Engine API Reference - v2.6.1
    Preparing search index...

    Class AnimTransition

    AnimTransitions represent connections in the controllers state graph between AnimStates. During each frame, the controller tests to see if any of the AnimTransitions have the current AnimState as their source (from) state. If so and the AnimTransitions parameter based conditions are met, the controller will transition to the destination state.

    Index

    Constructors

    Constructors

    • Create a new AnimTransition.

      Parameters

      • options: {
            conditions?: any[];
            exitTime?: number;
            from: string;
            interruptionSource?: string;
            priority?: number;
            time?: number;
            to: string;
            transitionOffset?: number;
        }

        Options.

        • Optionalconditions?: any[]

          A list of conditions which must pass for this transition to be used. Defaults to [].

        • OptionalexitTime?: number

          If provided, this transition will only be active for the exact frame during which the source states progress passes the time specified. Given as a normalized value of the source states duration. Values less than 1 will be checked every animation loop. Defaults to null.

        • from: string

          The state that this transition will exit from.

        • OptionalinterruptionSource?: string

          Defines whether another transition can interrupt this one and which of the current or previous states transitions can do so. One of pc.ANIM_INTERRUPTION_*. Defaults to pc.ANIM_INTERRUPTION_NONE.

        • Optionalpriority?: number

          Used to sort all matching transitions in ascending order. The first transition in the list will be selected. Defaults to 0.

        • Optionaltime?: number

          The duration of the transition in seconds. Defaults to 0.

        • to: string

          The state that this transition will transition to.

        • OptionaltransitionOffset?: number

          If provided, the destination state will begin playing its animation at this time. Given in normalized time, based on the state's duration and must be between 0 and 1. Defaults to null.

      Returns AnimTransition