I'm currently trying to display a simple animated 3D model with Three.js. The file exports fine from 3DS Max, but when I try to animate it I get the error:
Uncaught TypeError: Cannot read property 'morphTargetInfluences' of undefined
I'm using the animation code found in http://threejs.org/examples/webgl_loader_collada.html
function animate() {
requestAnimationFrame( animate );
controls.update();
for ( var i = 0; i < skin.morphTargetInfluences.length; i++ ) {
skin.morphTargetInfluences[ i ] = 0;
}
skin.morphTargetInfluences[ Math.floor( explode * 30 ) ] = 1;
render();
}
I have tracked the error down to the fact that my model has no skins. Is it possible for me to animate it anyway? The imported Three.js object does have a single entry in the Animations array.