Cannon.js Branch

Description

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.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
git clone https://github.com/Sean-Bradley/Three.js-TypeScript-Boilerplate.git

cd Three.js-TypeScript-Boilerplate

git checkout cannonjs 

npm install

npm install -g typescript

npm run dev