API

Interface SpriteAnimationTarget

Abstracts the sprite a frame animation drives, decoupling the animation core from each sprite family.

interface SpriteAnimationTarget {
    isAlive?: () => boolean;
    remove?: () => void;
    setFrame: (frame: number) => void;
}
Index
isAlive?: () => boolean

Optional. Returns false when the target no longer exists, stopping the animation.

remove?: () => void

Optional. Removes the target from its system, used when removeWhenFinished is set.

setFrame: (frame: number) => void

Sets the target's current atlas frame.