platformer - v1.0.0
    Preparing search index...

    Component for rendering and updating animated sprites. Stores animation state and playback information.

    interface default {
        animations: Record<string, SpriteAnimation>;
        currentAnimation: string;
        currentFrame: number;
        elapsedTime: number;
        flipX: boolean;
        image: HTMLImageElement;
        loop: boolean;
        size: Size;
    }
    Index

    Properties

    animations: Record<string, SpriteAnimation>

    Map of animation names to their configuration.

    currentAnimation: string

    Currently active animation key.

    currentFrame: number

    Current frame index within the animation.

    elapsedTime: number

    Accumulated time used to advance animation frames.

    flipX: boolean

    Whether the sprite should be flipped horizontally.

    image: HTMLImageElement

    Source spritesheet image.

    loop: boolean

    Whether the current animation should loop.

    size: Size

    Rendered size of the sprite.