
Woven thread background
Backgrounds, Hover
A page background to put behind a headline, on warm white: a wall of glass blocks, square glass bricks with light grout, in front of a soft apricot and lilac gradient. Each block is a pillow lens that turns its piece of the gradient over and squeezes it, with a thread of colour dispersion at the edge; the pointer carries a warm light that the wall breaks into a grid of small suns, and the blocks nearby swell a little. Press the button and a wave runs across the wall; when nobody touches, the light strolls on its own. A hand-written WebGL shader.
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>
<!--
"Glass block 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 glass block wall background that refracts the light as you pass</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 hero of an invented daylight and interiors studio, Oriel, on warm white: behind the words a wall of glass
blocks, and behind the wall a soft apricot and lilac gradient; every block turns its piece of the gradient over,
the pointer carries a warm light that the wall breaks into a grid of small suns, and the blocks near it swell -->
<main class="stage" data-stage>
<canvas class="glass" data-glass aria-hidden="true"></canvas>
<span class="veil" aria-hidden="true"></span>
<span class="grain" aria-hidden="true"></span>
<section class="hero" aria-labelledby="hero-title">
<p class="pill" data-in>
<span class="pill__tag">Oriel</span>
<span class="pill__text">Daylight and interiors studio</span>
</p>
<h1 class="title" id="hero-title" data-in>Light, made<br>to measure</h1>
<p class="lede" data-in>We plan windows, glass and lamps around the way the sun moves through your rooms.</p>
<div class="actions" data-in>
<button class="cta" type="button" data-cta>
<span class="cta__shine" aria-hidden="true"></span>
<span class="cta__face">
<span class="cta__row" data-row>
<span class="cta__label">Book a light survey</span>
<svg class="cta__arrow" viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h9.5M8.5 4 12.5 8l-4 4"></path></svg>
</span>
<span class="cta__row cta__row--done" data-done aria-hidden="true">
<svg class="cta__check" viewBox="0 0 16 16" aria-hidden="true"><path data-tick d="M3.5 8.4 6.6 11.3 12.6 4.9"></path></svg>
<span class="cta__label">Request sent</span>
</span>
</span>
</button>
<span class="note">Replies within a day</span>
</div>
</section>
<svg class="ghost" data-ghost viewBox="0 0 20 20" aria-hidden="true"><path d="M4 2.5v13.2l3.5-3.3 2.4 5.3 2.3-1-2.4-5.2 4.8-.2z"></path></svg>
</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.
26 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 “Glass block background” from Animorio and fit it into my siteThe WebGL canvas draws a single triangle bigger than the screen: all the work is in the fragment shader, which for every pixel works out which block it falls in and where inside the block, from minus a half to plus a half on both axes, with the grid centred on the page.
Each block does not show what is behind it but samples it shifted by its position inside the block times REFRACT: above one the piece of gradient turns over and squeezes. Red and blue are read with a slightly different refraction, and a sine on the distance from the centre gives the ring ripple of pressed glass.
The block is a rounded square inside the grout: the normal is a soft dome plus a steep bevel, a fixed light from the top left lights one side and a specular glint faces the pointer’s light. The grout is matte and light, with each block’s shadow shifted to the bottom right.
The warm light is a bell plus a bright core, behind the glass, and follows the pointer on a hand-written spring. Near it a Gaussian bell magnifies the coordinates, so the blocks look bigger, and the refraction and the curve grow with SWELL.
The click starts a ring from the centre of the button: its radius grows to the page’s diagonal while its strength fades, and where it passes the blocks shift, swell and light their glint. Meanwhile the label rises and gives way to «Request sent», with a check that draws itself, and comes back after 2.6 seconds.
On arrival a single number goes from zero to one in 2.2 seconds, and each block reads a piece of it according to its distance from the top left corner, with a back-style overshoot. When nobody touches, the light follows a slow figure made of four sines; after AUTO_PILOT seconds a drawn pointer passes, and the first real movement stops it.
| Name | File | Default | What it changes |
|---|---|---|---|
BLOCK | script.js | 64 | Side of one glass block, in pixels (never more than a fifth of the short side). |
JOINT | script.js | 2.5 | Half width of the grout between the blocks, in pixels. |
REFRACT | script.js | 1.75 | How much each block turns the gradient over and squeezes it (0 flat glass). |
SWELL | script.js | 0.8 | How much the blocks near the pointer swell (0 not at all). |
GLOW | script.js | 1 | How strong the warm light is (0.3 to 2). |
WANDER | script.js | 1 | How far the light strolls when nobody touches (0 still). |
FOLLOW | script.js | 0.9 | How closely the light follows the pointer (0 not at all, 1 fully). |
AUTO_PILOT | script.js | 3 | After how many seconds without a pointer the drawn one passes (0 never). |
--tint-a / --tint-b / --hot | style.css | #ff9566 / #a596ff / #ffb36e | The two colours of the gradient behind the wall and the pointer’s warm light. |
For the header of an architecture or interiors studio, a furniture or lighting brand, a design hotel or a launch page: when you need a light background with material and light that stays behind the headline without stealing the show.
Same animations: the block is never more than a fifth of the short side, so on a phone the wall still reads as a wall; the light follows the finger and the button starts the wave; headline, text and button fit inside the box, sized on the height too.
With reduced motion the wall and the light are already in place, still, the words only fade in and the button changes its label without the wave.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 9.4 KB; the libraries: GSAP 28 KB.
Tested on 7 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.