Skip to content

MapLight beta ​

Interface of @v12-engine/client

ts
export interface MapLight

The light of a map, under what the time of day does to it and over it what the game sets (GameView.world.lighting). Intensities about 0..2, colours 0..1

Members ​

ambient ​

ts
ambient?: number;

How bright the light from all around is, and its colour

ambientColor ​

ts
ambientColor?: Rgb;

The colour of the light from all around; the client's when left out

glow ​

ts
glow?: Rgb | false;

The colour the low sun lays over the light at dawn and dusk, for a game with a day: a warm orange when left out, false for none (the sky's and the mist's are GameView.world.daylight's)

ground ​

ts
ground?: Rgb;

The colour of the light from below

night ​

ts
night?: Pick<MapLight, 'ambient' | 'ambientColor' | 'ground' | 'sun' | 'sunColor'>;

The light at night, for a game with a day: the moon (sun), the light from all around, their colours. The client's moonlight where left out (sun 0.55, ambient 0.42: enough to play by). Lower makes lamps and torches stand out

sun ​

ts
sun?: number;

How bright the sun is, and its colour

sunAround ​

ts
sunAround?: number;

Where the sun is: degrees around from north (towards -z), clockwise seen from above, and degrees up from the horizon

sunColor ​

ts
sunColor?: Rgb;

The colour of the sun's light; the client's when left out

sunUp ​

ts
sunUp?: number;

Degrees of the sun above the horizon; SUN_UP when left out