Skip to content

ScatterPassOptions beta ​

Interface of @v12-engine/engine

ts
export interface ScatterPassOptions

What scatterPass takes: how much of what, where

Members ​

avoid ​

ts
avoid?: number;

How far from a start they keep, in cells: 10 when left out

avoidKinds ​

ts
avoidKinds?: Record<string, number>;

What else they keep off, by kind (placed), with how far: the starts always

density ​

ts
density?: number;

How much of the map they cover, 0..1: the parameter <kind> where the generator has one, or 0.12

kind ​

ts
kind: string;

What the things are, for the passes after (placed): trees, rocks

patches ​

ts
patches?: number;

In patches of a noise (how much the noise decides, 0 even, 1 all in patches): 0.6 when left out

radius ​

ts
radius?: number;

How big each is, for what comes after to keep off: half the spacing when left out

spacing ​

ts
spacing?: number;

How far apart they are at least, in cells: 1.5 when left out

what ​

ts
what: (ctx: GeneratorContext, at: Vec2) => void;

Puts one down at a place: a doodad, a unit, a camp, a region

where ​

ts
where?: (cell: {
        x: number;
        z: number;
        level: number;
        slope: number;
        noise: number;
        shore: boolean;
    }) => boolean;

Where they may go: a cell's level, slope, water and the noise of the kind (0..1, patches). On any dry ground when left out