Class NodeAppearAnimation
Combines fade and scale for a complete appear/disappear effect.
public class NodeAppearAnimation : IAnimation
- Inheritance
-
NodeAppearAnimation
- Implements
- Inherited Members
Constructors
NodeAppearAnimation(Node, bool, double, Action<Node, double, double>?, Action?)
Creates a new node appear/disappear animation.
public NodeAppearAnimation(Node node, bool appearing, double duration = 0.3, Action<Node, double, double>? onUpdate = null, Action? onComplete = null)
Parameters
nodeNodeThe node to animate.
appearingboolTrue for appear animation, false for disappear.
durationdoubleAnimation duration in seconds.
onUpdateAction<Node, double, double>Callback with (node, opacity, scale).
onCompleteActionCallback when animation completes.
Properties
CurrentOpacity
Gets the current opacity value.
public double CurrentOpacity { get; }
Property Value
CurrentScale
Gets the current scale value.
public double CurrentScale { get; }
Property Value
IsComplete
Gets whether the animation has completed.
public bool IsComplete { get; }
Property Value
Methods
Appear(Node, double, Action<Node, double, double>?, Action?)
Creates an appear animation for a node.
public static NodeAppearAnimation Appear(Node node, double duration = 0.3, Action<Node, double, double>? onUpdate = null, Action? onComplete = null)
Parameters
Returns
Cancel()
Called when the animation completes or is cancelled.
public void Cancel()
Disappear(Node, double, Action<Node, double, double>?, Action?)
Creates a disappear animation for a node.
public static NodeAppearAnimation Disappear(Node node, double duration = 0.2, Action<Node, double, double>? onUpdate = null, Action? onComplete = null)
Parameters
Returns
Update(double)
Updates the animation with the elapsed time since the last frame.
public void Update(double deltaTime)
Parameters
deltaTimedoubleTime elapsed since last update in seconds.