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

Properties

animation

animation: Animation

Gets the animation from the runtime animation

currentFrame

currentFrame: number

Gets the current frame of the runtime animation

currentValue

currentValue: any

Gets the current value of the runtime animation

originalValue

originalValue: any

Gets the original value of the runtime animation

target

target: any

Gets the actual target of the runtime animation

targetPath

targetPath: string

Gets the target path of the runtime animation

weight

weight: number

Gets the weight of the runtime animation

Methods

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 has ended

dispose

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

    Returns void

goToFrame

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

    Parameters

    • frame: number

      defines the frame to move to

    Returns void

isStopped

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

    Returns boolean

    Boolean specifying if the runtime animation is stopped

reset

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

    Returns void

setValue

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

    Parameters

    • currentValue: any

      defines the value computed by the animation

    • Optional weight: number

      defines the weight to apply to this value

    Returns void

Generated using TypeDoc