Skip to content Skip to sidebar Skip to footer

Three Js - Can You Clone Animations Loaded From A Collada File?

I'm essentially asking the same question as the one found here - https://github.com/mrdoob/three.js/issues/1883 - Using three js I can import a collada scene with basic keyframe an

Solution 1:

Since this question was written a few years ago, the three.js animation system has been rewritten. You no longer need to "clone" animations, you can simply apply them to other objects using different mixers. Example:

var clip; // some THREE.AnimationClip instance.var mixer1 = new THREE.AnimationMixer( object1 );
var mixer2 = new THREE.AnimationMixer( object2 );

var action1 = mixer1.clipAction( clip );
var action2 = mixer2.clipAction( clip );

action1.play();
action2.play();

This isn't unique to COLLADA, it works for FBX, glTF, and any other formats that three.js supports animation for.

Post a Comment for "Three Js - Can You Clone Animations Loaded From A Collada File?"