@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 ​
| Parameter | Type |
|---|---|
options | ScatterOptions |
Returns ​
ScatterComponent
Overrides ​
Properties ​
| Property | Type | Default value | Description | Defined in |
|---|---|---|---|---|
enabled | boolean | true | - | components/Foliage.ts:108 |
items | ScatterItem[] | [] | - | components/Foliage.ts:109 |
chunkSize | number | 48 | Chunk side in metres. | components/Foliage.ts:111 |

