
Wind stroke background
Backgrounds, Physics
The opening of a made-up mountain village, Valbruna, on a cold morning: snow falls on three planes, small and slow behind, soft and fast in front of the headline, and the pointer is the wind that bends it, with inertia. A thin crust of snow settles on the top of the letters and of the button, following the real shape of the letters, and now and then slips off in small pieces. Minimal style.
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>
<!--
"Snowfall 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>Valbruna, first snow</title>
<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 opening of a made-up ski village on a cold morning: snow falls on three planes behind and in front of the
heading, the pointer is the wind that bends it, and a thin crust of snow settles on the top of the letters and
of the button, now and then slipping off in small pieces -->
<section class="stage" data-stage>
<canvas class="snow snow--back" aria-hidden="true" data-back></canvas>
<header class="bar" data-in>
<span class="brand">
<svg class="brand__mark" viewBox="0 0 24 24" aria-hidden="true">
<path d="M2.5 19.5 9 8.5l3.6 6 2.4-3.6 6.5 8.6"/>
<path class="brand__cap" d="M7.2 11.6 9 8.5l1.8 3"/>
</svg>
Valbruna
</span>
<span class="bar__report">Snow report</span>
</header>
<div class="hero">
<p class="eyebrow" data-in>Valbruna, 1,840 m</p>
<h1 class="title">
<span class="title__mask"><span class="title__line" data-line>First snow</span></span>
<span class="title__mask"><span class="title__line" data-line>at Valbruna.</span></span>
</h1>
<p class="lede" data-in>The lifts open on the fifth of December. Twelve runs, one quiet valley.</p>
<a class="pill" href="#" data-pill>
<span class="pill__fill" aria-hidden="true"></span>
<span class="pill__words">Book the season</span>
<svg class="pill__arrow" viewBox="0 0 16 16" aria-hidden="true"><path d="M3.5 8h8.5M8.8 4.6 12.2 8l-3.4 3.4"/></svg>
</a>
</div>
<dl class="report" data-in>
<div class="report__item">
<dt>Fresh overnight</dt>
<dd><span data-count="38">0</span> cm</dd>
</div>
<div class="report__item">
<dt>Summit</dt>
<dd>−<span data-count="6">0</span> °C</dd>
</div>
</dl>
<canvas class="snow snow--front" aria-hidden="true" data-front></canvas>
</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.
29 values to change
Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI
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 “Snowfall background” from Animorio and fit it into my siteTwo canvases as big as the screen: behind the text the far and middle flakes, the snow on the letters and the falling pieces; in front of the text the near flakes, with pointer-events: none. Each plane has its own sprite, a white radial gradient drawn once and then scaled, softer for the near flakes: depth of field without blur filters.
The pointer’s horizontal speed becomes a target wind that dies down by itself when the pointer stops; the real wind chases it with 1 − e^(−2.2·dt), and every flake chases the wind of its plane with its own readiness. Near the pointer an extra push is added, falling off with distance like a 170-pixel gaussian.
The outline of each line of the headline is read from a mask: the line is drawn again on a hidden canvas with the same typeface and spacing, and for each 2-pixel column the first filled pixel from the top is found. Middle flakes crossing that edge settle and raise the snow there and on the nearby columns, but never across a step of the letter.
Every BREAK seconds or so a stretch of thick enough snow becomes small blocks with a speed, a spin and a life: they fall with gravity and with the wind and fade. Each step uses the real time of the frame, so it runs the same at 60 and 120 Hz.
| Name | File | Default | What it changes |
|---|---|---|---|
DENSITY | script.js | 1 | How much snow falls (1 = a calm snowfall). |
FALL | script.js | 1 | How fast the snow falls. |
SIZE | script.js | 1 | How big the flakes are. |
WIND | script.js | 1 | How much the pointer’s wind bends the snow. |
SWAY | script.js | 1 | How much each flake sways as it falls. |
SETTLE | script.js | 3.5 | How thick the crust on the letters can grow, in pixels. |
BREAK | script.js | 5 | Roughly every how many seconds a piece of crust slips off. |
SOFT | script.js | 1 | How soft the near flakes are (the depth of field). |
As the background of the opening of a ski resort, a mountain hut, an alpine hotel, a snow gear shop, a Christmas page or a winter campaign: where you want the season without a photo.
The same snow at adapted sizes: how many flakes depends on the area, the speed on the height, and the headline is sized on the height too. With a finger sliding on the screen the wind follows the finger.
The snow stays still, already settled in a thin crust on the letters; no wind and no falling pieces, and the words fade in.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 8.9 KB; the libraries: GSAP 28 KB.
Tested on 20 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.
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.