From bacb1ec7b752b8ba116aa8beabda7854ee7b4dc1 Mon Sep 17 00:00:00 2001 From: Greg Fodor Date: Tue, 27 Aug 2024 16:29:17 -0700 Subject: [PATCH] Fix loop bounds in BatchedMesh#computeBoundingBox to properly cover all instances --- src/objects/BatchedMesh.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/objects/BatchedMesh.js b/src/objects/BatchedMesh.js index 5ae02138baad50..155436ffbca615 100644 --- a/src/objects/BatchedMesh.js +++ b/src/objects/BatchedMesh.js @@ -300,12 +300,11 @@ class BatchedMesh extends Mesh { } - const geometryCount = this._geometryCount; const boundingBox = this.boundingBox; const drawInfo = this._drawInfo; boundingBox.makeEmpty(); - for ( let i = 0; i < geometryCount; i ++ ) { + for ( let i = 0, l = drawInfo.length; i < l; i ++ ) { if ( drawInfo[ i ].active === false ) continue;