
Words that melt into each other
Text, Scroll, SVG
NewFree
A loader in the minimal style: a thin line draws a U inside a square, then every bend opens into a smaller U, fold after fold, until the line passes through all 1,024 cells without ever crossing itself (the Hilbert curve). Underneath, the cell count gets narrower as it gets longer; at the end a second, electric blue line runs through the whole curve and counts the files packed.
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>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>The line that fills the square</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/archivo@5.3.0/wdth.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="stage" data-stage aria-label="Tessel is packing your files. Click to start again.">
<!-- one line folds itself into the square, corner by corner, then a second line runs through it in the accent -->
<svg class="scene" data-scene aria-hidden="true">
<path class="frame" data-frame d="" pathLength="1" />
<path class="marks" data-marks d="" />
<path class="line" data-line d="" />
<path class="pack" data-pack d="" pathLength="1" />
</svg>
<div class="caption" data-caption>
<span class="caption__name" data-name>Tessel</span>
<span class="caption__count">
<span class="caption__num" data-num>4</span>
<span class="caption__label" data-label>cells</span>
</span>
</div>
</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.
15 values to change
With the Animorio connector, Claude Code takes it from here, guide included, and fits it into your project. Paste this request:
Take “The line that fills the square” from Animorio and fit it into my siteThe Hilbert curve is worked out once at the finest order with the classic d2xy function, which turns a point’s index into its cell. The coarser orders are the same list taken every 4th, 16th, 64th… point, with the coordinates divided by 2, 4, 8: the Hilbert curve visits the sub-cells of each cell one after the other, so every group of four consecutive points always shares the same parent.
To go from order k to k+1 every new point starts at the centre of its parent’s cell (point j>>2 of the order before) and slides to the centre of its own. Each point’s progress is offset along the line (WAVE), so the fold runs from the start to the end, and goes through back.out(SPRING): every corner goes a hair past and comes back.
The counter is variable Archivo: GSAP tweens the number with a snap to whole numbers, the weight and a --w variable tied to font-stretch. The width goes down from 125 to 76 as the digits go from one to four, so the number never pushes the word next to it.
The blue line is a copy of the final path with pathLength=1: its stroke-dasharray is «0 tail head−tail 2», so tweening two numbers is enough to bring it in from the start and send it out from the tail. The file count follows it with the same duration.
It is all one paused timeline which, on onComplete, sets the state back to zero and plays again: the preview video sees the whole loop. The path is only rebuilt when the order, the fold or the size change, and on resize the square is worked out again in pixels, even halfway through a fold. With reduced motion the full square, in blue, with 1,024 packed, fades in and stays.
| Name | File | Default | What it changes |
|---|---|---|---|
NAME | script.js | 'Tessel' | The app’s name, under the square on the left. |
ORDER | script.js | 5 | How many times the line folds (3 to 6): 5 is 1,024 cells, 6 is 4,096. |
DRAW | script.js | 1.1 | The seconds the first U takes to draw itself. |
FOLD | script.js | 1.05 | The seconds of each fold. |
WAVE | script.js | 0.55 | How far the fold travels along the line: 0 = every corner at once. |
SPRING | script.js | 1.4 | How far every corner goes past its place before it settles: 0 = it stops dead. |
PACK | script.js | 2.6 | The seconds the blue line takes to run through the whole curve. |
HOLD | script.js | 1.6 | The seconds the full square stays before it folds back. |
As the loader of an app that stores, sorts or syncs files, a backup service or a warehouse; as the wait during a long import; as the picture on a page that explains how a system puts things in order without leaving gaps.
The same animation with the sizes adapted: the square takes nearly the whole width, the line stays at least a pixel thick even with the smallest cells, and the name and the number stay underneath, lined up with the edges of the square.
Nothing moves: the full square, with the blue curve and 1,024 packed underneath, fades in and stays.
GSAP 3.15.0, Archivo (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.6 KB; the libraries: GSAP 28 KB.
Tested on 19 October 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.
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.