Skip to content

SpriteAnimator

Defined in: src/modules/animation/sprite-clip.ts:66

Per-entity playback state for a SpriteClip selected by clip key. Holds only the cursor and play/pause flag; the frames themselves live in the SpriteClipRegistry.

clip: string

Defined in: src/modules/animation/sprite-clip.ts:68

The registry key of the clip being played.


currentIndex: number

Defined in: src/modules/animation/sprite-clip.ts:70

Mutable: index into the clip’s frames of the current frame.


elapsedMs: number

Defined in: src/modules/animation/sprite-clip.ts:72

Mutable: elapsed time accumulator in ms.


playing: boolean

Defined in: src/modules/animation/sprite-clip.ts:74

false pauses playback; the cursor holds its position.