Table of Contents

Class NodeAnimation

Namespace
FlowGraph.Avalonia.Animation
Assembly
FlowGraph.Avalonia.dll

Animates a node's position.

public class NodeAnimation : IAnimation
Inheritance
NodeAnimation
Implements
Inherited Members

Constructors

NodeAnimation(Node, Point, double, Func<double, double>?, Action?)

Creates a new node position animation.

public NodeAnimation(Node node, Point targetPosition, double duration = 0.3, Func<double, double>? easing = null, Action? onComplete = null)

Parameters

node Node

The node to animate.

targetPosition Point

Target position.

duration double

Animation duration in seconds.

easing Func<double, double>

Easing function (defaults to EaseOutCubic).

onComplete Action

Callback when animation completes.

Properties

IsComplete

Gets whether the animation has completed.

public bool IsComplete { get; }

Property Value

bool

Methods

Cancel()

Called when the animation completes or is cancelled.

public void Cancel()

Update(double)

Updates the animation with the elapsed time since the last frame.

public void Update(double deltaTime)

Parameters

deltaTime double

Time elapsed since last update in seconds.