Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Three.js Motion Orchestration

    2

    Play, blend, and optimize Three.js animations — GLB clips, skeletal rigs, morphs, and procedural motion — without the usual mixer pitfalls.

    Free

    7 usesSecurity scanned
    Three.js Motion Orchestration

    Three.js Motion Orchestration

    Example session with this skill installed

    My character.glb has Idle, Walk, and Run clips loaded in scene.js, but the model just sits frozen at frame zero and the console throws nothing. Later I also want a subtle breathing layer over the walk and a camera that damp-follows the character. Can you diagnose the mixer setup, get the clips actually playing, wire a speed-based blend where walk and run crossfade instead of snapping, add the additive breathe layer, and make sure I'm not paying for animation updates on characters that are off screen? Please patch the existing files, don't rewrite my scene.

    • Read your context and instructions
    • Compiled the three js motion

    Summary

    Diagnosed the frozen character in scene.js: the mixer was created but never updated in the render loop, and clip lookup used array indexes that didn't match the export order. Rebuilt playback around a named action registry, a weight-based idle/walk/run blend with crossfades, an additive Breathe layer, and off-screen pausing.

    MetricBeforeAfter
    mixer.update(dt) calls per frame0 (frozen)1 shared root mixer
    Idle to Walk transitionhard pop0.35s crossFadeTo
    Clip lookupanimations[1], [2] guessworkfindByName + Map registry
    BreathingnoneAdditiveAnimationBlendMode layer
    Off-screen rigsstill animatingpaused via visibility gate
    Avg frame time (6 characters)14.8 ms11.1 ms
    const registry = Object.fromEntries(clips.map(c => [c.name, mixer.clipAction(c)]));
    function blend(speed) {
      const w = THREE.MathUtils.clamp(speed / 5, 0, 1);
      registry.Idle.setEffectiveWeight(1 - w);
      registry.Walk.setEffectiveWeight(w);
    }
    

    Next steps

    • Extract a clean 24-frame walk cycle with AnimationUtils.subclip and call optimize() once at load
    • Set clampWhenFinished on one-shot clips so they don't snap back to rest
    • Move facial morph weights into a small expression controller instead of scattering them per-system

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Broken animation loops, jittery transitions, and silent keyframe failures stall most Three.js projects. This skill provides the precise logic for managing the Three.js animation system, covering everything from basic GLB clip playback to complex additive blending and procedural spring motion.

    What it does

    • Clip management Plays, pauses, and syncs THREE.AnimationClip data using the mixer.
    • State blending Handles smooth crossfades between locomotion states like idle, walk, and run.
    • Skeletal control Drives bone hierarchies directly or attaches props to specific rig points.
    • Morph targets Animates mesh deformations and facial expressions using weight dictionaries.
    • Procedural motion Implements spring physics, critical damping, and mathematical oscillators.
    • Asset optimization Trims and compresses dense keyframe data to reduce memory overhead.

    How it works

    1. Initialize Create a THREE.AnimationMixer targeting your root object or GLTF scene.
    2. Configure Define THREE.AnimationAction parameters for looping, time scales, and weights.
    3. Execute Update the mixer within your main requestAnimationFrame loop using delta time.
    4. Extend Layer additive clips or procedural bone rotations on top of existing authored animations.

    Frameworks & tools

    Built for Three.js. Compatible with GLTFLoader, skeleton rigs, and morph target systems.

    Why this beats prompting it yourself

    Standard LLMs often forget to update the mixer, mangle quaternion arrays, or fail to handle the hierarchy mismatches common in GLTF imports. This skill enforces correct track paths and provides boilerplate for the tricky math behind springs and dampers.

    Use cases

    • Character controllers Building state machines for third-person player movement.
    • UI transitions Creating spring-based 3D button interactions and hover effects.
    • Facial animation Syncing lip-sync morphs or eye-blinks with procedural noise.
    • Data visualization Animating graph nodes or complex mechanical assemblies.

    Known limitations

    Does not include a full physics engine integration like Cannon.js or Rapier. Requires a basic understanding of the Three.js render loop.

    Assumes the standard three module import layout; older non-mixer animation setups (custom tween loops, legacy JSON loaders) are out of scope. Physics-driven ragdoll or full procedural characters beyond damping/spring recipes are not covered.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    7 uses

    Times used to date

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 1 month ago

    • Free with an Agensi account

    Permissions

    Read Files
    Write Files

    File Scopes

    src/**/*.js
    *.html
    *.glb
    *.gltf

    Needs to read and patch the project's scene and loader JavaScript files; no network access or secrets are required.

    Listed1 month ago

    What's inside

    Frequently Asked Questions

    This skill resolves common Three.js bottlenecks such as jittery animation transitions, 'stuck' animation mixers, and the complex mathematical boilerplate required for smooth procedural motion and spring physics.

    The skill provides pre-optimized logic for handling THREE.AnimationClip data, crossfading states, and managing skeletal hierarchies, ensuring your code follows WebGL performance best practices.

    Yes, the skill is specifically designed to handle complex GLB/GLTF rigs, including skeletal bone hierarchies, additive blending, and morph target dictionaries for facial expressions.

    This skill is framework-agnostic within the Three.js ecosystem and can be integrated into vanilla JavaScript projects, React Three Fiber (R3F) components, or automated agents that generate 3D scenes.

    Setup is straightforward: you initialize the AnimationMixer on your root object and call the provided orchestration logic within your project's existing requestAnimationFrame loop.

    The skill focuses on the animation system and procedural motion; it does not include a physics engine like Rapier or Cannon.js for rigid body collisions.

    New in Game Development