• Public
  • Public/Protected
  • All

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.








  • Creates a new action manager


    Returns ActionManager


actionsSearch playground for actions

actions: IAction[]

Gets the list of actions

hoverCursorSearch playground for hoverCursor

hoverCursor: string

Gets the cursor to use when hovering items

isRecursiveSearch playground for isRecursive

isRecursive: boolean

Gets or sets a boolean indicating that the manager is recursive meaning that it can trigger action from children

Static Readonly NothingTriggerSearch playground for NothingTrigger

NothingTrigger: 0 = 0

Static Readonly OnCenterPickTriggerSearch playground for OnCenterPickTrigger

OnCenterPickTrigger: 4 = 4

Static Readonly OnDoublePickTriggerSearch playground for OnDoublePickTrigger

OnDoublePickTrigger: 6 = 6

Static Readonly OnEveryFrameTriggerSearch playground for OnEveryFrameTrigger

OnEveryFrameTrigger: 11 = 11

Static Readonly OnIntersectionEnterTriggerSearch playground for OnIntersectionEnterTrigger

OnIntersectionEnterTrigger: 12 = 12

Static Readonly OnIntersectionExitTriggerSearch playground for OnIntersectionExitTrigger

OnIntersectionExitTrigger: 13 = 13

Static Readonly OnKeyDownTriggerSearch playground for OnKeyDownTrigger

OnKeyDownTrigger: 14 = 14

Static Readonly OnKeyUpTriggerSearch playground for OnKeyUpTrigger

OnKeyUpTrigger: 15 = 15

Static Readonly OnLeftPickTriggerSearch playground for OnLeftPickTrigger

OnLeftPickTrigger: 2 = 2

Static Readonly OnLongPressTriggerSearch playground for OnLongPressTrigger

OnLongPressTrigger: 8 = 8

Static Readonly OnPickDownTriggerSearch playground for OnPickDownTrigger

OnPickDownTrigger: 5 = 5

Static Readonly OnPickOutTriggerSearch playground for OnPickOutTrigger

OnPickOutTrigger: 16 = 16

On pick out. This trigger will only be raised if you also declared a OnPickDown



Static Readonly OnPickTriggerSearch playground for OnPickTrigger

OnPickTrigger: 1 = 1

Static Readonly OnPickUpTriggerSearch playground for OnPickUpTrigger

OnPickUpTrigger: 7 = 7

Static Readonly OnPointerOutTriggerSearch playground for OnPointerOutTrigger

OnPointerOutTrigger: 10 = 10

Static Readonly OnPointerOverTriggerSearch playground for OnPointerOverTrigger

OnPointerOverTrigger: 9 = 9

Static Readonly OnRightPickTriggerSearch playground for OnRightPickTrigger

OnRightPickTrigger: 3 = 3

Static TriggersSearch playground for Triggers

Triggers: {}

Gets the list of active triggers

Type declaration

  • [key: string]: number



  • get hasPickTriggers(): boolean


  • get hasPointerTriggers(): boolean

Static HasPickTriggers

  • get HasPickTriggers(): boolean

Static HasTriggers

  • get HasTriggers(): boolean
  • Does exist one action manager with at least one trigger

    Returns boolean


disposeSearch playground for dispose

  • dispose(): void

getSceneSearch playground for getScene

  • Gets hosting scene

    Returns Scene

    the hosting scene

hasSpecificTriggerSearch playground for hasSpecificTrigger

  • hasSpecificTrigger(trigger: number, parameterPredicate?: (parameter: any) => boolean): boolean
  • Does this action manager handles actions of a given trigger


    • trigger: number

      defines the trigger to be tested

    • Optional parameterPredicate: (parameter: any) => boolean

      defines an optional predicate to filter triggers by parameter

        • (parameter: any): boolean
        • Parameters

          • parameter: any

          Returns boolean

    Returns boolean

    whether the trigger is handled

hasSpecificTriggersSearch playground for hasSpecificTriggers

  • hasSpecificTriggers(triggers: number[]): boolean
  • Does this action manager handles actions of any of the given triggers


    • triggers: number[]

      defines the triggers to be tested

    Returns boolean

    a boolean indicating whether one (or more) of the triggers is handled

hasSpecificTriggers2Search playground for hasSpecificTriggers2

  • hasSpecificTriggers2(triggerA: number, triggerB: number): boolean
  • Does this action manager handles actions of any of the given triggers. This function takes two arguments for speed.


    • triggerA: number

      defines the trigger to be tested

    • triggerB: number

      defines the trigger to be tested

    Returns boolean

    a boolean indicating whether one (or more) of the triggers is handled

processTriggerSearch playground for processTrigger

  • Process a specific trigger


    • trigger: number

      defines the trigger to process

    • Optional evt: IActionEvent

      defines the event details to be processed

    Returns void

registerActionSearch playground for registerAction

serializeSearch playground for serialize

  • serialize(name: string): any
  • Serialize this manager to a JSON object


    • name: string

      defines the property name to store this manager

    Returns any

    a JSON representation of this manager

unregisterActionSearch playground for unregisterAction

  • unregisterAction(action: IAction): Boolean
  • Unregisters an action to this action manager


    • action: IAction

      defines the action to be unregistered

    Returns Boolean

    a boolean indicating whether the action has been unregistered

Static GetTriggerNameSearch playground for GetTriggerName

  • GetTriggerName(trigger: number): string
  • Get a trigger name by index


    • trigger: number

      defines the trigger index

    Returns string

    a trigger name

Static HasSpecificTriggerSearch playground for HasSpecificTrigger

  • HasSpecificTrigger(trigger: number): boolean
  • Does exist one action manager that handles actions of a given trigger


    • trigger: number

      defines the trigger to be tested

    Returns boolean

    a boolean indicating whether the trigger is handled by at least one action manager

Static ParseSearch playground for Parse

  • Creates a new ActionManager from a JSON data


    • parsedActions: any

      defines the JSON data to read from

    • object: Nullable<AbstractMesh>

      defines the hosting mesh

    • scene: Scene

      defines the hosting scene

    Returns void


  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method