Constructor
Extends
Methods
getDirection() → {Array.<number>}
Get direction
A vector with values for each axis
Array.<number>
getValues() → {Array.<number>}
Get values
An array with constant, linear and quadratic values
Array.<number>
setAmbientColor(r, g, b) → {Light}
Set ambient color
Parameters:
Name | Type | Description |
---|---|---|
r |
number | Red value in the range 0 to 255 |
g |
number | Green value in the range 0 to 255 |
b |
number | Blue value in the range 0 to 255 |
- Inherited From:
A reference to the instance
setCutoff(value) → {SpotLight}
Set cut off
Parameters:
Name | Type | Description |
---|---|---|
value |
number | The cutoff value |
A reference to the instance
setDiffuseColor(r, g, b) → {Light}
Set diffuse color
Parameters:
Name | Type | Description |
---|---|---|
r |
number | Red value in the range 0 to 255 |
g |
number | Green value in the range 0 to 255 |
b |
number | Blue value in the range 0 to 255 |
- Inherited From:
A reference to the instance
setDirection(x, y, z) → {SpotLight}
Set direction
Parameters:
Name | Type | Description |
---|---|---|
x |
number | Direction on X |
y |
number | Direction on Y |
z |
number | Direction on Z |
A reference to the instance
setSpecularColor(r, g, b) → {Light}
Set specular color
Parameters:
Name | Type | Description |
---|---|---|
r |
number | Red value in the range 0 to 255 |
g |
number | Green value in the range 0 to 255 |
b |
number | Blue value in the range 0 to 255 |
- Inherited From:
A reference to the instance
setValues(constant, linear, quadratic) → {SpotLight}
Set point light's values
Parameters:
Name | Type | Description |
---|---|---|
constant |
number | The constant value |
linear |
number | The linear value |
quadratic |
number | The quadratic value |
A reference to the instance
visit(renderTarget) → {boolean}
Visit the node and his children
Parameters:
Name | Type | Description |
---|---|---|
renderTarget |
RenderTarget | Renderer who called this method |
- Inherited From:
True if visit was successful, otherwise false
boolean