@pmndrs/bvh
    Preparing search index...

    Interface TinyBvhBuilder

    interface TinyBvhBuilder {
        formatsInWasm: boolean;
        heapBytes: number;
        lastBuildHeapBytes: number;
        releases: number;
        build(geometry: MeshInput, options?: TinyBvhBuildOptions): TinyBvhBuild;
        buildLayout(
            geometry: MeshInput,
            options?: TinyBvhLayoutOptions,
        ): TinyBvhLayoutBuild;
    }
    Index
    formatsInWasm: boolean

    Whether buildLayout writes indexed triangles and quantized nodes inside the WASM: the .wasm has tbvh_write_layout_as and TinyBvhBuilderOptions.formatsInWasm is not false. Otherwise they are converted in JavaScript. The bytes are the same either way.

    heapBytes: number

    Bytes of the WASM memory this builder holds now. A WASM memory grows to a build's peak (tinybvh's working arrays, the input copies and the output, about 230 bytes per triangle) and can never shrink, so after a build that grew it past TinyBvhBuilderOptions.releaseAboveBytes the builder starts a fresh WASM instance and drops the old one, which the garbage collector then frees.

    lastBuildHeapBytes: number

    Bytes of the WASM memory at the end of the last build, before any release (0 before the first build).

    releases: number

    WASM instances this builder has dropped after big builds (see TinyBvhBuilderOptions.releaseAboveBytes).