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;
};

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

PropertyTypeDescriptionDefined in
colorstringLight color as #rrggbb hex string.components/Light.ts:8
intensitynumberLight intensity multiplier (units depend on three.js physically-correct mode).components/Light.ts:10
castShadowbooleanWhether the light casts shadows.components/Light.ts:12
frustumCullingbooleanWhether the light is frustum-culled when off-screen.components/Light.ts:14
distance?numberMaximum range; 0 means infinite. (PointLight, SpotLight)components/Light.ts:16
decay?numberFalloff exponent for distance attenuation. (PointLight, SpotLight)components/Light.ts:18
angle?numberCone half-angle in radians. (SpotLight)components/Light.ts:20
penumbra?numberSoft-edge factor in [0, 1]; 0 is a hard edge. (SpotLight)components/Light.ts:22
width?numberRectangle width in world units. (RectAreaLight)components/Light.ts:24
height?numberRectangle height in world units. (RectAreaLight)components/Light.ts:26