mwg API
    Preparing search index...

    Interface AnimationFrame

    One frame, with its own timing and its own place.

    A frame may carry its own duration, which is what Wesnoth writes as image=a.png:120,b.png:80: a list of frames with how long each is held. It may also sit a few pixels away from where the sprite is - a recoil, a hit shake, a frame drawn high on purpose.

    interface AnimationFrame {
        duration?: number;
        offsetX?: number;
        offsetY?: number;
        texture: Texture;
    }
    Index
    duration?: number

    seconds this frame is held; without it, AnimationOptions.fps decides

    offsetX?: number

    pixels this frame is drawn away from the sprite's own position

    offsetY?: number
    texture: Texture