浏览代码

Address review comments

Franklin Ta 8 年之前
父节点
当前提交
ee1277c9e8
共有 2 个文件被更改,包括 5 次插入10 次删除
  1. 4 4
      docs/api/deprecated/DeprecatedList.html
  2. 1 6
      src/math/Vector3.js

+ 4 - 4
docs/api/deprecated/DeprecatedList.html

@@ -117,7 +117,7 @@
 		<h2>Core</h2>
 
 		<h3>[page:EventDispatcher]</h3>
-		<div>EventDispatcher.apply has been has been removed. Inherit or Object.assign the prototype to mix-in instead.</div>
+		<div>EventDispatcher.apply has been removed. Inherit or Object.assign the prototype to mix-in instead.</div>
 
 		<h3>[page:Raycaster]</h3>
 		<div>Raycaster.params.PointCloud has been renamed to [page:Raycaster.params.Points].</div>
@@ -125,9 +125,9 @@
 
 		<h3>[page:Uniform]</h3>
 		<div>
-			Uniform.dynamic has been has been removed. Use object.onBeforeRender() instead.<br /><br />
+			Uniform.dynamic has been removed. Use object.onBeforeRender() instead.<br /><br />
 
-			Uniform.onUpdate has been has been removed. Use object.onBeforeRender() instead.
+			Uniform.onUpdate has been removed. Use object.onBeforeRender() instead.
 		</div>
 
 
@@ -316,7 +316,7 @@
 
 			Matrix4.setRotationFromQuaternion() has been renamed to [page:Matrix4.makeRotationFromQuaternion]( quaternion ).<br /><br />
 
-			Matrix4.multiplyVector3() has been has been removed. Use vector.applyMatrix4( matrix ) instead.<br /><br />
+			Matrix4.multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead.<br /><br />
 
 			Matrix4.multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.<br /><br />
 

+ 1 - 6
src/math/Vector3.js

@@ -301,12 +301,7 @@ Vector3.prototype = {
 		this.z = e[ 2 ] * x + e[ 6 ] * y + e[ 10 ] * z + e[ 14 ];
 		var w = e[ 3 ] * x + e[ 7 ] * y + e[ 11 ] * z + e[ 15 ];
 
-		var d = 1 / w; // perspective divide
-		this.x *= d;
-		this.y *= d;
-		this.z *= d;
-
-		return this;
+		return this.divideScalar( 1 / w );
 
 	},