Multi animations from Blender / JSON



I can’t seem to get this JSON model to animate in three.js. I’ve tried exporting it so many different ways using the three exporter, but I’m not sure if it’s the model or the code. I’m getting a trace on the animations from within the model (5), but nothing happens on the call-back. Any ideas?

new THREE.JSONLoader().load( 'assets/model/Gunnar.json', function ( model, material ) {

var mesh = new THREE.SkinnedMesh(model, material);
scene.add( mesh );
mesh.scale.x = mesh.scale.y = mesh.scale.z = 5;
var clips = model.animations;
mixer = new THREE.AnimationMixer( mesh );
mixer.clipAction( clips[0] ).play();

loaded = true;
} );

function animate() {
requestAnimationFrame( animate );
if (loaded) {
renderer.render( scene, camera );

Blender / JSON Test files

Blender 2.78
Three.js R88


Hi it’s fixed: (FinalGunnar.json)

few tips:
-Untick this part when exporting unless you want to use new THREE.ObjectLoader
-select only the model you want to export in pose mode, note do not select armature just the model
-you don’t need the blendshape


Thanks for the tips!

I’m still having trouble getting the animations to play. Any thoughts?


it’s working on my side
try this:


Still no dice, I’ve posted my file here using the latest FinalGunnar.json you sent over. I really appreciate the help!


you didn’t define your material

here it’s fixed:


Amazing! Thanks @Waverider