Constructor
new DirectionalLight3D(pos3Dopt, coloropt, intensityopt)
Create a directional light
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
pos3D | Vector3 | <optional> | Where it shines from, toward the origin | |
color | Color | <optional> | Light color, its alpha fades it | |
intensity | number | <optional> | 1 | Brightness, multiplies the color, above 1 is brighter than white |
- Source
Example
const fill = new DirectionalLight3D(vec3(-1, 1, 1), hsl(.6, .5, .3)); // from the back left and aboveExtends
- Light3D