pbd-fluid-rs

2D Position Based Fluid simulation in Rust with both WASM and native targets

https://github.com/lucas-schuermann/pbd-fluid-rs

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (6.7%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

2D Position Based Fluid simulation in Rust with both WASM and native targets

Basic Info
Statistics
  • Stars: 17
  • Watchers: 2
  • Forks: 1
  • Open Issues: 0
  • Releases: 0
Created over 4 years ago · Last pushed almost 2 years ago
Metadata Files
Readme License Citation

README.md

Build

pbd-fluid-rs is a 2D Position Based Fluid implementation in Rust with WASM + WebGL. It was inspired by Matthais Müller's position based fluid demo.

For a quick demo, please see https://lucas-schuermann.github.io/pbd-fluid-rs/. The WASM version of this project is deployed to Github Pages after building with Github Actions.

Running

Package Dependencies

```bash

debian/ubuntu

apt install build-essential pkg-config cmake libfreetype6-dev libfontconfig1-dev ```

Native (cargo)

bash RUST_LOG=info cargo run --package native --release Press 1-4 to select a dam break scene and reset the simulation, s to toggle drawing with a single color, or space to add a block of particles.

Web (npm)

```bash

install dependencies

npm install

compile to WASM, run webpack, and spawn a local server

npm run serve ``` Then visit http://localhost:8080

License

This project is distributed under the MIT license.

Owner

  • Name: Lucas V. Schuermann
  • Login: lucas-schuermann
  • Kind: user

Please visit my personal homepage at https://lvs.io for more information.

Citation (CITATION.cff)

cff-version: 1.2.0
title: "pbd-fluid-rs"
message: "If you use this software, please cite it as below."
type: software
authors:
  - given-names: "Lucas V."
    family-names: "Schuermann"
    email: lucas@lvs.io
repository-code: "https://github.com/lucas-schuermann/pbd-fluid-rs"
license: MIT
date-released: 2021-09-11

GitHub Events

Total
  • Watch event: 4
Last Year
  • Watch event: 4

Dependencies

Cargo.lock cargo
  • 184 dependencies
Cargo.toml cargo
  • cgmath 0.18
  • js-sys 0.3
  • wasm-bindgen 0.2
  • web-sys 0.3
native/Cargo.toml cargo
  • cgmath 0.18.0
  • env_logger 0.9.0
  • glium 0.30.1
  • log 0.4
solver/Cargo.toml cargo
  • cgmath 0.18.0
  • glam 0.20.0
  • rayon *
package-lock.json npm
  • 334 dependencies
package.json npm
  • @wasm-tool/wasm-pack-plugin ^1.6 development
  • html-webpack-plugin ^5.5 development
  • text-encoding ^0.7 development
  • wasm-pack ^0.10 development
  • webpack ^5.73 development
  • webpack-cli ^4.10 development
  • webpack-dev-server ^4.9 development
  • stats.js ^0.17
.github/workflows/main.yml actions
  • JamesIves/github-pages-deploy-action v4.4.1 composite
  • actions-rs/toolchain v1 composite
  • actions/checkout v3 composite
  • jetli/wasm-pack-action v0.4.0 composite