Table of Contents

Class MultiNodeAnimation

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

Animates multiple nodes' positions simultaneously.

public class MultiNodeAnimation : IAnimation
Inheritance
MultiNodeAnimation
Implements
Inherited Members

Constructors

MultiNodeAnimation(IReadOnlyDictionary<Node, Point>, double, Func<double, double>?, Action?)

Creates a new multi-node position animation.

public MultiNodeAnimation(IReadOnlyDictionary<Node, Point> nodePositions, double duration = 0.3, Func<double, double>? easing = null, Action? onComplete = null)

Parameters

nodePositions IReadOnlyDictionary<Node, Point>

Dictionary mapping nodes to their target positions.

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.