浏览代码

Improve Sphere closure performance

Tristan VALCKE 8 年之前
父节点
当前提交
c60105d93a
共有 1 个文件被更改,包括 1 次插入3 次删除
  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 ) {