5 ms·
Also Box2D JS and Box2Dweb http://box2d-js.sourceforge.net/ http://box2d-js.sourceforge.net/ https://code.google.com/p/box2dweb/ https://code.google.com/p/bo
by rorrr2 13y ago
Also
Box2D JS and Box2Dweb
http://box2d-js.sourceforge.net/ http://box2d-js.sourceforge.net/
https://code.google.com/p/box2dweb/ https://code.google.com/p/box2dweb/
Bullet JS
https://github.com/adambom/bullet.js/ https://github.com/adambom/bullet.js/
Cannon.js
https://github.com/schteppe/cannon.js https://github.com/schteppe/cannon.js
Ammo.js
https://github.com/kripken/ammo.js/ https://github.com/kripken/ammo.js/
Physijs
http://chandlerprall.github.io/Physijs/ http://chandlerprall.github.io/Physijs/
JigLibJS
https://github.com/supereggbert/JigLibJS https://github.com/supereggbert/JigLibJS
- Ygg2 13y agoInteresting list but I wonder how do these libraries fare when used by JS developers? What are their performances and experience with them?
- seanmcdirmid 13y agoAlso, a verlet-based physics engine is a very different beast compared to a rigid-body one (a few in the list above are also based on verlet, but not most).
- jjoonathan 13y agoErr, I thought verlet was just an integration technique? How does it translate into a "very different beast"?
- bm1362 13y agoVerlet integration uses an object's change in position at time t to determine the velocity for t+1- it is typically used for particles not full rigid bodies.
- seanmcdirmid 13y agoVerlet is incredibly stable and allows you to update the position of a mass directly (velocity, force, momentum are all implicit), making it very easy to work with if not very accurate. You can't emulate rigid bodies very well (shape matching kinda works), collision response and stacking is a pain in the ass.
- solox3 13y agoAlright, then why not do the very minor step up to Velocity-Verlet?
- seanmcdirmid 13y agoI don't really think it really helps with stacking.
- jjoonathan 13y agoI guess I'm still having trouble understanding where the complexities arise. I have no difficulty believing that they do arise, but I would like to understand how it happens if you're willing to take the time to explain. I would think that rigid bodies -- either perfectly rigid or semi-rigid via springs & struts -- would not handle all that differently in verlet since force is explicit (typo on your part?) and a v/p estimate is available from the last position, albeit with a bit more phase lag than usual. Does the phase lag induce nasty oscillations or something?
- seanmcdirmid 13y agoWe can make semi-rigid bodies in verlet using strings are shape matching techniques, but the pressure needed to maintain shape necessarily interferes with stacking or any other kind of stable contact. Actually, their was a solution to this in a shape matching paper by Matthias [1] but I was never able to get it to work right. I've played around a lot with Verlet, it is very powerful in certain cases...especially since you can just update the position of a mass directly (very easy to program, very mouse/touch input friendly). However, a rigid body physics engine is probably better for most game use cases. [1] http://www.matthiasmueller.info/realtimephysics/ http://www.matthiasmueller.info/realtimephysics/
- daredevildave 13y agoHere are some examples of ammo.js running in PlayCanvas[1] Vehicle: http://apps.playcanvas.com/will/ammo/vehicle http://apps.playcanvas.com/will/ammo/vehicle FPS Character Controller: http://apps.playcanvas.com/playcanvas/physics/charactercontroller http://apps.playcanvas.com/playcanvas/physics/charactercontr... Crates!: http://apps.playcanvas.com/will/ammo/crates http://apps.playcanvas.com/will/ammo/crates [1] Disclaimer: I'm a co-founder :-)
- rorrr2 13y agoChipmunk-JS https://github.com/josephg/Chipmunk-js https://github.com/josephg/Chipmunk-js