Constructor
new Light3D(pos3Dopt, radiusopt, coloropt)
Create a point light, set directional to make it shine from far away instead
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
pos3D | Vector3 | <optional> | ||
radius | number | <optional> | 5 | Distance where the light fades to nothing, ignored when directional |
color | Color | <optional> | Light color, alpha scales the brightness |
- Source
Example
const torch = new Light3D(vec3(0, 3, 0), 10, hsl(.1, 1, .65));Extends
- EngineObject3D
Members
directional
Properties| Type | Description |
|---|---|
| boolean | Shine along the light's forward axis from far away instead of out from its position, with no falloff |
- Source
radius
Properties| Type | Description |
|---|---|
| number | Distance where the light fades to nothing |
- Source
Methods
render3D()
Lights draw nothing
- Source