SceneWorkerOptions
Options for makeSceneWorker.
Defined in: engine/src/worker/scene.ts:452
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
chunkBricks? | number | Sparse bricks per chunk message when a model is sent to be encoded (default 16384, 8 MiB). Each chunk is packed on the main thread in a task of its own, so this bounds how long one such task takes. | engine/src/worker/scene.ts:465 |
closeTimeoutMs? | number | How long destroy() lets an idle worker finish its cache writes before terminating it anyway, in ms (default 10000). | engine/src/worker/scene.ts:470 |
spawn | () => Worker | Creates the worker, which runs serveScene. The consumer supplies this because only their bundler can resolve a worker entry: spawn: () => new Worker(new URL("./scene.worker.ts", import.meta.url), { type: "module" }) | engine/src/worker/scene.ts:459 |
SceneWorker
A worker that encodes models for the GPU and bakes static placements, from makeSceneWorker. Give it to makeInstanceLayer(target, { worker }), which does both for its static set; the methods are there for hosts that drive encodeModel / Renderer.addEncodedModel and the placement bake themselves.
ServeCacheOptions
The object form of ServeOptions.cache.