Skip to main content

LightingConfig

Lighting simulation configuration, normalized from EngineOptions.lighting

Index

Properties

optionalambientColor

ambientColor?: Color | null

Ambient light color, blended into any DarknessComponent veil proportional to ambientIntensity (e.g. a blue ambient at low intensity produces a moonlit veil). Default null, meaning no color tint is applied.

optionalambientIntensity

ambientIntensity?: number

Ambient brightness floor (0.0 to 1.0) subtracted from darkness intensity. Default 0.05.

optionalcullPadding

cullPadding?: number

World-pixel padding added around the camera frustum when culling lights/occluders. Default 64.

enabled

enabled: boolean

Enables the scene LightingSystem and FlickerSystem. Default false.

The lighting overlay is rendered with the 2D Canvas API and re-uploaded to the GPU every frame, which carries a performance penalty — this is why lighting is opt-in.

optionalshadowMidOpacity

shadowMidOpacity?: number

Occluder shadow radial gradient opacity at 40% of the shadow's reach (0.0 to 1.0). Default 0.6.

optionalshadowNearOpacity

shadowNearOpacity?: number

Occluder shadow radial gradient opacity at the occluder (near) edge (0.0 to 1.0). Default 0.92.

optionaltintAlphaFactor

tintAlphaFactor?: number

Fraction of a light's intensity used when painting its colored tint (0.0 to 1.0). Default 0.35.

optionalzIndex

zIndex?: number

The z-index of the provisioned lighting overlay. Default 100.

Overridden per-instance by LightingSystemOptions.zIndex.