Explorar o código

Revert "Improve Sphere closure performance"

This reverts commit c60105d93a38430debb9888fea94581a378c8122.
Joe Fox %!s(int64=8) %!d(string=hai) anos
pai
achega
c168f5d983
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  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 ) {