浏览代码

Docs: Update Vector*, Matrix and Quaternion pages with -*Self change.

Mr.doob 12 年之前
父节点
当前提交
8a7f3fad38
共有 5 个文件被更改,包括 45 次插入45 次删除
  1. 6 6
      docs/api/math/Matrix4.html
  2. 9 9
      docs/api/math/Quaternion.html
  3. 8 8
      docs/api/math/Vector2.html
  4. 13 13
      docs/api/math/Vector3.html
  5. 9 9
      docs/api/math/Vector4.html

+ 6 - 6
docs/api/math/Matrix4.html

@@ -30,8 +30,8 @@
 		m2.makeRotationY( beta );
 		m3.makeRotationZ( gamma );
 
-		m.multiply( m1, m2 );
-		m.multiplySelf( m3 );
+		m.multiplyMatrices( m1, m2 );
+		m.multiply( m3 );
 		</code>
 
 
@@ -68,14 +68,14 @@
 		Constructs a rotation matrix, looking from *eye* towards *center* with defined *up* vector.
 		</div>
 
-		<h3>.multiply( [page:Matrix4 a], [page:Matrix4 b] ) [page:Matrix4]</h3>
+		<h3>.multiply( [page:Matrix4 m] ) [page:Matrix4]</h3>
 		<div>
-		Sets this matrix to *a x b*.
+		Multiplies this matrix by *m*.
 		</div>
 
-		<h3>.multiplySelf( [page:Matrix4 m] ) [page:Matrix4]</h3>
+		<h3>.multiplyMatrices( [page:Matrix4 a], [page:Matrix4 b] ) [page:Matrix4]</h3>
 		<div>
-		Multiplies this matrix by *m*.
+		Sets this matrix to *a x b*.
 		</div>
 
 		<h3>.multiplyToArray( [page:Matrix4 a], [page:Matrix4 b], [page:Array r] ) [page:Matrix4]</h3>

+ 9 - 9
docs/api/math/Quaternion.html

@@ -14,11 +14,11 @@
 
 		<h2>Example</h2>
 
-		<code>var q = new THREE.Quaternion();
-		q.setFromAxisAngle( new THREE.Vector3( 0, 1, 0 ), Math.PI / 2 );
+		<code>var quaternion = new THREE.Quaternion();
+		quaternion.setFromAxisAngle( new THREE.Vector3( 0, 1, 0 ), Math.PI / 2 );
 
-		var v = new THREE.Vector3( 1, 0, 0 );
-		q.multiplyVector3( v );
+		var vector = new THREE.Vector3( 1, 0, 0 );
+		vector.applyQuaternion( quaternion );
 		</code>
 
 
@@ -94,15 +94,15 @@
 		Normalizes this quaternion.
 		</div>
 
-		<h3>.multiply( [page:Quaternion a], [page:Quaternion b] ) [page:Quaternion]</h3>
+		<h3>.multiply( [page:Quaternion b] ) [page:Quaternion]</h3>
 		<div>
-		Sets this quaternion to *a x b*<br />
-		Adapted from [link:http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/code/index.htm].
+		Multiplies this quaternion by *b*.
 		</div>
 
-		<h3>.multiplySelf( [page:Quaternion b] ) [page:Quaternion]</h3>
+		<h3>.multiplyQuaternions( [page:Quaternion a], [page:Quaternion b] ) [page:Quaternion]</h3>
 		<div>
-		Multiplies this quaternion by *b*.
+		Sets this quaternion to *a x b*<br />
+		Adapted from [link:http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/code/index.htm].
 		</div>
 
 		<h3>.multiplyVector3( [page:Vector3 vector], [page:Vector3 dest] ) [page:Quaternion]</h3>

+ 8 - 8
docs/api/math/Vector2.html

@@ -44,24 +44,24 @@
 		Copies value of *v* to this vector.
 		</div>
 
-		<h3>.add( [page:Vector2 a], [page:Vector2 b] ) [page:Vector2]</h3>
+		<h3>.add( [page:Vector2 v] ) [page:Vector2]</h3>
 		<div>
-		Sets this vector to *a + b*.
+		Adds *v* to this vector.
 		</div>
 
-		<h3>.addSelf( [page:Vector2 v] ) [page:Vector2]</h3>
+		<h3>.addVectors( [page:Vector2 a], [page:Vector2 b] ) [page:Vector2]</h3>
 		<div>
-		Adds *v* to this vector.
+		Sets this vector to *a + b*.
 		</div>
 
-		<h3>.sub( [page:Vector2 a], [page:Vector2 b] ) [page:Vector2]</h3>
+		<h3>.sub( [page:Vector2 v] ) [page:Vector2]</h3>
 		<div>
-		Sets this vector to *a - b*.
+		Subtracts *v* from this vector.
 		</div>
 
-		<h3>.subSelf( [page:Vector2 v] ) [page:Vector2]</h3>
+		<h3>.subVectors( [page:Vector2 a], [page:Vector2 b] ) [page:Vector2]</h3>
 		<div>
