
The glass word
WebGL, 3D, Scroll, Text
Scroll inside the preview
A word standing on the ground line, casting its shadow in perspective. The mouse turns the sun, scrolling stretches the shadow.
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>
<!--
"Long shadow letters" 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="it">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Lettere in piedi con l'ombra lunga</title>
<!-- Mona Sans ha l'asse della larghezza (wdth 75-125): serve per allargare le lettere.
In produzione scarica il font e servilo dal tuo dominio. -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/standard.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="corsa">
<div class="palco">
<div class="cielo" aria-hidden="true"></div>
<div class="sole" aria-hidden="true"></div>
<div class="terra" aria-hidden="true"></div>
<!-- l'ombra: la stessa parola, capovolta, su un piano ruotato in 3D attorno alla linea di terra -->
<div class="piano-vista" aria-hidden="true">
<div class="piano">
<p class="parola parola--ombra"><span class="parola__testo">Piazza</span></p>
</div>
</div>
<h1 class="parola parola--luce"><span class="parola__testo">Piazza</span></h1>
</div>
</main>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/ScrollTrigger.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/SplitText.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.
22 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 “Long shadow letters” from Animorio and fit it into my siteThe visible word and its shadow are two elements with the same text. The shadow lives inside a plane (.piano) rotated 72 degrees around the ground line, inside a container with perspective.
A zero-height inline element (.base-misura) placed at the end of the text tells where the baseline falls. The word is moved until its baseline sits on the ground line, and the shadow starts exactly there.
The sun's elevation gives the shadow length (1 / tan(el)), its direction gives the slant (atan(tan(az))). The result is skewX(slant) scaleY(-length) on the shadow.
A scroll-linked tween moves one value from 0 to 1: the sun's elevation, its direction, the sky colours and the letter width all come from it. The mouse adds a few degrees with gsap.quickTo.
Every change marks the scene as dirty; a function on the GSAP ticker redraws it once per frame.
| Name | File | Default | What it changes |
|---|---|---|---|
LARGHEZZA | script.js | 0.84 | How much of the screen width the word takes. |
BASE | script.js | 0.72 | Where the ground line falls, as a fraction of the height. |
MATTINO / SERA | script.js | 38° / 8° | Sun elevation and direction at the start and end of the scroll. Below 10 degrees the shadows get very long. |
WDTH | script.js | 84, 122 | Letter width on the wdth axis, at the start and at the end. It needs a variable font with a width axis. |
--ombra, --ombra-forza | style.css | #0b3b39, 0.52 | Shadow colour and strength. A dark colour from your palette works better than black. |
.corsa height | style.css | 280vh | How far you scroll to bring the sun to evening. |
A short, important name, at the top or in the footer of a page. Not for long text: the effect carries one word, two short ones at most.
Without a mouse the sun breathes on its own, back and forth, and stops when the scene leaves the screen. Scrolling works the same.
Everything holds still: the sun stays in the afternoon, letters and shadow are already in place and scrolling changes nothing.
GSAP 3.15.0, ScrollTrigger 3.15.0, SplitText 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 4.3 KB; the libraries: GSAP + ScrollTrigger + SplitText 49 KB.
Tested on 26 September 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.