r/tinycode • u/kotsoft • Apr 01 '13
Soft body physics in 998 bytes of JS
Here's what I made for js1k. It simulates a bunch of soft body blobs, collisions between them, and collisions with a moving sine terrain.
You can attract nearby blobs with mouse.
http://js1k.com/2013-spring/demo/1485
Unminified: http://jsfiddle.net/kotsoft/5TAtE/
Explanation of the math: https://skydrive.live.com/redir?resid=1F7837CC1CC2B2A4!1377&authkey=!ANyjHFa2HUjF-YQ
102
Upvotes
View all comments
3
u/seiyria Apr 01 '13
Do you happen to have an uglified version with some commentation that one could use to learn from/look at?