<code>var color = new THREE.Color( 0xff0000 );</code>
<code>var color = new THREE.Color("rgb(255,0,0)");</code>
<code>var color = new THREE.Color("rgb(255, 0, 0)");</code>
<code>var color = new THREE.Color("rgb(100%, 0%, 0%)");</code>
<code>var color = new THREE.Color("hsl(0, 100%, 50%)");</code>
<code>var color = new THREE.Color( 1, 0, 0 );</code>
...
...
@@ -27,7 +29,7 @@
<h3>[name]( value )</h3>
<div>
value — optional argument that sets initial color. Can be a hexadecimal or a CSS-style string, for example, "rgb(250, 0,0)", "rgb(100%,0%,0%)", "#ff0000", "#f00", or "red", or three arguments that represent color channels.
value — optional argument that sets initial color. Can be a hexadecimal or a CSS-style string, for example, "rgb(250, 0,0)", "rgb(100%,0%,0%)", "hsl(0, 100%, 50%)", "#ff0000", "#f00", or "red", or three arguments that represent color channels.
style — color as a CSS-style string, for example, "rgb(250, 0,0)", "rgb(100%,0%,0%)", "#ff0000", "#f00", or "red"
style — color as a CSS-style string.
</div>
<div>
Sets this color from a CSS-style string.
Sets this color from a CSS-style string. For example, "rgb(250, 0,0)", "rgb(100%, 0%, 0%)", "hsl(0, 100%, 50%)", "#ff0000", "#f00", or "red". Transluent 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.
canvas — A [page:Canvas] where the renderer draws its output.<br/>
precision — shader precision. Can be *"highp"*, *"mediump"* or *"lowp"*.<br/>
context — The [page:RenderingContext] context to use.<br/>
precision — Shader precision. Can be *"highp"*, *"mediump"* or *"lowp"*. Defaults to *"highp"* if supported by the device.<br/>
alpha — [page:Boolean], default is *false*.<br/>
premultipliedAlpha — [page:Boolean], default is *true*.<br/>
antialias — [page:Boolean], default is *false*.<br/>
stencil — [page:Boolean], default is *true*.<br/>
preserveDrawingBuffer — [page:Boolean], default is *false*.<br/>
maxLights — [page:Integer], default is *4*.<br/>
depth — [page:Boolean], default is *true*.<br/>
logarithmicDepthBuffer — [page:Boolean], default is *false*.<br/>
</div>
<h2>Properties</h2>
...
...
@@ -70,10 +72,6 @@
<div>Note: Sorting is used to attempt to properly render objects that have some degree of transparency. By definition, sorting objects may not work in all cases. Depending on the needs of application, it may be neccessary to turn off sorting and use other methods to deal with transparency rendering e.g. manually determining the object rendering order.</div>
<h3>[property:Boolean autoUpdateObjects]</h3>
<div>Defines whether the renderer should auto update objects. Default is true.</div>
<h3>[property:Boolean gammaInput]</h3>
<div>Default is false. If set, then it expects that all textures and colors are premultiplied gamma.</div>