GSplats data-processor concern extracted from scene-loader.ts.
Three pure-ish functions for GSplat projection and GPU commit. They
take the SceneLoader's per-call inputs (rootGroup, gpuBufferPool,
updateVersion) as parameters instead of reading them off this.
Behavior summary:
worker projection is used when useWebWorkers and the splat count exceeds
WORKER_MIN_SPLATS_ND (1 000) for nD data or WORKER_MIN_SPLATS_3D
(100 000) for 3-D data (whose fast path is cheap per splat, so only a
large node amortizes the clone),
truncation radius is read from the mesh material,
the projection's 6-stride choleskyFactors3D flows straight to the
commit (no split/re-interleave pass),
worker args derive discreteDims / discreteSteps / extendToAllDims from viewState.dimensions,
the non-worker path and worker-UNAVAILABLE failures (the pool has no
worker at all) run the shared dispatcher in-process
(workers/data-worker/projection/in-process); any other failure —
a rejection from the worker, a timeout — propagates instead, since the
fallback shares the kernel and would only block the UI thread,
first-update info logs are gated by updateVersion <= 1,
commits use the GPU buffer pool when enabled, otherwise
updateInstancedGSplatsMesh.
GSplats data-processor concern extracted from
scene-loader.ts.Three pure-ish functions for GSplat projection and GPU commit. They take the SceneLoader's per-call inputs (rootGroup, gpuBufferPool, updateVersion) as parameters instead of reading them off
this.Behavior summary:
useWebWorkersand the splat count exceedsWORKER_MIN_SPLATS_ND(1 000) for nD data orWORKER_MIN_SPLATS_3D(100 000) for 3-D data (whose fast path is cheap per splat, so only a large node amortizes the clone),choleskyFactors3Dflows straight to the commit (no split/re-interleave pass),viewState.dimensions,workers/data-worker/projection/in-process); any other failure — a rejection from the worker, a timeout — propagates instead, since the fallback shares the kernel and would only block the UI thread,updateVersion <= 1,updateInstancedGSplatsMesh.