Skip to content

MapShadows beta ​

Interface of @v12-engine/client

ts
export interface MapShadows

Which things cast the sun's shadow on a map: small things far from the camera do not, as a shadow a few pixels across is not seen and each thing costs a draw in every part of the shadows it falls in. The game says so too (GameView.world.shadows, where its code may decide thing by thing); this is the map's, over the game's

Members ​

cascades ​

ts
cascades?: number;

How many parts (cascades) the shadows are split into at most, 1 to 4: fewer is fewer draws, each part covering more and so blurrier. 0 (when left out) as many as the quality says (high 3, medium and low 2)

cull ​

ts
cull?: boolean;

Small things far from the camera cast no shadow: yes when left out; no draws every shadow at any distance

distance ​

ts
distance?: number;

How far from the camera the sun's shadows are drawn, in cells: 0 (when left out) as far as the camera sees ground, and what stands past it and throws its shadow in, so the shadows' parts are spent on what is on the screen; a number for that far whatever the camera sees

fade ​

ts
fade?: number;

Over how many cells before their far edge the sun's shadows ease to none, so that they do not end in a line. 12 when left out; 0 they cut

near ​

ts
near?: number;

How far from the camera a small thing still casts its shadow, in cells. 70 when left out

small ​

ts
small?: number;

How big a thing is at most to be small: the longest side of what it is drawn in, in cells. 2 when left out

smallFade ​

ts
smallFade?: number;

Over how many cells before near small things stop casting, one by one, not all along a line. 10 when left out; 0 all at near

unitsCascades ​

ts
unitsCascades?: number;

How many parts (cascades) a unit's or building's shadow is drawn into at most, of those it falls in by how far it is from the camera, the nearest first: 2 when left out, a shadow across a seam of two showing in both; 1 is fewer draws and cuts a shadow across a seam; 0 every part it falls in