
The glass word
WebGL, 3D, Scroll, Text
Scroll inside the preview
The home page of a made-up logistics company, Yardline, all in 3D: as you scroll, a semi truck at sunset drives along a desert road with its headlights on, kicking up dust, the camera rises and the yard appears behind it. The truck turns in at the gate, the barrier lifts, it goes under the scanner arch, which draws it in lime lines and writes its card, crosses the yard and backs in on a curve to dock seven, trailer first and tractor behind like a real rig. Five metres from the wall it stops: the lock rods turn, the rear doors swing open and bounce off their stops, the dock door rolls up, the truck docks, the dock plate rises, runs its lip out and settles on the trailer, the straps drop. A driverless electric pallet jack brings out two pallets, one at a time; the film is cut and peels off in strips, the cartons line up in rows, a gantry reads their labels one by one while the receiving list ticks them off, and the last carton opens on the goods.
Rebuilt from scratch studying terminal-industries.com by Rejouice, Propagande: 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.
<!doctype html>
<!--
"Truck into the yard" 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 truck that drives into the yard on scroll</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/jetbrains-mono@5.3.0/index.css">
<script type="importmap">
{
"imports": {
"three": "https://cdn.jsdelivr.net/npm/three@0.178.0/build/three.module.min.js",
"three/addons/": "https://cdn.jsdelivr.net/npm/three@0.178.0/examples/jsm/"
}
}
</script>
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- the home page of a made-up yard operations company, Yardline: at dusk a semi truck drives along the road, turns
in at the gate, is scanned, crosses the yard, pulls forward and backs into dock seven. The lock rods turn, the
doors swing open, the dock door rolls up, the plate settles, a driverless pallet jack brings out two pallets,
the film peels off, the cartons line up, a gantry reads their labels while the list ticks them off and the last
carton opens on the goods. The whole scene is built in three.js and follows the scroll -->
<header class="barra" data-barra>
<a class="marchio" href="#" aria-label="Yardline">
<svg viewBox="0 0 32 32" aria-hidden="true"><path d="M4 6h7l5 9 5-9h7L19 19v7h-6v-7z"/></svg>
<span>Yardline</span>
</a>
<nav class="voci" aria-label="Main">
<a href="#">Platform</a>
<a href="#">Gate</a>
<a href="#">Yard</a>
<a href="#">Dock</a>
<a href="#">Customers</a>
</nav>
<div class="azioni">
<a class="pulsante pulsante--chiaro" href="#">Book a demo</a>
<a class="pulsante pulsante--accento" href="#">See the yard</a>
</div>
</header>
<main>
<section class="corsa" data-corsa>
<div class="palco" data-palco>
<canvas class="scena" data-scena aria-hidden="true"></canvas>
<div class="velo" data-velo aria-hidden="true"></div>
<div class="righe">
<p class="riga riga--grande" data-riga data-da="0.004" data-a="0.085">The yard, rebuilt from the gate to the dock.</p>
<p class="riga" data-riga data-da="0.1" data-a="0.205">Every truck checked in at the gate, in seconds.</p>
<p class="riga" data-riga data-da="0.22" data-a="0.325">Guided across the yard to the right door.</p>
<p class="riga" data-riga data-da="0.335" data-a="0.455">Backed in on the first try. Doors open.</p>
<p class="riga" data-riga data-da="0.47" data-a="0.56">Dock ready before the engine stops.</p>
<p class="riga" data-riga data-da="0.565" data-a="0.77">Unloaded the moment it arrives.</p>
<p class="riga" data-riga data-da="0.775" data-a="0.885">Every carton counted and checked.</p>
<p class="riga riga--grande" data-riga data-da="0.89" data-a="1.01">Unboxed, verified, on the shelf.</p>
</div>
<div class="scheda-scan" data-scan aria-hidden="true">
<p class="scheda-scan__titolo">Inbound</p>
<dl>
<div><dt>Carrier</dt><dd>Northline Freight</dd></div>
<div><dt>Trailer</dt><dd>YL 48213</dd></div>
<div><dt>Seal</dt><dd>Intact</dd></div>
<div><dt>Door</dt><dd>Dock 7</dd></div>
</dl>
<p class="scheda-scan__esito"><span class="spunta"><svg viewBox="0 0 16 16"><path d="M3 8.5l3.2 3L13 4.5"/></svg></span>Cleared in <b data-tempo>0:04</b></p>
</div>
<aside class="lista" data-lista aria-hidden="true">
<p class="lista__titolo">Receiving<span>Dock 7 · PO 48213</span></p>
<div class="lista__conte">
<div><b><span data-palette>0</span><small>/2</small></b><span>pallets</span></div>
<div><b><span data-cartoni>0</span><small>/12</small></b><span>cartons</span></div>
<div><b><span data-unita>0</span><small>/24</small></b><span>units</span></div>
</div>
<div class="lista__barra"><i data-avanzamento></i></div>
<ul class="lista__righe">
<li data-voce="Stoneware mugs"><span class="lista__nome">Stoneware mugs</span><span class="lista__sku">SKU 2041</span><span class="lista__spunta"><svg viewBox="0 0 16 16"><path d="M3 8.5l3.2 3L13 4.5"/></svg></span></li>
<li data-voce="Linen napkins"><span class="lista__nome">Linen napkins</span><span class="lista__sku">SKU 1187</span><span class="lista__spunta"><svg viewBox="0 0 16 16"><path d="M3 8.5l3.2 3L13 4.5"/></svg></span></li>
<li data-voce="Glass carafes"><span class="lista__nome">Glass carafes</span><span class="lista__sku">SKU 3320</span><span class="lista__spunta"><svg viewBox="0 0 16 16"><path d="M3 8.5l3.2 3L13 4.5"/></svg></span></li>
<li data-voce="Oak boards"><span class="lista__nome">Oak boards</span><span class="lista__sku">SKU 0912</span><span class="lista__spunta"><svg viewBox="0 0 16 16"><path d="M3 8.5l3.2 3L13 4.5"/></svg></span></li>
<li data-voce="Wool throws"><span class="lista__nome">Wool throws</span><span class="lista__sku">SKU 5530</span><span class="lista__spunta"><svg viewBox="0 0 16 16"><path d="M3 8.5l3.2 3L13 4.5"/></svg></span></li>
<li data-voce="Clay planters"><span class="lista__nome">Clay planters</span><span class="lista__sku">SKU 7724</span><span class="lista__spunta"><svg viewBox="0 0 16 16"><path d="M3 8.5l3.2 3L13 4.5"/></svg></span></li>
<li data-voce="Copper kettles"><span class="lista__nome">Copper kettles</span><span class="lista__sku">SKU 6408</span><span class="lista__spunta"><svg viewBox="0 0 16 16"><path d="M3 8.5l3.2 3L13 4.5"/></svg></span></li>
<li data-voce="Cotton towels"><span class="lista__nome">Cotton towels</span><span class="lista__sku">SKU 1462</span><span class="lista__spunta"><svg viewBox="0 0 16 16"><path d="M3 8.5l3.2 3L13 4.5"/></svg></span></li>
<li data-voce="Rattan baskets"><span class="lista__nome">Rattan baskets</span><span class="lista__sku">SKU 8815</span><span class="lista__spunta"><svg viewBox="0 0 16 16"><path d="M3 8.5l3.2 3L13 4.5"/></svg></span></li>
<li data-voce="Gift sets"><span class="lista__nome">Gift sets</span><span class="lista__sku">SKU 9006</span><span class="lista__spunta"><svg viewBox="0 0 16 16"><path d="M3 8.5l3.2 3L13 4.5"/></svg></span></li>
<li data-voce="Ceramic bowls"><span class="lista__nome">Ceramic bowls</span><span class="lista__sku">SKU 2093</span><span class="lista__spunta"><svg viewBox="0 0 16 16"><path d="M3 8.5l3.2 3L13 4.5"/></svg></span></li>
<li data-voce="Brass candleholders"><span class="lista__nome">Brass candleholders</span><span class="lista__sku">SKU 4471</span><span class="lista__spunta"><svg viewBox="0 0 16 16"><path d="M3 8.5l3.2 3L13 4.5"/></svg></span></li>
</ul>
<p class="lista__ultimo" data-ultimo>Unloading dock 7</p>
</aside>
<div class="numeri" data-numeri aria-hidden="true">
<div><b data-conta="2.4" data-decimali="1">0</b><span>min at the gate</span></div>
<div><b data-conta="38" data-suffisso="%">0</b><span>faster turns</span></div>
<div><b data-conta="12" data-suffisso=" min">0</b><span>dock to shelf</span></div>
</div>
<p class="scorri" data-scorri>Scroll</p>
</div>
</section>
<section class="dopo">
<h2>One yard, from the gate to the shelf.</h2>
<a class="pulsante pulsante--accento" href="#">Book a demo</a>
</section>
</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/lenis@1.3.26/dist/lenis.min.js"></script>
<script type="module" 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.
88 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 “Truck into the yard” from Animorio and fit it into my siteThe section is 1400vh tall with a 100lvh sticky stage and the three.js canvas inside. A ScrollTrigger on the section gives the progress from 0 to 1; every frame the scene follows it with an exponential ease (the LAG constant), so every move is soft even with a mouse wheel. Lenis smooths the scroll.
The cab is an extruded side profile with the wheel arch cut out, with windscreen, windows, mirrors, grille, headlights, tanks and stacks added on top. The tyres are turned on a lathe with a raised tread and the rims have ten nuts. The trailer has its ribs in an InstancedMesh, the brand on a canvas texture, the rear doors hung on hinges and the brake and reversing lights.
The road to the dock is a Catmull-Rom curve for the tractor; the trailer follows it like a tractrix (its axle is pulled toward the kingpin at a fixed distance). In reverse it is the other way round: the trailer axle follows a Bézier curve that ends straight in the dock and the tractor is pushed along behind the kingpin. Everything is worked out once in 1600 and 900 samples; the scroll picks the sample and the wheels turn as far as the distance covered.
An object P says in which part of the scroll each thing happens. The forward drive is not linear: a monotone curve goes through the points where the truck must be on the road, under the arch and in the lane, so the camera finds it where it is waiting. The other things (rods, doors, dock door, plate, straps, jack, film, cartons, gantry, goods) each have their own window and their own curve.
Thirty-one shots, each with a position, a target and a field of view, some tied to the truck, the jack or the carton. Between them the camera moves along a Catmull-Rom spline, so it never stops on a key. On a tall screen the field widens just enough to keep the same scene.
The pallet jack follows Catmull-Rom curves on the floor with its heel (the root of the forks) and turns along the tangent; in reverse the tangent flips. When the forks rise the pallet moves from the trailer to the scene and follows the forks, then stays where it is set down. Every strip of film has its hinge at the base and peels in order of distance from the cut corner; the cartons go to places worked out in the pallet’s own coordinates. The gantry steps row by row and its head runs back and forth: a label lights up when the head passes it, and the list counts the labels read.
The lime lines are the EdgesGeometry of every part of the truck with two clipping planes in world space: they only show inside the band of the arch. The lines of the page are split into letters and type themselves inside their scroll window, the newest letter in the accent colour.
One Points object with a shader: every particle has an age, a life, a type and a size, and grows as it fades. Dust is born behind the wheels the faster the truck goes, smoke from the stacks while the engine works; a jump of the scroll makes none.
| Name | File | Default | What it changes |
|---|---|---|---|
BRAND | script.js | 'YARDLINE' | The name on the trailer, the arch and the boxes. |
CAB_COLOR | script.js | '#2f3539' | The paint of the tractor. |
TRAILER_COLOR | script.js | '#d6d8da' | The paint of the trailer. |
RUN | script.js | 1400 | How long the story is, in vh of scroll. |
LAG | script.js | 3.2 | How quickly the scene catches up with the scroll (higher is tighter). |
SMOOTH | script.js | 1.1 | Seconds of the smooth scroll (0 turns it off). |
SUN | script.js | 6 | How high the sun is over the horizon, in degrees. |
EXPOSURE | script.js | 1.08 | The brightness of the whole picture. |
SHADOWS | script.js | true | Soft shadows from the sun. |
--accento | style.css | #c7f03a | The one accent: the caret, the scan light, the button. |
For the home page of a logistics, trucking or warehousing company, or of supply chain software: a story told as you scroll, from the truck on the road to the goods on the shelf. It also suits a shop that wants to show its delivery, or a product page that follows an order step by step.
The same scene and the same moves: the stage is 100lvh tall and on a tall screen the field of view widens to keep the same framing; the bar keeps the mark and one button, the lines size themselves on height and width. The pixel ratio is capped at 1.75 to stay smooth.
No following, no smooth scroll and no particles: the story moves in still chapters (the road, the gate, the yard, the dock, the open doors, the plate, the jack under the pallet, the pallets down, the cut film, the cartons in rows, the goods) with a fade between them; the ticks of the list appear without a spring.
three.js 0.178.0, GSAP 3.15.0, ScrollTrigger 3.15.0, Lenis 1.3.26, Mona Sans (font variabile) 5.3.0, JetBrains Mono (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 41 KB; the libraries: GSAP + ScrollTrigger 45 KB, Lenis 5.3 KB, Three.js 174 KB.
Tested on 2 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.