From 6af32a24cae28ca46549d045cc59ef12ebb29e4a Mon Sep 17 00:00:00 2001 From: Wandalen Date: Sun, 1 Feb 2015 19:06:55 +0200 Subject: [PATCH] *.toArray documentation update --- docs/api/math/Color.html | 8 + docs/api/math/Euler.html | 279 +++++++++++++++++----------------- docs/api/math/Quaternion.html | 13 +- docs/api/math/Vector2.html | 5 +- docs/api/math/Vector3.html | 5 +- docs/api/math/Vector4.html | 15 +- 6 files changed, 174 insertions(+), 151 deletions(-) diff --git a/docs/api/math/Color.html b/docs/api/math/Color.html index 68a785b313..b08ae1d05d 100644 --- a/docs/api/math/Color.html +++ b/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. +

[method:Array toArray]( [page:Array array] )

+
+ array -- Optional array to store the color. +
+
+ Returns an array [r,g,b] +
+

[method:Color equals]( [page:Color c] ) [page:Color this]

Compares this color and c and returns true if they are the same, false otherwise. diff --git a/docs/api/math/Euler.html b/docs/api/math/Euler.html index 4b0ea4232e..9871338f5f 100644 --- a/docs/api/math/Euler.html +++ b/docs/api/math/Euler.html @@ -1,141 +1,144 @@ - - - - - - - -

[name]

- -
Euler Angles.

- - 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 Wikipedia)
- -

Example

- - var a = new THREE.Euler( 0, 1, 1.57, 'XYZ' ); - var b = new THREE.Vector3( 1, 0, 1 ); - b.applyEuler(a); - - - -

Constructor

- - -

[name]( [page:Float x], [page:Float y], [page:Float z], [page:String order] )

-
- x -- [page:Float] the angle of the x axis in radians
- y -- [page:Float] the angle of the y axis in radians
- z -- [page:Float] the angle of the z axis in radians
- order -- [page:String] A string representing the order that the rotations are applied, defaults to 'XYZ' (must be upper case). -
-
- A euler angle for transforming -
- - -

Properties

- -

[property:Float x]

- -

[property:Float y]

- -

[property:Float z]

- -

[property:String order]

- - - -

Methods

- -

[method:Euler set]( [page:Float x], [page:Float y], [page:Float z], [page:String order] ) [page:Euler this]

-
- x -- [page:Float] Angle in x axis in radians
- y -- [page:Float] Angle in y axis in radians
- z -- [page:Float] Angle in z axis in radians
- order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case) -
-
- Sets the angles of this euler transform. -
- -

[method:Euler copy]( [page:Euler euler] ) [page:Euler this]

-
- Copies value of *euler* to this euler. -
- -

[method:Euler setFromRotationMatrix]( [page:Matrix4 m], [page:String order] ) [page:Euler this]

-
- m -- [page:Matrix4] assumes upper 3x3 of matrix is a pure rotation matrix (i.e. unscaled)
- order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case) -
-
- Sets the angles of this euler transform from a pure rotation matrix based on the orientation specified by order. -
- -

[method:Euler setFromQuaternion]( [page:Quaternion q], [page:String order] ) [page:Euler this]

-
- q -- [page:Quaternion] quaternion must be normalized
- order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case) -
-
- Sets the angles of this euler transform from a normalized quaternion based on the orientation specified by order. -
- -

[method:Euler reorder]( [page:String newOrder] ) [page:Euler this]

-
- 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.
- WARNING: this discards revolution information. -
- -

[method:Euler setFromVector3]([page:Vector3 vector], [page:String order]) [page:Euler this]

-
- vector -- [page:Vector3]. - order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case) -
-
- Optionally Vector3 to the XYZ parameters of Euler, and order to the Euler's order property. -
- -

[method:Vector3 toVector3]()

-
- Returns the Euler's XYZ properties as a Vector3. -
- -

[method:Euler fromArray]([page:Array array]) [page:Euler this]

-
- array -- [page:Array] of length 3 or 4. array[3] is an optional order argument. -
-
- Assigns this euler's x angle to array[0].
- Assigns this euler's y angle to array[1].
- Assigns this euler's z angle to array[2].
- Optionally assigns this euler's order to array[3]. -
- -

[method:Array toArray]()

-
- Returns an array [x, y, z, order]. -
- -

[method:Boolean equals]( [page:Euler euler] )

-
- Checks for strict equality of this euler and *euler*. -
- -

[method:Euler clone]()

-
- Returns a new euler created from this euler. -
- - - - -

Source

- - [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] - + + + + + + + +

[name]

+ +
Euler Angles.

+ + 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 Wikipedia)
+ +

Example

+ + var a = new THREE.Euler( 0, 1, 1.57, 'XYZ' ); + var b = new THREE.Vector3( 1, 0, 1 ); + b.applyEuler(a); + + + +

Constructor

+ + +

[name]( [page:Float x], [page:Float y], [page:Float z], [page:String order] )

+
+ x -- [page:Float] the angle of the x axis in radians
+ y -- [page:Float] the angle of the y axis in radians
+ z -- [page:Float] the angle of the z axis in radians
+ order -- [page:String] A string representing the order that the rotations are applied, defaults to 'XYZ' (must be upper case). +
+
+ A euler angle for transforming +
+ + +

Properties

+ +

[property:Float x]

+ +

[property:Float y]

+ +

[property:Float z]

+ +

[property:String order]

+ + + +

Methods

+ +

