Class ExecuteCodeAction
Hierarchy (View Summary)
- Action
- ExecuteCodeAction
Constructors
constructor
-
new ExecuteCodeAction(
triggerOptions: any,
func: (evt: ActionEvent) => void,
condition?: Condition,
): ExecuteCodeActionInstantiate the action
Parameters
- triggerOptions: any
defines the trigger options
- func: (evt: ActionEvent) => void
defines the callback function to run
Optionalcondition: Conditiondefines the trigger related conditions
Returns ExecuteCodeAction
- triggerOptions: any
Properties
func
The callback function to run.
on Before Execute Observable
An event triggered prior to action being executed.
trigger
trigger: number
Trigger for the action
trigger Options
triggerOptions: any
the trigger, with or without parameters, for the action
Methods
execute
-
Execute the action and run the attached code.
Parameters
- evt: ActionEvent
event to execute
Returns void
- evt: ActionEvent
get Trigger Parameter
-
Gets the trigger parameter
Returns any
the trigger parameter
serialize
-
Serialize placeholder for child classes
Parameters
- parent: any
of child
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 run code (external event) once triggered.
See
https://doc.babylonjs.com/features/featuresDeepDive/events/actions