Verlet-js - Open source dynamic body physics engine
subprotocol.com
subprotocol.com
Cheers
Great work though
Thank you for the feedback!
A question, Why did you chose Verlet integration? I know it's great for particles but I always had issues trying to do angular mechanics.
It does look good and integrates well, but to be honest ThreeJS is so mature and battle tested with multiple renderers (canvas, webgl etc) that when building a physics engine, I really think it would be better to spend ones dev time on the physics and not waste* time reimplementing a portion of ThreeJS.
[0]: http://chandlerprall.github.io/Physijs/
*Obviously not actually 'wasted' time, hacking is great even just for the sake of it - but I'm sure you know what I mean.
Another way to exhibit it is to take the center node of the wheel and press it against the wall. The whole shape will spin.
Another issue with defining shapes via distance constraints is that they sometimes have alternate solutions / stable minima. For example, you can smash the circle in to the ground and get it to crumple: http://i.imgur.com/UzxbKvJ.png
But, this is still an awesome demo. Good work subprotocol.
For my most recent attempt at something speedy, here's some source code making use of typed arrays and doing away with objects completely. The speed improvement is good, but maybe the maintainability suffers a little (press space to create blob): https://c9.io/blixt/blob/workspace/index.html
Note that the particle-line collision is currently inefficient, so it slows down the simulation a lot more than it should.
I'm not sure what about it is so effective.
Box2D JS and Box2Dweb
http://box2d-js.sourceforge.net/
https://code.google.com/p/box2dweb/
Bullet JS
https://github.com/adambom/bullet.js/
Cannon.js
https://github.com/schteppe/cannon.js
Ammo.js
https://github.com/kripken/ammo.js/
Physijs
http://chandlerprall.github.io/Physijs/
JigLibJS
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?
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.
Vehicle: http://apps.playcanvas.com/will/ammo/vehicle
FPS Character Controller: http://apps.playcanvas.com/playcanvas/physics/charactercontr...
Crates!: http://apps.playcanvas.com/will/ammo/crates
[1] Disclaimer: I'm a co-founder :-)
Any thoughts of integrating it with SVG? SVG is super useful for drawing and manipulating shapes in the browser.
That is the best bug ever.
Just for fun, try pulling one of the spider's legs and bring it close to the web! I really like how it clings on to the web.
Anyone knows a good "directory" or collection of such sites?
Another example of that kind of site: http://worrydream.com/
Thanks for any reply.
edit: after I deleted google analytics code, everything went hunky dory. Thanks for this amazing piece of code :)