How they’re builtLibrary
three-mesh-bvh
A library that builds a bounding volume hierarchy over a Three.js mesh, so raycasts and other spatial queries against detailed geometry stay fast. A game can use it to test karts, balls or characters against the level itself.