This is an implementation of a (modified) Vicsek model for flocking behavior.
It is implemented in Rust and will show an animation.
Just visit surt91.github.io/vicsek/ to watch!
Just start it with cargo, (you can get it at, eg., rustup.rs):
cargo run --releaseOn Debian 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
We use Trunk to build for web target.
- Install the required target with
rustup target add wasm32-unknown-unknown. - Install Trunk with
cargo install --locked trunk. - Run
trunk serveto build and serve onhttp://127.0.0.1:8080. Trunk will rebuild automatically if you edit the project. - Open
http://127.0.0.1:8080/index.html#devin a browser. See the warning below.
- Just run
trunk build --release. - It will generate a
distdirectory as a "static html" website - Upload the
distdirectory to any of the numerous free hosting websites including GitHub Pages.
If you are running Linux and have an X server installed (if you do not know what this means, it is probably true; XWayland does also work), you can also use the provided docker container:
docker-compose build
# this is needed to allow access to your X-server from within the Docker container
xhost +local:
docker-compose up