Skip to content

TilesPassOptions beta ​

Interface of @v12-engine/engine

ts
export interface TilesPassOptions

What tilesPass takes: how a cell is painted, from what the ground is there

Members ​

by ​

ts
by?: (cell: {
        x: number;
        z: number;
        level: number;
        slope: number;
        moisture: number;
        shore: boolean;
    }, tiles: readonly string[]) => string | undefined;

The tile a cell is painted with, by id, or nothing for none (the ground's own colours): from its level, the slope there (radians), how wet it is (a noise, 0..1) and whether it is by the water. The engine's own rule when left out: sand by the water, rock on steep ground (the cliffs), snow on the top of four levels or more, dirt where it is dry, each where the game has such a tile