Explorar o código

Improve Sphere closure performance

Tristan VALCKE %!s(int64=8) %!d(string=hai) anos
pai
achega
c60105d93a
Modificáronse 1 ficheiros con 1 adicións e 3 borrados
  1. 1 3
      src/math/Sphere.js

+ 1 - 3
src/math/Sphere.js

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