title: js Model Animation Using three.js r68
body: <p>As stated in the title, I cannot get animation to work. I'm pretty sure I'm missing something in my code because it works <a href="http://blacktowerentertainment.com/tools/animationviewer.html" rel="nofollow">here</a>, but not <a href="http://e-shabazz.github.io/2DGame00/2DGame00.html" rel="nofollow">where I'm testing</a>.</p>
  
  <p>I create the animation object in playerCharacter.js with</p>
  
  <pre><code>this.init = function(){
      for (var k in this.mesh.material.materials) {this.mesh.material.materials[k].skinning = true;}
  
      this.animation = new THREE.Animation(this.mesh, this.mesh.geometry.animations[0].name);
      this.animation.play();
  }
  </code></pre>
  
  <p>In the update function I use:</p>
  
  <pre><code>    this.animation.update(0.017);
  </code></pre>
  
  <p>And when I look at the console log I get:</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'length' of undefined 
  </code></pre>
  
  <p>So it seems that in THREE.AnimationHandler, data.hierarchy is undefined, so I'm guessing that if I can somehow make it defined, the problem will be fixed. Except I don't know how, or even why it is not defined. Any help?</p>