提交 f8781f9a 编写于 作者: M Mr.doob

Documentation: Color.

上级 5ac88316
......@@ -35,12 +35,12 @@ Start clock.
Stop clock.
</div>
<h3>.getElapsedTime() [page:Number Number]</h3>
<h3>.getElapsedTime() [page:Number]</h3>
<div>
Get milliseconds passed since the clock started.
</div>
<h3>.getDelta() [page:Number Number]</h3>
<h3>.getDelta() [page:Number]</h3>
<div>
Get the milliseconds passed since the last call to this method.
</div>
......
<h1>[name]</h1>
<div class="desc">todo</div>
<div class="desc">
Represents a color. See also [page:ColorUtils].
</div>
<h2>Constructor</h2>
<h3>[name]()</h3>
<h3>[name]( [page:Number hex])</h3>
<div>
hex — initial color in hexadecimal<br />
</div>
<h2>Properties</h2>
<h3>.[page:Vector3 todo]</h3>
<h3>.[page:Number r]</h3>
<div>
Red channel value (between 0 and 1).
</div>
<h3>.[page:Number g]</h3>
<div>
Green channel value (between 0 and 1).
</div>
<h3>.[page:Number b]</h3>
<div>
Blue channel value (between 0 and 1).
</div>
<h2>Methods</h2>
<h3>.todo( [page:Vector3 todo] )</h3>
<h3>.copy( [page:Color color] ) [page:this]</h3>
<div>
color — Color to copy.
</div>
<div>
Copies given color.
</div>
<h3>.copyGammaToLinear( [page:Color color] ) [page:this]</h3>
<div>
color — Color to copy.
</div>
<div>
Copies given color making conversion from gamma to linear space.
</div>
<h3>.copyLinearToGamma( [page:Color color] ) [page:this]</h3>
<div>
color — Color to copy.
</div>
<div>
Copies given color making conversion from linear to gamma space.
</div>
<h3>.convertGammaToLinear() [page:this]</h3>
<div>
color — Color to copy.
</div>
<div>
Converts this color from gamma to linear space.
</div>
<h3>.convertLinearToGamma() [page:this]</h3>
<div>
color — Color to copy.
</div>
<div>
Converts this color from linear to gamma space.
</div>
<h3>.setRGB( [page:Number r], [page:Number g], [page:Number b] ) [page:this]</h3>
<div>
r — Red channel value (between 0 and 1).<br />
g — Green channel value (between 0 and 1).<br />
b — Blue channel value (between 0 and 1).
</div>
<div>
Sets this color from RGB values.
</div>
<h3>.setHSV( [page:Number h], [page:Number s], [page:Number v] ) [page:this]</h3>
<div>
h — Hue channel (between 0 and 1).<br />
s — Saturation channel (between 0 and 1).<br />
v — Value channel (between 0 and 1).
</div>
<div>
Sets this color from HSV values.<br />
Based on MochiKit implementation by Bob Ippolito.
</div>
<h3>.setHex( [page:Number hex] ) [page:this]</h3>
<div>
hex — Color in hexadecimal.<br />
</div>
<div>
Sets this color from a hexadecimal value.
</div>
<h3>.getHex() [page:Number]</h3>
<div>
todo — todo<br />
Returns the value of this color in hexadecimal.
</div>
<h3>.getContextStyle() [page:String]</h3>
<div>
Returns the value of this color in CSS context style.<br />
Example: rgb(r, g, b)
</div>
<h3>.clone() [page:Color]</h3>
<div>
Clones this object.
</div>
<h2>Source</h2>
......
......@@ -344,7 +344,7 @@
text = text.replace(/\[page:(\w+)\]/gi, "<a href=\"javascript:goTo('$1')\" title=\"$1\">$1</a>" );
text = text.replace(/\[page:(\w+) (\w+)\]/gi, "<a href=\"javascript:goTo('$1')\" title=\"$1\">$2</a>" );
viewer.innerHTML = '<br>' + text + '<br>';
viewer.innerHTML = '<br>' + text + '<br><br>';
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册