CLASSES
TagsA - Z

ActionManager

Action

Description

class ActionManager

Action Manager manages all events to be triggered on a given mesh or the global scene.

A single scene can have many Action Managers to handle predefined actions on specific meshes.

Constructor

new ActionManager(scene)

See more about Actions here

Parameters

Name Type Description
scene Scene The scene which contains the new action manager

Members

static NothingTrigger : number

Nothing trigger

static OnPickTrigger : number

On pick trigger

static OnDoublePickTrigger : number

On double pick trigger

static OnLeftPickTrigger : number

On left pick trigger

static OnRightPickTrigger : number

On right pick trigger

static OnCenterPickTrigger : number

On center pick trigger

static OnPickDownTrigger : number

static OnPickUpTrigger : number

static OnPickOutTrigger : number

static OnLongPressTrigger : number

static OnPointerOverTrigger : number

On pointer over trigger

static OnPointerOutTrigger : number

On pointer out trigger

static OnEveryFrameTrigger : number

On every frame trigger

static OnIntersectionEnterTrigger : number

On intersection enter trigger

static OnIntersectionExitTrigger : number

On intersection exit trigger

static OnKeyDownTrigger : number

On key down trigger

static OnKeyUpTrigger : number

on key up trigger

actions : Action[]

The actions of the action manager

hoverCursor : string

hasPointerTriggers : boolean

Does this action manager has pointer triggers

@return {boolean} whether or not it has pointer triggers

hasPickTriggers : boolean

Does this action manager has pick triggers

@return {boolean} whether or not it has pick triggers

Methods

dispose() void

Delete the action manager

getScene() Scene

Get the scene which contains the action manager

hasSpecificTriggers(triggers) boolean

Does this action manager handles actions of any of the given triggers

@return {boolean} whether one (or more) of the triggers is handeled

Parameters

Name Type Description
triggers number[] @param triggers

hasSpecificTrigger(trigger) boolean

Does this action manager handles actions of a given trigger

@return {boolean} whether the trigger is handeled

Parameters

Name Type Description
trigger number The trigger

registerAction(action) Action

Registers an action to this action manager

@return {BABYLON.Action} the action amended (prepared) after registration

Parameters

Name Type Description
action Action The action to register

processTrigger(trigger, evt) void

Process a specific trigger

Parameters

Name Type Description
trigger number The trigger
evt ActionEvent {BABYLON.ActionEvent} the event details to be processed {BABYLON.ActionEvent} the event details to be processed {BABYLON.ActionEvent} the event details to be processed {BABYLON.ActionEvent} the event details to be processed {BABYLON.ActionEvent} the event details to be processed

serialize(name) any

Parameters

Name Type Description
name string

static Parse(parsedActions, object, scene) void

Parameters

Name Type Description
parsedActions any
object AbstractMesh
scene Scene The scene which contains the new action manager

static GetTriggerName(trigger) string

Parameters

Name Type Description
trigger number The trigger