threejs-animation
Installation
SKILL.md
Three.js Animation
Work Pattern
- Use
Clock.getDelta()or a framework-provided delta so mixer and procedural updates stay frame-rate independent. - For imported models, inspect
gltf.animations, create one mixer per animated root, and store actions by semantic name. - Use fade/crossfade for state changes, clamp/loop settings for one-shots, and cleanup with
uncacheRootwhen removing animated assets. - Pair with
threejs-loadersfor GLTF animation,threejs-geometryfor morph targets, andthreejs-interactionfor user-driven state changes.
Quick Start
import * as THREE from "three";
// Simple procedural animation
const clock = new THREE.Clock();