Skip to content

PrefabGround beta ​

Interface of @v12-engine/editor

ts
export interface PrefabGround

The ground a prefab brings: a rectangle of cells around its parts, its corner at x, z from the prefab's middle; the heights of its corners against the height at the middle, and each cell's level, ramp, water, tile (by id: a map's tileset is its own), the game's layers and the pathing. Placed, the heights are eased into the ground around over falloff cells

Members ​

cells ​

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

The game's layers of cells by layer id, each one number per cell

depth ​

ts
depth: number;

The rectangle's depth, in cells

falloff ​

ts
falloff: number;

Cells over which the prefab's heights are eased into the ground around it

heights ​

ts
heights: number[];

(width + 1) × (depth + 1) corners, row by row, against the middle's height

levels ​

ts
levels: number[];

The level of each cell, row by row

pathing ​

ts
pathing?: number[];

The pathing of each cell, row by row, where the prefab brings it

ramps ​

ts
ramps: number[];

The ramp of each cell, row by row

tiles ​

ts
tiles: string[];

Tile ids per cell, '' for none

water ​

ts
water: number[];

The water of each cell, row by row

width ​

ts
width: number;

The rectangle's width, in cells

x ​

ts
x: number;

Where the ground rectangle's corner is from the prefab's middle, along x, in cells

z ​

ts
z: number;

Where the ground rectangle's corner is from the prefab's middle, along z, in cells