You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There seems to be an obvious bug in BatchedMesh#computeBoundingBox. The routine BatchedMesh#computeBoundingSphere routine properly sets the for loop bounds to be 0 to drawInfo.length, but the BatchedMesh#computeBoundingBox routine sets the loop bounds to be 0 to geometryCount, which cuts the loop short if you have multiple instances of the same geometry.
Description
There seems to be an obvious bug in
BatchedMesh#computeBoundingBox
. The routineBatchedMesh#computeBoundingSphere
routine properly sets the for loop bounds to be 0 todrawInfo.length
, but theBatchedMesh#computeBoundingBox
routine sets the loop bounds to be 0 togeometryCount
, which cuts the loop short if you have multiple instances of the same geometry.https://github.com/mrdoob/three.js/blob/dev/src/objects/BatchedMesh.js#L308
The net result is you get an inaccurate bounding box if you instance the same geometry more than once in a batched mesh.
Reproduction steps
Code
No code or example, bug seems clear.
Live example
No code or example, bug seems clear.
Screenshots
No response
Version
r167
Device
No response
Browser
No response
OS
No response
The text was updated successfully, but these errors were encountered: