@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / components / ScatterItem
Type Alias: ScatterItem ​
ts
type ScatterItem = {
path: string;
density: number;
minScale: number;
maxScale: number;
alignToGround: number;
sink: number;
mask: FoliageMask;
impostorDistance: number;
cullDistance: number;
castShadow: boolean;
spacing: number;
seed: number;
};Defined in: components/Foliage.ts:56
One kind of thing to scatter: a model, how many and how they vary.
Properties ​
| Property | Type | Description | Defined in |
|---|---|---|---|
path | string | The model file. | components/Foliage.ts:58 |
density | number | Instances per 100 square metres. | components/Foliage.ts:60 |
minScale | number | - | components/Foliage.ts:61 |
maxScale | number | - | components/Foliage.ts:62 |
alignToGround | number | Lean with the ground (0 upright, 1 fully along the slope). | components/Foliage.ts:64 |
sink | number | Sink this many metres into the ground, so roots and rocks sit in it. | components/Foliage.ts:66 |
mask | FoliageMask | - | components/Foliage.ts:67 |
impostorDistance | number | Past this many metres a flat picture (impostor) is drawn instead. 0: never. | components/Foliage.ts:69 |
cullDistance | number | Past this many metres nothing is drawn. | components/Foliage.ts:71 |
castShadow | boolean | - | components/Foliage.ts:72 |
spacing | number | Keep this many metres from other instances of the same item. | components/Foliage.ts:74 |
seed | number | - | components/Foliage.ts:75 |

