
The glass word
WebGL, 3D, Scroll, Text
Scroll inside the preview
The scrolling story of the page of a made-up school that teaches by working on real projects, Ashlar School of Practice: five short sentences composed like a poster, one big Playfair Display word, one mint italic with a thin flourish and two or three small words set off to the side. Each sentence is drawn on a canvas and handed to a hand-written WebGL plane with the shader of the Why Zero site: a cloudy noise front runs from left to right, the letters come out of a blur and get sharp, and right on the front the colour flares, more saturated and brighter. The scroll decides when a sentence lights up or goes out, backwards too; time decides how: 4 seconds on outExpo to come in, 0.3 to go.
Rebuilt from scratch studying why.zero.university by Sindhur Dutta, Zero: the idea is theirs; code, copy and images are ours. Read how it’s made
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>
<!--
"Words out of the fog" 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>Ashlar School of Practice: learn by doing real work</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/playfair-display@5.3.0/wght.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/playfair-display@5.3.0/wght-italic.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/instrument-sans@5.3.0/wdth.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- the scrolling story of the page of a made-up school, Ashlar School of Practice: five short sentences, each drawn
on a canvas and passed to a hand-written WebGL plane. Each one lights up out of a noisy fog, from blur to sharp,
with a bright front, when the scroll reaches it, and goes out when the scroll leaves it, backwards too -->
<div class="story" data-story>
<div class="stage" data-stage>
<div class="tone" data-tone aria-hidden="true"></div>
<canvas class="gl" data-gl aria-hidden="true"></canvas>
<div class="dom-words" data-dom aria-hidden="true"></div>
<div class="grain" data-grain aria-hidden="true"></div>
<header class="bar" data-bar>
<a class="brand" href="#" aria-label="Ashlar School of Practice">
<svg class="brand__mark" viewBox="0 0 24 24" aria-hidden="true">
<path d="M4.5 7.5 12 3.5l7.5 4v9L12 20.5l-7.5-4Z"/>
<path d="M4.5 7.5 12 11.5l7.5-4M12 11.5v9"/>
</svg>
<span>Ashlar</span>
</a>
<nav class="links" aria-label="Main">
<a href="#">Programs</a>
<a href="#">Mentors</a>
<a href="#">Outcomes</a>
</nav>
<a class="apply" href="#" data-apply>
<span class="apply__fill" aria-hidden="true"></span>
<span class="apply__shine" aria-hidden="true" data-shine></span>
<span class="apply__text">Apply</span>
<svg class="apply__arrow" viewBox="0 0 16 16" aria-hidden="true"><path d="M3.5 8h8.5M8.6 4.4 12.2 8l-3.6 3.6"/></svg>
</a>
</header>
<h1 class="sr">Ashlar School of Practice</h1>
<ol class="sr" data-lines>
<li>You learned all the theory,</li>
<li>but nobody let you build.</li>
<li>So here you make real things</li>
<li>for real clients, with mentors who still ship,</li>
<li>and you leave hired, with work to show.</li>
</ol>
<p class="hint" data-hint aria-hidden="true"><span class="hint__line"><i></i></span><span>Scroll to read</span></p>
<dl class="facts" data-facts>
<div><dt>Next cohort</dt><dd>12 January</dd></div>
<div><dt>Seats</dt><dd>40</dd></div>
<div><dt>Length</dt><dd>14 weeks</dd></div>
<div><dt>Hired in six months</dt><dd>91%</dd></div>
</dl>
</div>
</div>
<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.
39 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 “Words out of the fog” from Animorio and fit it into my siteEach sentence is a list of pieces: the text, the kind (big, italic, small) and the position of its baseline in units of the big word. measureText gives the box of each, and the box of the sentence sets the size, measured on both the width and the height of the page like a min(vw, vh). First the mint halo is drawn with shadowBlur, then the crisp letters with a light gradient, and under the italics a thin flourish made of two Bézier curves.
The canvas becomes a premultiplied texture and a two-triangle rectangle puts it in place, in pixels. In the fragment shader, like the site: p = progress * 1.3; mask = uv.x * 0.5 + vnoise(uv * 4 + seed) * 0.5, so the front runs from left to right with a cloudy edge, and the seed changes at every entrance. Alpha is smoothstep(p + 0.3, p - 0.1, mask).
blurFactor = smoothstep(p - 0.5, p + 0.3, mask): behind the front the letters are already sharp, ahead of it still blurred. The radius is blurFactor * 6 * 0.003 and there are seven samples, the centre counted twice and six on a hexagon; below 0.03 a single sample is read, and at full progress the texture passes through untouched.
flare = smoothstep(p - 0.85, p + 0.1, mask), switched off between 0.8 and 1 of progress. The colour is un-premultiplied, pushed away from the grey of its luminance up to four times and brightened by 25%, then premultiplied again: the mint italic glows, the ivory picks up a hint of green.
Each sentence has a scroll window and four states: hidden, appearing, visible, disappearing. Going down it lights up when the scroll enters its window and goes out when it passes it; going up, the other way round. The entrance takes 4 s on outExpo, 1 - 2^(-10t), the exit 0.3 s on smoothstep, whatever the scroll does.
The light of the ground slides towards the tone of the lit sentence, the grain moves eleven times a second, an arrived sentence breathes by a pixel, the facts under the last one come in staggered on a spring. Without WebGL the same canvases sit in the DOM and fade in from a CSS blur; the real text is in a list for screen readers.
| Name | File | Default | What it changes |
|---|---|---|---|
APPEAR_TIME | script.js | 4 | Seconds a sentence takes to light up, on outExpo (the site uses 4). |
DISAPPEAR_TIME | script.js | 0.3 | Seconds a sentence takes to go out when the scroll leaves it (the site uses 0.3). |
MAX_BLUR | script.js | 6 | How blurred the words are before the front reaches them (the site uses 6). |
NOISE_SCALE | script.js | 4 | How cloudy the front is: higher means smaller clouds (the site uses 4). |
FLARE | script.js | 1 | How bright and saturated the front is: 0 none, 1 like the site. |
STORY_LENGTH | script.js | 1 | How much scroll the story takes: 2 is twice as long. |
GRAIN | script.js | 0.06 | How visible the film grain is: 0 none. |
BREATH | script.js | 1 | Pixels a sentence breathes up and down once it has arrived: 0 still. |
For the scrolling story of the landing page of a school, a course, a startup or a brand manifesto: when every sentence should get its moment and arrive like a thought coming into focus, in a high-contrast typeface. The real text stays on the page for Google and screen readers.
The same animation with adapted sizes: each sentence is sized on both width and height, the sentences stay centred without leaning, the bar keeps only the mark and Apply, and the facts under the last sentence wrap onto two rows. Everything is redrawn at every resize, even halfway through an entrance.
No front, no blur, no flare and no breathing: each sentence simply fades in and out when the scroll reaches it, the ground changes tone without sliding and the grain stays still.
GSAP 3.15.0, Playfair Display (font variabile) 5.3.0, Instrument Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 11 KB; the libraries: GSAP 28 KB.
Tested on 11 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.