Browse Source

Improve Sphere closure performance

Tristan VALCKE 8 years ago
parent
commit
c60105d93a
1 changed files with 1 additions and 3 deletions
  1. 1 3
      src/math/Sphere.js

+ 1 - 3
src/math/Sphere.js

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