@pmndrs/bvh
    Preparing search index...

    Function buildTraceScene

    • Builds every mesh tree with options.build and assembles the scene. With mergeStaticInstances (on by default) and instances marked static, meshes only merged instances use get no tree of their own, and each merged group's geometry is built instead.

      Every mesh's triangleFlags may set bit 0 only; a reserved bit throws, naming the mesh and triangle.

      Static means static. A merged instance's transform is baked into the merged mesh. Only assembling again notices that one moved (or that its mask, visible or contributesToGi changed); nothing checks between assemblies, so a caller that moves a merged instance and only updates the top level gets the old position. A merged group's range (TraceSceneData.mergedGroups) must never be refit: use meshRefitPlacement, which refuses merged meshes, to get refit offsets.

      Parameters

      Returns Promise<TraceSceneData>