three-mesh-bvh is a Bounding Volume Hierarchy (BVH) implementation for three.js meshes that speeds up raycasting and supports spatial queries. It provides utilities and extension functions to build BVHs for different three.js geometry types, along with examples for raycasting, intersections, and related performance-focused queries.
Project status
- Actively maintained, with the last upstream push on 2026-08-10 and multiple tagged updates in mid 2026 (v0.9.14 on 2026-08-01, v0.9.13 and v0.9.12 on 2026-07-18).
- Update cadence appears roughly weekly to every couple weeks, suggesting an ongoing development stream rather than a long freeze.
AI summary generated
Recent updates
v0.9.14
v0.9.14 includes fixes to GPU closest-point triangle barycentric output ordering (WGSL and GLSL) and to BVH data generation for BatchedMesh range-based BVHs. The code changes also include a geometryOffset correction based on whether the BVH is indirect, plus a large package-lock.json churn.
v0.9.13
v0.9.13 introduces support for context-value proxies in the NodeProxy system. The diff also includes internal changes to how WGSLTag nodes normalize and set up their arguments, which may alter when argument setup and normalization occurs during node compilation.
Featuresv0.9.12
v0.9.12 primarily improves safety and build-time code generation. It adds support for WGSLTag inline functions evaluated during build, and adds a runtime guard to throw when BVH traversal depth could overrun the compute stack.
BreakingFeaturesv0.9.11
v0.9.11 adds WebGPU compute support for packed multi-object BVH data via a new BVHComputeData class, and it deprecates the prior wgslFn/wgsl-based TSL node exports. It also renames the BVH option maxLeafSize to targetLeafSize and fixes several raycast firstHitOnly edge cases. Code changes indicate additional internal refactors and API surface changes beyond what the release notes describe, especially around the WebGPU TypeScript declarations.
BreakingFeaturesv0.9.10
v0.9.10 primarily fixes coplanar triangle warning spam during closest point computations, and includes “types update” changes intended to resolve TypeScript issues from internal import paths. The code diff also shows several public typing and API-shape changes around traversal callbacks, hit information, BVH serialization, and worker interfaces.
Featuresv0.9.9
v0.9.9 adds two new BVH variants, ObjectBVH and SkinnedMeshBVH, and moves both into the core package area. The release also includes test coverage and multiple raycasting-related fixes, plus a worker progress reporting fix.
Featuresv0.9.8
v0.9.8 focuses on improving developer guidance around the `intersectsTriangle` callback, including deprecation messaging, and fixing `onProgress` percentage reporting during BVH build. It also adds an Object Hierarchy BVH example (`ObjectBVH`) and updates the documentation/examples landing content accordingly.
Featuresv0.9.7
v0.9.7 introduces BVH BVH-casting support via a new bvhcast callback API, along with BVHHelper updates to use instanceId instead of objectIndex. It also deprecates MeshBVHHelper and the MeshBVH maxLeafTris option in favor of BVHHelper and maxLeafSize, respectively.
BreakingFeaturesv0.9.6
v0.9.6 focuses on improving refit support and fixing a few correctness issues. Release notes call out BVHHelper clone field cloning, more resilient acceleratedRaycast behavior when the .type field changes, and a WGSL keyword usage fix, plus new example support via a SkinnedMeshBVH.
Featuresv0.9.5
v0.9.5 adds new BVH variants for non-mesh primitives, including PointsBVH and multiple line-based BVHs (LineBVH, LineSegmentsBVH, LineLoopBVH). The change also includes a major internal refactor that generalizes the BVH implementation, plus TypeScript declaration updates.
Features