Class enchant.gl.DirectionalLight
- Defined in: gl.enchant.js
- Extends enchant.gl.Light3D
Constructor Attributes | Constructor Name and Description |
---|---|
Class for setting light source in 3D scene.
|
Field Attributes | Field Name and Description |
---|---|
Light source exposure direction x component
|
|
Light source exposure direction y component
|
|
Light source exposure direction z component
|
- Fields borrowed from class enchant.gl.Light3D:
- color
Method Summary
- Methods borrowed from class enchant.EventTarget:
- addEventListener
- clearEventListener
- dispatchEvent
- on
- removeEventListener
Class Detail
enchant.gl.DirectionalLight()
Class for setting light source in 3D scene.
Directioned light source without position.
var scene = new Scene3D(); var light = new DirectionalLight(); light.color = [1.0, 1.0, 0.0]; light.directionY = 10; scene.setDirectionalLight(light);
Field Detail
{Number}
directionX
Light source exposure direction x component
{Number}
directionY
Light source exposure direction y component
{Number}
directionZ
Light source exposure direction z component