@pmndrs/bvh
    Preparing search index...

    Interface SerializedTreeHeader

    A tree's header (serializeLayout).

    interface SerializedTreeHeader {
        bounds: Float32Array;
        byteLength: number;
        current: boolean;
        formatVersion: number;
        geometryHash: readonly [number, number] | null;
        kind: "tree";
        layoutVersion: number;
        leafCount: number;
        maxDepth: number;
        nodeCount: number;
        nodeFormat: GpuLayoutNodeFormat | null;
        reason: string | null;
        triangleCount: number;
        triangleLeaves: GpuLayoutTriangleLeaves | null;
    }

    Hierarchy

    • SerializedHeaderCommon
      • SerializedTreeHeader
    Index
    bounds: Float32Array

    The tree's box: minX, minY, minZ, maxX, maxY, maxZ.

    byteLength: number

    Bytes the whole file should have (header included), from the header's counts.

    current: boolean

    True when this package loads the file: both versions are its own and it knows the formats. When false, reason says why: bake again.

    formatVersion: number

    Word 1: the byte format the file was written with (SERIALIZED_FORMAT_VERSION for a tree, SERIALIZED_SCENE_FORMAT_VERSION for a scene).

    geometryHash: readonly [number, number] | null

    The hash of the geometry it was written with (meshGeometryHash), or null when it was written without one.

    kind: "tree"
    layoutVersion: number

    Word 2: the GPU layout the file was written with (GPU_LAYOUT_VERSION).

    leafCount: number
    maxDepth: number
    nodeCount: number
    nodeFormat: GpuLayoutNodeFormat | null

    'f32' or 'quantized'; null for a format code this package doesn't know.

    reason: string | null

    Why the file isn't current (the message loading it would throw), or null.

    triangleCount: number
    triangleLeaves: GpuLayoutTriangleLeaves | null

    'records' or 'indexed'; null for a format code this package doesn't know.