Skip to content

Cannon.js Branch



The Cannon.js branch demonstrates,

  • using a Cannonjs to modify THREE.Mesh positions and quaternions,
  • creating a CANNON.Plane from a THREE.PlaneGeometry,
  • creating a CANNON.Box from a THREE.BoxGeometry,
  • creating a CANNON.Sphere from a THREE.SphereGeometry,
  • creating a CANNON.Cylinder from a THREE.CylinderGeometry,
  • creating a CANNON.Trimesh from a THREE.TorusKnotGeometry,
  • creating a CANNON.Trimesh from a loaded OBJ file,
  • creating a CANNON.ConvexPolyhedron from a THREE.IcosahedronGeometry,
  • using the CannonDebugRenderer to help visualize the physics object boundaries

To load the Cannon.js example, checkout the cannonjs branch.

git clone

cd Three.js-TypeScript-Boilerplate

git checkout cannonjs

npm install

npm run dev