Options
All
  • Public
  • Public/Protected
  • All
Menu

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.

see

https://doc.babylonjs.com/how_to/how_to_use_actions

Hierarchy

Index

Constructors

Properties

actions: IAction[]

Gets the list of actions

hoverCursor: string

Gets the cursor to use when hovering items

isRecursive: boolean

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

NothingTrigger: 0 = 0
OnCenterPickTrigger: 4 = 4
OnDoublePickTrigger: 6 = 6
OnEveryFrameTrigger: 11 = 11
OnIntersectionEnterTrigger: 12 = 12
OnIntersectionExitTrigger: 13 = 13
OnKeyDownTrigger: 14 = 14
OnKeyUpTrigger: 15 = 15
OnLeftPickTrigger: 2 = 2
OnLongPressTrigger: 8 = 8
OnPickDownTrigger: 5 = 5
OnPickOutTrigger: 16 = 16

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

see

https://doc.babylonjs.com/how_to/how_to_use_actions#triggers

OnPickTrigger: 1 = 1
OnPickUpTrigger: 7 = 7
OnPointerOutTrigger: 10 = 10
OnPointerOverTrigger: 9 = 9
OnRightPickTrigger: 3 = 3
Triggers: {}

Gets the list of active triggers

Type declaration

  • [key: string]: number

Accessors

  • get hasPickTriggers(): boolean
  • Does this action manager has pick triggers

    Returns boolean

  • get hasPointerTriggers(): boolean
  • Does this action manager has pointer triggers

    Returns boolean

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

    Returns boolean

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

    Returns boolean

Methods

  • dispose(): void
  • Gets hosting scene

    Returns Scene

    the hosting scene

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

    Parameters

    • 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

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

    Parameters

    • triggers: number[]

      defines the triggers to be tested

    Returns boolean

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

  • 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.

    Parameters

    • 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

  • Process a specific trigger

    Parameters

    • trigger: number

      defines the trigger to process

    • Optional evt: IActionEvent

      defines the event details to be processed

    Returns void

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

    Parameters

    • name: string

      defines the property name to store this manager

    Returns any

    a JSON representation of this manager

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

    Parameters

    • action: IAction

      defines the action to be unregistered

    Returns Boolean

    a boolean indicating whether the action has been unregistered

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

    Parameters

    • trigger: number

      defines the trigger index

    Returns string

    a trigger name

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

    Parameters

    • trigger: number

      defines the trigger to be tested

    Returns boolean

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

  • Creates a new ActionManager from a JSON data

    Parameters

    • parsedActions: any

      defines the JSON data to read from

    • object: Nullable<AbstractMesh>

      defines the hosting mesh

    • scene: Scene

      defines the hosting scene

    Returns void

Legend

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

Settings

Theme