API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classTweenSequencer

@codexo/exojs / animation / stable

Composes multiple Tween instances into a multi-stage animation. Each stage added via TweenSequencer.then plays after the previous one finishes. Within a single stage, multiple tweens run simultaneously (parallel); the stage advances when **all** of them complete. Delay stages inserted via TweenSequencer.wait create a timed pause between stages without needing a dummy tween. The sequencer integrates with TweenSystem via TweenSystem.addTicker so it is driven automatically each frame. It can also be used stand-alone by calling TweenSequencer.update manually - in that mode the sequencer also advances its child tweens.

2
props
11
methods
0
events
Import
import { TweenSequencer } from '@codexo/exojs'

Composes multiple Tween instances into a multi-stage animation.

Each stage added via TweenSequencer.then plays after the previous one finishes. Within a single stage, multiple tweens run simultaneously (parallel); the stage advances when **all** of them complete.

Delay stages inserted via TweenSequencer.wait create a timed pause between stages without needing a dummy tween.

The sequencer integrates with TweenSystem via TweenSystem.addTicker so it is driven automatically each frame. It can also be used stand-alone by calling TweenSequencer.update manually - in that mode the sequencer also advances its child tweens.

Constructors1
Methods11
onComplete(cb: () => void): this
Register a callback fired when the sequence finishes naturally (all stages and repeat cycles exhausted). Does NOT fire when stopped via TweenSequencer.stop.
onStart(cb: () => void): this
Register a callback fired once on the first TweenSequencer.update call after TweenSequencer.start.
pause(): this
Pause the sequence. Tweens in the current stage are also paused. The elapsed timer in delay stages is frozen.
repeat(count: number): this
Number of additional repeat cycles. -1 = infinite. Default 0 (plays once). repeat(2) plays the full sequence three times total (initial pass + 2 repeats).
resume(): this
Resume a paused sequence (and its current-stage tweens) from where they left off.
start(): this
Start (or restart) the sequence from stage 0. Resets all internal state and re-registers with the system if one is attached.
stop(): this
Stop the sequence without finishing. Active tweens are stopped. TweenSequencer.onComplete does NOT fire. The sequencer is removed from its system if one is assigned.
Append a stage to the sequence. - **Single tween**: the stage plays that tween, then advances. - **Array of tweens**: all start simultaneously; the stage advances when every tween in the array has completed.
update(deltaSeconds: number): void
Advance the sequencer by deltaSeconds. Called automatically by the attached TweenSystem each frame. When used stand-alone (no system), call this manually and child tweens will also be advanced.
wait(seconds: number): this
Insert a fixed pause of seconds between stages.
yoyo(enabled: boolean): this
Reverse stage order on each repeat cycle. Only meaningful when combined with TweenSequencer.repeat.
Properties2
progress: number
Playback progress in 0..1, advancing in discrete steps as each stage completes. Equals 1 when the entire sequence has finished.
Source