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.step
in animation loop- Two controls in
dat.GUI
can 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