瀏覽代碼

Removed Vector*.isZero()

WestLangley 12 年之前
父節點
當前提交
f05d90f890
共有 3 個文件被更改,包括 1 次插入17 次删除
  1. 1 5
      src/core/Geometry.js
  2. 0 6
      src/core/Vector2.js
  3. 0 6
      src/core/Vector3.js

+ 1 - 5
src/core/Geometry.js

@@ -138,11 +138,7 @@ THREE.Geometry.prototype = {
 			ab.sub( vA, vB );
 			ab.sub( vA, vB );
 			cb.crossSelf( ab );
 			cb.crossSelf( ab );
 
 
-			if ( !cb.isZero() ) {
-
-				cb.normalize();
-
-			}
+			cb.normalize();
 
 
 			face.normal.copy( cb );
 			face.normal.copy( cb );
 
 

+ 0 - 6
src/core/Vector2.js

@@ -160,12 +160,6 @@ THREE.Vector2.prototype = {
 
 
 	},
 	},
 
 
-	isZero: function ( v ) {
-
-		return this.lengthSq() < ( v !== undefined ? v : 0.0001 );
-
-	},
-
 	clone: function () {
 	clone: function () {
 
 
 		return new THREE.Vector2( this.x, this.y );
 		return new THREE.Vector2( this.x, this.y );

+ 0 - 6
src/core/Vector3.js

@@ -476,12 +476,6 @@ THREE.Vector3.prototype = {
 
 
 	},
 	},
 
 
-	isZero: function ( v ) {
-
-		return this.lengthSq() < ( v !== undefined ? v : 0.0001 );
-
-	},
-
 	clone: function () {
 	clone: function () {
 
 
 		return new THREE.Vector3( this.x, this.y, this.z );
 		return new THREE.Vector3( this.x, this.y, this.z );