Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Module workers/data-worker/projection/in-process

    Main-thread (in-process) projection dispatcher.

    The worker dispatchers in this directory (gsplats.ts, lines.ts) take a WasmCtx and run the WASM kernels. They are normally invoked across the Comlink RPC boundary from the worker pool, but the exact same functions can run on the main thread against a locally-initialized WasmCtx. This module provides that path.

    It serves two callers, replacing the deleted main-thread projection copies (data/gsplats/projection.ts, data/lines/projection.ts):

    1. useWebWorkers === false / below-threshold data — the data-processors call the in-process dispatcher directly instead of a separate hand-written main-thread implementation.
    2. Worker-infrastructure failure — when a worker RPC throws for a reason other than a dataset-switch abort, the data-processors degrade to this in-process path rather than crashing.

    Both callers go through the same kernel code the worker runs, so there is exactly one projection implementation per geometry — no second copy to keep in sync.

    The Comlink transfer() markers the dispatchers attach to their return values are inert here: nothing is posted through a MessagePort, so the returned typed arrays stay fully usable on the main thread.

    projectGSplatsInProcess
    projectLinesInProcess
    getPointsBackend
    getMeshBackend