Class Animation

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(root: Mesh, name: string): Animation

Parameters

  • root: Mesh
  • name: string

Returns

Animation

Properties

public currentTime: number

public data: AnimationData

public hierarchy: Bone[]

public interpolationType: AnimationInterpolation

public isPaused: boolean

public isPlaying: boolean

public keyTypes: Array<string>

public loop: boolean

public root: Mesh

public timeScale: number

public weight: number

Methods

public getNextKeyWith(type: string, h: number, key: number): KeyFrame

Parameters

  • type: string
  • h: number
  • key: number

Returns

KeyFrame

public getPrevKeyWith(type: string, h: number, key: number): KeyFrame

Parameters

  • type: string
  • h: number
  • key: number

Returns

KeyFrame

public interpolate(p0: number, p1: number, p2: number, p3: number, t: number, t2: number, t3: number): number

Parameters

  • p0: number
  • p1: number
  • p2: number
  • p3: number
  • t: number
  • t2: number
  • t3: number

Returns

number

public interpolateCatmullRom(points: Vector3[], scale: number): Vector3[]

Parameters

Returns

Vector3[]

public pause()

public play(startTime?: number, weight?: number)

Parameters

  • startTime?: number optional
  • weight?: number optional

public reset()

public stop()

public update(deltaTimeMS: number)

Parameters

  • deltaTimeMS: number