GLTFLoader doesn't update bone world matrices after a model loads (see https://github.com/mrdoob/three.js/issues/24772) which means the SkinnedMesh.computeBoundingBox() call within Box3.expandByObject() can result in an incorrect bounding box.
A workaround is to call .updateMatrixWorld() on the object before calculating the bounding box.
Three.js r151 introduced bounding volumes for SkinnedMesh, see https://github.com/mrdoob/three.js/pull/25612. This causes unexpected behavior with
Box3.setFromObject()
Take for example this model: bobby.glb.zip
GLTFLoader doesn't update bone world matrices after a model loads (see https://github.com/mrdoob/three.js/issues/24772) which means the
SkinnedMesh.computeBoundingBox()
call withinBox3.expandByObject()
can result in an incorrect bounding box.A workaround is to call
.updateMatrixWorld()
on the object before calculating the bounding box.https://github.com/donmccurdy/three-gltf-viewer/blob/83114d40078975a0709b85a0a1f3a266f2514941/src/viewer.js#L251-L257