GenerateSpec
One entity to generate. Everything in it is posted to a worker, so it must be structured- cloneable (plain data, no functions).
Defined in: engine/src/worker/pool.ts:61
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
ctx? | GenerateContext | Passed to the generator, e.g. { voxelsPerMetre: 100 }. | engine/src/worker/pool.ts:71 |
entityId? | string | Sets the produced entity's id. | engine/src/worker/pool.ts:69 |
generator | string | EntityGenerator.id, registered in the worker (e.g. "voxolith/tree.broadleaf"). | engine/src/worker/pool.ts:63 |
params | unknown | The generator's parameters, in its units (10 voxels per metre). | engine/src/worker/pool.ts:65 |
seed | number | Seeds the generator's rng; the same spec always gives the same entity. | engine/src/worker/pool.ts:67 |