Skip to content

three-animated-display-object.component overview


Table of contents


utils

ThreeAnimatedDisplayObjectComponent (class)

A ThreeDisplayObjectComponent whose native mesh carries AnimationClips (loaded via ThreeLoader.loadFromGlb from a .glb with non-empty gltf.animations) - see IAnimatedDisplayObject3dComponent's own doc for the contract this implements. Owns a single THREE.AnimationMixer rooted at nativeMesh (works whether nativeMesh is the loaded model's own scene root, or a wrapping Group one level up - see ThreeLoader.loadFromGlb's offset handling - since AnimationMixer/AnimationClip tracks address targets by name via root.getObjectByName(...), found the same way regardless of how many ancestors sit above the named node).

Signature

export declare class ThreeAnimatedDisplayObjectComponent {
  constructor(nativeMesh: Object3D, clips: AnimationClip[])
}

playAnimation (method)

Signature

public playAnimation(name: string, options: PlayAnimationOptions = {}): void

stopAnimation (method)

Signature

public stopAnimation(fadeDuration: number = 0.2): void

updateAnimations (method)

Signature

public updateAnimations(deltaSeconds: number): void

clone (method)

Signature

clone(): ThreeAnimatedDisplayObjectComponent

dispose (method)

Signature

dispose(): void