Skip to content

AreaShape beta ​

TypeAlias of @v12-engine/engine

ts
export type AreaShape = {
    kind: 'circle';
    x: number;
    z: number;
    radius: number;
} | {
    kind: 'rect';
    x: number;
    z: number;
    width: number;
    depth: number;
} | {
    kind: 'polygon';
    x: number;
    z: number;
    points: Vec2[];
};

Where an area is on the map: a circle, a rectangle by its middle and size, or a polygon by its corners round a middle of its own (points, each from x and z, three or more, in order round it: moving the middle moves it whole)