threejs-animation
Skill1 starsChanged 8 months agoMITView on GitHub
Three.js animation - keyframe animation, skeletal animation, morph targets, animation mixing. Use when animating objects, playing GLTF animations, creating procedural motion, or blending animations.
38 other projects use a version of this, 24 of them edited.
Adopted by
Most recently taken up by
- gromov0737/skillsedited, first seen Nov 29, 2026
- bullish0x/GameStudioedited, first seen Nov 29, 2026
- Manram/esc-skillsedited, first seen Nov 29, 2026
- ScalingOnline/claude-skillstheir own version, first seen Nov 29, 2026
- mrrajrumel/claude-video-skillstheir own version, first seen Nov 29, 2026
- Lordi898/Draktertheir own version, first seen Nov 22, 2026
Used with
Projects with it also use threejs-performance, threejs-react-three-fiber and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
alton47Skillthreejs-performance
Optimizes Three.js performance — instancing, draw call reduction, LOD, frustum culling, geometry merging, texture compression, Stats.js profiling, and GPU debugging. Use when the user asks about performance, FPS, draw calls, instancing, optimization, lag, stuttering, or profiling a Three.js scene. Trigger keywords: performance, fps, draw calls, instancing, InstancedMesh, LOD, profiling, optimization, Stats.
Also in 6 projects that use this
CloudAI-XSkillthreejs-react-three-fiber
Building three.js scenes from React with React Three Fiber and drei: renderer setup, the scene graph as JSX, frame-loop, state and loading hooks, pointer events, and adaptive performance, on WebGL or with WebGPU and TSL. Use when writing React components that render three.js.
Also in 4 projects that use this
alton47Skillthreejs-audio
Adds spatial and non-spatial audio to Three.js scenes using AudioListener, Audio, PositionalAudio, AudioAnalyser, and AudioLoader. Use when the user asks about 3D audio, spatial sound, positional audio, audio visualization, background music, or Web Audio API integration. Trigger keywords: audio, sound, PositionalAudio, AudioListener, AudioAnalyser, spatial audio, 3D sound, music visualization.
Also in 3 projects that use this
iart-aiSkillshader-glsl
This skill should be used when the user asks to "write a fragment shader", "make a GLSL gradient/noise/plasma background", "create an image transition (dissolve, displacement, glitch)", "add distortion or chromatic aberration", "build an SDF shape shader", "wire up a Three.js ShaderMaterial with uniforms", or "do GPU post-processing". Covers GLSL fragment shaders, noise/fbm, SDFs, domain warping, transitions, and Three.js integration.
Also in 3 projects that use this
CloudAI-XSkillthreejs-asset-pipeline
Shrinking glTF assets for three.js with gltf-transform: inspect, validate and optimize commands, Draco, meshopt and quantization, KTX2, WebP and AVIF textures, the loader setup each output needs, and gltfjsx for React. Use when compressing, optimizing or validating 3D models before loading them.
Also in 3 projects that use this
iart-aiSkillparticle-system
This skill should be used when the user asks to "build a particle system", "make confetti/snow/smoke/sparks", "create a connected-dot/constellation network background", "add a flow-field or curl-noise particle effect", "render thousands of GPU particles with Three.js Points", or "animate emitters with forces". Covers per-particle integration, forces, flow fields, burst/continuous emission, spatial-grid connected dots, and GPU points + shaders.
Also in 3 projects that use this
- +1 more from alton47
Other versions38 projects use a version of this.
Word for word · 0
None found.
Edited · 24
- calesthio/OpenMontage★ 84k40% same
- OpenMontageInc/OpenMontage★ 84k40% same
- educlopez/thegridcn-ui★ 40140% same
- quiet-node/gesture-lab★ 18540% same
- OpenCoven/coven★ 7840% same
- kumaran-is/claude-code-onboarding★ 3546% same
- codetesla51/skills★ 3240% same
- bullish0x/GameStudio★ 2940% same
- ruloCode/hermes-os★ 1740% same
- LinHao-city/StoryMind★ 1040% same
14 more not listed
Wrote their own version · 14
- CloudAI-X/threejs-skills★ 3.7ksame name
- iart-ai/webgl-animation-skills★ 59same name
- alton47/threejs-skills★ 13same name
- full-stack-skills/threejs-skills★ 9same name
- DaraBoth/skilljmskill★ 8same name
- Badhon-00/MDCP★ 2same name
- caucy2026/skills★ 1same name
- Lordi898/Drakter★ 1same name
- mrrajrumel/claude-video-skills★ 1same name
- willlee1995/skills★ 1same name
4 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository3 other files it gives its agents.
- threejs-fbx-mixamoSkill
- threejs-interactionSkill
- threejs-loadersSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 33 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 200
All actions play simultaneously at weight 0.
- Very specific: line 291
Call clip.optimize() to remove redundant keyframes
- Distinctive: line 293
Use LOD for animation rigs on distant characters
“Common” is measured: kept by at least 6 in 10 of the 33 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Three.js Animation
Quick Start
import * as THREE from "three";
// Simple procedural animation
const clock = new THREE.Clock();
function animate() {
const delta = clock.getDelta();
const elapsed = clock.getElapsedTime();
mesh.rotation.y += delta;
mesh.position.y = Math.sin(elapsed) * 0.5;
requestAnimationFrame(animate);
renderer.render(scene, camera);
}
animate();Animation System Overview
Three.js animation system has three main components:
- AnimationClip - Container for keyframe data
- AnimationMixer - Plays animations on a root object
- AnimationAction - Controls playback of a clip
AnimationClip
Stores keyframe animation data.
// Create animation clip
const times = [0, 1, 2]; // Keyframe times (seconds)
const values = [0, 1, 0]; // Values at each keyframe
const track = new THREE.NumberKeyframeTrack(
".position[y]", // Property path
times,
values,
);
const clip = new THREE.AnimationClip("bounce", 2, [track]);KeyframeTrack Types
// Number track (single value)
new THREE.NumberKeyframeTrack(".opacity", times, [1, 0]);
// Vector track (position, scale)
new THREE.VectorKeyframeTrack(".position", times, [
0, 0, 0, // t=0
1, 2, 0, // t=1
0, 0, 0, // t=2
]);
// Quaternion track (rotation)
const q1 = new THREE.Quaternion().setFromEuler(new THREE.Euler(0, 0, 0));
const q2 = new THREE.Quaternion().setFromEuler(new THREE.Euler(0, Math.PI, 0));
new THREE.QuaternionKeyframeTrack(
".quaternion",
[0, 1],
[q1.x, q1.y, q1.z, q1.w, q2.x, q2.y, q2.z, q2.w],
);
// Color track
new THREE.ColorKeyframeTrack(".material.color", times, [
1, 0, 0, // red
0, 1, 0, // green
0, 0, 1, // blue
]);Interpolation Modes
track.setInterpolation(THREE.InterpolateLinear); // Default
track.setInterpolation(THREE.InterpolateSmooth); // Cubic spline
track.setInterpolation(THREE.InterpolateDiscrete); // Step functionAnimationMixer
const mixer = new THREE.AnimationMixer(model);
const action = mixer.clipAction(clip);
action.play();
// Update in animation loop
function animate() {
const delta = clock.getDelta();
mixer.update(delta); // Required!
requestAnimationFrame(animate);
renderer.render(scene, camera);
}Mixer Events
mixer.addEventListener("finished", (e) => {
console.log("Animation finished:", e.action.getClip().name);
});
mixer.addEventListener("loop", (e) => {
console.log("Animation looped:", e.action.getClip().name);
});AnimationAction
const action = mixer.clipAction(clip);
// Playback
action.play();
action.stop();
action.reset();
// Loop modes
action.loop = THREE.LoopRepeat; // Default: loop forever
action.loop = THREE.LoopOnce; // Play once and stop
action.loop = THREE.LoopPingPong; // Alternate forward/backward
action.repetitions = 3;
// Clamping
action.clampWhenFinished = true; // Hold last frame when done
// Weight (for blending)
action.setEffectiveWeight(1); // 0-1
// Speed
action.timeScale = 1; // Negative = reverse
// Blending
action.blendMode = THREE.NormalAnimationBlendMode;
action.blendMode = THREE.AdditiveAnimationBlendMode;Fade In/Out
action.reset().fadeIn(0.5).play();
action.fadeOut(0.5);
// Crossfade
action1.crossFadeTo(action2, 0.5, true);
action2.play();Loading GLTF Animations
import { GLTFLoader } from "three/addons/loaders/GLTFLoader.js";
const loader = new GLTFLoader();
loader.load("model.glb", (gltf) => {
const mixer = new THREE.AnimationMixer(gltf.scene);
const clips = gltf.animations;
// Play by name
const walkClip = THREE.AnimationClip.findByName(clips, "Walk");
if (walkClip) mixer.clipAction(walkClip).play();
});Skeletal Animation
// Access skeleton
const skinnedMesh = model.getObjectByProperty("type", "SkinnedMesh");
const skeleton = skinnedMesh.skeleton;
// Programmatic bone control
const headBone = skeleton.bones.find((b) => b.name === "Head");
if (headBone) headBone.rotation.y = Math.PI / 4;
// Attach objects to bones
const weapon = new THREE.Mesh(weaponGeometry, weaponMaterial);
const handBone = skeleton.bones.find((b) => b.name === "RightHand");
if (handBone) handBone.add(weapon);
// Skeleton helper (debug)
scene.add(new THREE.SkeletonHelper(model));Animation Blending
All actions play simultaneously at weight 0; weights sum to ~1.
const idleAction = mixer.clipAction(idleClip);
const walkAction = mixer.clipAction(walkClip);
const runAction = mixer.clipAction(runClip);
idleAction.play(); walkAction.play(); runAction.play();
function updateAnimations(speed) {
if (speed < 0.1) {
idleAction.setEffectiveWeight(1);
walkAction.setEffectiveWeight(0);
runAction.setEffectiveWeight(0);
} else if (speed < 5) {
const t = speed / 5;
idleAction.setEffectiveWeight(1 - t);
walkAction.setEffectiveWeight(t);
runAction.setEffectiveWeight(0);
} else {
const t = Math.min((speed - 5) / 5, 1);
idleAction.setEffectiveWeight(0);
walkAction.setEffectiveWeight(1 - t);
runAction.setEffectiveWeight(t);
}
}Additive Blending
// Convert to additive
THREE.AnimationUtils.makeClipAdditive(additiveClip);
const additiveAction = mixer.clipAction(additiveClip);
additiveAction.blendMode = THREE.AdditiveAnimationBlendMode;
additiveAction.play();Animation Utilities
const clip = THREE.AnimationClip.findByName(clips, "Walk");
const subclip = THREE.AnimationUtils.subclip(clip, "subclip", 0, 30, 30);
clip.optimize(); // Remove redundant keyframesMorph Targets
// Set by index
mesh.morphTargetInfluences[0] = 0.5;
// Set by name
const smileIndex = mesh.morphTargetDictionary["smile"];
mesh.morphTargetInfluences[smileIndex] = 1;
// Animate
const track = new THREE.NumberKeyframeTrack(
".morphTargetInfluences[smile]",
[0, 0.5, 1],
[0, 1, 0],
);Procedural Patterns
Spring Physics
class Spring {
constructor(stiffness = 100, damping = 10) {
this.stiffness = stiffness;
this.damping = damping;
this.position = 0;
this.velocity = 0;
this.target = 0;
}
update(dt) {
const force = -this.stiffness * (this.position - this.target);
const dampingForce = -this.damping * this.velocity;
this.velocity += (force + dampingForce) * dt;
this.position += this.velocity * dt;
return this.position;
}
}Performance Tips
- Share clips across multiple mixers —
AnimationClipis data only - Call
clip.optimize()to remove redundant keyframes - Pause
mixer.update()for off-screen characters - Use LOD for animation rigs on distant characters
See Also
threejs-fbx-mixamo— Mixamo FBX multi-clip loading and overlay pipelinethreejs-loaders— Loading animated GLTF/FBX models
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

