Please have a look at this web workshop
Transformation of the objects in the scene is essentially determined by the following default code for each Object or Group.
var cobj = scene.getObjectByName(pair); var pobj = scene.getObjectByName(pair); var s = size(cobj); //Box3 data var thisX = s; lastX = i>0? lastX +thisX/2 : 0; cobj.position.x = lastX; s = size(cobj); //Box3 data lastX = s; var ps = size(pobj); //Box3 data var adjY = cobj.type === "Group"? 0 : ps/2-s/2; cobj.position.y = -adjY; var adjZ = -ps/2 + s/2; cobj.position.z = adjZ;
Basically it packs Objects and Groups along the X-axis and aligns them to bottommost of Y, and topmost of Z axis. There are sets of optional criteria (margins, rotations etc) before this code both to set up and (next step) to modify transformations.
If members see there is anything fundamentally wrong with this approach and help rectify it, I can avoid multiple questions; e.g. why are some of the objects in the website scene not properly spaced and aligned.