Is there a way to calculate the bounding box dimensions of grouped objects in three.js? I have a collection of objects that are grouped together as a single unit in three.js. I am looking for a method to determine the height and width of these groups, so I attempted to use Box3 to calculate their dimensions. How can I retrieve the height and width of a group of objects in three.js?
var geometry = new THREE.BoxBufferGeometry( 1, 1, 1 );
var material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
var cubeA = new THREE.Mesh( geometry, material );
cubeA.position.set( 100, 100, 0 );
var cubeB = new THREE.Mesh( geometry, material );
cubeB.position.set( -100, -100, 0 );
//create a group and add the two cubes
//These cubes can now be rotated / scaled etc as a group
var group = new THREE.Group();
group.add( cubeA );
group.add( cubeB );
scene.add( group );