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

    Module data/loaders

    Unified Loader Architecture - Shared Components

    Foundation for the unified spatial-index loader architecture, shared by the Points, Lines, and GSplats loaders, plus label-picking and overlay loaders. The mesh whole-node loader is not spatial-indexed but still consumes the RangeLoader and the color helpers from here.

    Subpackages:

    • spatial-query/ — chunk-bounds probe, tolerance computer, AABB query builder, chunk-boundary prefetch planner, and encoding-dispatching range loader.
    • picking/ — label and image-label loaders consumed by core/app/picking.
    • overlays/ — overlay config loader consumed by the overlay manager.

    Root-level files:

    • base-types.ts — canonical shared types (BaseViewState, LoadRange, …).
    • color-loader.ts — color-attribute encode/decode shared by the three spatial-index loaders and the mesh whole-node loader.
    • chunk-bounds-loader.ts — zarr chunk-bounds probe (layer below spatial-query).
    • element-ids.ts — slot → on-disk element index map composition, shared by the Points, GSplats and Lines projections (picking's label lookup). For Lines it supplies only the local→on-disk vertex link of a longer chain; see data/scene-loader/process/data-processor-lines.ts.
    • loader-metrics.ts, monitor-events.ts, once-init.ts, extend-to-all-preflight.ts — small cross-cutting helpers used by every spatial loader.

    External callers should import from this barrel rather than reaching into deep paths so subpackage internals can move without callsite churn.

    BaseViewState → BaseViewState
    LoadRange → LoadRange
    BaseChunkSpatialIndex → BaseChunkSpatialIndex
    LoaderOptions → LoaderOptions
    LoaderDependencies → LoaderDependencies
    BaseLoader → BaseLoader
    SpatialDataLoader → SpatialDataLoader
    LoadedDataMetadata → LoadedDataMetadata
    hasDimensionMetadata → hasDimensionMetadata
    getDisplayDimCount → getDisplayDimCount
    isHiddenDimension → isHiddenDimension
    RangeLoader → RangeLoader
    RangeLoaderConfig → RangeLoaderConfig
    EncodingType → EncodingType
    prefetchRangesIntoCache → prefetchRangesIntoCache
    planChunkBoundaryViewStates → planChunkBoundaryViewStates
    isAbortError → isAbortError
    getSharedRangeLoader → getSharedRangeLoader
    getSharedRefRegistry → getSharedRefRegistry
    resetSharedRangeLoader → resetSharedRangeLoader
    SpatialQueryBuilder → SpatialQueryBuilder
    SpatialQueryOptions → SpatialQueryOptions
    ChunkSpatialIndex → ChunkSpatialIndex
    SpatialQueryParams → SpatialQueryParams
    buildQueryPosition → buildQueryPosition
    executeSpatialQuery → executeSpatialQuery
    chunkIndicesToRanges → chunkIndicesToRanges
    mergeRanges → mergeRanges
    shouldExtendVisibility → shouldExtendVisibility
    createLoadAllRange → createLoadAllRange
    formatTolerance → formatTolerance
    computeTolerance → computeTolerance
    gsplatsContinuousDimTolerance → gsplatsContinuousDimTolerance
    DimensionInfo → DimensionInfo
    ToleranceOptions → ToleranceOptions
    fetchChunkBoundsArray → fetchChunkBoundsArray
    ChunkBoundsArray → ChunkBoundsArray
    allocateColorBuffer → allocateColorBuffer
    getExpectedColorType → getExpectedColorType
    colorBufferTypeMatches → colorBufferTypeMatches
    restoreOriginalDtype → restoreOriginalDtype
    loadColorRanges → loadColorRanges
    assertColorLayout → assertColorLayout
    colorComponentsOf → colorComponentsOf
    ColorRange → ColorRange
    ColorBuffer → ColorBuffer
    ColorBufferKind → ColorBufferKind
    recordLoadEvent → recordLoadEvent
    computeLoadLatency → computeLoadLatency
    finishQueryTracking → finishQueryTracking
    makeInitialLoaderMetrics → makeInitialLoaderMetrics
    buildSpatialIndexMetrics → buildSpatialIndexMetrics
    LoaderMetricsCounters → LoaderMetricsCounters
    QueryMetricsCounters → QueryMetricsCounters
    loadSliceWithCache → loadSliceWithCache
    recordLoadMetrics → recordLoadMetrics
    runWithActiveSignal → runWithActiveSignal
    runWithResidencyProbe → runWithResidencyProbe
    SpatialFacadeCtx → SpatialFacadeCtx
    FacadeViewState → FacadeViewState
    FacadeMetrics → FacadeMetrics
    buildElementIdMap → buildElementIdMap
    ElementIdRange → ElementIdRange
    LoaderEventEmitter → LoaderEventEmitter
    OnceInit → OnceInit
    warnExtendToAllNoDimensions → warnExtendToAllNoDimensions
    announceExtendToAllOnce → announceExtendToAllOnce
    LabelLoader → LabelLoader
    ImageLabelLoader → ImageLabelLoader
    loadOverlayConfigs → loadOverlayConfigs
    MAX_OVERLAY_HTML_CHARS → MAX_OVERLAY_HTML_CHARS
    OverlayConfig → OverlayConfig