Three.js 018Physics
Summary
- Simple physics demo using
cannon(npm install --save cannon) CANNON.World,CANNON.SAPBroadphase,world.gravity,CANNON.Material,friction,restitution(bounce),addContactMaterial, andworld.stepin animation loop- Two controls in
dat.GUIcan be used to spawn additional boxes and spheres - New boxes and spheres will fall down and play a hit sound effect upon collision
Loading...
Links
- Three.js Documentation
- Bruno Simon's Three.js Journey
- Very cool pinball game for inspiration and its creator
- ammo.js and demos (most used)
- cannon.js, demos, and documentation (easier to implement and understand)
- oimo.js, demos, and documentation
- matter.js, demos, and documentation
- p2.js, demos, and documentation
- planck.js, demos, and documentation
- box2d.js and demos
- Physijs, demos, and documentation
- Code for this section
Back to Raycaster
Back to Three.js
Continue with Imported Models