dino-ge
    Preparing search index...

    Interface SpriteProps

    Configuration for creating a Sprite object.

    interface SpriteProps {
        __sourceId?: string;
        cols: number;
        endCol?: number;
        img: string | HTMLImageElement;
        physics?: {
            acceleration?: default;
            friction?: number;
            isSensor?: boolean;
            isStatic?: boolean;
            mass?: number;
            restitution?: number;
            velocity?: default;
        };
        position?: default;
        rows: number;
        scale?: number
        | default;
        startCol?: number;
        tag: string;
        visible?: boolean;
        zIndex?: number;
    }
    Index

    Properties

    __sourceId?: string

    Hidden identifier linking runtime object to its source code location.

    cols: number

    Number of columns in the spritesheet.

    endCol?: number

    Ending column index for the animation (0-based).

    img: string | HTMLImageElement

    Image instance or tag from ResourceLoader.

    physics?: {
        acceleration?: default;
        friction?: number;
        isSensor?: boolean;
        isStatic?: boolean;
        mass?: number;
        restitution?: number;
        velocity?: default;
    }

    Initial physics configuration.

    position?: default

    Initial position in world space.

    rows: number

    Number of rows in the spritesheet.

    scale?: number | default

    Scale factor (number or Vector2).

    startCol?: number

    Starting column index for the animation (0-based).

    tag: string

    Unique tag for the object.

    visible?: boolean

    Whether the sprite is initially visible.

    zIndex?: number

    Rendering order.