mwg API
    Preparing search index...

    Interface AnimationOptions

    interface AnimationOptions {
        fps?: number;
        loop?: boolean;
        startTime?: number;
    }
    Index
    fps?: number

    frames per second: the duration of every frame that does not carry one of its own

    loop?: boolean

    whether to start again at the end, or hold on the last frame

    startTime?: number

    Seconds into its own timeline this animation starts at. Positive holds the first frame that much longer, negative skips that much of the leading frames. The negative case is not a quirk: it is how Wesnoth lines an attack animation up with the frame the damage lands on, by starting mid-swing (start_time=-450 over frames of 100ms each skips four and a half of them). The offset applies once, when playback starts; a looping animation then cycles on the frames' own length, so the delay does not repeat every lap.