cliffCells beta
Function of @v12-engine/client/common
ts
export declare function cliffCells(terrain: Terrain, out?: Uint8Array<ArrayBuffer>, area?: {
x: number;
z: number;
width: number;
depth: number;
}): Uint8Array<ArrayBuffer>;Which cells of a terrain are the walls of cliffs, a byte a cell, row by row, into out: 0 for none, else which of its corners stand on the top, a bit each (1 the corner at its lowest x and z, 2 at x + 1, 4 at z + 1, 8 at both). A wall is in the cell below a cliff: its corners on the edge are lifted to the level above (updateMapTerrain). A corner is on the top where a cell around it is of a higher level and it stands CLIFF_RISE over the lowest corner, so that a ramp, a hill or a cell sunk between cliffs (all four corners lifted, flat) is no wall. Within area only (and the ring of cells around it) when it is given: what a change to those cells can have changed