Options
All
  • Public
  • Public/Protected
  • All
Menu

Class InterpolateValueAction

This defines an action responsible to change the value of a property by interpolating between its current value and the newly set one once triggered.

see

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

Hierarchy

  • Action
    • InterpolateValueAction

Implements

Index

Constructors

constructor

  • new InterpolateValueAction(triggerOptions: any, target: any, propertyPath: string, value: any, duration?: number, condition?: Condition, stopOtherAnimations?: boolean, onInterpolationDone?: () => void): InterpolateValueAction
  • Instantiate the action

    Parameters

    • triggerOptions: any

      defines the trigger options

    • target: any

      defines the object containing the value to interpolate

    • propertyPath: string

      defines the path to the property in the target object

    • value: any

      defines the target value at the end of the interpolation

    • Optional duration: number

      defines the time it will take for the property to interpolate to the value.

    • Optional condition: Condition

      defines the trigger related conditions

    • Optional stopOtherAnimations: boolean

      defines if the other scene animations should be stopped when the action has been triggered

    • Optional onInterpolationDone: () => void

      defines a callback raised once the interpolation animation has been done

        • (): void
        • Returns void

    Returns InterpolateValueAction

Properties

durationSearch playground for duration

duration: number

Defines the time it will take for the property to interpolate to the value.

onBeforeExecuteObservableSearch playground for onBeforeExecuteObservable

onBeforeExecuteObservable: Observable<Action>

An event triggered prior to action being executed.

Optional onInterpolationDoneSearch playground for onInterpolationDone

onInterpolationDone: () => void

Defines a callback raised once the interpolation animation has been done.

Type declaration

    • (): void
    • Returns void

onInterpolationDoneObservableSearch playground for onInterpolationDoneObservable

onInterpolationDoneObservable: Observable<InterpolateValueAction>

Observable triggered once the interpolation animation has been done.

propertyPathSearch playground for propertyPath

propertyPath: string

Defines the path of the property where the value should be interpolated

Optional stopOtherAnimationsSearch playground for stopOtherAnimations

stopOtherAnimations: boolean

Defines if the other scene animations should be stopped when the action has been triggered

triggerSearch playground for trigger

trigger: number

Trigger for the action

triggerOptionsSearch playground for triggerOptions

triggerOptions: any

the trigger, with or without parameters, for the action

valueSearch playground for value

value: any

Defines the target value at the end of the interpolation.

Methods

executeSearch playground for execute

  • execute(): void
  • Execute the action starts the value interpolation.

    Returns void

getTriggerParameterSearch playground for getTriggerParameter

  • getTriggerParameter(): any

serializeSearch playground for serialize

  • 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

setTriggerParameterSearch playground for setTriggerParameter

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

    Parameters

    • value: any

      defines the new trigger parameter

    Returns void

skipToNextActiveActionSearch playground for skipToNextActiveAction

  • skipToNextActiveAction(): void

thenSearch playground for then

Legend

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