[method:Euler set]( [page:Float x], [page:Float y], [page:Float z], [page:String order] ) [page:Euler this]

+
+ x -- [page:Float] Angle in x axis in radians
+ y -- [page:Float] Angle in y axis in radians
+ z -- [page:Float] Angle in z axis in radians
+ order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case) +
+
+ Sets the angles of this euler transform. +
+ +

[method:Euler copy]( [page:Euler euler] ) [page:Euler this]

+
+ Copies value of *euler* to this euler. +
+ +

[method:Euler setFromRotationMatrix]( [page:Matrix4 m], [page:String order] ) [page:Euler this]

+
+ m -- [page:Matrix4] assumes upper 3x3 of matrix is a pure rotation matrix (i.e. unscaled)
+ order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case) +
+
+ Sets the angles of this euler transform from a pure rotation matrix based on the orientation specified by order. +
+ +

[method:Euler setFromQuaternion]( [page:Quaternion q], [page:String order] ) [page:Euler this]

+
+ q -- [page:Quaternion] quaternion must be normalized
+ order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case) +
+
+ Sets the angles of this euler transform from a normalized quaternion based on the orientation specified by order. +
+ +

[method:Euler reorder]( [page:String newOrder] ) [page:Euler this]

+
+ 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.
+ WARNING: this discards revolution information. +
+ +

[method:Euler setFromVector3]([page:Vector3 vector], [page:String order]) [page:Euler this]

+
+ vector -- [page:Vector3]. + order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case) +
+
+ Optionally Vector3 to the XYZ parameters of Euler, and order to the Euler's order property. +
+ +

[method:Vector3 toVector3]()

+
+ Returns the Euler's XYZ properties as a Vector3. +
+ +

[method:Euler fromArray]([page:Array array]) [page:Euler this]

+
+ array -- [page:Array] of length 3 or 4. array[3] is an optional order argument. +
+
+ Assigns this euler's x angle to array[0].
+ Assigns this euler's y angle to array[1].
+ Assigns this euler's z angle to array[2].
+ Optionally assigns this euler's order to array[3]. +
+ +

[method:Array toArray]( [page:Array array] )

+
+ array -- Optional array to store the euler. +
+
+ Returns an array [x, y, z, order] +
+ +

[method:Boolean equals]( [page:Euler euler] )

+
+ Checks for strict equality of this euler and *euler*. +
+ +

[method:Euler clone]()

+
+ Returns a new euler created from this euler. +
+ + + + +

Source

+ + [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] + diff --git a/docs/api/math/Quaternion.html b/docs/api/math/Quaternion.html index 139194281f..25735bfbe0 100644 --- a/docs/api/math/Quaternion.html +++ b/docs/api/math/Quaternion.html @@ -131,15 +131,18 @@

[method:Quaternion slerp]([page:Quaternion qb], [page:float t])

qb -- Target quaternion rotation.
- t -- Normalized [0..1] interpolation factor. + t -- Normalized [0..1] interpolation factor.
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.
-

.toArray() [page: Array]

+

[method:Array toArray]( [page:Array array] )

+
+ array -- Array to store the quaternion. +
Returns the numerical elements of this quaternion in an array of format (x, y, z, w).
@@ -155,7 +158,7 @@

[method:Float lengthSq]()

- Calculates the squared length of the quaternion. + Calculates the squared length of the quaternion.

[method:Quaternion fromArray]([page:Array array])

diff --git a/docs/api/math/Vector2.html b/docs/api/math/Vector2.html index c09dec2c30..f1bdc572cb 100644 --- a/docs/api/math/Vector2.html +++ b/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].
-

[method:Array toArray]()

+

[method:Array toArray]( [page:Array array] )

+
+ array -- Optional array to store the vector. +
Returns an array [x, y].
diff --git a/docs/api/math/Vector3.html b/docs/api/math/Vector3.html index 0f5738b3d8..bc2d47a077 100644 --- a/docs/api/math/Vector3.html +++ b/docs/api/math/Vector3.html @@ -401,7 +401,10 @@ Multiplies this vector and m, and divides by perspective. -

[method:Array toArray]()

+

[method:Array toArray]( [page:Array array] )

+
+ array -- Optional array to store the vector. +
Assigns this vector's x value to array[0].
Assigns this vector's y value to array[1].
diff --git a/docs/api/math/Vector4.html b/docs/api/math/Vector4.html index 5d0733cf82..a874c8964a 100644 --- a/docs/api/math/Vector4.html +++ b/docs/api/math/Vector4.html @@ -186,7 +186,7 @@ v -- [page:Vector4]
- 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.

[method:Vector4 addScalar]([page:Float s]) [page:Vector4 this]

@@ -204,7 +204,7 @@
Checks to see if this vector matches vector v.
- +

[method:Vector4 setAxisAngleFromRotationMatrix]([page:Matrix4 m]) [page:Vector4 this]

m -- [page:Matrix4] @@ -236,7 +236,7 @@ Index 1: y
Index 2: z
Index 3: w
- +

[method:null setComponent]([page:Integer index], [page:Float value])

@@ -246,13 +246,13 @@
Sets the value of the vector component x, y, or z by an index.

- + Index 0: x
Index 1: y
Index 2: z
Index 3: w
- +

[method:Vector4 fromArray]([page:Array array]) [page:Vector4 this]

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]
-

[method:Array toArray]()

+

[method:Array toArray]( [page:Array array] )

+
+ array -- Optional array to store the vector. +
Returns an array in the format [x, y, z, w]
-- GitLab