ReadonlyformatsReadonlyheapBytes 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.
ReadonlylastBytes of the WASM memory at the end of the last build, before any release (0 before the first build).
ReadonlyreleasesWASM instances this builder has dropped after big builds (see TinyBvhBuilderOptions.releaseAboveBytes).
Builds one mesh's tree and returns its shape. Synchronous; one at a time.
Optionaloptions: TinyBvhBuildOptionsBuilds one mesh's tree and returns it in the tracer's GPU layout, written
inside the WASM. Byte for byte what ddgi-core's buildMeshBvhFromTopology
makes from build's topology of the same mesh: the boxes are recomputed
from the triangles, not taken from tinybvh. Synchronous; one at a time.
Optionaloptions: TinyBvhLayoutOptions
Whether
buildLayoutwrites indexed triangles and quantized nodes inside the WASM: the .wasm hastbvh_write_layout_asand TinyBvhBuilderOptions.formatsInWasm is not false. Otherwise they are converted in JavaScript. The bytes are the same either way.