Skip to content

TerrainPatch beta ​

Interface of @v12-engine/engine

ts
export interface TerrainPatch

A part of the ground as it is, to put in another of the same size (applyTerrainPatch): a rectangle of cells and every layer of it, the vertices at its corners included. What the editor's Play here sends of the map's ground as it is edited (debug.ground, EQ10), and what a session is told of it (ground)

Members ​

blocked ​

ts
blocked: number[];

Per cell, whether the cell is blocked for walking (0 for no)

cells ​

ts
cells?: Record<string, number[]>;

The game's layers of cells (Terrain.cells), by id, per cell: those in either ground

depth ​

ts
depth: number;

How many cells down the patch is

heights ​

ts
heights: number[];

Per vertex, row by row: (width + 1) * (depth + 1) of them

levels ​

ts
levels: number[];

Per cell, row by row: width * depth of them

tiles ​

ts
tiles: number[];

Per cell, the tile there (an index into the game's tiles)

water ​

ts
water: number[];

Per cell, the water there (0 for none)

waterHeights ​

ts
waterHeights: number[];

Heights of the water at the patch's vertices, in the order of heights

width ​

ts
width: number;

How many cells across the patch is

x ​

ts
x: number;

The first cell, and how many across and down

z ​

ts
z: number;

The patch's first cell on the z axis, in cells