Skip to content

@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 ​

PropertyTypeDescriptionDefined in
colorstringLight color as #rrggbb hex string.components/Light.ts:35
intensitynumberLight intensity multiplier (units depend on three.js physically-correct mode).components/Light.ts:37
castShadowbooleanWhether the light casts shadows.components/Light.ts:39
frustumCullingbooleanWhether the light is frustum-culled when off-screen.components/Light.ts:41
distance?numberMaximum range; 0 means infinite. (PointLight, SpotLight)components/Light.ts:43
decay?numberFalloff exponent for distance attenuation. (PointLight, SpotLight)components/Light.ts:45
angle?numberCone half-angle in radians. (SpotLight)components/Light.ts:47
penumbra?numberSoft-edge factor in [0, 1]; 0 is a hard edge. (SpotLight)components/Light.ts:49
width?numberRectangle width in world units. (RectAreaLight)components/Light.ts:51
height?numberRectangle height in world units. (RectAreaLight)components/Light.ts:53
shadow?LightShadowStateOptional shadow tuning. Absent = three's shadow defaults. (DirectionalLight, SpotLight, PointLight)components/Light.ts:55