Skip to content

WorldState beta ​

Interface of @v12-engine/render

ts
export interface WorldState

The world's terms every material of the view applies after its own light

Members ​

beyond ​

ts
beyond?: {
        bounds: readonly [number, number, number, number];
        colour: Vec3;
        margins: readonly [number, number, number, number];
        fade: number;
    };

Beyond the map's playable bounds: what is out of them goes to a colour

clouds ​

ts
clouds?: {
        drift: readonly [number, number];
        repeat: number;
        strength: number;
        masked?: boolean;
    };

The clouds' shadows: the renderer's cloudPicture (its alpha) drifting over the map; masked where cloudMask (its alpha, a texel a cell) says where clouds are

fogOfWar ​

ts
fogOfWar: boolean;

Whether the fog of war darkens the map (the renderer's fogOfWar texture: 1 seen, 0 never)

haze ​

ts
haze?: {
        start: number;
        end: number;
        colour: Vec3;
    };

The scene's fog: nothing of a colour is left past end

mist ​

ts
mist?: MistState;

The mist: a layer on the ground and up to eight areas of it (mist.ts)

shadowFade ​

ts
shadowFade: number;

Over how far, before their end, the sun's shadows fade out, in cells along the view