Here is an oversimplified diagram:
There are file formats that describe the structure of an object and the relations of its elements. Such data are convenient to modify the structure. If the object is a house, these data may contains positions of walls, their thickness, how they join, the material and its strength, etc.
Then, these data are cooked/baked into graphical data, which are convenient to draw (render) the object. During the cooking process a lot of data is lost, as it is not needed for the visualization (e.g. if you have coordinates of wall corners, you do not need to have wall’s dimensions and connections to other walls). GLTF is such format. It is useful to draw the object, but it contains no data to manipulate easily the objects.
Having this said, manipulation must be done at the higher level, when topology data is present. Once these data are cooked into GLTF, your only option is to modify the graphical properties. So, it is still possible to change the structure of an object, but only to some limited degree, as a complete manipulation becomes too difficult (and sometimes impossible).
Here is a comparison: imagine you have ingredients and a receipt for a meal; once you cook it into something suitable for eating (that’s the GLTF), in most cases you cannot change the proportions of ingredients.
Back to your question. If you have a house as GLTF format, and you have no way to get any other data about this house, your options are these:
- Very hard to implement: analyze the meshes in the GLTF, extract positions, sizes and orientations of walls, rescale the house by rescalings positions and lengths of walls, but keep walls thickness the same, then generate (or update) the meshes
- Easier to implement, but not universal: if you want to extend the house along X direction (for example); think of imaginary plane crossing the house across its X axis. Then traverse all meshes, get their vertices and move only the vertices that are from the correct side of the invisible plane. Special treatment is needed for walls that reuse the same geometry and walls that are nested in other objects.
The second approach is used in these two demos. The first demo expands a vehicle, the second one does the same with the globe:
https://codepen.io/boytchev/pen/yLQJZdr
https://codepen.io/boytchev/pen/VwVjOre