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

    L0 Decompressed Chunk Cache.

    Uses LRU eviction with byte-size tracking to cache decompressed zarr chunks. Key format: ${arrayPath}:${chunkCoords.join(',')} (e.g., "/points/positions:0,1,2")

    const cache = new DecompressedChunkCache({ maxSize: 200 * 1024 * 1024 });

    // Cache a decompressed chunk
    const key = DecompressedChunkCache.makeKey('/points/positions', [0, 1, 2]);
    cache.set(key, { data: float32Array, shape: [1000, 3], stride: [3, 1] });

    // Retrieve cached chunk
    const cached = cache.get(key);
    if (cached) {
    console.log('L0 hit!', cached.data.byteLength, 'bytes');
    }
    Index
    DEFAULT_MAX_SIZE: number = ...

    Default cache size derived from config.cache.l0MaxSizeMB

    METADATA_OVERHEAD: 64

    Metadata overhead estimate per chunk (shape array, stride array, object wrapper)

    debug: boolean
    maxSize: number

    Resolved byte budget — surfaced in getStats() for runtime introspection.

    • Generate a cache key from array path and chunk coordinates.

      Parameters

      • arrayPath: string

        Full path to the zarr array (e.g., "/points/positions")

      • chunkCoords: number[]

        Chunk coordinates (e.g., [0, 1, 2])

      Returns string

      Cache key string

      const key = DecompressedChunkCache.makeKey('/scene/points/positions', [0, 1, 2]);
      // Returns: "/scene/points/positions:0,1,2"
    • Parse a cache key back into array path and chunk coordinates.

      Parameters

      • key: string

        Cache key to parse

      Returns { arrayPath: string; chunkCoords: number[] } | null

      Parsed components or null if invalid key format