Options
All
  • Public
  • Public/Protected
  • All
Menu

Defines a runtime animation

Hierarchy

  • RuntimeAnimation

Index

Constructors

  • 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

  • Gets the animation from the runtime animation

    Returns Animation

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

    Returns number

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

    Returns any

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

    Returns boolean

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

    Returns any

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

    Returns string

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

    Returns number

Methods

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

    Parameters

    • elapsedTimeSinceAnimationStart: number

      defines the elapsed time (in milliseconds) since the animation was started

    • from: number

      defines the lower frame of the animation range

    • to: number

      defines the upper frame 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

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

    Returns void

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

    Parameters

    • frame: number

      defines the frame to move to

    Returns void

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

    Returns boolean

    Boolean specifying if the runtime animation is stopped

  • 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

  • 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
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Method
  • Static method

Settings

Theme