Skip to content

Getting Started

Get the simulation running in under a minute.

Quick Start

bash
git clone https://github.com/AICL-Lab/particle-fluid-sim.git
cd particle-fluid-sim
npm install
npm run dev

Open http://localhost:5173 in a WebGPU-enabled browser.

Requirements

  • Node.js: 18+
  • Browser: Chrome 113+, Edge 113+, or Safari 17+

Firefox: WebGPU is still experimental and requires dom.webgpu.enabled in about:config.

Controls

ActionEffect
Move mouseRepel nearby particles
TouchSame interaction on mobile
Resize windowRecompute canvas size and HiDPI scale

Development Commands

bash
npm run dev
npm run build
npm run preview
npm run lint
npm run typecheck
npm run test:coverage
npm run verify

Project Structure

text
particle-fluid-sim/
├── src/
│   ├── config/       # Shared simulation constants
│   ├── core/         # Runtime modules and tests
│   └── shaders/      # WGSL shader assets
├── docs/             # VitePress docs and architecture notes
├── .github/          # CI, Pages, issue templates, repo metadata
└── CHANGELOG.md      # Single changelog for the project

Next Steps

Built with VitePress