title: Three.js: How to Update BufferGeometry Vertices
body: <p>I just have to update a line that have 2 vertices, and i trying to use these things above that are changed in r58, but the lines cant move, i just made this to initialize:</p>
  
  <pre><code>var geometry = new THREE.BufferGeometry();
  geometry.addAttribute('position', Float32Array, 2, 3);
  geometry.dynamic = true;
  
  var position = geometry.attributes.position;
  position.needsUpdate = true;
  
  var p = position.array;
  
  var i = 0;
  p[i++] = vertex1.position.x;
  p[i++] = vertex1.position.y;
  p[i++] = vertex1.position.z;
  p[i++] = vertex2.position.x;
  p[i++] = vertex2.position.y;
  p[i] = vertex2.position.z;
  
  var color = new THREE.Color();
  color.g = color.b = 1 - this.value;
  
  var material = new THREE.LineBasicMaterial({
    color: color.getHex(),
    linewidth: 5 // THIS DON'T WORKS IN WINDOWS?
  });
  
  this.model = new THREE.Line(geometry, material);
  </code></pre>
  
  <p>and in update rendering i´m just doing this:</p>
  
  <pre><code>var p = this.model.geometry.attributes.position.array;
  
  var i = 0;
  p[i++] = vertex1.position.x;
  p[i++] = vertex1.position.y;
  p[i++] = vertex1.position.z;
  p[i++] = vertex2.position.x;
  p[i++] = vertex2.position.y;
  p[i] = vertex2.position.z;
  </code></pre>
  
  <p>but the lines didn´t move or render itself.</p>