2D Predictive-Corrective Smoothed Particle Hydrodynamics (SPH) implementation in Rust with WASM + WebGL

Related tags

pcisph-wasm
Overview

pcisph-wasm

Build Netlify Status

2D Predictive-Corrective Smoothed Particle Hydrodynamics (SPH) implementation in Rust with WASM + WebGL

Reimplementation of my previous Rust PCISPH repository now including a WASM thread parallel solver using wasm-bindgen-rayon

For further information, see SPH tutorials on my website, including an introduction to SPH math and a simple SPH solver.

Demo

Since Github Pages does not support setting HTTP headers, this project is deployed on Netlify after building with Github Actions.

Link to demo

Usage

Install dependencies

npm install
rustup install nightly

Compile WASM, run webpack, and spawn a local server (note you might need to download additional rust-src, etc. with rustup)

npm run serve

Then visit http://localhost:8080

Note

This solver is not exactly PCISPH, but can be viewed as 1-iteration of SPH relaxation plus sub-stepping. The “prediction-relaxation” scheme of my implementation actually comes mainly from the (much easier to follow) paper "Particle-based Viscoelastic Fluid Simulation”, as opposed to "Predictive-Corrective Incompressible SPH”.

Issues
Owner
Lucas V. Schuermann
Please visit my personal homepage at https://lvs.io for more information.
Lucas V. Schuermann
Async executor for WebAssembly

There are a number of async task executors available in Rust's ecosystem. However, most (if not all?) of them rely on primitives that might not be available or optimal for WebAssembly deployment at the time.

wasm.rs 35 Sep 14, 2021
Apache Arrow in WebAssembly

WASM Arrow This package compiles the Rust library of Apache Arrow to WebAssembly. This might be a viable alternative to the pure JavaScript library. R

Dominik Moritz 39 Sep 13, 2021
BSV stdlib written in Rust and runs in WASM environments

BSV.WASM A Rust/WASM Library to interact with Bitcoin SV Installation NodeJS: npm i bsv-wasm --save Web: npm i bsv-wasm-web --save Rust: https://crate

null 30 Sep 6, 2021
a wasm interpreter written by rust

wai (WebAssembly interpreter) A simple wasm interpreter This is an ongoing project DEMO 2021-06-27.10.23.18.mov Install Install via Homebrew brew inst

nasa 48 Aug 25, 2021
cargo, make me a project

cargo-generate cargo, make me a project cargo-generate is a developer tool to help you get up and running quickly with a new Rust project by leveragin

null 789 Sep 7, 2021
Re-implementation of Panda Doodle in Rust targetting WASM, a mobile game originally written in C++

Description This is the source code of my game Panda Doodle, which can be played at https://pandadoodle.lucamoller.com/ (it's best playable on touch s

null 61 Sep 14, 2021
Sample code for compute shader 101 training

Sample code for Compute Shader 101 This repo contains sample code to help you get started writing applications using compute shaders.

Google Fonts 246 Sep 17, 2021
A low-ish level tool for easily writing and hosting WASM based plugins.

A low-ish level tool for easily writing and hosting WASM based plugins. The goal of wasm_plugin is to make communicating across the host-plugin bounda

Alec Deason 51 Aug 31, 2021
Arkworks bindings to Circom's R1CS, for Groth16 Proof and Witness generation in Rust.

ark-circom Arkworks bindings to Circom's R1CS, for Groth16 Proof and Witness generation in Rust.

Georgios Konstantopoulos 37 Sep 13, 2021
A wasm interpreter written by rust

A wasm interpreter written by rust

nasa 48 Sep 11, 2021
swc node binding use wasm

node_swc swc node binding use wasm Build Make sure you have rust wasm-pack installed. $ yarn build # build wasm, node Usage import { parseSync, printS

伊撒尔 22 Aug 6, 2021
wasm actor system based on lunatic

Wactor WASM actor system based on lunatic. Actors run on isolated green threads. They cannot share memory, and communicate only through input and outp

Noah Corona 22 Jun 30, 2021
An n-tuple pendulum simulator in Rust + WebAssembly (and JavaScript)

An n-tuple pendulum simulator in Rust + WebAssembly (and JavaScript) Remaking this n-tuple pendulum simulator moving the math to Rust ?? and WebAssemb

Travis Taylor 25 Sep 11, 2021
FerrisChat's Client

egui template This is a template repo for egui. The goal is for this to be the simplest way to get started writing a GUI app in Rust. You can compile

FerrisChat 3 Sep 16, 2021
transmute-free Rust library to work with the Arrow format

Arrow2: Transmute-free Arrow This repository contains a Rust library to work with the Arrow format. It is a re-write of the official Arrow crate using

Jorge Leitao 159 Sep 20, 2021
A reactive DOM library for Rust in WASM

maple A VDOM-less web library with fine-grained reactivity. Getting started The recommended build tool is Trunk. Start by adding maple-core to your Ca

Luke Chu 337 Sep 13, 2021
A stack-allocated box that stores trait objects.

This crate allows saving DST objects in the provided buffer. It allows users to create global dynamic objects on a no_std environment without a global allocator.

Aleksey Sidorov 15 Jul 22, 2021
Simple color picker that lets the user create harmonic palettes with ease.

epick Simple color picker that lets the user create harmonic palettes with ease. Get it You can checkout the web demo over here or get a native binary

Wojciech Kępka 25 Aug 28, 2021
Um projeto que eu irei escrever todo dia sobre coisas que eu tento fazer codando e também interagir com vocês pela aba de discussão

Um dia programando Descrição Um projeto que eu irei escrever todo dia sobre coisas que eu tento fazer codando e também interagir com vocês pela aba de

Gabriel Paulucci 17 Aug 4, 2021