Lava Particle Field
A GPU particle solver where the particles live in the texture itself. Buffer A stores one particle per texel as position in RG and velocity in BA, and advances it by sampling its eight neighbours and adopting whichever one is closer under a wrapped distance, which is how particles are handed between texels without any CPU-side list. Buffer B accumulates density and pressure from that field, and its gradient is fed back into A on the next frame, so the two ping-pong: motion writes density, density pushes motion. The image pass reads out vorticity, the curl of the velocity field, and maps it straight to the lava colour, so what you see is rotation rather than heat. Four double-buffered FloatType targets at twice display resolution; press and drag to inject a gaussian of velocity.
npx shadcn@latest add https://ui.aryank.space/r/lava-particle-field.jsonInstalls from ui.aryank.space. To add it by hand, copy the files in Usage below, or register the @compronents namespace via the docs.
| Prop | Type | Default | Description |
|---|---|---|---|
| resolutionScale | number | 2 | Simulation runs at this multiple of display size. Particle count is one per simulation texel, so halving this quarters the work. |
| brand / experimentLabel / footerLeft / footerRight | string | BLANK copy | Overlay chrome above the canvas. |
resolutionScaletextSimulation resolution as a multiple of display size.
experimentLabeltextLabel at the top right.
three