StaticmaxMaximum number of worker threads. Defaults to one less than the available hardware concurrency, capped at 4. (Peak memory scales with worker count, since each holds its own WebP WASM heap; 4 captures most of the parallelism for SOG writes.)
The configured limit, or null when auto-sized.
Sets the maximum number of worker threads. Set to 0 to force inline
execution on the calling thread, or null to auto-size. Configure once
before the first run() (as the CLI does); changing it while tasks are
in flight is not supported.
Maximum worker threads, or null to auto-size.
StaticworkerURL of the worker script, or null when auto-resolved relative to the bundle.
The configured worker URL, or null.
Sets the URL of the worker script (the shipped dist/worker.mjs). Set
this before first use in browser environments whose bundler does not
rewrite new Worker(new URL('./worker.mjs', import.meta.url)) - e.g.
import workerUrl from '@playcanvas/splat-transform/worker?url'; WorkerQueue.workerUrl = workerUrl;
Absolute URL of the worker script, or null to auto-resolve.
A small cross-platform (Node + browser) worker pool running the CPU-heavy tasks defined in tasks.ts off the main thread. The worker entry is built and shipped as
dist/worker.mjs; the pool spawns it from a URL resolved relative to the library bundle. Node and bundlers that rewritenew Worker(new URL('./worker.mjs', import.meta.url))(e.g. Vite, webpack) pick it up automatically; with other bundlers, setWorkerQueue.workerUrlto the deployed worker asset (mirroringWebPCodec.wasmUrl).Workers spawn lazily on demand and run one task at a time. When workers are unavailable (running from source via tsx,
maxWorkers = 0, or spawn fails) every task runs inline on the calling thread instead - same code, same results, just serial.