2
0
Эх сурвалжийг харах

Merge pull request #6012 from Wandalen/dev

*.toArray documentation update
Mr.doob 10 жил өмнө
parent
commit
4c050954ec

+ 8 - 0
docs/api/math/Color.html

@@ -176,6 +176,14 @@
 		Linear interpolation of this colors rgb values and the rgb values of the first argument. The alpha argument can be thought of as the percent between the two colors, where 0 is this color and 1 is the first argument.
 		Linear interpolation of this colors rgb values and the rgb values of the first argument. The alpha argument can be thought of as the percent between the two colors, where 0 is this color and 1 is the first argument.
 		</div>
 		</div>
 
 
+		<h3>[method:Array toArray]( [page:Array array] )</h3>
+		<div>
+		array -- Optional array to store the color.
+		</div>
+		<div>
+		Returns an array [r,g,b]
+		</div>
+
 		<h3>[method:Color equals]( [page:Color c] ) [page:Color this]</h3>
 		<h3>[method:Color equals]( [page:Color c] ) [page:Color this]</h3>
 		<div>
 		<div>
 		Compares this color and c and returns true if they are the same, false otherwise.
 		Compares this color and c and returns true if they are the same, false otherwise.

+ 141 - 138
docs/api/math/Euler.html

@@ -1,141 +1,144 @@
 <!DOCTYPE html>
 <!DOCTYPE html>
 <html lang="en">
 <html lang="en">
