Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Animation

A runtime animation

Hierarchy

  • Animation

Implements

Index

Constructors

constructor

Accessors

basisTime

  • get basisTime(): number
  • set basisTime(val: number): void
  • The server time (in milliseconds since the UNIX epoch) when the animation was started

    inheritdoc

    Returns number

  • The server time (in milliseconds since the UNIX epoch) when the animation was started

    Parameters

    • val: number

    Returns void

duration

  • get duration(): number

id

isPlaying

  • get isPlaying(): boolean
  • set isPlaying(val: boolean): void
  • Determine if this animation is playing based on the animation's weight. Setting this property calls play and stop internally.

    Returns boolean

  • Determine if this animation is playing based on the animation's weight. Setting this property calls play and stop internally.

    Parameters

    • val: boolean

    Returns void

name

  • get name(): string
  • set name(val: string): void

normalizedTime

  • get normalizedTime(): number

speed

  • get speed(): number
  • set speed(val: number): void

targetActorIds

  • get targetActorIds(): ReadonlyArray<string>

targetActors

  • get targetActors(): Actor[]

time

  • get time(): number
  • set time(val: number): void

weight

  • get weight(): number
  • set weight(val: number): void
  • When multiple animations play together, this is the relative strength of this instance

    inheritdoc

    Returns number

  • When multiple animations play together, this is the relative strength of this instance

    Parameters

    • val: number

    Returns void

wrapMode

Methods

finished

  • finished(): Promise<void>
  • Returns Promise<void>

    A promise that resolves when the animation completes. This only occurs if the wrap mode is set to "Once". The promise is not resolved if the animation is stopped manually.

play

  • play(reset?: boolean): void
  • Play the animation by setting its weight to 1.

    Parameters

    • Default value reset: boolean = false

      If true, restart the animation from the beginning.

    Returns void

stop

  • stop(): void
  • Halt the running animation by setting its weight to 0. Has no effect if the animation is already stopped.

    Returns void