
Woven thread background
Backgrounds, Hover
The opening background of The Rosmere, a made-up hotel with a theatre bar: a deep bordeaux velvet with its real sheen, lighter where the pile leans toward the light and darker where it turns away. Where the pointer (or a finger) passes, the pile bends the way it moves and leaves a light or dark trail, like a hand on velvet, which stays and slowly stands up again. When nobody touches, an invisible hand draws a slow S.
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>
<!--
"Velvet 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>The velvet background that follows the hand</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/fraunces@5.3.0/index.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/instrument-sans@5.3.0/index.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- the hero of an invented hotel with a theatre bar, The Rosmere: behind the name a deep bordeaux velvet; where the
hand passes the pile bends the way it moved and leaves a lighter or darker trail that slowly stands up again -->
<main class="stage" data-stage>
<canvas class="velvet" data-velvet aria-hidden="true"></canvas>
<canvas class="grain" data-grain aria-hidden="true"></canvas>
<span class="rake" aria-hidden="true"></span>
<span class="vignette" aria-hidden="true"></span>
<section class="hero" aria-labelledby="hero-title">
<p class="kicker" data-in>
<span class="kicker__rule" data-rule aria-hidden="true"></span>
<span class="kicker__text">Hotel and theatre bar</span>
<span class="kicker__rule" data-rule aria-hidden="true"></span>
</p>
<h1 class="title" id="hero-title" data-title>
<span class="title__word" data-in>The</span>
<span class="title__word title__word--name" data-in>Rosmere</span>
</h1>
<p class="line" data-in>Forty rooms behind the red curtain, open long after the last bow.</p>
</section>
<p class="hint" data-hint aria-hidden="true">
<svg class="hint__mark" viewBox="0 0 24 12" aria-hidden="true"><path d="M1.5 9.5C5 2.5 8.5 2.5 12 6s7 3.5 10.5-3.5"></path></svg>
<span>Brush the velvet</span>
</p>
</main>
<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.
19 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 “Velvet background” from Animorio and fit it into my siteThe screen is split into 5 pixel cells. Each cell has a vector: which way the pile leans and how far (0 upright, 1 flat). At rest the vector comes from a few slow waves (sine and cosine of the position), so the velvet has the crushes of a real cloth and is never even.
For each cell the direction toward the lamp is multiplied by the pile vector: positive, the pile faces the light and brightens; negative, it turns away and deepens. On top, the light falling off with distance and a fixed value per cell, the fibres, which break the trails into lighter and darker streaks.
The tone goes through a 256 colour ramp built once from the four :root colours (near black, bordeaux, light bordeaux, pinkish sheen). The small map is softened with a 1-2-1 both ways, written into a tiny canvas and stretched across the screen with the browser's smoothing: a full screen costs as much as a small one.
Between two pointer positions the brush takes steps of one cell, and at each step the cells inside the radius turn toward the direction of motion, with a weight that falls off softly toward the edge of the hand and grows with speed. Pressing, the radius and the strength grow. Every frame each cell goes back toward its rest by 1 - exp(-dt times RECOVER): the trail slowly stands up.
The grain is a second canvas, drawn once per size: a grey with a little memory along the row, which makes short fibres rather than snow, laid on top in overlay. After a few seconds without a pointer the invisible hand follows an S (the sine of the descent) with a soft ease, down and then up: at the ends it slows and bends less.
| Name | File | Default | What it changes |
|---|---|---|---|
CELL | script.js | 5 | Side of one cell of the pile map, in pixels: smaller is finer and slower. |
BRUSH | script.js | 0.34 | How far the hand bends the pile on each pass. |
RADIUS | script.js | 64 | Radius of the hand, in pixels. |
RECOVER | script.js | 0.09 | How fast the pile stands up again, per second (0: the trail stays forever). |
SHEEN | script.js | 1 | How glossy the velvet is: the difference between pile toward the light and against it. |
CRUSH | script.js | 0.24 | How crushed the velvet is at rest (0 smooth). |
HAND_TIME | script.js | 6.5 | Seconds the invisible hand takes to draw one S. |
AUTO_PILOT | script.js | 2.5 | After how many seconds without a pointer the invisible hand comes back (0 never). |
--velvet | style.css | #4b0b1c | The velvet colour (with --velvet-deep, --velvet-lit and --velvet-sheen it makes the ramp of tones). |
--champagne | style.css | #f2dfc4 | The colour of the name and the lines. |
Behind the title of a brand that wants to feel warm and luxurious: a hotel, a theatre or its bar, a jeweller, an art house cinema, a tailor, a cocktail lounge. It invites touch without asking for anything: the trail is the first gesture of the visit.
The same: dragging a finger leaves the trail (the page inside the demo does not scroll), a long press pushes harder. The invisible hand's S is sized on the smaller of width and height, so it stays inside even in a low, wide box; the title is sized on width and height.
The velvet stands still with a single static shade: the S already brushed once, and nothing else moving. The lines fade in.
GSAP 3.15.0, Fraunces (font variabile) 5.3.0, Instrument Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.4 KB; the libraries: GSAP 28 KB.
Tested on 18 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.