Skip to main content

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

Animation

the animation to transition to

conditions

AnimationCondition[]

the list of animation conditions

metadata?

Partial<TransitionMetadata>

the optional transition metadata

Returns

AnimationTransition

Properties

conditionMustBeTrueAtTheEndOfTheAnimation

readonly conditionMustBeTrueAtTheEndOfTheAnimation: 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

readonly finishCurrentAnimationBeforeTransitioning: 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

AnimationInputs

the current animation inputs

Returns

boolean

true if all conditions are met, false otherwise