02
Metaballs
Five points orbit on offset sine paths and sum into a single inverse-square field, thresholded into soft, merging blobs. Colours blend in OKLab, so the violet ramp stays clean, and the cursor gently swirls the field around it.
metaballsOKLabswirl cursor
Live· swirl
Installation
Add it to your project
$
Installs 5 files into components/shaders. The engine is shared, so a second shader only adds its own three files.
Usage
Mount it behind your content
app/hero.tsx
The shader fills its nearest positioned ancestor. Give the parent relative isolate and the shader -z-10 to put it behind everything else. The cursor is tracked on the window, so content on top doesn’t block it.
API reference