PlacementWorkerOptions
Options for makePlacementWorker.
Defined in: engine/src/worker/placement.ts:18
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
closeTimeoutMs? | number | How long destroy() waits for an idle worker to finish its cache writes before terminating it (default 10 s), as for makeSceneWorker. | engine/src/worker/placement.ts:30 |
spawn | () => Worker | Creates the worker, which runs servePlacement (or serveScene). The consumer supplies this because only their bundler can resolve a worker entry: spawn: () => new Worker(new URL("./placement.worker.ts", import.meta.url), { type: "module" }) | engine/src/worker/placement.ts:25 |
PlacementWorker
A worker that bakes static placements, from makeSceneWorker (or the older makePlacementWorker). Give it to makeInstanceLayer(target, { placement }), which registers models and bakes for you; the methods are there for hosts that drive Renderer.placementInput / applyPlacement themselves. One...
SceneCache
The scene worker's cache of encodings and bakes, from openSceneCache or makeSceneCache. Storage errors are swallowed: a failed get is a miss, a failed put keeps nothing. Every put copies what it stores before its first await, so the caller may transfer the result's buffers straight after calling.