In my THREE.js
Scene, objects have physics applied to them using CANNON.js
. The RigidBody initiation process is as follows:
let shape = new CANNON.Box(new CANNON.Vec3(1, 1, 1));
let body = new CANNON.Body({
mass: 5,
shape: shape
});
I am interested in creating a visual representation of the CANNON.Body
within my THREE.Scene
.
What is the best approach to visually represent a RigidBody?