@pmndrs/bvh
    Preparing search index...

    Interface TraceSceneBuildOptions

    Options of buildTraceScene.

    interface TraceSceneBuildOptions {
        build: (geometry: MeshGeometry) => MeshBvh | Promise<MeshBvh>;
        maxTrianglesPerGroup?: number;
        mergeStaticInstances?: boolean;
        nodeFormat?: GpuLayoutNodeFormat;
        positionLayout?: PositionLayout;
        topLevel?: Partial<SahBuildOptions>;
        triangleLeaves?: GpuLayoutTriangleLeaves;
        weld?: boolean;
        weldTolerance?: number;
    }

    Hierarchy (View Summary)

    Index
    build: (geometry: MeshGeometry) => MeshBvh | Promise<MeshBvh>

    Builds one mesh's tree: tinybvh (buildMeshBvhWithTinyBvh), a worker builder's build, or a GPU builder's layout.

    maxTrianglesPerGroup?: number

    Most triangles in one merged mesh; a group that would pass it is split. Default (and at most) the layout's limit, 2^28 - 1.

    mergeStaticInstances?: boolean

    Merge static instances whose mesh is used once into world-space meshes (static-merge.ts; docs/internals/design/trace.md). Default true; it only touches instances marked static: true. With none (or with false), every instance is a normal instance, and the scene is exactly what building each mesh and calling assembleTraceScene gives.

    nodeFormat?: GpuLayoutNodeFormat

    The scene's node format (see TraceSceneAssemblyOptions.nodeFormat). Default 'quantized'; trees are built f32 and quantized at assembly.

    positionLayout?: PositionLayout

    Indexed scenes: 'vec4' (the default) or 'packed' positions.

    topLevel?: Partial<SahBuildOptions>
    triangleLeaves?: GpuLayoutTriangleLeaves

    The scene's triangle format (see TraceSceneAssemblyOptions.triangleLeaves). Default 'records'.

    weld?: boolean

    Indexed scenes: the exact-bit weld at assembly. Default true.

    weldTolerance?: number

    Opt-in: weld each mesh's vertices closer than this on every axis before building (weldPositions), in either format. It moves geometry away from what the app draws by up to this much, and closes seams whose copies differ by an ulp or so (which leak otherwise, in both formats). Within one mesh only. Default 0: off.