title: Subtracting Geometry in Three.js (or really, 3D programming in general)
body: <p>I'm currently working on a small project with which I need to subtract a rectangular area of a cube on <em>mousemove</em> (think, an indented area for placing a door on a house). The 'door' would be 'placed' on click, but would need to be 'visualized' while the user is deciding its location; in reality, nothing changes except the fact that the user is no longer moving it around.</p>
  
  <p>The issue here is finding an efficient way of allowing a user to move the door around, while it interacts and modifies the house mesh. I've been toying with <a href="http://evanw.github.io/csg.js/" rel="nofollow">CSG</a> for <a href="http://threejs.org/" rel="nofollow">Three.js</a>, but I'm thinking that there might be a better algorithm for my use case. I feel it would be really costly to remove the cube from the scene, convert it to a CSG mesh, subtract, then convert back to a mesh and add it back into the scene <em>on every frame</em> until the user decides its location.</p>
  
  <p>Is CSG the wrong approach here? Should I modify the vertices directly? If so, how would I go about calculating/adding the vertices needed to create an 'indention' in the square? Really, I'm looking for what game and 3D application programmers consider best practice for handling a case like this. How does an application like SketchUp handle things like pushing/pulling geometry?</p>
  
  <p>Thanks.</p>