Browse Source

Revert "Improve Sphere closure performance"

This reverts commit c60105d93a38430debb9888fea94581a378c8122.
Joe Fox 8 years ago
parent
commit
c168f5d983
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/math/Sphere.js

+ 3 - 1
src/math/Sphere.js

@@ -26,10 +26,12 @@ Object.assign( Sphere.prototype, {
 
 	setFromPoints: function () {
 
-		var box = new Box3();
+		var box;
 
 		return function setFromPoints( points, optionalCenter ) {
 
+			if ( box === undefined ) box = new Box3(); // see #10547
+
 			var center = this.center;
 
 			if ( optionalCenter !== undefined ) {