Ver código fonte

Fix non-bundled build - _box is defined in a different .js file

Arseny Kapoulkine 5 anos atrás
pai
commit
11b8bf3d83
1 arquivos alterados com 6 adições e 4 exclusões
  1. 6 4
      src/math/Box3.js

+ 6 - 4
src/math/Box3.js

@@ -257,11 +257,13 @@ Object.assign( Box3.prototype, {
 
 			}
 
-			_box.copy( geometry.boundingBox );
-			_box.applyMatrix4( object.matrixWorld );
+			var box = new Box3();
 
-			this.expandByPoint( _box.min );
-			this.expandByPoint( _box.max );
+			box.copy( geometry.boundingBox );
+			box.applyMatrix4( object.matrixWorld );
+
+			this.expandByPoint( box.min );
+			this.expandByPoint( box.max );
 
 		}