CellSelection beta
Class of @v12-engine/editor
export declare class CellSelectionCells of a layer picked to be changed together (the Patch tool): by index (z * width + x), never saved and no part of the map. A byte a cell of the map, so a selection of the whole map is as quick to add to as one of a few
Members
bounds
bounds: {
x: number;
z: number;
width: number;
depth: number;
} | undefined;The rectangle the cells are in, in cells: none while nothing is picked
cells
cells(): number[];The cells picked, in order
clear
clear(): void;Lets go of every cell
each
each(visit: (cell: number) => void): void;Goes through the cells picked, in order, within their rectangle alone
has
has(cell: number): boolean;Whether a cell is picked
layer
layer: string | undefined;The layer the cells were picked on: none while nothing is
select
select(layer: string, width: number, depth: number, cells: Iterable<number>, how?: SelectHow): void;Picks cells of a layer of a map of a size: in the place of those picked (replace), with them (add) or out of them (subtract). Cells of another layer, or of a map of another size, are let go of first
size
size: number;How many cells are picked
version
version: number;Moves with every change, for what is drawn of it