diff --git a/docs/api/math/Color.html b/docs/api/math/Color.html index 70e413223c69714632d66f07f8a31cdb4f8413b9..3ce18e18b7608459ba27034c75f41bfc7e9a34f3 100644 --- a/docs/api/math/Color.html +++ b/docs/api/math/Color.html @@ -44,22 +44,22 @@ var color = new THREE.Color( 1, 0, 0 );

Constructor

-

[name]( [page:Multi r], [page:Float g], [page:Float b] )

+

[name]( [page:Color_Hex_or_String r], [page:Float g], [page:Float b] )

- [page:Multi r] - (optional) the red component of the color if arguments g and b are defined. - If they are not defined, it can be a [link:https://en.wikipedia.org/wiki/Web_colors#Hex_triplet hexadecimal triplet] (recommended) or a CSS-style string or another Color instance.
- [page:Float g] - (optional) The green component of the color if it is defined.
- [page:Float b] - (optional) The blue component of the color if it is defined.

+ [page:Color_Hex_or_String r] - (optional) If arguments [page:Float g] and [page:Float b] are defined, the red component of the color. + If they are not defined, it can be a [link:https://en.wikipedia.org/wiki/Web_colors#Hex_triplet hexadecimal triplet] (recommended), a CSS-style string, or another Color instance.
+ [page:Float g] - (optional) If it is defined, the green component of the color.
+ [page:Float b] - (optional) If it is defined, the blue component of the color.

Note that standard method of specifying color in three.js is with a [link:https://en.wikipedia.org/wiki/Web_colors#Hex_triplet hexadecimal triplet], and that method is used throughout the rest of the documentation.

- When all arguments are defined then r is the red component, g is the green component and b is the blue component of the color.
- When only r is defined:
+ When all arguments are defined then [page:Color_Hex_or_String r] is the red component, [page:Float g] is the green component and [page:Float b] is the blue component of the color.
+ When only [page:Color_Hex_or_String r] is defined:

[method:Boolean equals]( [page:Color color] )

-
Compares [page:Color color] with this one and returns true if they are the same, false otherwise.
+
Compares the RGB values of [page:Color color] with those of this object. Returns true if they are the same, false otherwise.

[method:Color fromArray]( [page:Array array], [page:Integer offset] )

- [page:Array array] - [page:Array] of float in the form [ [page:Float r], [page:Float g], [page:Float b] ].
+ [page:Array array] - [page:Array] of floats in the form [ [page:Float r], [page:Float g], [page:Float b] ].
[page:Integer offset] - An optional offset into the array.

Sets this color's components based on an array formatted like [ [page:Float r], [page:Float g], [page:Float b] ]. @@ -160,14 +160,14 @@ var color = new THREE.Color( 1, 0, 0 );
Returns the hexadecimal value of this color.

[method:String getHexString]()

-
Returns the string formatted hexadecimal value of this color.
+
Returns the hexadecimal value of this color as a string (for example, 'FFFFFF').

[method:Object getHSL]( [page:Object optionalTarget] )

- [page:Object optionalTarget] — (optional) if specified, adds h, s and l keys to object (if not already present) - and sets the results there, otherwise a new Object will be created.

+ [page:Object optionalTarget] — (optional) if specified, adds h, s and l keys to the object (if not already present) + and sets the results there. Otherwise, a new Object will be created.

- Convert the values [page:.r r], [page:.g g] and [page:.b b] to [link:https://en.wikipedia.org/wiki/HSL_and_HSV HSL] + Convert this Color's [page:.r r], [page:.g g] and [page:.b b] values to [link:https://en.wikipedia.org/wiki/HSL_and_HSV HSL] format and returns an object of the form: @@ -177,37 +177,37 @@ var color = new THREE.Color( 1, 0, 0 );

[method:String getStyle]()

-
Returns the value of this color as a CSS-style string. Example: 'rgb(255,0,0)'.
+
Returns the value of this color as a CSS style string. Example: 'rgb(255,0,0)'.

[method:Color lerp]( [page:Color color], [page:Float alpha] )

[page:Color color] - color to converge on.
[page:Float alpha] - interpolation factor in the closed interval [0, 1].

- Linear interpolation of this colors RGB values and the RGB values of the passed 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. + Linearly interpolates this color's RGB values toward the RGB values of the passed argument. + The alpha argument can be thought of as the ratio between the two colors, where 0.0 is + this color and 1.0 is the first argument.

[method:Color multiply]( [page:Color color] )

-
Multiplies this color's RGB values by given [page:Color color]'s RGB values.
+
Multiplies this color's RGB values by the given [page:Color color]'s RGB values.

[method:Color multiplyScalar]( [page:Number s] )

Multiplies this color's RGB values by [page:Number s].

[method:Color offsetHSL]( [page:Float h], [page:Float s], [page:Float l] )

- Adds given [page:Float h], [page:Float s], and [page:Float l] to this color's existing values. - Internally this converts the [page:.r r], [page:.g g] and [page:.b b] values to HSL, adds - [page:Float h], [page:Float s], and [page:Float l] and then converts back to RGB. + Adds the given [page:Float h], [page:Float s], and [page:Float l] to this color's values. + Internally, this converts the color's [page:.r r], [page:.g g] and [page:.b b] values to HSL, adds + [page:Float h], [page:Float s], and [page:Float l], and then converts the color back to RGB.
-

[method:Color set]( [page:Multi value] )

+

[method:Color set]( [page:Color_Hex_or_String value] )

- [page:Multi value] - Value to set this color to.

+ [page:Color_Hex_or_String value] - Value to set this color to.

- See the Constructor above for full details of what [page:Multi value] can be. - Delegates to [page:.copy], .setStyle, or .setHex depending on input type. + See the Constructor above for full details of what [page:Color_Hex_or_String value] can be. + Delegates to [page:.copy], [page:.setStyle], or [page:.setHex] depending on input type.

[method:Color setHex]( [page:Integer hex] )

@@ -228,9 +228,9 @@ var color = new THREE.Color( 1, 0, 0 );

[method:Color setRGB]( [page:Float r], [page:Float g], [page:Float b] )

- [page:Float r] — Red channel value between 0 and 1.
- [page:Float g] — Green channel value between 0 and 1.
- [page:Float b] — Blue channel value between 0 and 1.

+ [page:Float r] — Red channel value between 0.0 and 1.0.
+ [page:Float g] — Green channel value between 0.0 and 1.0.
+ [page:Float b] — Blue channel value between 0.0 and 1.0.

Sets this color from RGB values.
@@ -255,7 +255,7 @@ var color = new THREE.Color( 1, 0, 0 ); "red" ( or any [link:https://en.wikipedia.org/wiki/X11_color_names#Color_name_chart X11 color name] - all 140 color names are supported ).
- Transluent colors such as "rgba(255, 0, 0, 0.5)" and "hsla(0, 100%, 50%, 0.5)" are also accepted, + Translucent colors such as "rgba(255, 0, 0, 0.5)" and "hsla(0, 100%, 50%, 0.5)" are also accepted, but the alpha-channel coordinate will be discarded.

Note that for X11 color names, multiple words such as Dark Orange become the string 'darkorange' (all lowercase). @@ -263,8 +263,8 @@ var color = new THREE.Color( 1, 0, 0 );

[method:Color sub]( [page:Color color] )

- Subtracts RGB components of the given color from the RGB components of this color. - If a component is negative, it is set to zero. + Subtracts the RGB components of the given color from the RGB components of this color. + If this results in a negative component, that component is set to zero.

[method:Array toArray]( [page:Array array], [page:Integer offset] )