Struct AnimationSequenceControls
- Namespace
- Velvet
- Assembly
- Velvet.Docs.dll
Imperative controls for a sequence started by UseAnimationSequence(IReadOnlyList<AnimationSequenceStep>, object?[]?, bool, bool), Framer Motion's
sequence playback controls. They drive the sequence's own timeline — its step cursor and clock — and the
Spring and Bezier plays its steps' labels start on a V.Motion handed
CurrentTransition: see the motion guide's Timelines section for what
each reaches.
public readonly struct AnimationSequenceControls
Properties
- Cancel
Stops the sequence, Framer Motion's
cancel(): the cursor stays where it is, and eachSpringorBezierplay its steps started returns to the values it started from and stops there, without its completion running. Play starts the sequence again from step 0.
- Pause
Freezes the cursor at its current step — elapsed time stops accumulating toward the next hold — and holds the
SpringandBezierplays its steps started where they are.
- Play
Resumes advancing (idempotent), the cursor and the
SpringandBezierplays its steps started alike. Also whatautoplay: truestarts with on mount. After Cancel, starts the sequence again from step 0.
- Restart
Returns to step 0 and re-commits its effect (firing a
Callstep 0's callback again). Does not implicitly unpause.
- Speed
The rate the timeline and the
SpringandBezierplays its steps started advance at, delays included, Framer Motion'sspeed: 1 by default, 2 twice as fast, 0.5 half as fast, and 0 holds both where they are. Setting it re-times the running plays from the next frame. Throws System.ArgumentOutOfRangeException for a negative, NaN or infinite value.
- TimeSec
Seconds into the sequence's timeline, counting each step's hold at its authored length. Read live, not per render; the motion guide's Timelines section owns the rest.