
The coloured fog background
Backgrounds, WebGL
An animated background for the hero of a skincare brand, on a warm plaster wall: the afternoon sun comes in through a window and lays a slanted patch of light on the wall, with the shadow of the window frame, a linen curtain on the left that lets the light through in folds and the shadows of three olive sprigs swaying in the breeze. The leaves close to the wall cast sharp shadows, the far ones soft and pale, as real sunlight does. The pointer is the breeze: it stirs the sprigs and the curtain and gently shifts the sun, and the heading's shadow turns with it. Pressing Shop the serum sends a gust through, the sun warms for a moment and the bag counts one more.
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>
<!--
"Olive leaf shadows" 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>Olea</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 an olive leaf skincare brand on a warm plaster wall. A WebGL shader draws the afternoon sun coming
through a window: the slanted patch of light with its frame, a sheer linen curtain on the left and the shadows
of three olive sprigs that sway in the breeze, sharp where the leaves are close to the wall and soft where they
are far. The pointer is the breeze: moving it stirs the leaves and the curtain and shifts the sun a little -->
<section class="stage" data-stage>
<canvas class="wall" aria-hidden="true" data-canvas></canvas>
<div class="patch" 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="M12 21V9"/><path d="M12 13c-3.6-.4-5.6-2.6-6-6.4 3.6.3 5.6 2.4 6 6.4z"/><path d="M12 10.4c3.2-.5 5-2.6 5.4-6 -3.3.3-5 2.3-5.4 6z"/>
</svg>
Olea
</span>
<nav class="nav">
<a class="nav__link nav__link--wide" href="#">Journal</a>
<a class="bag" href="#" aria-label="Bag">
<svg class="bag__icon" viewBox="0 0 20 20" aria-hidden="true"><path d="M4.5 7h11l-.9 9.2a1.4 1.4 0 0 1-1.4 1.3H6.8a1.4 1.4 0 0 1-1.4-1.3z"/><path d="M7.4 7V5.8a2.6 2.6 0 0 1 5.2 0V7"/></svg>
<span class="bag__count" aria-hidden="true"><span class="bag__roll" data-roll><span>0</span><span>1</span></span></span>
</a>
</nav>
</header>
<div class="hero">
<a class="chip" href="#" data-in>
<span class="chip__new">New</span>
<span class="chip__words">Olive leaf serum</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 light,</span> <span class="title__line">soft skin.</span></h1>
<p class="lede" data-in>Cold-pressed olive leaf serums, bottled in small batches under the trees they come from.</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>Shop the serum</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="#">Our grove</a>
</div>
<p class="note" data-in>Olive Leaf Serum, 30 ml, €48</p>
</div>
<p class="hint" data-in>Move the pointer to stir the breeze</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.
33 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 “Olive leaf shadows” 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 shade colour, the patch of sun, the curtain, the leaves, the plaster and the grain. Without WebGL a CSS patch of light remains.
The patch is a signed-distance rectangle, slanted with a horizontal shear (like a low sun) and with edges fading into a penumbra. A mullion and a transom are two strips of shadow; where the light ends a faint orange fringe warms it as real sunlight does.
Each leaf is a lance: wide in the middle, pointed at both ends, slightly bent. The JavaScript works out where it sits on each sprig and passes it to the shader in a list of thirty; each sprig has its own distance from the wall, which sets the blur of the penumbra, the size and how pale the shadow is. Shadows join with the maximum, they do not add up: two leaves on top of each other do not make a darker shadow.
The breeze is the sum of three slow sines, plus the gusts (GSAP tweens) and what the pointer adds with its speed, which fades slowly. Each sprig is an angular spring with its own stiffness, the curtain another spring that moves the hem and bends the folds; each leaf trembles at its own frequency, harder when the wind blows.
The plaster is a three-octave noise: its gradient, compared with the sun's direction, makes the relief, strong where there is light and almost none in the shade. The shadow of the heading and the button is a text-shadow and a box-shadow with two CSS variables that follow the sun.
| Name | File | Default | What it changes |
|---|---|---|---|
BREEZE | script.js | 1 | How strong the steady breeze is (0 = still air). |
GUST | script.js | 1 | How strong the gusts are, on their own and when the button is pressed. |
STIFFNESS | script.js | 16 | The sprigs' spring: higher sways quicker and shorter. |
DAMPING | script.js | 1.8 | Lower lets the sprigs swing longer. |
FLUTTER | script.js | 1 | How much each leaf trembles on its own. |
SOFTNESS | script.js | 1 | How blurred the shadows of the far leaves are. |
SUN | script.js | 1 | How bright the patch of sun is. |
FOLLOW | script.js | 0.05 | How much the sun shifts 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 breeze and the button. |
As the background of the first screen of a cosmetics or skincare brand, a country hotel or holiday home, an interior architecture studio, a meditation app or a homeware shop: wherever a calm natural light is wanted instead of a gradient. The colours are --shade, --sun and --olive in the CSS.
The same animations at adapted sizes: the window of light is measured on width and height, the sprigs start from the top corner of the light and the leaves are measured on the shorter side, the heading on width and height; on short screens the price and the line at the bottom go. With a finger the breeze follows the gesture.
Sprigs, curtain and sun stay still: the light and the shadows fade in; pressing the button the sun warms slightly and the label, the checkmark and the bag's 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 12 KB; the libraries: GSAP 28 KB.
Tested on 2 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.