Class: AnimationTransition
Defined in: animations/types/AnimationTransition.ts:33
Class to manage transitions between animation states in the animation controller
Constructors
Constructor
new AnimationTransition(
fromStates,toAnimation,conditions,metadata?):AnimationTransition
Defined in: animations/types/AnimationTransition.ts:67
Creates an instance of AnimationTransition
Parameters
fromStates
string[]
the list of states to transition from
toAnimation
the animation to transition to
conditions
the list of animation conditions
metadata?
Partial<TransitionMetadata>
the optional transition metadata
Returns
AnimationTransition
Properties
conditionMustBeTrueAtTheEndOfTheAnimation
readonlyconditionMustBeTrueAtTheEndOfTheAnimation:boolean
Defined in: animations/types/AnimationTransition.ts:50
conditions
conditions:
AnimationCondition[]
Defined in: animations/types/AnimationTransition.ts:46
An array of conditions that must be fulfilled for the transition to occur
finishCurrentAnimationBeforeTransitioning
readonlyfinishCurrentAnimationBeforeTransitioning:boolean
Defined in: animations/types/AnimationTransition.ts:49
fromStates
fromStates:
string[]
Defined in: animations/types/AnimationTransition.ts:37
An array of states the animation can be in for this transition to be considered
onAnimationChange
onAnimationChange:
OnAnimationChangeEvent
Defined in: animations/types/AnimationTransition.ts:58
A parameterized Forge Event that is raised when this transition occurs
Note: This event is NOT called on the first transition from the 'entry' state. This is a known limitation of the current implementation.
toAnimation
toAnimation:
Animation
Defined in: animations/types/AnimationTransition.ts:41
The animation to transition to when the conditions are fulfilled
Methods
validateConditions()
validateConditions(
animationInputs):boolean
Defined in: animations/types/AnimationTransition.ts:98
Validates whether all conditions for this transition are met based on the provided animation inputs
Parameters
animationInputs
the current animation inputs
Returns
boolean
true if all conditions are met, false otherwise