Class PlayAnimationAction
Hierarchy (View Summary)
- Action
- PlayAnimationAction
Constructors
constructor
-
new PlayAnimationAction(
triggerOptions: any,
target: any,
from: number,
to: number,
loop?: boolean,
condition?: Condition,
): PlayAnimationActionInstantiate the action
Parameters
- triggerOptions: any
defines the trigger options
- target: any
defines the target animation or animation name
- from: number
defines from where the animation should start (animation frame)
- to: number
defines where the animation should stop (animation frame)
Optionalloop: booleandefines if the animation should loop or stop after the first play
Optionalcondition: Conditiondefines the trigger related conditions
Returns PlayAnimationAction
- triggerOptions: any
Properties
from
Where the animation should start (animation frame)
Optionalloop
Define if the animation should loop or stop after the first play.
on Before Execute Observable
An event triggered prior to action being executed.
to
Where the animation should stop (animation frame)
trigger
Trigger for the action
trigger Options
the trigger, with or without parameters, for the action
Methods
execute
-
Execute the action and play the animation.
Returns void
get Trigger Parameter
-
Gets the trigger parameter
Returns any
the trigger parameter
serialize
-
Serializes the actions and its related information.
Parameters
- parent: any
defines the object to serialize in
Returns any
the serialized object
- parent: any
set Trigger Parameter
-
Sets the trigger parameter
Parameters
- value: any
defines the new trigger parameter
Returns void
- value: any
skip To Next Active Action
-
Skips to next active action
Returns void
This defines an action responsible to start an animation once triggered.
See
https://doc.babylonjs.com/features/featuresDeepDive/events/actions