PhysicsDebugBVH
new PhysicsDebugBVH(physics : Physics, options : Object)PhysicsDebugBVH - BVH debug overlay for physics bodies
Visualizes collision meshes and BVH helpers for all registered bodies. Extends THREE.Object3D - MUST be added to the scene to be visible.
Note: For dynamic/kinematic bodies, call update() every frame to keep transforms synced.
Constructor Parameters
Example
import { PhysicsDebugBVH } from '@three-blocks/pro';
// Create and add to scene (REQUIRED for visibility!)
const debugBVH = new PhysicsDebugBVH( physics, { enabled: true } );
scene.add( debugBVH ); // <-- Don't forget this!
function animate() {
debugBVH.update(); // Sync transforms for moving bodies
renderer.render( scene, camera );
}