Class

DirectionalLight

DirectionalLight()

A directional light

Constructor

new DirectionalLight()

Constructor

View Source Lights/DirectionalLight.js, line 9

Extends

Methods

getAmbientColor() → {Color}

Get ambient color
Inherited From:

View Source Lights/Light.js, line 104

A color instance
Color

getDiffuseColor() → {Color}

Get diffuse color
Inherited From:

View Source Lights/Light.js, line 113

A color instance
Color

getDirection() → {Array.<number>}

Get direction

View Source Lights/DirectionalLight.js, line 44

A vector with values for each axis
Array.<number>

getSpecularColor() → {Color}

Get specular color
Inherited From:

View Source Lights/Light.js, line 122

A color instance
Color

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:

View Source Lights/Light.js, line 65

A reference to the instance
Light

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:

View Source Lights/Light.js, line 79

A reference to the instance
Light

setDirection(x, y, z) → {DirectionalLight}

Set direction
Parameters:
Name Type Description
x number Direction on X
y number Direction on Y
z number Direction on Z

View Source Lights/DirectionalLight.js, line 33

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:

View Source Lights/Light.js, line 93

A reference to the instance
Light

visit(renderTarget) → {boolean}

Visit the node and his children
Parameters:
Name Type Description
renderTarget RenderTarget Renderer who called this method
Inherited From:

View Source Lights/Light.js, line 48

True if visit was successful, otherwise false
boolean