RCWeb Fluid Simulation

The RCWeb Fluid Simulation app (app/fluid-sim) is a shared display for collaborative, relaxing color swirls. It pairs with app/fluid-sim-control, where many users can touch and drag to inject their own color into a WebGL fluid canvas.

Icon

icon

What it does

  • WebGL Fluid Solver: A GPU velocity and dye simulation creates curls, pressure-driven motion, and soft paint-on-water blooms.
  • Momentum: Finger velocity is transferred into the display, so fast strokes keep drifting and slow strokes bloom gently.
  • Multi-User Color Trails: Every controller has its own color, letting several people create distinct swirls on the same screen.
  • Shared Display Flow: The display shows a QR code to open the controller for the current room.

How it works

The controller sends normalized touch segments to fluidSim.addStroke using rc.sendFunctionCall. The display converts those segments into WebGL splats, disturbs a GPU velocity field, solves pressure to keep the motion fluid-like, and advects dye through the field over time. The graphics pipeline is inspired by Pavel Dobryakov's MIT-licensed WebGL Fluid Simulation.

DocumentationServer TelemetryServer StatsServer HTTP LogServer WebSocket Log