Class EdgePulseAnimation
Animates an edge's stroke thickness for pulse/highlight effects.
public class EdgePulseAnimation : IAnimation
- Inheritance
-
EdgePulseAnimation
- Implements
- Inherited Members
Constructors
EdgePulseAnimation(Edge, double, double, double, double, Action<Edge, double>?, Action?)
Creates a new edge pulse animation.
public EdgePulseAnimation(Edge edge, double baseThickness = 2, double pulseAmount = 2, double frequency = 2, double duration = 1, Action<Edge, double>? onUpdate = null, Action? onComplete = null)
Parameters
edgeEdgeThe edge to animate.
baseThicknessdoubleBase stroke thickness.
pulseAmountdoubleAmount to add during pulse (thickness oscillates between base and base+pulseAmount).
frequencydoublePulse frequency in Hz.
durationdoubleTotal animation duration in seconds.
onUpdateAction<Edge, double>Callback called each frame with the edge and current thickness.
onCompleteActionCallback when animation completes.
Properties
CurrentThickness
Gets the current thickness value.
public double CurrentThickness { get; }
Property Value
IsComplete
Gets whether the animation has completed.
public bool IsComplete { get; }
Property Value
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
deltaTimedoubleTime elapsed since last update in seconds.