Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AnimationComponent

Hierarchy

Index

Events

animationFinished

animationFinished: AsyncEvent<string> = new AsyncEvent<string>()

Accessors

active

  • get active(): boolean
  • set active(active: boolean): void

animations

entity

id

  • get id(): string

parent

  • get parent(): undefined | Entity

version

  • get version(): number

Methods

addAnimation

copy

deserialize

destroy

  • destroy(): void

isA

  • isA<T>(type: object): boolean

isLoaded

  • isLoaded(): boolean

onReplace

playAnimation

playAnimationByIndex

reset

  • reset(): void

serialize

setEntity

  • setEntity(entity: Entity): void

setProperty

  • setProperty(name: string, value: any): void

setState

stopAllAnimations

  • stopAllAnimations(waitForEnd?: undefined | false | true): void

stopAnimation

  • stopAnimation(id: string | number, waitForEnd?: undefined | false | true): void

transitionToAnimation

  • transitionToAnimation(sourceAnimId: string | number, destAnimId: string | number, options: ITransitionOptions): void
  • Plays an animation while attempting to transition from an existing active animation

    Parameters

    • sourceAnimId: string | number

      The index or the name of the source animation that is already playing

    • destAnimId: string | number

      The index or the name of the destination animation to play

    • options: ITransitionOptions

      Transition options

    Returns void

upgrade