@pmndrs/bvh
    Preparing search index...

    Interface MeshLayoutBuilder

    interface MeshLayoutBuilder {
        fallback: boolean;
        fallbackReason: string | null;
        kind: MeshLayoutBuilderKind;
        ready: boolean;
        buildLayouts(
            geometries: readonly MeshInput[],
            options?: MeshLayoutBuildOptions,
        ): Promise<MeshLayoutResult[]>;
        prepare(): Promise<void>;
    }
    Index
    fallback: boolean

    True only for a real fallback: a GPU builder was wanted (no prefer, or a GPU one) and the device can't run it, so tinybvh builds. False when a GPU builder is in use, and when tinybvh was asked for (prefer: 'tinybvh'), which an overlay should not show as a fallback.

    fallbackReason: string | null

    Why the GPU builder is not in use, or null when it is. Its meaning is unchanged: it is set whenever kind is 'tinybvh', a real fallback ('no GPU device', 'the device has no "subgroups" feature') and a choice alike ('the CPU builder was asked for', with prefer: 'tinybvh'). fallback tells the two apart.

    The builder meshes go to first.

    ready: boolean

    True once the builder's pipelines are compiled (always for tinybvh).

    • Compiles the GPU builder's pipelines, once (the factory does unless prepare: false; a build does if nothing did).

      Returns Promise<void>