docsby gkjohnson
Building a BVH for half a million triangles off the main thread
On this page

Properties

running: boolean

Methods

generate(
	geometry: BufferGeometry,

	// Same options accepted by the `MeshBVH` constructor.
	options?: {
		// Callback invoked with a `[0, 1]` progress value as the BVH is built.
		onProgress?: function,

		// If true the position and index `ArrayBuffers` are transferred to the worker rather than copied, avoiding the copy but leaving the geometry unusable until the build finishes. Any other attribute stored in the same `ArrayBuffer` is detached as well. Ignored with a warning for an interleaved position attribute or a `range`.
		transferBuffers: boolean = false
	}
): Promise<MeshBVH>
dispose(): void