Installation
$ npm install lesca-cannon-debug-renderer --save
Usage
Cannonjs debug renderer for Three.js. transiform to es6 version read more => https://github.com/schteppe/cannon.js/tree/master/tools/threejs
import CannonDebugRenderer from 'lesca-cannon-debug-renderer';
const world = new CANNON.World();
const scene = new THREE.Scene();
const cannonDebugRenderer = new CannonDebugRenderer(scene, world);
function render() {
requestAnimationFrame(render);
world.step(timeStep);
cannonDebugRenderer.update();
renderer.render(scene, camera);
}
render();