Capítulo 575 de 859

Chapter 575: MorphAnimMesh

Core Idea

A special type of an animated mesh with a simple interface for animation playback. It allows to playback just one animation without any transitions or fading between animation changes.

Key Concepts

  • activeAction : AnimationAction: The current active animation action.
  • mixer : AnimationMixer: The internal animation mixer.

Code Examples

import { MorphAnimMesh } from 'three/addons/misc/MorphAnimMesh.js';
  • What it demonstrates: Typical usage of MorphAnimMesh.

Reference Tables

Constructor

Signature
`new MorphAnimMesh( geometry : BufferGeometry, material : Material

Properties

PropertyDescription
.activeAction : AnimationActionThe current active animation action.
.mixer : AnimationMixerThe internal animation mixer.

Methods

MethodDescription
.playAnimation( label : string, fps : number )Plays the defined animation clip. The implementation assumes the animation clips are stored in Object3D#animations or the geometry.
.setDirectionBackward()Sets the animation playback direction to "backward".
.setDirectionForward()Sets the animation playback direction to "forward".
.updateAnimation( delta : number )Updates the animations of the mesh. Must be called inside the animation loop.

Key Takeaways

  1. MorphAnimMesh extends: EventDispatcher → Object3D → Mesh
  2. Most relevant properties: activeAction, mixer.
  3. Key methods: playAnimation, setDirectionBackward, setDirectionForward, updateAnimation.

Connects To