Skip to content

@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 ​

PropertyTypeDescriptionDefined in
pathstringThe model file.components/Foliage.ts:58
densitynumberInstances per 100 square metres.components/Foliage.ts:60
minScalenumber-components/Foliage.ts:61
maxScalenumber-components/Foliage.ts:62
alignToGroundnumberLean with the ground (0 upright, 1 fully along the slope).components/Foliage.ts:64
sinknumberSink this many metres into the ground, so roots and rocks sit in it.components/Foliage.ts:66
maskFoliageMask-components/Foliage.ts:67
impostorDistancenumberPast this many metres a flat picture (impostor) is drawn instead. 0: never.components/Foliage.ts:69
cullDistancenumberPast this many metres nothing is drawn.components/Foliage.ts:71
castShadowboolean-components/Foliage.ts:72
spacingnumberKeep this many metres from other instances of the same item.components/Foliage.ts:74
seednumber-components/Foliage.ts:75