Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / components / EnvironmentLightingState

Type Alias: EnvironmentLightingState ​

ts
type EnvironmentLightingState = {
  envMapUrl?: string;
  envIntensity?: number;
  envRotationY?: number;
  useAsBackground?: boolean;
  backgroundBlurriness?: number;
  backgroundIntensity?: number;
  toneMapping?: EnvironmentToneMapping;
  exposure?: number;
};

Defined in: components/Environment.ts:84

Image-based lighting and renderer colour settings. Every field is optional; the defaults below apply when a field is missing. When the whole block is absent the scene's environment map and the renderer's tone mapping are left untouched.

Properties ​

PropertyTypeDescriptionDefined in
envMapUrl?stringURL or localasset:// path of an equirectangular environment map used for image-based lighting (reflections and ambient light on PBR materials). .hdr and .exr load as HDR; any other extension loads as an sRGB image. Empty = no environment map.components/Environment.ts:91
envIntensity?numberStrength of the environment lighting (scene.environmentIntensity). Default 1.components/Environment.ts:93
envRotationY?numberRotation of the environment map around world Y, in radians. Default 0.components/Environment.ts:95
useAsBackground?booleanAlso show the environment map as the background. Overrides the skybox. Default false.components/Environment.ts:97
backgroundBlurriness?numberBackground blur in [0, 1] when useAsBackground is on. Default 0.components/Environment.ts:99
backgroundIntensity?numberBackground brightness multiplier when useAsBackground is on. Default 1.components/Environment.ts:101
toneMapping?EnvironmentToneMappingRenderer tone-mapping operator. Default "none".components/Environment.ts:103
exposure?numberRenderer exposure (toneMappingExposure). Only has an effect when tone mapping is on. Default 1.components/Environment.ts:105