Sample code to make a dodecahedron roll with Three.js, Cannon.js and a touch of OrbitControls.
How to test
- Install Monaca via npm (for funsies):
- https://www.npmjs.com/package/monaca
$ npm i monaca
- (once inside the project folder) On your favorite command window run:
$ monaca preview
Instructions
- Click to roll.
- Drag left click to rotate camera.
- Drag right click to move camera.
Feel free to comment and give any advice on how to improve my code!
This was made based on various examples especially from :
(Some could say this is basically a fork)