Skip to content

LightSourceOptions

Defined in: lighting/src/LightSource.ts:16

Options accepted by LightSource.

optional castShadows?: boolean

Defined in: lighting/src/LightSource.ts:31

Whether occluders block this light. Default true.


optional color?: number

Defined in: lighting/src/LightSource.ts:22

RGB tint used by renderers that support coloured light. Default 0xffffff.


optional cone?: LightConeOptions

Defined in: lighting/src/LightSource.ts:29

Spotlight cone, with an optional soft edge. Omit for a light that shines in every direction.


optional enabled?: boolean

Defined in: lighting/src/LightSource.ts:33

Whether the source starts enabled. Default true.


optional intensity?: number

Defined in: lighting/src/LightSource.ts:20

Peak contribution at the light’s centre, from 0 to 1. Default 1.


radius: number

Defined in: lighting/src/LightSource.ts:18

Light radius in world pixels.


optional size?: number

Defined in: lighting/src/LightSource.ts:24

Lamp diameter in world pixels, from 0 upwards. Default 0.

Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/lighting.md.