@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;
shadow?: LightShadowState;
};Defined in: components/Light.ts:33
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:35 |
intensity | number | Light intensity multiplier (units depend on three.js physically-correct mode). | components/Light.ts:37 |
castShadow | boolean | Whether the light casts shadows. | components/Light.ts:39 |
frustumCulling | boolean | Whether the light is frustum-culled when off-screen. | components/Light.ts:41 |
distance? | number | Maximum range; 0 means infinite. (PointLight, SpotLight) | components/Light.ts:43 |
decay? | number | Falloff exponent for distance attenuation. (PointLight, SpotLight) | components/Light.ts:45 |
angle? | number | Cone half-angle in radians. (SpotLight) | components/Light.ts:47 |
penumbra? | number | Soft-edge factor in [0, 1]; 0 is a hard edge. (SpotLight) | components/Light.ts:49 |
width? | number | Rectangle width in world units. (RectAreaLight) | components/Light.ts:51 |
height? | number | Rectangle height in world units. (RectAreaLight) | components/Light.ts:53 |
shadow? | LightShadowState | Optional shadow tuning. Absent = three's shadow defaults. (DirectionalLight, SpotLight, PointLight) | components/Light.ts:55 |

