What is the reason for larger box in the setFromObject method?

Ok. If you came here to find the answer to a similar question, here it is:

Instead of recomputing the bounding box every time, we now use the
cached bounding box from the object, and transform it by the world
transform.

Note that this results in slightly less accurate bounding box compared
to the previous implementation. This seems like a fair tradeoff -
it’s possible to get the precise box by using Box3.setFromBufferAttribute
if desired.

In addition to making the box more precise, this honors morph target
data and supports arbitrary future improvements to object bounding box
computation automatically.

1 Like