Skip to content
animorio
IT
Back to the library

Lake dawn background

Backgrounds, WebGLWebGL, GSAP, CSS onlyMediumCompressed weight: Demo 11 KBGSAP 28 KBFreeDownload the zip

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.

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>
<!--
  "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>

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.

35 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 “Lake dawn background” 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

On a sky that still keeps the last blue of the night at the top, the hero of Stillmere appears, an invented retreat on a lake: at the top the name with its mark of the sun on the water, ‘Cabins’, ‘The sauna’ and the ‘Stay with us’ pill; in the middle the ‘Winter, Dawn swims, from December’ label, the heading ‘Wake where the lake keeps the first light.’ with its second line in italics, a line about the six wooden cabins, the sauna and the coffee on the jetty, the ivory ‘Book a dawn stay’ button, ‘See the cabins’ and the note with a tiny sun on its horizon, ‘Sunrise tomorrow at 7:12’. Under the words there is only light, fog and water, as in a long-exposure photograph: the sun is still below the horizon and its light climbs gold on the line, pink higher up, lilac and then blue at the top. Three banks of fog lie on the water: a thin far one on the line, a thick slow one spread over the lake, higher wisps; they drift slowly to the left and catch the light from behind, pink and gold near the sun and cool lilac far from it, opening it into faint shafts. The still lake holds the sky upside down, smooth as in a long exposure, with ripples that get finer toward the horizon, a path of light that trembles and glints softly under the glow and a bright thread where the far water touches the sky; closer to us the water turns dark. A fine grain covers everything and the heading takes a warm halo that grows with the light. On its own, the light comes up slowly for nine seconds, a breath crosses the fog from left to right moving it aside, then the button is pressed: it gives and comes back on a spring, a band of gold slides over it, the mist parts and drifts faster, the light comes up further, the label turns into ‘Dawn held for you’ with a checkmark that draws itself, the tiny sun of the note lifts off its horizon and the note says ‘Cabin by the jetty, two nights’; then everything goes back and the light sinks to start again. With the pointer the breath follows the gesture: it pushes the fog away where it passes and drags it in the direction of the movement.

How it works

Everything is a shader

The 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 and the sun below the horizon

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.

The water that holds the sky

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 banks of fog lit from behind

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 breath of the pointer

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.

Values to change

NameFileDefaultWhat it changes
DAWNscript.js1How bright the dawn gets at the top of the loop.
FOGscript.js1How thick the banks of fog are (0 = clear air).
DRIFTscript.js1How fast the fog drifts across the lake.
RIPPLEscript.js1How much the water trembles under the reflection.
GLITTERscript.js1How much the path of light on the water sparkles.
RAYSscript.js1How visible the shafts of light through the fog are.
BREATHscript.js1How far the pointer pushes the fog.
GRAINscript.js0.035How strong the grain is.
SPEEDscript.js12 = the loop on its own twice as fast, 0.5 = half.
LOOPscript.jstrueRepeats the loop of the light and the button.

Try them in the Playground

When to use it

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.

On phones

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.

With reduced motion

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.

Pitfalls

  • A drawn sun, even just a disc, turns it into an illustration at once: here the sun stays below the horizon and only its light shows, so it reads as a photograph.
  • A reflection that moves too much looks like a stormy sea: the still lake of a long exposure is half smooth reflection, and the ripples tighten toward the horizon with one over the depth, as in perspective.
  • Strong shafts of light make a postcard starburst: the fan of sines only touches the fog near the sun and stays almost invisible in the clear air.

Libraries

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.

Testing

Tested on 4 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