gkjohnson/three-mesh-bvh

A BVH implementation to speed up raycasting and enable spatial queries against three.js meshes.

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 7 minutes ago
Added to GitGenius on September 19th, 2026
Created on January 19th, 2018
Open Issues & Pull Requests: 84 (+0)
GitHub issues: Enabled
Number of forks: 334
Total Stargazers: 3,489 (+0)
Total Subscribers: 42 (+0)

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 35
New in 7 days: 1
Closed in 7 days: 0
Avg open age: 782 days
Stale 30+ days: 34
Stale 90+ days: 21

Recent activity

Opened in 7 days: 1
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • bug (26)
  • question (16)
  • enhancement (15)
  • help wanted (3)
  • runtime performance (3)
  • build performance (2)
  • memory usage (2)

Most active issues this week

Detailed Description

three-mesh-bvh is a bounding volume hierarchy acceleration structure for three.js that speeds up raycasting and spatial queries against meshes.

The tool solves the performance problem of raycasting and spatial intersection tests against complex geometry. Without acceleration, these operations require checking every triangle in a mesh, which becomes prohibitively slow for detailed models. The project builds a hierarchical tree structure over mesh geometry that allows queries to skip large portions of the mesh during intersection tests. This approach enables real-time raycasting against models with tens of thousands of polygons and supports various spatial query types including point-cloud intersection, line intersection, shape casting, and distance queries.

Developers working with three.js who need fast raycasting or spatial queries should consider this tool. It suits interactive applications like games, physics simulations, sculpting tools, and path tracing systems where performance matters. The project provides both mesh-level BVH acceleration and object hierarchy BVH for accelerating raycasts across entire scenes. The examples demonstrate practical applications including character movement with collision detection, sphere physics, frustum culling, and GPU path tracing, showing the breadth of use cases the tool enables.

The project maintains active engagement with its codebase through regular refinements and feature additions. Development includes support for advanced use cases such as skinned mesh acceleration, batched mesh raycasting, and asynchronous BVH generation via WebWorkers. The tool provides configuration options for tuning BVH construction and query behavior, with an interactive inspector example allowing developers to explore how different settings affect performance and accuracy.