title: Animated Three.js file not rendering
body: <p>I have made an animation in Blender and I exported it as a Three.js file so that I could display it in my Three.js code. </p>
  
  <p>Here is the Javascript code:</p>
  
  <pre><code>var loader = new THREE.JSONLoader();
  loader.load( "obj/dog5.js", function( geometry ) {
      mesh = new THREE.Mesh( geometry, new THREE.MeshNormalMaterial() );
      mesh.scale.set( 10, 10, 10 );
      mesh.position.y = 20;
      mesh.position.x = 0;
  
      var materials = mesh.material.materials;
  
      for (var k in materials) {
          materials[k].skinning = true;
      }
  
      animation = new THREE.Animation(mesh, "ArmatureAction", THREE.AnimationHandler.CATMULLROM);
      animation.play();
  
      lesson6.scene.add(mesh);
  </code></pre>
  
  <p>This is the error I get: </p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot read property 'length' of undefined</p>
  </blockquote>
  
  <p>This is where it happens in my code:</p>
  
  <pre><code>animation = new THREE.Animation(mesh, "ArmatureAction", THREE.AnimationHandler.CATMULLROM);
  </code></pre>
  
  <p>This is where it happens in the Three.js library file three.min.js:</p>
  
  <pre><code>init:function(a){if(!0===a.initialized)return a;for(var b=0;b&lt;a.hierarchy.length;b++)
  </code></pre>
  
  <p>I know my JSON file has a hierarchy so I don't know why it's undefined. I'm thinking I'm just missing some code, I'm not sure.</p>
  
  <p>If I take away the animation stuff the regular object renders but doesn't animate.</p>
  
  <p>I'm completely stumped. Any advice would be appreciated! Thanks!</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>So it's rendering now with this code:</p>
  
  <pre><code>          for ( var k in materials ) {
  
          materials[k].skinning = true;
  
        }
  
        skinnedMesh = new THREE.SkinnedMesh(geometry, new THREE.MeshFaceMaterial(materials));
        skinnedMesh.scale.set( 11, 11, 11 );
        lesson6.scene.add( skinnedMesh );
        animation = new THREE.Animation( skinnedMesh, skinnedMesh.geometry.animations[ 0 ], THREE.AnimationHandler.CATMULLROM);
        animation.play();
  </code></pre>
  
  <p>But it still doesn't animate. Do I need a start time with animation.play? Could it possibly be my json? </p>
  
  <p>Thanks!</p>