-  <head>
-    <meta charset="utf-8" />
-    <script src="../../list.js"></script>
-    <script src="../../page.js"></script>
-    <link type="text/css" rel="stylesheet" href="../../page.css" />
-  </head>
-  <body>
-    <h1>[name]</h1>
-
-    <div class="desc">Euler Angles. <br/><br/>
-    
-    Euler angles describe a rotation transformation by rotating an object on its various axes in specified amounts per axis, and a specified axis order.
-    (More information on <a href='http://en.wikipedia.org/wiki/Euler_angles' target='blank'>Wikipedia</a>)</div>
-
-    <h2>Example</h2>
-
-    <code>var a = new THREE.Euler( 0, 1, 1.57, 'XYZ' );
-    var b = new THREE.Vector3( 1, 0, 1 );
-    b.applyEuler(a);
-    </code>
-
-
-    <h2>Constructor</h2>
-
-
-    <h3>[name]( [page:Float x], [page:Float y], [page:Float z], [page:String order] )</h3>
-    <div>
-    x -- [page:Float] the angle of the x axis in radians<br />
-    y -- [page:Float] the angle of the y axis in radians<br />
-    z -- [page:Float] the angle of the z axis in radians<br />
-    order -- [page:String] A string representing the order that the rotations are applied, defaults to 'XYZ' (must be upper case).
-    </div>
-    <div>
-    A euler angle for transforming
-    </div>
-
-
-    <h2>Properties</h2>
-
-    <h3>[property:Float x]</h3>
-
-    <h3>[property:Float y]</h3>
-
-    <h3>[property:Float z]</h3>
-
-    <h3>[property:String order]</h3>
-
-
-
-    <h2>Methods</h2>
-
-    <h3>[method:Euler set]( [page:Float x], [page:Float y], [page:Float z], [page:String order] ) [page:Euler this]</h3>
-    <div>
-    x -- [page:Float] Angle in x axis in radians<br />
-    y -- [page:Float] Angle in y axis in radians<br />
-    z -- [page:Float] Angle in z axis in radians<br />
-    order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case)
-    </div>
-    <div>
-    Sets the angles of this euler transform.
-    </div>
-
-    <h3>[method:Euler copy]( [page:Euler euler] ) [page:Euler this]</h3>
-    <div>
-    Copies value of *euler* to this euler.
-    </div>
-
-    <h3>[method:Euler setFromRotationMatrix]( [page:Matrix4 m], [page:String order] ) [page:Euler this]</h3>
-    <div>
-    m -- [page:Matrix4] assumes upper 3x3 of matrix is a pure rotation matrix (i.e. unscaled)<br />
-    order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case)
-    </div>
-    <div>
-    Sets the angles of this euler transform from a pure rotation matrix based on the orientation specified by order.
-    </div>
-
-    <h3>[method:Euler setFromQuaternion]( [page:Quaternion q], [page:String order] ) [page:Euler this]</h3>
-    <div>
-    q -- [page:Quaternion] quaternion must be normalized<br />
-    order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case)
-    </div>
-    <div>
-    Sets the angles of this euler transform from a normalized quaternion based on the orientation specified by order.
-    </div>
-
-    <h3>[method:Euler reorder]( [page:String newOrder] ) [page:Euler this]</h3>
-    <div>
-    Resets the euler angle with a new order by creating a quaternion from this euler angle and then setting this euler angle with the quaternion and the new order. <br />
-    WARNING: this discards revolution information.
-    </div>
-
-    <h3>[method:Euler setFromVector3]([page:Vector3 vector], [page:String order]) [page:Euler this]</h3>
-    <div>
-    vector -- [page:Vector3].
-    order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case)
-    </div>
-    <div>
-    Optionally Vector3 to the XYZ parameters of Euler, and order to the Euler's order property.
-    </div>
-
-    <h3>[method:Vector3 toVector3]()</h3>
-    <div>
-    Returns the Euler's XYZ properties as a Vector3.
-    </div>
-
-    <h3>[method:Euler fromArray]([page:Array array]) [page:Euler this]</h3>
-    <div>
-    array -- [page:Array] of length 3 or 4. array[3] is an optional order argument.
-    </div>
-    <div>
-    Assigns this euler's x angle to array[0]. <br />
-    Assigns this euler's y angle to array[1]. <br />
-    Assigns this euler's z angle to array[2]. <br />
-    Optionally assigns this euler's order to array[3].
-    </div>
-
-    <h3>[method:Array toArray]()</h3>
-    <div>
-    Returns an array [x, y, z, order].
-    </div>
-
-    <h3>[method:Boolean equals]( [page:Euler euler] )</h3>
-    <div>
-    Checks for strict equality of this euler and *euler*.
-    </div>
-
-    <h3>[method:Euler clone]()</h3>
-    <div>
-    Returns a new euler created from this euler.
-    </div>
-
-
-
-
-    <h2>Source</h2>
-
-    [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
-  </body>
+	<head>
+		<meta charset="utf-8" />
+		<script src="../../list.js"></script>
+		<script src="../../page.js"></script>
+		<link type="text/css" rel="stylesheet" href="../../page.css" />
+	</head>
+	<body>
+		<h1>[name]</h1>
+
+		<div class="desc">Euler Angles. <br/><br/>
+
+		Euler angles describe a rotation transformation by rotating an object on its various axes in specified amounts per axis, and a specified axis order.
+		(More information on <a href='http://en.wikipedia.org/wiki/Euler_angles' target='blank'>Wikipedia</a>)</div>
+
+		<h2>Example</h2>
+
+		<code>var a = new THREE.Euler( 0, 1, 1.57, 'XYZ' );
+		var b = new THREE.Vector3( 1, 0, 1 );
+		b.applyEuler(a);
+		</code>
+
+
+		<h2>Constructor</h2>
+
+
+		<h3>[name]( [page:Float x], [page:Float y], [page:Float z], [page:String order] )</h3>
+		<div>
+		x -- [page:Float] the angle of the x axis in radians<br />
+		y -- [page:Float] the angle of the y axis in radians<br />
+		z -- [page:Float] the angle of the z axis in radians<br />
+		order -- [page:String] A string representing the order that the rotations are applied, defaults to 'XYZ' (must be upper case).
+		</div>
+		<div>
+		A euler angle for transforming
+		</div>
+
+
+		<h2>Properties</h2>
+
+		<h3>[property:Float x]</h3>
+
+		<h3>[property:Float y]</h3>
+
+		<h3>[property:Float z]</h3>
+
+		<h3>[property:String order]</h3>
+
+
+
+		<h2>Methods</h2>
+
+		<h3>[method:Euler set]( [page:Float x], [page:Float y], [page:Float z], [page:String order] ) [page:Euler this]</h3>
+		<div>
+		x -- [page:Float] Angle in x axis in radians<br />
+		y -- [page:Float] Angle in y axis in radians<br />
+		z -- [page:Float] Angle in z axis in radians<br />
+		order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case)
+		</div>
+		<div>
+		Sets the angles of this euler transform.
+		</div>
+
+		<h3>[method:Euler copy]( [page:Euler euler] ) [page:Euler this]</h3>
+		<div>
+		Copies value of *euler* to this euler.
+		</div>
+
+		<h3>[method:Euler setFromRotationMatrix]( [page:Matrix4 m], [page:String order] ) [page:Euler this]</h3>
+		<div>
+		m -- [page:Matrix4] assumes upper 3x3 of matrix is a pure rotation matrix (i.e. unscaled)<br />
+		order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case)
+		</div>
+		<div>
+		Sets the angles of this euler transform from a pure rotation matrix based on the orientation specified by order.
+		</div>
+
+		<h3>[method:Euler setFromQuaternion]( [page:Quaternion q], [page:String order] ) [page:Euler this]</h3>
+		<div>
+		q -- [page:Quaternion] quaternion must be normalized<br />
+		order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case)
+		</div>
+		<div>
+		Sets the angles of this euler transform from a normalized quaternion based on the orientation specified by order.
+		</div>
+
+		<h3>[method:Euler reorder]( [page:String newOrder] ) [page:Euler this]</h3>
+		<div>
+		Resets the euler angle with a new order by creating a quaternion from this euler angle and then setting this euler angle with the quaternion and the new order. <br />
+		WARNING: this discards revolution information.
+		</div>
+
+		<h3>[method:Euler setFromVector3]([page:Vector3 vector], [page:String order]) [page:Euler this]</h3>
+		<div>
+		vector -- [page:Vector3].
+		order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case)
+		</div>
+		<div>
+		Optionally Vector3 to the XYZ parameters of Euler, and order to the Euler's order property.
+		</div>
+
+		<h3>[method:Vector3 toVector3]()</h3>
+		<div>
+		Returns the Euler's XYZ properties as a Vector3.
+		</div>
+
+		<h3>[method:Euler fromArray]([page:Array array]) [page:Euler this]</h3>
+		<div>
+		array -- [page:Array] of length 3 or 4. array[3] is an optional order argument.
+		</div>
+		<div>
+		Assigns this euler's x angle to array[0]. <br />
+		Assigns this euler's y angle to array[1]. <br />
+		Assigns this euler's z angle to array[2]. <br />
+		Optionally assigns this euler's order to array[3].
+		</div>
+
+		<h3>[method:Array toArray]( [page:Array array] )</h3>
+		<div>
+		array -- Optional array to store the euler.
+		</div>
+		<div>
+		Returns an array [x, y, z, order]
+		</div>
+
+		<h3>[method:Boolean equals]( [page:Euler euler] )</h3>
+		<div>
+		Checks for strict equality of this euler and *euler*.
+		</div>
+
+		<h3>[method:Euler clone]()</h3>
+		<div>
+		Returns a new euler created from this euler.
+		</div>
+
+
+
+
+		<h2>Source</h2>
+
+		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+	</body>
 </html>
 </html>

