# gkjohnson/three-mesh-bvh

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

Repository: https://github.com/gkjohnson/three-mesh-bvh
Canonical: https://ross.abutalabs.com/products/three-mesh-bvh
Homepage: https://gkjohnson.github.io/three-mesh-bvh/example/bundle/raycast.html
Language: JavaScript
License: MIT
License Family: permissive
Topics: graphics, raycast, tree, bounds, threejs, three-js, bounds-hierarchy, performance, geometry, mesh, distance, intersection, acceleration, bvh, webvr, point-cloud, pointcloud, raytracing, pathtracing, three-mesh-bvh
Last push: 2026-08-10T23:17:53+00:00

## Health v2 (maintenance only)
Score: 97/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 95, longevity 100
- inputs: {"age_days": 3149, "days_push": 23, "days_rel": 32, "gap_med": 14.5, "n_releases_24m": 21}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3462, forks 333 (observed 2026-08-28T04:08:05.671751+00:00)

## What it is
A Bounding Volume Hierarchy (BVH) acceleration library for three.js that speeds up raycasting and enables spatial queries against meshes. It supports raycasting, distance queries, shape casting, SDF generation, and GPU path tracing on large geometries.

## Use cases
- speed up raycasting against large three.js meshes
- perform spatial queries like distance and intersection tests on 3D geometry
- build character movement and collision detection in a three.js game
- generate signed distance fields from meshes
- do GPU path tracing in the browser
- implement lasso selection or triangle painting tools on 3D models
- voxelize or sculpt 3D geometry in the browser

## When to choose
- you use three.js and need fast raycasting on high-polygon meshes
- you need spatial queries (distance, intersection, shapecast) against 3D geometry in JavaScript
- you're building browser-based 3D games, editors, or path tracers with three.js

## When to avoid
- you're not using three.js or WebGL-based rendering
- you need a general-purpose physics engine with rigid body dynamics
- you need BVH acceleration outside JavaScript/browser environments

## Facets
- artifact type: library
- maturity: active
- function: graphics, simulation, computer-vision, game-engine
- domain: graphics, web-development, simulation
- platform: browser
- tags: threejs, bvh, raycasting, spatial-index, path-tracing, collision-detection, webgl, performance, game-development, nodejs, javascript, web

## Member repositories
- gkjohnson/three-mesh-bvh (main) score 97

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:05.671751+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:36:54.451047+00:00, confidence not recorded.
  - readme: https://github.com/gkjohnson/three-mesh-bvh (fetched 2026-08-28T04:08:05.671751+00:00, sha cf27b5651708)
  - homepage: https://gkjohnson.github.io/three-mesh-bvh/example/bundle/raycast.html (fetched 2026-08-29T09:31:10.151062+00:00, sha e44998706f69)
  - registry_npm: https://registry.npmjs.org/three-mesh-bvh (fetched 2026-08-29T09:31:10.159934+00:00, sha 0b0a6d922342)
- Data as of 2026-08-30T08:39:29.467469+00:00.
