Well, if all the cells are separate primitives, then you can simply zoom in on each part that you want to change along one axis, and just adjust the anchor points to be constrained from the outside. Therefore, for the parts on the border, you scale the empty object to which they are attached to support the outer shell.
EG:
OOOOOO OMMMMMMO OMmmmmMO OMmmmmMO OMMMMMMO OOOOOO
where O is a 3D object carrying an adjacent Mesh-M, and m represents grids that scale themselves. Thus, if you adjust the scale of all βmβ and βOβ, the outer shell will remain in place,
But you are on the right track with a detour. You just have to do it. For an easy transition to a crawl, I would give everything you want to change as an attribute in a .userData object. Because in some cases you need to scale empty objects (O) (so that you can move the anchor point efficiently), while in others you need to scale the grids in place (m). Thus, this is not a pure mesh-based operation (since the grids want to scale from their center). Running some tags makes it easier to bypass:
object.traverse(function(child){ if(child instanceof THREE.Mesh){ if(child.userData.isScalable){
and if you configured the heirarchy and .userData tags correctly, then you just scale things and save the outer shell.
Is that what you are asking? because the question is unclear.
source share