I'm currently working on a small project with which I need to subtract a rectangular area of a cube on mousemove (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.
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 CSG for Three.js, 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 on every frame until the user decides its location.
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?
Thanks.