Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RuntimeAnimation

Defines a runtime animation

Hierarchy

  • RuntimeAnimation

Index

Constructors

constructor

  • Create a new RuntimeAnimation object

    Parameters

    • target: any

      defines the target of the animation

    • animation: Animation

      defines the source animation object

    • scene: Scene

      defines the hosting scene

    • host: Animatable

      defines the initiating Animatable

    Returns RuntimeAnimation

Accessors

animation

  • Gets the animation from the runtime animation

    Returns Animation

currentFrame

  • get currentFrame(): number
  • Gets the current frame of the runtime animation

    Returns number

currentValue

  • get currentValue(): any
  • Gets the current value of the runtime animation

    Returns any

isAdditive

  • get isAdditive(): boolean
  • Gets the additive state of the runtime animation

    Returns boolean

target

  • get target(): any
  • Gets the actual target of the runtime animation

    Returns any

targetPath

  • get targetPath(): string
  • Gets or sets the target path of the runtime animation

    Returns string

weight

  • get weight(): number
  • Gets the weight of the runtime animation

    Returns number

Methods

animateSearch playground for animate

  • animate(delay: number, from: number, to: number, loop: boolean, speedRatio: number, weight?: number): boolean
  • Execute the current animation

    Parameters

    • delay: number

      defines the delay to add to the current frame

    • from: number

      defines the lower bound of the animation range

    • to: number

      defines the upper bound of the animation range

    • loop: boolean

      defines if the current animation must loop

    • speedRatio: number

      defines the current speed ratio

    • Optional weight: number

      defines the weight of the animation (default is -1 so no weight)

    Returns boolean

    a boolean indicating if the animation is running

disposeSearch playground for dispose

  • dispose(): void
  • Disposes of the runtime animation

    Returns void

goToFrameSearch playground for goToFrame

  • goToFrame(frame: number): void
  • Move the current animation to a given frame

    Parameters

    • frame: number

      defines the frame to move to

    Returns void

isStoppedSearch playground for isStopped

  • isStopped(): boolean
  • Specifies if the runtime animation is stopped

    Returns boolean

    Boolean specifying if the runtime animation is stopped

resetSearch playground for reset

  • reset(restoreOriginal?: boolean): void
  • Resets the runtime animation to the beginning

    Parameters

    • Optional restoreOriginal: boolean

      defines whether to restore the target property to the original value

    Returns void

setValueSearch playground for setValue

  • setValue(currentValue: any, weight: number): void
  • Apply the interpolated value to the target

    Parameters

    • currentValue: any

      defines the value computed by the animation

    • weight: number

      defines the weight to apply to this value (Defaults to 1.0)

    Returns void

Legend

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