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)

Parameters

Name Type Description
scene Scene

Members

static NothingTrigger : number

static OnPickTrigger : number

static OnLeftPickTrigger : number

static OnRightPickTrigger : number

static OnCenterPickTrigger : number

static OnPickDownTrigger : number

static OnDoublePickTrigger : number

static OnPickUpTrigger : number

static OnPickOutTrigger : number

static OnLongPressTrigger : number

static OnPointerOverTrigger : number

static OnPointerOutTrigger : number

static OnEveryFrameTrigger : number

static OnIntersectionEnterTrigger : number

static OnIntersectionExitTrigger : number

static OnKeyDownTrigger : number

static OnKeyUpTrigger : number

static Triggers : { [key: string]: number }

actions : Action[]

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

static HasTriggers : boolean

Does exist one action manager with at least one trigger

@return {boolean} whether or not it exists one action manager with one trigger

static HasPickTriggers : boolean

Does exist one action manager with at least one pick trigger

@return {boolean} whether or not it exists one action manager with one pick trigger

Methods

dispose() void

getScene() Scene

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[]

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

static HasSpecificTrigger(trigger) boolean

Does exist one action manager that handles actions of a given trigger

@return {boolean} whether the trigger is handeled by at least one action manager

Parameters

Name Type Description
trigger number

registerAction(action) Nullable<Action>

Registers an action to this action manager

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

Parameters

Name Type Description
action Action

processTrigger(trigger, evt) void

Process a specific trigger

Parameters

Name Type Description
trigger number
optional evt ActionEvent {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 Nullable<AbstractMesh>
scene Scene

static GetTriggerName(trigger) string

Parameters

Name Type Description
trigger number