melonJS
    Preparing search index...

    Interface AnimationOptions

    Normalized options for a played animation, shared by the 2D Sprite frame-animation path and the 3D Mesh keyframe-animation path so both accept the same setCurrentAnimation(name, …) second argument.

    interface AnimationOptions {
        loop: boolean;
        next?: string;
        onComplete?: () => unknown;
        speed: number;
    }
    Index
    loop: boolean

    loop forever (default) or play once and hold the last frame.

    next?: string

    name of an animation to switch to when this one finishes.

    onComplete?: () => unknown

    called when the animation completes a cycle (each loop, or once if loop: false).

    speed: number

    playback rate multiplier (1 = authored speed).