Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / components / ScatterComponent

Class: ScatterComponent ​

Defined in: components/Foliage.ts:107

Trees, rocks and bushes scattered over the terrain on the same entity: drawn as instances in square chunks (each culled on its own), as flat pictures of themselves (impostors) past each item's impostor distance, and not at all past its cull distance. The same settings always place the same instances, so nothing about them is saved but the settings.

Extends ​

Constructors ​

Constructor ​

ts
new ScatterComponent(options?): ScatterComponent;

Defined in: components/Foliage.ts:113

Parameters ​

ParameterType
optionsScatterOptions

Returns ​

ScatterComponent

Overrides ​

Component.constructor

Properties ​

PropertyTypeDefault valueDescriptionDefined in
enabledbooleantrue-components/Foliage.ts:108
itemsScatterItem[][]-components/Foliage.ts:109
chunkSizenumber48Chunk side in metres.components/Foliage.ts:111