IFClite TypeScript API
    Preparing search index...

    Interface CacheWriteOptions

    Options for writing cache

    interface CacheWriteOptions {
        compressGeometryChunks?: boolean;
        compressGeometryChunksInWorker?: boolean;
        includeGeometry?: boolean;
        includeSpatialHierarchy?: boolean;
        omitSourceHash?: boolean;
        onGeometryOrder?: (meshes: readonly MeshData[]) => void;
        yieldBetweenSections?: boolean;
    }
    Index
    compressGeometryChunks?: boolean

    v13+: deflate-raw compress geometry chunk records above the size floor (default true); off for byte inspection.

    compressGeometryChunksInWorker?: boolean

    Use one lazy browser module worker for geometry compression (default false). Requires Worker support and a bundled worker asset; failure rejects the write. Has no effect when compression is disabled or all chunks are below its floor.

    includeGeometry?: boolean

    Include geometry data (default: true)

    includeSpatialHierarchy?: boolean

    Include spatial hierarchy (default: true)

    omitSourceHash?: boolean

    Skip the header's full-file xxhash64(sourceBuffer): store sourceHash = 0n and set HeaderFlags.SourceHashUnset. Use when the caller validates the source by another means (e.g. an application-layer content hash), so a large source pays NO full-file main-thread hash on write. Consumers that would validate against the header (reader.validate() / read({ sourceBuffer })) can then detect the absence via CacheHeaderInfo.hasSourceHash instead of silently fail-closing. Default false (the writer hashes the whole sourceBuffer, unchanged).

    onGeometryOrder?: (meshes: readonly MeshData[]) => void

    The meshes in the order the entry stores them (spatial chunks), which is the order a hit decodes them in.

    yieldBetweenSections?: boolean

    Yield to the event loop after each section (default false): short tasks while the page is interactive.