Просмотр исходного кода

Fix loop bounds in BatchedMesh#computeBoundingBox to properly cover all instances (#29243)

Greg Fodor 1 год назад
Родитель
Сommit
d02a234bf5
1 измененных файлов с 1 добавлено и 2 удалено
  1. 1 2
      src/objects/BatchedMesh.js

+ 1 - 2
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;
 

粤ICP备19079148号