-		Subtracts *v* from this vector.
+		Sets this vector to *a - b*.
 		</div>
 
 		<h3>.multiplyScalar( [page:Float s] ) [page:Vector2]</h3>

+ 13 - 13
docs/api/math/Vector3.html

@@ -18,7 +18,7 @@
 		var b = new THREE.Vector3( 0, 1, 0 );
 
 		var c = new THREE.Vector3();
-		c.cross( a, b );
+		c.crossVectors( a, b );
 		</code>
 
 
@@ -63,24 +63,24 @@
 		Copies value of *v* to this vector.
 		</div>
 
-		<h3>.add( [page:Vector3 a], [page:Vector3 b] ) [page:Vector3]</h3>
+		<h3>.add( [page:Vector3 v] ) [page:Vector3]</h3>
 		<div>
-		Sets this vector to *a + b*.
+		Adds *v* to this vector.
 		</div>
 
-		<h3>.addSelf( [page:Vector3 v] ) [page:Vector3]</h3>
+		<h3>.addVectors( [page:Vector3 a], [page:Vector3 b] ) [page:Vector3]</h3>
 		<div>
-		Adds *v* to this vector.
+		Sets this vector to *a + b*.
 		</div>
 
-		<h3>.sub( [page:Vector3 a], [page:Vector3 b] ) [page:Vector3]</h3>
+		<h3>.sub( [page:Vector3 v] ) [page:Vector3]</h3>
 		<div>
-		Sets this vector to *a - b*.
+		Subtracts *v* from this vector.
 		</div>
 
-		<h3>.subSelf( [page:Vector3 v] ) [page:Vector3]</h3>
+		<h3>.subVectors( [page:Vector3 a], [page:Vector3 b] ) [page:Vector3]</h3>
 		<div>
-		Subtracts *v* from this vector.
+		Sets this vector to *a - b*.
 		</div>
 
 		<h3>.multiplyScalar( [page:Float s] ) [page:Vector3]</h3>
@@ -145,14 +145,14 @@
 		Normalizes this vector and multiplies it by *l*.
 		</div>
 
-		<h3>.cross( [page:Vector3 a], [page:Vector3 b] ) [page:Vector3]</h3>
+		<h3>.cross( [page:Vector3 v] ) [page:Vector3]</h3>
 		<div>
-		Sets this vector to cross product of *a* and *b*.
+		Sets this vector to cross product of itself and *v*.
 		</div>
 
-		<h3>.crossSelf( [page:Vector3 v] ) [page:Vector3]</h3>
+		<h3>.crossVectors( [page:Vector3 a], [page:Vector3 b] ) [page:Vector3]</h3>
 		<div>
-		Sets this vector to cross product of itself and *v*.
+		Sets this vector to cross product of *a* and *b*.
 		</div>
 
 		<h3>.getPositionFromMatrix( [page:Matrix4 m] ) [page:Vector3]</h3>

+ 9 - 9
docs/api/math/Vector4.html

@@ -40,24 +40,24 @@
 		Copies value of *v* to this vector.
 		</div>
 
-		<h3>.add( [page:Vector4 a], [page:Vector4 b] ) [page:Vector4]</h3>
+		<h3>.add( [page:Vector4 v] ) [page:Vector4]</h3>
 		<div>
-		Sets this vector to *a + b*.
+		Adds *v* to this vector.
 		</div>
 
-		<h3>.addSelf( [page:Vector4 v] ) [page:Vector4]</h3>
+		<h3>.addVectors( [page:Vector4 a], [page:Vector4 b] ) [page:Vector4]</h3>
 		<div>
-		Adds *v* to this vector.
+		Sets this vector to *a + b*.
 		</div>
 
-		<h3>.sub( [page:Vector4 a], [page:Vector4 b] ) [page:Vector4]</h3>
+		<h3>.sub( [page:Vector4 v] ) [page:Vector4]</h3>
 		<div>
-		Sets this vector to *a - b*.
+		Subtracts *v* from this vector.
 		</div>
 
-		<h3>.subSelf( [page:Vector4 v] ) [page:Vector4]</h3>
+		<h3>.subVectors( [page:Vector4 a], [page:Vector4 b] ) [page:Vector4]</h3>
 		<div>
-		Subtracts *v* from this vector.
+		Sets this vector to *a - b*.
 		</div>
 
 		<h3>.multiplyScalar( [page:Float s] ) [page:Vector4]</h3>
@@ -101,7 +101,7 @@
 		Normalizes this vector and multiplies it by *l*.
 		</div>
 
-		<h3>.lerpSelf( [page:Vector4 v], [page:Float alpha] ) [page:Vector4]</h3>
+		<h3>.lerp( [page:Vector4 v], [page:Float alpha] ) [page:Vector4]</h3>
 		<div>
 		Linearly interpolate between this vector and *v* with *alpha* factor.
 		</div>