Animatable

Hierarchy

  • Animatable

Index

Constructors

constructor

  • new Animatable(scene: Scene, target: any, fromFrame?: number, toFrame?: number, loopAnimation?: boolean, speedRatio?: number, onAnimationEnd?: function | null | undefined, animations?: any): Animatable
  • Parameters

    • scene: Scene
    • target: any
    • Optional fromFrame: number
    • Optional toFrame: number
    • Optional loopAnimation: boolean
    • Optional speedRatio: number
    • Optional onAnimationEnd: function | null | undefined
    • Optional animations: any

    Returns Animatable

Properties

animationStarted

animationStarted: boolean

fromFrame

fromFrame: number

loopAnimation

loopAnimation: boolean

masterFrame

masterFrame: number

Gets the current frame of the first RuntimeAnimation Used to synchronize Animatables

onAnimationEnd

onAnimationEnd: function | null | undefined

speedRatio

speedRatio: number

Gets or sets the speed ratio to apply to the animatable (1.0 by default)

syncRoot

syncRoot: Animatable

Gets the root Animatable used to synchronize and normalize animations

target

target: any

toFrame

toFrame: number

weight

weight: number

Gets or sets the animatable weight (-1.0 by default meaning not weighted)

Methods

appendAnimations

  • appendAnimations(target: any, animations: Animation[]): void
  • Parameters

    Returns void

disableBlending

  • disableBlending(): void
  • Returns void

enableBlending

  • enableBlending(blendingSpeed: number): void
  • Parameters

    • blendingSpeed: number

    Returns void

getAnimationByTargetProperty

getAnimations

getRuntimeAnimationByTargetProperty

goToFrame

  • goToFrame(frame: number): void
  • Parameters

    • frame: number

    Returns void

pause

  • pause(): void
  • Returns void

reset

  • reset(): void
  • Returns void

restart

  • restart(): void
  • Returns void

stop

  • stop(animationName?: string): void
  • Parameters

    • Optional animationName: string

    Returns void

syncWith

  • Synchronize and normalize current Animatable with a source Animatable This is useful when using animation weights and when animations are not of the same length

    Parameters

    • root: Animatable

      defines the root Animatable to synchronize with

    Returns Animatable

    the current Animatable

Generated using TypeDoc