Skip to content
animorio
IT
Back to the library

Liquid wave gallery

WebGL, ImagesWebGL, Canvas, GSAPAdvancedCompressed weight: Demo 7.5 KBGSAP 28 KBFreeDownload the zip

The product page gallery of Wrenware, a made-up ceramics shop: changing the glaze of the vase, the real photo does not fade, it turns into the new one with a liquid WebGL wave that starts where you touch, its front bending the picture and barely splitting the three colours, with a few ripples behind it that settle; below, the ring on the thumbnails slides to the chosen colour and the name rolls.

The code

A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN. The React and Vue tabs hold the same demo as a ready component, which switches its animations off when it leaves the page.

<!doctype html>
<!--
  "Liquid wave gallery" from Animorio · https://animorio.com
  License: free on your own sites and your clients’ sites, paid work included.
  Not for resale, redistribution, templates or code collections · https://animorio.com/en/license/
-->
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>The product gallery with a liquid wave between photos</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/standard.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main class="stage">
    <section class="card" data-card aria-label="Product gallery">
      <div class="photo" data-photo>
        <canvas class="photo__gl" data-gl aria-hidden="true"></canvas>
        <p class="photo__tag"><span data-brand>Wrenware</span> · Glazed ceramics</p>
        <button class="arrow arrow--prev" type="button" data-prev aria-label="Previous colour">
          <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M12 5 7 10l5 5" /></svg>
        </button>
        <button class="arrow arrow--next" type="button" data-next aria-label="Next colour">
          <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M8 5l5 5-5 5" /></svg>
        </button>
      </div>

      <div class="info">
        <div class="info__text">
          <h1 class="info__name" data-name>Bottle vase</h1>
          <p class="info__colour">Colour <span class="roll"><span class="roll__in" data-colour>Ink</span></span></p>
        </div>
        <p class="info__price" data-price>$86</p>
      </div>

      <div class="thumbs" data-thumbs role="tablist" aria-label="Colours">
        <span class="thumbs__ring" data-ring aria-hidden="true"></span>
      </div>
    </section>
  </main>
  <svg class="pointer" viewBox="0 0 24 24" aria-hidden="true" data-pointer><path d="M5 3l14 8.2-6.2 1.4 3.6 6.8-2.6 1.4-3.6-6.8L5 18.6z"></path></svg>

  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
  <script src="script.js"></script>
</body>
</html>

Playground

Change values, colours and text with the controls and watch the animation respond live. Or write in the code yourself. Then download the folder with your changes.

18 values to change

Or ask your AI assistant for it

With the Animorio connector, Claude Code, ChatGPT, Cursor or VS Code take it from here, guide included, and fit it into your project. Paste this request:

Take “Liquid wave gallery” from Animorio and fit it into my site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

A white card from Wrenware’s product page: at the top the real photo of a bottle vase, the Bottle vase, on a photo studio’s grey backdrop, whole and as tall as the frame, its sides fading into the grey; over the photo two round arrows, below the name, the colour and the price, and the row of four thumbnails, Ink, Rust, Cobalt and Primrose, four bottle vases in four glazes, with a dark ring around the chosen one. Tapping the photo, an arrow or a thumbnail, the new photo opens from that point with a wave front that bends the image like water, brightens slightly and splits red and blue by a hair; inside, two or three ripples remain and settle while the wave reaches the corners. The photo dips by a hair on the tap, the ring slides to the new thumbnail on a spring, the colour name leaves upwards and the new one comes in from below. The arrows squash and come back with an elastic. The autopilot taps the photo, the right arrow, the photo again and the first thumbnail, and the loop starts again from Ink.

How it works

The photos

Four real CC0 photos of bottle vases, each with its own glaze. Each photo is drawn into a canvas the size of the frame: whole, as tall as the frame, centred; on the sides its edge strips, the studio grey, stretched and blurred, and the photo’s sides faded over them with a mask, so the backdrop carries on with no seam. Each canvas becomes a texture; the thumbnails are the same photos.

The wave

The old and the new photo live in a single WebGL quad. For each point the shader measures the distance from the tapped point, corrected for the photo’s aspect, and compares it with the front, which runs from zero to the distance of the furthest corner; the front is not a perfect circle, a noise on the angle and one on the position make it wobble. Inside the front the new photo is read, outside the old one.

The liquid

On the front, a Gaussian band pushes the sampled point along the wave’s direction (WAVE): the photo bends as if under water. The new photo is read three times, once per channel, slightly ahead and slightly behind (PRISM), and that is where the thin rainbow comes from; inside, sine ripples (RIPPLES) remain and fade as the wave ends.

The thumbnails and the name

The ring is a single element moving over the chosen thumbnail with back.out; the colour name sits in a one-line mask: it leaves upwards and the new one comes in from below with a small bounce. A tap during a wave ends it and starts another one from the photo that was opening.

The autopilot and the sizes

A drawn pointer taps the photo, the arrow and a thumbnail with a repeating timeline; a real touch stops it and it restarts after eight quiet seconds. The WebGL canvas stays under half a million pixels, and on every resize the four photos are redrawn at the new size.

Values to change

NameFileDefaultWhat it changes
BRANDscript.js'Wrenware'The name of the made-up shop, written on the photo.
DURATIONscript.js1.15The seconds of the liquid wave from one photo to the next.
WAVEscript.js0.045How much the wave shifts the photo on its front.
PRISMscript.js0.35The chromatic aberration on the front: the three colours splitting.
RIPPLESscript.js0.006The ripples left behind the wave that settle.
HOLDscript.js1.6The seconds the autopilot stays on a colour.

Try them in the Playground

When to use it

For the product page of a shop selling objects in several colours or finishes (ceramics, bags, shoes, furniture): changing colour becomes a small gesture people remember, without slowing down whoever is choosing.

On phones

The same wave under a finger, swipes on the photo included; the card is sized on width and height, the photo never goes over 54% of the height and the thumbnails shrink with the screen.

With reduced motion

No wave and no ripples: the new photo fades in over half a second, the ring moves without a spring and the name changes without rolling.

Pitfalls

  • After the wave a small dent remained at the tapped point: the noise pushed the front past zero even with no progress. Now between waves the shader only reads the still photo (uOn at zero) and the noise grows with the progress.
  • The photos are redrawn on every resize at the canvas size, so the shader needs no cover fit and the vase always stays centred. The textures are rebuilt once the photos have arrived (decode); before that the canvas is grey.
  • With software WebGL a large canvas freezes the page: it stays under half a million pixels, lowering the density when needed.
  • Opened from file:// the browser will not hand the photos to WebGL (texImage2D throws a security error): then the still photo is shown, without the wave, and the thumbnails swap it.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 7.5 KB; the libraries: GSAP 28 KB.

Testing

Tested on 8 November 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

Use it in your own projects and in your clients’ projects. Do not resell it or redistribute it as is. GSAP stays under its own Standard license. Full license.

All animations