title: Animating Three.js vertices
body: <p>I'm trying to animate individual vertices from a collada model.
  The vertices ARE animating fine once but then they don't animate anymore.</p>
  
  <p>1: Load my collada</p>
  
  <pre><code>// name obj
  var orgVerts = false;
  var desVerts = false;
  var material = new THREE.MeshBasicMaterial({ color:0x1e5679, wireframe:true });
  var loader = new THREE.ColladaLoader();
  var nameModel = false;
  
  loader.options.convertUpAxis = true;
  loader.load( '3d/name.dae', function ( collada ) {
      nameModel = collada.scene.children[0].children[0];
      nameModel.material = material;
      nameModel.geometry.dynamic = true;
      nameModel.position.set(0,0,0);//x,z,y- if you think in blender dimensions ;)
      nameModel.scale.x = .0035;
      nameModel.scale.y = .0035;
      nameModel.scale.z = .0035;
      scene.add(nameModel);
      orgVerts = nameModel.geometry.vertices; // make a backup of all verts
      genVerts(); // create a new array of random verts
  });
  </code></pre>
  
  <p>2: in my render function</p>
  
  <pre><code>var render = function () {
      requestAnimationFrame(render);
      // do stuff
      if(nameModel){
          if(window.globalCurrentSlide != 0){
              for(var r=0; r &lt; nameModel.geometry.vertices.length; r++){
                  var vert = desVerts[r]; // loop through all the destination verts
                  nameModel.geometry.vertices[r].x = nameModel.geometry.vertices[r].x - (nameModel.geometry.vertices[r].x - vert.x)/20;
                  nameModel.geometry.vertices[r].y = nameModel.geometry.vertices[r].y - (nameModel.geometry.vertices[r].y - vert.y)/20;
                  nameModel.geometry.vertices[r].z = nameModel.geometry.vertices[r].z - (nameModel.geometry.vertices[r].z - vert.z)/20;
              }
          }else{
              for(var t=0; t &lt; nameModel.geometry.vertices.length; t++){
                  var vert2 = orgVerts[t]; // loop through all the original verts
                  nameModel.geometry.vertices[t].x = nameModel.geometry.vertices[t].x - (nameModel.geometry.vertices[t].x - vert2.x)/20;
                  nameModel.geometry.vertices[t].y = nameModel.geometry.vertices[t].y - (nameModel.geometry.vertices[t].y - vert2.y)/20;
                  nameModel.geometry.vertices[t].z = nameModel.geometry.vertices[t].z - (nameModel.geometry.vertices[t].z - vert2.z)/20;
              }
          }
          nameModel.geometry.verticesNeedUpdate = true;
          nameModel.rotation.y += .005;
      }
      renderer.render( scene, camera );
  }
  </code></pre>
  
  <p><code>window.globalCurrentSlide</code> is set to 0 to start with and everything is fine. if I change <code>window.globalCurrentSlide</code> to 1, all the vertices animate correctly... <strong>BUT</strong> when I change <code>window.globalCurrentSlide</code> back to 0 the vertices don't animate back to their original positions. I've debugged heaps and can 100% say that <strong>BOTH</strong> <code>desVerts</code> and <code>orgVerts</code> don't change and they are correct. Any ideas? It's driving me nuts.</p>
  
  <p>PS: I know the code could be condensed, I'm just playing ATM</p>