Documentation
    Preparing search index...

    Interface AnimationTransition

    One authored edge of the state machine (§18 transitions).

    interface AnimationTransition {
        allowSelf?: boolean;
        duration?: number;
        exitTime?: number;
        from: string;
        interruptible?: boolean;
        to: string;
        when?: TransitionWhen;
    }
    Index
    allowSelf?: boolean

    Whether a wildcard (from: "*") may fire as a self-transition. Named from/to pairs that name the same state are always allowed (they are authored self-transitions). Default false.

    duration?: number

    Cross-fade length in seconds (§7a). Default 0, which switches the pose on the step the transition fires. Finite and >= 0.

    exitTime?: number

    Seconds of source-state time that must have elapsed before the transition becomes eligible (§18 "exit time"). Default 0. Finite and >= 0.

    Deliberately seconds rather than the normalized fraction other engines use: §7a admits no other unit. Write clip.duration * 0.8 for "80% through".

    from: string

    Source state name, or ANY_STATE ("*") for an any-state edge. A named source must be declared in states.

    interruptible?: boolean

    Whether another transition may interrupt this one while it cross-fades. Default true. See the module header on what interruption does to the outgoing pose.

    to: string

    Destination state name; must be declared in states.

    Predicates that must all hold for the transition to be eligible. Absent or empty is vacuously true — pair it with AnimationTransition.exitTime to sequence states automatically.

    A string is sugar for one predicate ("speed > 0.1", "grounded"); an array ANDs its entries. See ./when.js for the grammar.