Installation
Choose your framework. The registry installs one component file and its PixiJS dependency.
Installation unavailable
This preview is not assigned to the free or paid catalog. Installation is unavailable.
The registry command writes the component to src/lib/components/ui/FluidSimulation.svelte and installs its dependencies.
The registry command writes the component to src/components/ui/FluidSimulation.tsx and installs its dependencies.
The registry command writes the component to src/components/ui/FluidSimulation.vue and installs its dependencies.
Overview
Fluid Simulation implements Pavel Dobryakov’s minimal incompressible solver: curl, vorticity confinement, reflected-boundary divergence, pressure decay and Jacobi solve, gradient subtraction, advection, and additive splats.
Velocity and pressure run on a compact simulation grid while dye is transported independently at display-oriented resolution.
Basic usage
The shader fills its parent. Your layout decides whether that parent is a card, hero, or viewport.
- Move the pointer over the canvas to inject velocity and dye; the first move only initializes pointer history.
- Simulation and dye resolution rebuild their target sets, while pressure iterations trade GPU cost for incompressibility accuracy.
- Density and velocity diffusion are rates, not per-frame retention values; each advection computes result / (1 + rate × dt).
Component API
Types below match the selected Svelte component.
Types below match the selected React component.
Types below match the selected Vue component.