This is a combination of a FLIP fluid solver, and a Particle Life simulation. On each page refresh, fresh rules are chosen for the particle life simulation. This simulation is interactive, drag the particles around!
https://masterchef365.github.io/pic-fluids/
The node graph portion can be considered to be a type of self-modifying code; changes to the node graph re-compile a portion of the webassembly code and use it to accelerate the simulation.
Make sure you are using the latest version of stable rust by running rustup update
.
cargo run --release
On Linux you need to first run:
sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev
On Fedora Rawhide you need to run:
dnf install clang clang-devel clang-tools-extra libxkbcommon-devel pkg-config openssl-devel libxcb-devel gtk3-devel atk fontconfig-devel
Just run trunk build --release
.
- Add save states
- BUG: it is not possible to add new nodes in mobile!
- Can be fixed by adding a button which floats on top and opens the finder menu
- Add a way to keep a certain set of "projects" around
- Add another set of nodes for per-particle alongside the existing per-neighbor. Include a dt!
- Specify output node type!
- Subroutines? !
- "Maximum" and "Minimum" functions
- Vector reduction functions