I am looking for a way to change height of this garage without changing size of an entrance. Scale() will not work here as it will make an entrance bigger too. Is there any way to achieve it without dividing model into x meshes and changing them one by one?
The easiest and most logical way of doing it would be ofc to just split the model into parts - working with bash-kit-like models is generally easier if you want to modify the model using code (in any way, not just scaling.)
But you seem bold and brave, and for such bold and brave souls an alternative solution could be a lattice modifier (ex.) You’d need to code it though - and allow splitting the lattice into any arbitrary number of sub-volumes. That way you can scale up the middle section of the model and scale down the other parts (that’ll still be significantly more troubling than separating the model, but also likely more fun to code )
What is preventing you from picking all vertices above some threshold and moving them up? If you put this threshold above the door but below the ceiling, you can move just the top of the garage cell, all the rest will be intact.
Here is a demo of expanding (not scaling) a GLTF tractor. Note how wheels remain the same size:
Unfortunately, in Three.js, as I understand, vertices are not described or labeled in any way, they are simply stored as a raw array of numbers in the position attribute of the geometry. Therefore, i dont know how to locate specific vertices, such as those “above the door threshold.” Is there any way to do that?