Options
All
  • Public
  • Public/Protected
  • All
Menu

This defines an action responsible to start an animation once triggered.

see

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

Hierarchy

Index

Constructors

  • new PlayAnimationAction(triggerOptions: any, target: any, from: number, to: number, loop?: boolean, condition?: Condition): PlayAnimationAction
  • Instantiate the action

    Parameters

    • triggerOptions: any

      defines the trigger options

    • target: any

      defines the target animation or animation name

    • from: number

      defines from where the animation should start (animation frame)

    • to: number

      defines where the animation should stop (animation frame)

    • Optional loop: boolean

      defines if the animation should loop or stop after the first play

    • Optional condition: Condition

      defines the trigger related conditions

    Returns PlayAnimationAction

Properties

_actionManager: ActionManager

Internal only - manager for action

internal
from: number

Where the animation should start (animation frame)

loop?: boolean

Define if the animation should loop or stop after the first play.

onBeforeExecuteObservable: Observable<Action>

An event triggered prior to action being executed.

to: number

Where the animation should stop (animation frame)

trigger: number

Trigger for the action

triggerOptions: any

the trigger, with or without parameters, for the action

_GetTargetProperty: ((target: Scene | Node) => { name: string; targetType: string; value: string })

Type declaration

    • (target: Scene | Node): { name: string; targetType: string; value: string }
    • Internal only

      internal

      Parameters

      Returns { name: string; targetType: string; value: string }

      • name: string
      • targetType: string
      • value: string
_SerializeValueAsString: ((value: any) => string)

Type declaration

    • (value: any): string
    • Internal only

      internal

      Parameters

      • value: any

      Returns string

Methods

  • _evaluateConditionForCurrentFrame(): boolean
  • Internal only - Returns if the current condition allows to run the action

    internal

    Returns boolean

  • Internal only - executes current action event

    internal

    Parameters

    Returns void

  • _getEffectiveTarget(target: any, propertyPath: string): any
  • internal

    Parameters

    • target: any
    • propertyPath: string

    Returns any

  • _getProperty(propertyPath: string): string
  • Internal only

    internal

    Parameters

    • propertyPath: string

    Returns string

  • _prepare(): void
  • internal

    Returns void

  • execute(): void
  • Execute the action and play the animation.

    Returns void

  • getTriggerParameter(): any
  • Gets the trigger parameter

    Returns any

    the trigger parameter

  • serialize(parent: any): any
  • Serializes the actions and its related information.

    Parameters

    • parent: any

      defines the object to serialize in

    Returns any

    the serialized object

  • setTriggerParameter(value: any): void
  • Sets the trigger parameter

    Parameters

    • value: any

      defines the new trigger parameter

    Returns void

  • skipToNextActiveAction(): void

Legend

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

Settings

Theme