I’m working on a Three.js project where I load a GLTF house model. I’ve set up raycaster logic to select a wall in the model. Now, I want to update the geometry of the selected wall efficiently.
Here’s what I need to do:
Load a GLTF house model.
Select a wall using raycaster logic.
Update the geometry of the selected wall by extending its length from a specific point (e.g., the minimum point of its bounding box) without stretching the texture.
For example, in the screenshot below, I want to extend the length of the wall to the right, keeping the texture and other properties intact. What I mean increase the length from that point(without stretching it). I hope someone understands what I am trying to say.
What is the best way to achieve this in Three.js? Any advice or code snippets would be greatly appreciated!
how do you plan to extend the wall when it has windows and frames in it? it doesn’t sound very feasible if you have to mess with geometry buffers. if you scale the wall it will stretch everything in it as well.
something like that is normally built from scratch either with topological cad, or constructive solid geometry.
i would use csg to built the basic walls, roofing, floor, and then insert the fixed stuff with separate models, windows + frames, doors, etc. like so CSG house - CodeSandbox
Thank you so much for the reply, So do you think it is possible at all to these CAD like functions to existing GLTF models? All I simply want is move walls the way I explained it.