
The coloured fog background
Backgrounds, WebGL
A WebGL animated background for the hero of a small lakeside retreat, made only of light, fog and water, like a long-exposure photograph: the pink and gold light climbs from behind the horizon, low banks of fog drift slowly over the water and catch the light from behind, which opens into faint shafts; the still lake holds the sky upside down, smooth as in a long exposure, with a path of light that barely trembles, and a fine grain over everything. No drawn shapes. The pointer is a breath: it pushes the fog aside where it passes and drags it along with the gesture. Pressing Book a dawn stay parts the mist and the light comes up.
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>
<!--
"Lake dawn 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>Stillmere</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/newsreader@5.2.10/opsz.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/newsreader@5.2.10/opsz-italic.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 lakeside retreat at first light. A WebGL shader draws only light, fog and water, like a long
exposure: the pink and gold glow climbing from behind the horizon, low banks of fog drifting slowly across the
water and lit from behind, the still lake holding the sky with a soft trembling path of light, and a fine grain.
The pointer is a breath: it pushes the fog aside a little where it passes -->
<section class="stage" data-stage>
<canvas class="lake" aria-hidden="true" data-canvas></canvas>
<div class="fallback" aria-hidden="true"></div>
<header class="bar" data-in>
<span class="brand">
<svg class="brand__mark" viewBox="0 0 24 24" aria-hidden="true">
<path d="M3 14.5h18"/><path d="M7.2 14.5a4.8 4.8 0 0 1 9.6 0"/><path d="M6 17.6h12" opacity=".6"/><path d="M8.6 20.4h6.8" opacity=".35"/>
</svg>
Stillmere
</span>
<nav class="nav">
<a class="nav__link nav__link--wide" href="#">Cabins</a>
<a class="nav__link nav__link--wide" href="#">The sauna</a>
<a class="nav__link nav__link--pill" href="#">Stay with us</a>
</nav>
</header>
<div class="hero">
<a class="chip" href="#" data-in>
<span class="chip__new">Winter</span>
<span class="chip__words">Dawn swims, from December</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">Wake where the lake</span> <span class="title__line">keeps the first light.</span></h1>
<p class="lede" data-in>Six wooden cabins on a quiet shore, a wood-fired sauna and coffee on the jetty before the mist lifts.</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>Book a dawn stay</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 cabins</a>
</div>
<p class="note" data-in>
<svg class="note__sun" viewBox="0 0 20 12" aria-hidden="true" data-sun><path d="M1 10.5h18"/><path class="note__arc" d="M4.5 10.5a5.5 5.5 0 0 1 11 0"/></svg>
<span data-note>Sunrise tomorrow at 7:12</span>
</p>
</div>
<p class="hint" data-in>Move the pointer to breathe on the mist</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.
35 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 “Lake dawn background” from Animorio and fit it into my siteThe background is a WebGL shader on a single triangle covering the canvas, under the words: sky, glow, fog, water and grain. No images and no shapes: each pixel asks what colour the light is at that point. Without WebGL a CSS gradient of the same dawn remains.
The sky is a gradient by height, gold on the line, pink, lilac and night blue at the top, warming with the dawn value. The sun never shows: it is a point below the horizon that sends out two exponential glows squashed sideways and a horizontal band along the line; as the dawn grows the point climbs toward the line.
Below the horizon the shader asks for the sky at the mirrored height, moved by noise ripples that tighten toward the line (the distance is one over the depth, as in perspective). The long exposure is half rippled reflection and half smooth reflection; then the water darkens toward us, and under the glow a path of light trembles, with two multiplied noises making the glints.
Three four-octave fbm noises, stretched horizontally and held in Gaussian bands around the horizon, one warped by a second noise: far, on the water, high. The fog is lit from behind, pink and gold near the sun and lilac far from it, and a fan of sines on the angle from the sun opens it into faint shafts.
The pointer is a Gaussian circle that shifts the coordinates the fog is read at, pushing it away from the centre and dragging it with the speed of the gesture, and inside the circle the fog thins out. When nobody touches, a breath of the automatic loop takes the same path; the drift of the fog is summed in JavaScript, so it speeds up without jumps when the button parts it.
| Name | File | Default | What it changes |
|---|---|---|---|
DAWN | script.js | 1 | How bright the dawn gets at the top of the loop. |
FOG | script.js | 1 | How thick the banks of fog are (0 = clear air). |
DRIFT | script.js | 1 | How fast the fog drifts across the lake. |
RIPPLE | script.js | 1 | How much the water trembles under the reflection. |
GLITTER | script.js | 1 | How much the path of light on the water sparkles. |
RAYS | script.js | 1 | How visible the shafts of light through the fog are. |
BREATH | script.js | 1 | How far the pointer pushes the fog. |
GRAIN | script.js | 0.035 | How strong the grain is. |
SPEED | script.js | 1 | 2 = the loop on its own twice as fast, 0.5 = half. |
LOOP | script.js | true | Repeats the loop of the light and the button. |
As the background of the first screen of a hotel, a retreat or a holiday home on a lake, a spa, a meditation or sleep app, a yoga retreat or a festival at dawn: wherever a slow, calm morning light is wanted instead of a photo. The colours are --night, --lilac, --rose, --gold, --sun, --mist and --deep in the CSS.
The same animations at adapted sizes: on narrow screens the horizon sits a little lower and the glow moves to the middle, under the buttons; the heading is measured on width and height, the two buttons stay on one row, the Cabins and The sauna links go, and on short screens the note and the line at the bottom too. With a finger the breath follows the gesture.
Fog, water and light stay still in a dawn already full that fades in; pressing the button the fog thins without moving and the label, the checkmark and the note change without motion.
GSAP 3.15.0, Newsreader (font variabile) 5.2.10, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 11 KB; the libraries: GSAP 28 KB.
Tested on 4 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.