Skip to content

playClip

playClip(animator, clip, restart?): void

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

Switch animator to clip and (re)start it from frame 0. A no-op when the animator is already playing that clip, so calling it every tick from input handling does not stutter — pass restart: true to force a restart of the clip already playing. This is the supported way to change an animator’s clip; to pause or resume in place (keeping the cursor), toggle animator.playing.

SpriteAnimator

string

boolean = false

void