+ 8 - 5
docs/api/math/Quaternion.html

@@ -131,15 +131,18 @@
 		<h3>[method:Quaternion slerp]([page:Quaternion qb], [page:float t])</h3>
 		<h3>[method:Quaternion slerp]([page:Quaternion qb], [page:float t])</h3>
 		<div>
 		<div>
 		qb -- Target quaternion rotation.<br />
 		qb -- Target quaternion rotation.<br />
-		t -- Normalized [0..1] interpolation factor. 
+		t -- Normalized [0..1] interpolation factor.
 		</div>
 		</div>
 		<div>
 		<div>
 		Handles the spherical linear interpolation between this quaternion's configuration
 		Handles the spherical linear interpolation between this quaternion's configuration
-		and that of *qb*. *t* represents how close to the current (0) or target (1) rotation the 
-		result should be. 
+		and that of *qb*. *t* represents how close to the current (0) or target (1) rotation the
+		result should be.
 		</div>
 		</div>
 
 
-		<h3>.toArray() [page: Array]</h3>
+		<h3>[method:Array toArray]( [page:Array array] )</h3>
+		<div>
+		array -- Array to store the quaternion.
+		</div>
 		<div>
 		<div>
 		Returns the numerical elements of this quaternion in an array of format (x, y, z, w).
 		Returns the numerical elements of this quaternion in an array of format (x, y, z, w).
 		</div>
 		</div>
@@ -155,7 +158,7 @@
 
 
 		<h3>[method:Float lengthSq]()</h3>
 		<h3>[method:Float lengthSq]()</h3>
 		<div>
 		<div>
-		Calculates the squared length of the quaternion. 
+		Calculates the squared length of the quaternion.
 		</div>
 		</div>
 
 
 		<h3>[method:Quaternion fromArray]([page:Array array])</h3>
 		<h3>[method:Quaternion fromArray]([page:Array array])</h3>

+ 4 - 1
docs/api/math/Vector2.html

