Class InterpolateValueAction
Hierarchy (View Summary)
- Action
- InterpolateValueAction
Constructors
constructor
-
new InterpolateValueAction(
triggerOptions: any,
target: any,
propertyPath: string,
value: any,
duration?: number,
condition?: Condition,
stopOtherAnimations?: boolean,
onInterpolationDone?: () => void,
): InterpolateValueActionInstantiate the action
Parameters
- triggerOptions: any
defines the trigger options
- target: any
defines the object containing the value to interpolate
- propertyPath: string
defines the path to the property in the target object
- value: any
defines the target value at the end of the interpolation
- duration: number = 1000
defines the time it will take for the property to interpolate to the value.
Optionalcondition: Conditiondefines the trigger related conditions
OptionalstopOtherAnimations: booleandefines if the other scene animations should be stopped when the action has been triggered
OptionalonInterpolationDone: () => voiddefines a callback raised once the interpolation animation has been done
Returns InterpolateValueAction
- triggerOptions: any
Properties
duration
Defines the time it will take for the property to interpolate to the value.
on Before Execute Observable
An event triggered prior to action being executed.
Optionalon Interpolation Done
Defines a callback raised once the interpolation animation has been done.
on Interpolation Done Observable
Observable triggered once the interpolation animation has been done.
property Path
Defines the path of the property where the value should be interpolated
Optionalstop Other Animations
Defines if the other scene animations should be stopped when the action has been triggered
trigger
Trigger for the action
trigger Options
the trigger, with or without parameters, for the action
value
Defines the target value at the end of the interpolation.
Methods
execute
-
Execute the action starts the value interpolation.
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 change the value of a property by interpolating between its current value and the newly set one once triggered.
See
https://doc.babylonjs.com/features/featuresDeepDive/events/actions