Riptide Image Wave Reveal with WebGL Refraction
Overview
A band of refracting water crosses a picture, for React and Next.js. Inside the band the picture bends and its colours fan out into a spectrum, a glossy highlight follows the ripples and foam glints along a rolling crest. It can sweep once and reveal the picture, follow the scroll, or drift and turn in place.
The picture sits on a rounded card in the middle of a dark stage, and a band of water crosses the whole stage. Inside the band, layered noise refracts what's underneath: it's pushed along the band's direction, wobbled sideways and lifted under the crest like a lens, then sampled seven times along a spectrum so its edges split into rainbow fringes. Light from the upper left catches one side of each ripple and shades the other, a thin tinted line marks the crest, foam glints along it, and the crest itself bulges and rolls as it travels. The card's own edges ripple as the band passes over them.
Details
- Category
- Gallery
- Interaction
- On Load + On Scroll + Mouse Move + On Click
- Trigger
- On Load
- Languages
- React, TypeScript, Tailwind
(01)Keep exploring
All 150 componentsBuilt with the same techniques
No. 150 / Gallery
Draped Print Gallery with a WebGL Scroll Arch
On Scroll · On Hover · On Click
No. 060 / Scroll
Ink Wash Image Reveal on Load and Scroll with Canvas
On Load · On Scroll · On Click · Mouse Move
No. 154 / Hero
3D Blooming Branch Hover Effect with Real Moss and Wildflowers
Mouse Move · On Hover · On Load
(02)FAQ
Riptide Image Wave Reveal with WebGL Refraction — FAQ
01How do I choose a mode?
Pass mode="sweep", "scroll" or "drift". For scroll, pass scrollTarget: a ref to a tall element whose scroll-through moves the band from top to bottom. Change the replay number to run a sweep again.
02Can it fill the stage instead of sitting on a card?
Yes. card={null} fills the stage with the picture like background-size: cover. Otherwise card sets the card's aspect, its height as a fraction of the stage and its corner radius.
03Which settings matter most?
width for how wide the water is, distortion for how hard it bends the picture, dispersion for the rainbow fringes, swell for how much the crest rolls, and gloss for the highlight and foam. All run 0 to 1.
04What happens with reduced motion?
The sweep shows the finished picture straight away, drift holds still and the crest doesn't roll. Scroll still follows the scroll, since that's driven by the reader. Without WebGL you get the plain picture on its card.