title: ThreeJS: How to remove vertices?
body: <p>Adding new vertices to a three.js mesh goes by <strong>mesh.geometry.vertices.push(new THREE.Vector3(x, y, z))</strong>, but how do I remove them?</p>
  <p>&quot;geometry&quot; is an array, so I thought, I could remove vertices with:</p>
  <blockquote>
  <p>mesh.geometry.vertices.splice(vertexIndex, 1)</p>
  <p>mesh.geometry.verticesNeedUpdate = true;</p>
  </blockquote>
  <p>But when I do that, that whole thing breaks with three.js internal error messages that say: &quot;Uncaught TypeError: Cannot read property 'x' of undefined&quot; inside three.min.js.</p>
  <p>I searched their wiki, their github issues. And can't find an answer to this. The mesh is a simple BoxGeometry, so not even a custom one.</p>