1681-engine / index / Light
Interface: Light ​
Defined in: src/light/LightLayer.ts:5
A light in the world. Change its fields any time (follow a body by writing x/y each frame).
Properties ​
color? ​
ts
optional color?: number;Defined in: src/light/LightLayer.ts:11
The colour it casts on what it lights (default warm white).
flicker? ​
ts
optional flicker?: number;Defined in: src/light/LightLayer.ts:15
Radius wobble, 0–1 (a torch ≈ 0.08).
intensity? ​
ts
optional intensity?: number;Defined in: src/light/LightLayer.ts:13
0–1: how much of the dark it takes away, and how strong its colour (default 1).
on? ​
ts
optional on?: boolean;Defined in: src/light/LightLayer.ts:17
A light off is kept but not drawn.
radius ​
ts
radius: number;Defined in: src/light/LightLayer.ts:9
World px.
x ​
ts
x: number;Defined in: src/light/LightLayer.ts:6
y ​
ts
y: number;Defined in: src/light/LightLayer.ts:7