
The coloured fog background
Backgrounds, WebGL
A WebGL animated background for the hero of a small island hotel, on a whitewashed wall in the shade of the eaves: the pool below throws the sun back onto the plaster as a net of bright caustics, fine and sharp near the water, wider and softer as they climb, with the turquoise bounce of the water and a thread of colour on their edges. A slice of direct sun comes in across the top. The pointer touches the water: it leaves rings that travel through the light and tilts the reflection a little. Pressing Check dates sends a ring out from the button and the rooms left for June go down by one.
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>
<!--
"Pool reflections background" 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>Albedo</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/fraunces@5.3.0/full.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- the hero of a small island hotel on a whitewashed wall in the shade of the eaves. A WebGL shader draws the light
that the pool below throws onto the wall: a net of bright caustics, stretched and softened the higher it climbs,
with a cool bounce from the water and a slice of direct sun across the top. The pointer touches the water: it
leaves rings that travel through the light and tilts the reflection a little -->
<section class="stage" data-stage>
<canvas class="wall" aria-hidden="true" data-canvas></canvas>
<div class="glow" aria-hidden="true"></div>
<header class="bar" data-in>
<span class="brand">
<svg class="brand__mark" viewBox="0 0 24 24" aria-hidden="true">
<circle cx="12" cy="9" r="4.2"/><path d="M3.5 16.2c2.1-1.4 4.2-1.4 6.3 0s4.3 1.4 6.4 0 4.2-1.4 4.3 0"/><path d="M5.5 19.6c1.7-1 3.4-1 5.1 0s3.4 1 5.1 0"/>
</svg>
Albedo
</span>
<nav class="nav">
<a class="nav__link nav__link--wide" href="#">Rooms</a>
<a class="nav__link nav__link--wide" href="#">Journal</a>
<a class="book" href="#">Book</a>
</nav>
</header>
<div class="hero">
<a class="chip" href="#" data-in>
<span class="chip__new">Now booking</span>
<span class="chip__words">Summer 2027</span>
<svg class="chip__arrow" viewBox="0 0 16 16" aria-hidden="true"><path d="M6 4l4 4-4 4"/></svg>
</a>
<h1 class="title" data-title><span class="title__line">Slow days</span> <span class="title__line">by the water.</span></h1>
<p class="lede" data-in>Eleven whitewashed rooms around a spring-fed pool, on the quiet side of the island.</p>
<div class="actions" data-in>
<button class="btn" type="button" data-btn data-autoclic>
<span class="btn__face" data-face>
<span class="btn__shine" aria-hidden="true"></span>
<span class="btn__words" data-words>Check dates</span>
<svg class="btn__icon" viewBox="0 0 16 16" aria-hidden="true">
<path class="btn__arrow" data-arrow d="M3 8h9M8.5 4.2L12.3 8 8.5 11.8"/>
<path class="btn__check" data-check pathLength="1" d="M3.4 8.4l3 3 6.2-6.6"/>
</svg>
</span>
</button>
<a class="ghost" href="#">See the rooms</a>
</div>
<p class="note" data-in><span class="note__count" aria-hidden="true"><span class="note__roll" data-roll><span>4</span><span>3</span></span></span> rooms left for June</p>
</div>
<p class="hint" data-in>Move the pointer to touch the water</p>
<p class="sr" aria-live="polite" data-live></p>
</section>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
<script src="script.js"></script>
</body>
</html>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.
34 values to change
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 “Pool reflections background” from Animorio and fit it into my siteThe whole background is a WebGL shader on a single triangle covering the canvas, full page under the words: the wall, the slice of sun, the caustics, the rings, the plaster and the grain. Without WebGL a turquoise CSS glow remains.
Each net is an animated Voronoi diagram: for every point the difference between the nearest cell and the second one is measured, which is almost zero on the edges. Two nets of different size, bent by a slow noise, join with the minimum; where the edges of both cross, the light makes a whiter knot.
A reflection on a wall is stretched sideways and squeezed in height: the coordinates are multiplied by 0.72 and 1.55. The cells grow and the lines widen as they climb, because further from the water the light spreads; a mask with a wavy edge turns it off before the top. Red and blue are read at slightly different scales, and there is the thread of colour.
Each ring is a wave that starts from the touched point and runs outward: it shifts the coordinates of the nets along the radius and brightens the front. Six live at most; the pointer leaves one every so often, stronger when it moves fast, and the button sends two.
The shader's time does not run at a fixed pace: a current that slowly returns to 1, raised by the swell (a GSAP tween) and by the pointer. The reflection tilts against the pointer on a soft spring, and the heading's shadow is a text-shadow with two CSS variables that tremble with the same time.
| Name | File | Default | What it changes |
|---|---|---|---|
DRIFT | script.js | 1 | How fast the water moves (0 = still). |
LIGHT | script.js | 1 | How bright the caustics are. |
SHARP | script.js | 1 | How fine the lines of light are: higher is thinner and crisper. |
SIZE | script.js | 1 | How big the cells of the net are. |
RIPPLE | script.js | 1 | How strong the rings are, from the pointer and the button. |
SWELL | script.js | 1 | How strong the swell is that passes on its own. |
TINT | script.js | 0.35 | How much turquoise is in the light (0 = white sun). |
FOLLOW | script.js | 0.04 | How much the reflection tilts with the pointer. |
GRAIN | script.js | 0.03 | How strong the grain is. |
SPEED | script.js | 1 | 2 = the walk on its own twice as fast, 0.5 = half. |
LOOP | script.js | true | Repeats the loop of the swell, the ring and the button. |
As the background of the first screen of a hotel, a holiday home or a resort with a pool, a swimwear brand, a spa, a travel agency or a summer app: wherever a lively, calm light is wanted instead of a gradient. The colours are --wall, --sun, --water and --teal in the CSS.
The same animations at adapted sizes: the net is measured on width and height, so a phone sees cells like a large screen, the slice of sun and the light are measured on the height, the heading on width and height; on short screens the bottom line and the rooms line go. With a finger you touch the water and the rings appear.
The water stays still and no rings appear: the light and the caustics fade in; pressing the button the light brightens slightly and the label, the checkmark and the rooms digit change without motion.
GSAP 3.15.0, Fraunces (font variabile) 5.3.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 11 KB; the libraries: GSAP 28 KB.
Tested on 3 November 2026
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.
Support Animorio
Animorio stays free thanks to the people who support it. If you like, buy us a coffee: it helps us make the next animations.
You asked for
We made it for you: it’s in the library, with the preview, the Playground and the code to copy.
An animation you can’t find, or a site to take apart in the journal: tell us which. We pick the next ones from here.
With your account’s email and password.
or with your email
You’re signed in as .
With your account, you can download the zip of every animation and every pack, for free.