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

data

dataId

  • get dataId(): Guid

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

targetActors

  • get targetActors(): Actor[]

targetIds

  • get targetIds(): ReadonlyArray<Guid>

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

delete

  • delete(): void

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.

isOrphan

  • isOrphan(): boolean
  • Tells whether this animation is an orphan, i.e. its data has been unloaded, or it has no live targets.

    Returns boolean

    Whether this animation is an orphan.

play

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

    Parameters

    • Default value reset: boolean = null

      If true, restart the animation from the beginning. Defaults to true when wrapMode is Once, and false otherwise.

    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

Static AnimateTo