@pmndrs/bvh
    Preparing search index...

    Interface SerializedSceneHeader

    A scene's header (serializeTraceScene).

    interface SerializedSceneHeader {
        byteLength: number;
        current: boolean;
        formatVersion: number;
        instanceCount: number;
        kind: "scene";
        layoutVersion: number;
        mergedGroupCount: number;
        meshCount: number;
        nodeFormat: GpuLayoutNodeFormat | null;
        positionLayout: "vec4" | "packed" | null;
        reason: string | null;
        requiredStackSize: number;
        triangleLeaves: GpuLayoutTriangleLeaves | null;
        vertexCount: number;
    }

    Hierarchy

    • SerializedHeaderCommon
      • SerializedSceneHeader
    Index
    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).

    instanceCount: number

    Instance records in the top level (merged groups' included).

    kind: "scene"
    layoutVersion: number

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

    mergedGroupCount: number

    Merged static groups (TraceSceneData.mergedGroups).

    meshCount: number

    The input meshes (TraceSceneData.meshes).

    nodeFormat: GpuLayoutNodeFormat | null

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

    positionLayout: "vec4" | "packed" | null

    'vec4' or 'packed' (an indexed scene's positions); null for a code this package doesn't know.

    reason: string | null

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

    requiredStackSize: number

    Trace stack entries the scene needs (TraceSceneData.requiredStackSize).

    triangleLeaves: GpuLayoutTriangleLeaves | null

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

    vertexCount: number

    Vertices in the positions (0 for records).