I have an
with many levels of children (more Object3Ds or Meshes/Lines). The
class has a
method which will compute a bounding box of an object and all of its descendants. This is the behavior I am looking for.
I can't use the
, however, because I am not using
objects. Instead, the project I'm working on uses
objects do not have a
property, which is what the
function looks for when computing a bounding box.
var bbox = new THREE.Box3().setFromObject(object);
console.log(bbox.min); // x, y, and z are all Infinity.
console.log(bbox.max); // x, y, and z are all -Infinity.
I have also been experimenting with using the
, but it does not seem to update the bounding box when the geometry is manipulated. I think it might be related to
, but I've also tried explicitly calling
to no avail.
Is there a way to compute a bounding box on an
and all of its descendants if using the
class? I'm new to Three.js, so any help would be appreciated!
I am using Three.js r66.