Documentation / @ripl/3d / ResolvedLight
Interface: ResolvedLight ​
Defined in: 3d/src/core/shading.ts:87
A light reduced to the flat numeric form both the CPU painter and the WGSL shader consume.
Properties ​
| Property | Type | Description | Defined in |
|---|---|---|---|
color | ColorUnitRGB | The light's colour premultiplied by its intensity, in unit RGB. | 3d/src/core/shading.ts:91 |
cosInner | number | Cosine of the spot cone's inner half-angle, where the penumbra begins. | 3d/src/core/shading.ts:105 |
cosOuter | number | Cosine of the spot cone's outer half-angle. | 3d/src/core/shading.ts:103 |
decay | number | The exponent of the inverse-distance falloff. | 3d/src/core/shading.ts:101 |
direction | Vector3 | The unit-length world-space direction the light travels in. Unused by ambient, hemisphere and point lights. | 3d/src/core/shading.ts:97 |
distance | number | The distance at which the light falls to zero, or 0 when it never does. | 3d/src/core/shading.ts:99 |
ground | ColorUnitRGB | The downward colour of a hemisphere light, premultiplied by intensity. Zero for other types. | 3d/src/core/shading.ts:93 |
position | Vector3 | The light's world-space position. Unused by ambient, hemisphere and directional lights. | 3d/src/core/shading.ts:95 |
type | number | The light's numeric type, one of LIGHT_TYPE_CODE. | 3d/src/core/shading.ts:89 |