Liquid-Simulation
- 4 Devlogs
- 24 Total hours
This project is an interactive 2D fluid simulation built with HTML5 and vanilla JavaScript. Users can interact with the canvas by clicking, dragging, or touching to paint dynamic, swirling ink patterns while background particles react to the underlying velocity fields. It features a sleek, expandable settings menu styled with CSS frosted-glass effects, allowing users to customize stroke width, dissipation duration, brightness, and color themes—such as cyan, purple, green, orange, pink, or white—in real time. Programmatically, the simulation is driven by a grid-based Navier-Stokes physics engine that handles diffusion, advection, and pressure projection, rendering efficient pixel data via an offscreen canvas. Cross-platform usability is supported through pointer events paired with CSS rules that prevent unwanted mobile scrolling and block unintended drawing when interacting with the sidebar controls. A key technical challenge addressed during development was preventing the mathematical