SPHjs
works
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
SPHjs
-
Water – Oimo.io
Decade or so ago, I had made a water simulation myself in JavaScript: https://asadmemon.com/SPHjs/
I should find some time and modernize it with some more features.
- water movement with gyroscope
- Show HN: Box2D fluid simulation in WebGL and WASM
- [AskJS] How could I implement realistic fluids simulations (SPH?) in my video game?
works
-
Cloth Simulation
The same creator has some more really fun open source physics demos, click on the images: https://github.com/saharan/works
-
Water – Oimo.io
They add some randomness: https://github.com/saharan/works/blob/main/water/src/MPM.hx#...
-
Clock
The core idea (backwards time integration) seems to be implemented here:
https://github.com/saharan/works/blob/main/clock/src/phys/Wo...
And by the looks of it, there is a description here: https://blog.oimo.io/2022/02/11/clock-core/
I'm not passionate enough to try and (machine-)translate it, even though I would've really liked to understand how you make collision handling work backwards (especially since the simulation clearly seems to have energy dissipation)...
What are some alternatives?
box2d-wasm - Box2D physics engine compiled to WebAssembly. Supports TypeScript and ES modules.
literature-clock - Clock using time quotes from the literature, based on the work of Jaap Meijers
LiquidFun - 2D physics engine for games
society-htm - rich emergent dynamics via physics simulation (p2.js)
WebGL-Fluid-Simulation - Play with fluids in your browser (works even on mobile)
fluid - Fluid Simulation on HTML5 Canvas