mwg API
    Preparing search index...

    Interface FlightOptions

    interface FlightOptions {
        animation?: Animation;
        duration?: number;
        fadeIn?: number | boolean | "progress";
        onArrive?: () => void;
        speed?: number;
        spin?: number;
        spinDegrees?: number;
        tint?: number;
    }

    Hierarchy (View Summary)

    Index
    animation?: Animation

    Flight frames for the missile art. The projectile advances this with its own elapsed time, so a caller reads frame/frameOffset here instead of keeping a second animation and an elapsed clock in step with the tween.

    duration?: number

    seconds to cross the whole flight; overrides speed when both are given

    fadeIn?: number | boolean | "progress"

    Seconds the sprite fades 0 to 1 from launch (a number), or 'progress'/true to ease 0 to 1 along the flight's own progress - the tween's own clock, so the fade cannot desynchronise from a duration the caller re-computed differently. 0, false or omitted means no fade.

    onArrive?: () => void

    Dispatched once, when this flight arrives - never on cancel() or clear(), and after the flight has left the list, so an arrival that launches another flight cannot disturb the iteration it arrived in.

    speed?: number

    world units per second; ignored if duration is given

    spin?: number

    radians per second added to the sprite's rotation while flying

    spinDegrees?: number

    spin in degrees per second instead - the same rotation, converted once here, so an authored angular speed needs no * Math.PI / 180 at the call site. Ignored when spin is given.

    tint?: number

    set once at launch, when the sprite takes a tint