@@ -226,7 +226,10 @@
 		Sets this vector's x value to be array[0] and y value to be array[1].
 		Sets this vector's x value to be array[0] and y value to be array[1].
 		</div>
 		</div>
 
 
-		<h3>[method:Array toArray]()</h3>
+		<h3>[method:Array toArray]( [page:Array array] )</h3>
+		<div>
+		array -- Optional array to store the vector.
+		</div>
 		<div>
 		<div>
 		Returns an array [x, y].
 		Returns an array [x, y].
 		</div>
 		</div>

+ 4 - 1
docs/api/math/Vector3.html

@@ -401,7 +401,10 @@
 		Multiplies this vector and m, and divides by perspective.
 		Multiplies this vector and m, and divides by perspective.
 		</div>
 		</div>
 
 
-		<h3>[method:Array toArray]()</h3>
+		<h3>[method:Array toArray]( [page:Array array] )</h3>
+		<div>
+		array -- Optional array to store the vector.
+		</div>
 		<div>
 		<div>
 		Assigns this vector's x value to array[0]. <br />
 		Assigns this vector's x value to array[0]. <br />
 		Assigns this vector's y value to array[1]. <br />
 		Assigns this vector's y value to array[1]. <br />

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

@@ -186,7 +186,7 @@
 		v -- [page:Vector4]
 		v -- [page:Vector4]
 		</div>
 		</div>
 		<div>
 		<div>
-		If this vector's x, y, z, or w value is greater than vector v's x, y, z, or w value, that value is replaced by the corresponding vector v value. 
+		If this vector's x, y, z, or w value is greater than vector v's x, y, z, or w value, that value is replaced by the corresponding vector v value.
 		</div>
 		</div>
 
 
 		<h3>[method:Vector4 addScalar]([page:Float s]) [page:Vector4 this]</h3>
 		<h3>[method:Vector4 addScalar]([page:Float s]) [page:Vector4 this]</h3>
@@ -204,7 +204,7 @@
 		<div>
 		<div>
 		Checks to see if this vector matches vector v.
 		Checks to see if this vector matches vector v.
 		</div>
 		</div>
-		
+
 		<h3>[method:Vector4 setAxisAngleFromRotationMatrix]([page:Matrix4 m]) [page:Vector4 this]</h3>
 		<h3>[method:Vector4 setAxisAngleFromRotationMatrix]([page:Matrix4 m]) [page:Vector4 this]</h3>
 		<div>
 		<div>
 		m -- [page:Matrix4]
 		m -- [page:Matrix4]
@@ -236,7 +236,7 @@
 		Index 1: y<br/>
 		Index 1: y<br/>
 		Index 2: z<br/>
 		Index 2: z<br/>
 		Index 3: w<br/>
 		Index 3: w<br/>
- 
+
 		</div>
 		</div>
 
 
 		<h3>[method:null setComponent]([page:Integer index], [page:Float value])</h3>
 		<h3>[method:null setComponent]([page:Integer index], [page:Float value])</h3>
@@ -246,13 +246,13 @@
 		</div>
 		</div>
 		<div>
 		<div>
 		Sets the value of the vector component	x, y, or z by an index.<br/><br/>
 		Sets the value of the vector component	x, y, or z by an index.<br/><br/>
-		
+
 		Index 0: x<br/>
 		Index 0: x<br/>
 		Index 1: y<br/>
 		Index 1: y<br/>
 		Index 2: z<br/>
 		Index 2: z<br/>
 		Index 3: w<br/>
 		Index 3: w<br/>
 		</div>
 		</div>
-		
+
 		<h3>[method:Vector4 fromArray]([page:Array array]) [page:Vector4 this]</h3>
 		<h3>[method:Vector4 fromArray]([page:Array array]) [page:Vector4 this]</h3>
 		<div>
 		<div>
 		array -- [page:Array] An array formatted [x, y, z, w]
 		array -- [page:Array] An array formatted [x, y, z, w]
@@ -261,7 +261,10 @@
 		Sets the vector's components based on an array formatted like [x, y, z, w]
 		Sets the vector's components based on an array formatted like [x, y, z, w]
 		</div>
 		</div>
 
 
-		<h3>[method:Array toArray]()</h3>
+		<h3>[method:Array toArray]( [page:Array array] )</h3>
+		<div>
+		array -- Optional array to store the vector.
+		</div>
 		<div>
 		<div>
 		Returns an array in the format [x, y, z, w]
 		Returns an array in the format [x, y, z, w]
 		</div>
 		</div>