MapResize beta
Interface of @v12-engine/engine
ts
export interface MapResizeHow a map is being grown or cut (resizeMap), for what moves along with it: where a place goes, whether it is still on the map, and a shape moved and cut to the map
Members
depth
ts
readonly depth: number;The new depth of the map in cells
inside
ts
inside<P extends Vec2>(place: P): P;A place kept on the grown map: at its edge where it is past it
moved
ts
moved<P extends Vec2>(place: P): P;A place where it is on the grown map (the old place, moved by the cells gained on the left and the top)
on
ts
on(place: Vec2): boolean;Whether a place is on the grown map
shape
ts
shape<S extends AreaShape>(shape: S): S | undefined;A shape moved: a circle while its middle is on the map, what is left of a rectangle on it; none when it is gone
sides
ts
readonly sides: MapSides;The sides the map is grown or cut on
width
ts
readonly width: number;The new size, in cells