Three.Box3.setFromObject and Three.Box3.setFromObject compute a bounding box of any 3D objects by searching for specific properties and recursively repeating the operation in the descendant of that object ^1. For now, they produce incorrect results on SplatMesh or any objects with a SplatMesh in its descendant.
Those two method look for a property called boundingBox. When it's undefined, they assume the object have no bounding box, and try to use its geometry instead if it's null they suppose the object can compute its bounding box but does not have done it yet. As SplatMesh initializes its boundingBox to a new Box3(), those methods are unable to trigger the box computation and just use this empty box as if it was the correct value.
When they find a bounding box with a value "null", those methods call the computeBoudingBox method of the object with no parameter, then assume the boundingBox property of the object will be updated after this call. SplatMesh.computeBoudingBox do exist, but it does not update the boundingBox property of the mesh. That mean just setting the bounding box of a SplatMesh before using those methods won't make them work better.
Finally, when computing the bounding box of a composite object, those methods aggregate the bounding boxes of all its children together without applying any transform on them. They assume those box are all given in the global coordinate system. By default, the SplatMesh does not compute is bounding box in the global coordinate system.
Three.Box3.setFromObject and Three.Box3.setFromObject compute a bounding box of any 3D objects by searching for specific properties and recursively repeating the operation in the descendant of that object ^1. For now, they produce incorrect results on SplatMesh or any objects with a SplatMesh in its descendant.
Those two method look for a property called boundingBox. When it's undefined, they assume the object have no bounding box, and try to use its geometry instead if it's null they suppose the object can compute its bounding box but does not have done it yet. As SplatMesh initializes its boundingBox to a new Box3(), those methods are unable to trigger the box computation and just use this empty box as if it was the correct value.
When they find a bounding box with a value "null", those methods call the
computeBoudingBox
method of the object with no parameter, then assume the boundingBox property of the object will be updated after this call.SplatMesh.computeBoudingBox
do exist, but it does not update the boundingBox property of the mesh. That mean just setting the bounding box of a SplatMesh before using those methods won't make them work better.Finally, when computing the bounding box of a composite object, those methods aggregate the bounding boxes of all its children together without applying any transform on them. They assume those box are all given in the global coordinate system. By default, the SplatMesh does not compute is bounding box in the global coordinate system.