dino-ge
    Preparing search index...

    Component that holds data for rendering an animated sprite.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    cols: number

    Number of columns in the spritesheet.

    currentFrame: number = 0

    The current frame index being displayed.

    endCol: number

    The ending column for the current animation loop.

    flip: boolean = false

    Whether the sprite is horizontally flipped.

    frameDuration: number = 100

    Duration of each animation frame in milliseconds.

    frameHeight: number = 0

    The pixel height of a single animation frame.

    frameWidth: number = 0

    The pixel width of a single animation frame.

    gameObject?: default

    Reference to the GameObject this component is attached to.

    img: HTMLImageElement

    The source image for the sprite.

    playing: boolean = false

    Whether the sprite is currently playing its animation.

    rows: number

    Number of rows in the spritesheet.

    startCol: number

    The starting column for the current animation loop.

    Methods