Skip to content
TheChatArchiveThe Chat Archive
Claudeclaude-3-7-sonnet-20250219-thinking-32k· AnthropicHugging Face LMArena Human Preference 140K

In three.js, can you reuse THREE.AnimationMixer between models? If not, why not just…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Claudeclaude-opus-4-20250514’s answer.
  1. User

    In three.js, can you reuse THREE.AnimationMixer between models? If not, why not just have them be part of the mesh they are controlling?

  2. Claude Assistant

    In three.js, you typically shouldn't reuse a single AnimationMixer between different models for a few key reasons:

    1. Each AnimationMixer maintains its own internal time and update state
    2. Mixers are designed to handle the animation system for a specific object hierarchy
    3. Using one mixer for multiple unrelated models would mean they all share the same timeline and update cycle

    The reason AnimationMixer isn't built directly into mesh objects follows three.js's component-based design philosophy:

    • Not all meshes need animation capabilities
    • One mixer can control animations for an entire character (which might be composed of multiple meshes)
    • This separation allows for more flexible animation control, like blending between animations or coordinating complex hierarchies

    The standard pattern is to create one AnimationMixer per animated model or character:

    // Create a mixer for each model
    const mixer1 = new THREE.AnimationMixer(model1);
    const mixer2 = new THREE.AnimationMixer(model2);
    
    // Update them independently
    function animate(time) {
      mixer1.update(deltaTime);
      mixer2.update(deltaTime);
    }
    

    Would you like me to explain more about how AnimationMixer works with complex models?

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.