Case study · 2025
Cursor Fluid Background
Shaded Three.js waves whose camera follows your pointer.
Highlights
- Vanta.js WAVES effect rendered with Three.js in a fixed layer behind the content
- Mouse and touch controls move the camera, so the surface shifts with the pointer
- Colour, shininess, wave height, wave speed and zoom tuned through Vanta options
This is the second version of my fluid background. Instead of writing the shader myself, I used the WAVES effect from Vanta.js, which builds a moving Three.js surface and renders it into a fixed layer behind the page. I set the colour to black and the shininess to 50, so the light picks out each facet and the waves look like folded dark glass rather than water.
Mouse and touch controls are switched on. As you move the pointer, Vanta moves the camera, so the whole surface shifts and catches the light at new angles. That small bit of parallax does most of the work.
I also added a GSAP ScrollTrigger tween for wave height and speed. Right now it writes to the effect object instead of to Vanta's options, so scrolling does not change the waves yet. Passing those values through Vanta's own options is the next fix on my list.


