Browse Source

Merge pull request #18744 from WestLangley/dev_box3

Box3: use .union() in .expandFromObject()
Mr.doob 5 years ago
parent
commit
fcf905e465
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/math/Box3.js

+ 1 - 2
src/math/Box3.js

@@ -262,8 +262,7 @@ Object.assign( Box3.prototype, {
 			_box.copy( geometry.boundingBox );
 			_box.copy( geometry.boundingBox );
 			_box.applyMatrix4( object.matrixWorld );
 			_box.applyMatrix4( object.matrixWorld );
 
 
-			this.expandByPoint( _box.min );
-			this.expandByPoint( _box.max );
+			this.union( _box );
 
 
 		}
 		}