Project GSplats to 3D on a worker thread. Only when the pool has no worker
for the call (WorkerUnavailableError: none at all, or none left after its
worker was evicted before replying) does it degrade to the in-process
dispatcher — the same projection kernel run on the main thread — rather
than a separate hand-written copy.
Every other failure propagates. A rejection that came back FROM the worker
would only reproduce the fault on the UI thread (the fallback shares the
kernel); a WASM trap there blocks the frame. A timeout means work the main
thread cannot afford either — a hung kernel or a genuinely-slow projection
re-run in-process blocks the frame at least as long again, and the pool has
already evicted the wedged worker, so a retry gets a fresh one.
gate is the truncation radius, or a GSplatsProjectionGate that also
carries a gained node's visibility threshold. updateVersion gates the
first-update info logs.
signal is the per-update abort signal: a superseded pass rejects promptly
with a WorkerAbortError instead of holding the update lock through a whole
projection (50-150 ms at 1-3M elements). The worker still finishes the
abandoned task; the pool keeps that worker's slot busy until it does.
Project GSplats to 3D on a worker thread. Only when the pool has no worker for the call (
WorkerUnavailableError: none at all, or none left after its worker was evicted before replying) does it degrade to the in-process dispatcher — the same projection kernel run on the main thread — rather than a separate hand-written copy.Every other failure propagates. A rejection that came back FROM the worker would only reproduce the fault on the UI thread (the fallback shares the kernel); a WASM trap there blocks the frame. A timeout means work the main thread cannot afford either — a hung kernel or a genuinely-slow projection re-run in-process blocks the frame at least as long again, and the pool has already evicted the wedged worker, so a retry gets a fresh one.
gateis the truncation radius, or a GSplatsProjectionGate that also carries a gained node's visibility threshold.updateVersiongates the first-update info logs.signalis the per-update abort signal: a superseded pass rejects promptly with a WorkerAbortError instead of holding the update lock through a whole projection (50-150 ms at 1-3M elements). The worker still finishes the abandoned task; the pool keeps that worker's slot busy until it does.