liabru / matter-js

a 2D rigid body physics engine for the web ▲● ■
MIT License
16.81k stars 1.96k forks source link

an example of SPH with matter.js? #895

Closed augus1990 closed 3 years ago

augus1990 commented 4 years ago

Hi, I would like to use fluids like water of rain and rivers in the game I'm trying to develop. Is there any example of SPH (Smoothed-particle hydrodynamics) using matter.js? thank you!!

liabru commented 4 years ago

This is a complex topic and is currently out of scope of the engine, but is certainly possible (I've experimented with it, but nothing good enough for release, but maybe one day). There are some simple fluid-like examples around if you dig through the codepen collection but none that are using SPH as far as I know. Let me know if you get anywhere with it!