gkjohnson

    gkjohnson/three-mesh-bvh

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

    graphics
    acceleration
    bounds
    bounds-hierarchy
    bvh
    distance
    JavaScript
    MIT
    3.5K stars
    345 forks
    3.5K GitHub watchers
    Updated Oct 31, 2026
    View on GitHub

    Build with Backblaze B2

    SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.

    Explore Backblaze Labs

    Loading star history...

    Where it stands

    Rank, growth pace and release cadence relative to everything GStars tracks.

    3 releases in the last 90 days, the latest 2 days ago, with 51 contributors on GitHub.

    Use Cases & Benefits

    • Implements a Bounding Volume Hierarchy (BVH) to accelerate raycasting and spatial queries on three.js meshes.
    • Significantly improves performance of raycasting and intersection tests on complex 3D geometries by reducing computational overhead.
    • Use for optimizing real-time raycasting in interactive 3D applications and games using three.js.
    • Use for performing efficient spatial queries like closest point, intersection, and shape casting on large mesh geometries.
    • Use for asynchronous or parallel BVH generation in web workers to avoid blocking the main thread during complex geometry processing.

    Should you depend on it?

    License terms, project hygiene and risks, from GitHub metadata and GStars' snapshots.

    License

    MIT

    Permissive: commercial use, modification and redistribution are allowed with attribution.

    Community files

    • README: present
    • Contributing guide: present

    Watch-outs

    No watch-outs from GStars' checks.

    General guidance from repository metadata, not legal advice. How we score

    From the README

    A Bounding Volume Hierarchy (BVH) implementation to speed up raycasting and enable spatial queries against three.js meshes. See the associated Wikipedia article for more information on bounding volume hierarchies and how they work.

    Casting 500 rays against an 80,000 polygon model at 60fps!

    Using pre-made functions

    Or manually building the BVH

    And then raycasting

    Excerpt from the gkjohnson/three-mesh-bvh README on GitHub (MIT license). © its authors.Read the full README on GitHub

    Daily snapshots

    Stars gained per day, and how forks and open issues moved, from GStars' daily snapshots

    Forks

    345+12

    Open issues

    88+6

    Compared with peers in Graphics

    Fastest-growing repositories GStars tracks in this cohort for the week of Nov 1, by 7-day star growth

    gkjohnson/three-mesh-bvh compared with Graphics repositories by stars, 7-day star growth, health score and last release
    RepositoryStars+7dHealthLast release
    heygen-com/hyperframes79.6K+4.1K45today
    mrdoob/three.js117.7K+463656 days ago
    NVIDIA/cuda-rust4.0K+122604 days ago
    bilawalsidhu/gods-eye-view61.8K—603 days ago
    processing/p5.js24.2K—657 days ago
    gkjohnson/three-mesh-bvh3.5K—602 days ago
    Category median61.8K+46360—

    Discover Repositories

    Search across tracked repositories by name or description