Author here. This demo showcases liquidfun-wasm[0], my effort to revive liquidfun[1] (a fork which adds fluid simulation and soft-body physics to Box2D[2]).<p>to make liquidfun-wasm, I repurposed my existing box2d-wasm[3] and pointed it at a different release of Box2D — a commit obtained by rebasing liquidfun over 7 years of upstream Box2D changes[4]. the end result is that liquidfun is now distributed in WebAssembly and with TypeScript typings for the first time. The TypeScript typings are generated from WebIDL bindings via my webidl-to-ts[5] compiler.<p>this demo in particular aims to bring to the Web the shaders from the liquidfun EyeCandy demo[6], and show how fast JS can run if you avoid incurring the garbage collector (the main loop tries not to allocate objects). the demo repurposes gravity and drag calculations that I'd used previously in my Lunar Survey experiment[7] (a Mario Galaxy homage).<p>[0] <a href="https://github.com/Birch-san/box2d-wasm/releases/tag/liquidfun-v6.0.4-lf.1" rel="nofollow">https://github.com/Birch-san/box2d-wasm/releases/tag/liquidf...</a><p>[1] <a href="http://google.github.io/liquidfun/" rel="nofollow">http://google.github.io/liquidfun/</a><p>[2] <a href="https://github.com/erincatto/box2d" rel="nofollow">https://github.com/erincatto/box2d</a><p>[3] <a href="https://github.com/Birch-san/box2d-wasm" rel="nofollow">https://github.com/Birch-san/box2d-wasm</a><p>[4] <a href="https://github.com/Birch-san/box2d-wasm/releases/tag/v4.0.0-liquidfun.0" rel="nofollow">https://github.com/Birch-san/box2d-wasm/releases/tag/v4.0.0-...</a><p>[5] <a href="https://github.com/Birch-san/box2d-wasm/tree/master/webidl-to-ts" rel="nofollow">https://github.com/Birch-san/box2d-wasm/tree/master/webidl-t...</a><p>[6] <a href="https://github.com/google/liquidfun/blob/master/liquidfun/Box2D/EyeCandy/engine.cpp" rel="nofollow">https://github.com/google/liquidfun/blob/master/liquidfun/Bo...</a><p>[7] <a href="https://birchlabs.co.uk/lunar-survey/" rel="nofollow">https://birchlabs.co.uk/lunar-survey/</a>