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

    Module tests/helpers/projection-adapters

    Test-only adapters bridging the legacy main-thread projection call shapes to the surviving production code.

    The hand-written main-thread projection copies in data/{gsplats,lines}/projection.ts were deleted in W4 — the nD → 3D math now lives solely in the worker dispatchers (workers/data-worker/projection/{gsplats,lines}.ts) and the WASM / TS-reference kernels. These adapters let the still-valuable behavioral suites (clip-segment property tests, scalar end-to-end, golden equivalence) keep their assertions while exercising the live code:

    • clipSegmentToSlice wraps the TS-reference clipper (wasm/typescript/lines-clipping.ts), which is the implementation the worker uses as its fallback.
    • projectGSplatsViaDispatcher / projectLinesViaDispatcher run the worker dispatchers in-process against a caller-supplied backend (TypeScript fallback or compiled WASM), returning the same Processed*Data shape the data-processors map to.

    Production code never imports this module.

    clipSegmentToSlice
    projectGSplatsViaDispatcher
    projectLinesViaDispatcher