@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / components / LightValueState
Type Alias: LightValueState
ts
type LightValueState = {
color: string;
intensity: number;
castShadow: boolean;
frustumCulling: boolean;
distance?: number;
decay?: number;
angle?: number;
penumbra?: number;
width?: number;
height?: number;
};Defined in: components/Light.ts:6
Authoring state for LightComponent. Common fields apply to every light kind; the optional fields are only meaningful for specific kinds.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
color | string | Light color as #rrggbb hex string. | components/Light.ts:8 |
intensity | number | Light intensity multiplier (units depend on three.js physically-correct mode). | components/Light.ts:10 |
castShadow | boolean | Whether the light casts shadows. | components/Light.ts:12 |
frustumCulling | boolean | Whether the light is frustum-culled when off-screen. | components/Light.ts:14 |
distance? | number | Maximum range; 0 means infinite. (PointLight, SpotLight) | components/Light.ts:16 |
decay? | number | Falloff exponent for distance attenuation. (PointLight, SpotLight) | components/Light.ts:18 |
angle? | number | Cone half-angle in radians. (SpotLight) | components/Light.ts:20 |
penumbra? | number | Soft-edge factor in [0, 1]; 0 is a hard edge. (SpotLight) | components/Light.ts:22 |
width? | number | Rectangle width in world units. (RectAreaLight) | components/Light.ts:24 |
height? | number | Rectangle height in world units. (RectAreaLight) | components/Light.ts:26 |

