Skip to content
animorio
IT
Back to the library

Drawing trace loader

Intro, SVGGSAP, CSS onlyMediumCompressed weight: Demo 8.4 KBGSAP + CustomEase 31 KBFreeDownload the zip

The loading screen of an AI agent for architects, on drawing paper: the elevation of a house traces itself line by line while a thin orange line grows with the percentage, and beside it a monospaced card lights up its start-up list. At one hundred the line splits, one half runs up, the other down, and between them the full drawing opens, with its concrete, glass and hatched shadows. Then the title rises word by word.

Rebuilt from scratch studying heronaiapp.com by Bearplus, Kenny Ho: the idea is theirs; code, copy and images are ours. Read how it’s made

The code

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>
<!--
  "Drawing trace loader" 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 loading screen where the drawing traces itself and opens</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/index.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/geist-mono@5.3.0/index.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <!-- the loading screen of Egret, an invented AI agent for architects -->
  <div class="pagina">
    <header class="testa">
      <a class="marchio" href="#" aria-label="Egret, home">
        <svg viewBox="0 0 24 24" aria-hidden="true"><path d="M3 18 L11 6 L13 10 L21 4" /><path d="M11 6 L9 19" /></svg>
        <span>Egret</span>
      </a>
      <span class="stato mono" data-state aria-live="polite"><span class="stato__dentro" data-state-in>Loading</span></span>
    </header>

    <main class="palco">
      <div class="disegno" data-sheet>
        <svg class="disegno__linee" data-lines viewBox="0 0 800 400" preserveAspectRatio="xMidYMid meet" aria-hidden="true"></svg>
        <svg class="disegno__pieno" data-full viewBox="0 0 800 400" preserveAspectRatio="xMidYMid meet" aria-hidden="true">
          <defs>
            <linearGradient id="vetro" x1="0" y1="0" x2="1" y2="1">
              <stop offset="0" stop-color="#9ea2a0" />
              <stop offset=".55" stop-color="#c3c6c2" />
              <stop offset="1" stop-color="#d9dbd6" />
            </linearGradient>
            <linearGradient id="dentro" x1="0" y1="0" x2="0" y2="1">
              <stop offset="0" stop-color="#7c7f7c" />
              <stop offset="1" stop-color="#b9bbb6" />
            </linearGradient>
            <pattern id="tratteggio" width="6" height="6" patternUnits="userSpaceOnUse" patternTransform="rotate(45)">
              <line x1="0" y1="0" x2="0" y2="6" stroke="#282828" stroke-width=".7" stroke-opacity=".55" />
            </pattern>
            <pattern id="cemento" width="14" height="14" patternUnits="userSpaceOnUse">
              <rect width="14" height="14" fill="#e3e1d9" />
              <circle cx="3" cy="4" r=".6" fill="#b9b7ae" /><circle cx="10" cy="9" r=".5" fill="#c4c2b9" /><circle cx="6" cy="12" r=".4" fill="#aeaca4" />
            </pattern>
          </defs>
          <g data-fills></g>
          <g data-strokes></g>
          <g class="segni" data-marks>
            <rect x="321" y="291" width="7" height="7" />
            <rect x="563" y="193" width="7" height="7" />
          </g>
        </svg>
        <!-- the loading line, which later splits into the two edges of the sheet -->
        <span class="filo filo--sopra" data-line-top><span class="filo__tratto" data-line-fill></span></span>
        <span class="filo filo--sotto" data-line-bottom></span>
        <span class="percento mono" data-pct-wrap><span data-pct>0</span>%</span>
        <span class="angolo angolo--a" aria-hidden="true"></span><span class="angolo angolo--b" aria-hidden="true"></span>
        <span class="angolo angolo--c" aria-hidden="true"></span><span class="angolo angolo--d" aria-hidden="true"></span>
      </div>

      <div class="coda">
        <section class="scheda mono" data-card aria-label="Loading">
          <dl class="scheda__dati">
            <dt class="scheda__titolo">Welcome to Egret</dt>
            <dt>Type</dt><dd>AI agent for architects</dd>
            <dt>Founded</dt><dd>2026</dd>
            <dt>Works in</dt><dd>Your drawing tools</dd>
          </dl>
          <ul class="scheda__avvio" data-boot>
            <li><span>Load the model</span><b>ok</b></li>
            <li><span>Read the drawings</span><b>ok</b></li>
            <li><span>Find the levels</span><b>ok</b></li>
            <li><span>Check the codes</span><b>ok</b></li>
            <li><span>Measure the stairs</span><b>ok</b></li>
            <li><span>Check the doors</span><b>ok</b></li>
            <li><span>Draft the notes</span><b>ok</b></li>
            <li><span>Start</span><b>ok</b></li>
          </ul>
        </section>

        <section class="titolo" data-title-wrap>
          <h1 class="titolo__riga" data-title>An AI agent that works inside your drawings</h1>
          <p class="titolo__sotto mono" data-sub>Egret reads your model, flags what breaks the code and fixes it once you say yes.</p>
        </section>
      </div>
    </main>

    <button class="ancora mono" type="button" data-replay aria-label="Play the loading screen again">
      <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M13 8a5 5 0 1 1-1.6-3.7" /><path d="M13 2.6v3.2H9.8" /></svg>
      <span>Replay</span>
    </button>
  </div>

  <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/CustomEase.min.js"></script>
  <script src="script.js"></script>
</body>
</html>

Playground

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.

43 values to change

Or ask your AI assistant for it

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 “Drawing trace loader” from Animorio and fit it into my site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

The page is a paper-coloured sheet with a thin frame. In the middle the elevation of a modern house starts drawing itself: the ground, the slabs, the upper volume cantilevering out, the glazing with its mullions, the door, the stairs, the bare trees at the sides, each line in just over a second and all of them one after another within three. Meanwhile, halfway down the sheet, a thin orange line grows from the left with the percentage running at its tip: fast up to sixty, then slower up to one hundred. Below, a small monospaced card says “Welcome to Egret” and lights up its start-up list one line at a time, each followed by an orange “ok”. At one hundred the line takes a breath, thickens for an instant and splits: one half runs up, the other down, with a snap that starts slow and arrives all at once, and they turn grey, the two edges of the sheet. Between them the full drawing opens: grainy concrete, grey glass with a reflection, the dark inside behind the door and hatched shadows under the cantilever and on the stairs. The lines of the first drawing go from black to grey, the card disappears, four orange crosses light up at the corners and two orange marks on the drawing. In the card’s place the title rises word by word, and at the top “Loading” becomes “Ready”. After a few seconds everything goes back to the empty sheet and plays again; there is a Replay button too.

How it works

Every line draws itself

Each stroke of the drawing gets a dash as long as itself and an equal offset, so it starts invisible. GSAP brings the offset to zero in 1.3 seconds with power1.out, and a stagger with amount 3 spreads the starts of all the lines over three seconds, in the order they are written: the ground and the slabs first, the trees last.

Two speeds for the loading

An object goes from 0 to 60 in 3 seconds with power2.out and from 60 to 100 in 2.5 with power3.out: the first part runs, the second slows down. At each step it writes the number and a CSS variable, which stretches the line with scaleX and moves the number along its tip without letting it leave the sheet.

One line becomes two edges

The two lines and the crop of the full drawing depend on the same variable, --apri: the first sits at 50% minus half of --apri, the second at 50% plus half, and the clip-path inset only shows what lies between them. GSAP takes --apri from 0 to 1 in 0.8 seconds with the curve cubic-bezier(1, 0, 0.44, 1): still at the start, very fast at the end.

The same drawing, twice

The lines are written once in a list and the code puts them in two stacked drawings: underneath the one that traces itself, on top the full one with its fills (patterned concrete, gradient glass, hatching at 45 degrees), cropped. So they match to the pixel.

The title in its mask

The title is split into words, each inside a mask with overflow hidden: the words rise from yPercent 105 to 0 in half a second, two hundredths apart, while the sheet finishes opening.

Values to change

NameFileDefaultWhat it changes
DRAWscript.js1.3How many seconds each line takes to draw itself.
DRAW_SPREADscript.js3Over how many seconds all the lines start, from the first to the last.
LOAD_FIRSTscript.js3How many seconds the loading takes to reach sixty.
LOAD_SECONDscript.js2.5How many seconds it takes from sixty to one hundred.
SPLITscript.js0.8How many seconds the line takes to split and open the drawing.
BOOT_STAGGERscript.js0.3The pace of the start-up list, between one line and the next.
HOLDscript.js4.5How many seconds the open drawing stays before it plays again.
ACCENTscript.js#f15534The colour of the line, the crosses and the marks.
SPEEDscript.js1Speed of everything: 2 twice as fast, 0.5 half as fast.

Try them in the Playground

When to use it

For the loading screen of an architecture site, a design studio, software for people who draw or an AI product: while the page loads you watch the drawing being born, and when it is ready the drawing opens.

On phones

The same animation: the sheet takes the whole width and is sized on the height too, the card underneath keeps only its heading and the start-up list in two columns, and the title arrives in its place.

With reduced motion

Nothing moves: the drawing appears already open, with its grey edges, the crosses and the title, in a fade.

Pitfalls

  • The dash and its offset are in the drawing’s units: with vector-effect: non-scaling-stroke the lines would be dashed in screen pixels and only draw halfway. The width stays at one pixel by recalculating stroke-width from the sheet’s width, on resize.
  • The lines and the crop use the same variable in percent: on resize, even halfway through opening, they stay together without recalculating anything.
  • The percentage moves with left at the tip and translateX of minus the same fraction: at the start it sits right of zero, at the end left of one hundred, and it never leaves the sheet.

Libraries

GSAP 3.15.0, CustomEase (GSAP) 3.15.0, Mona Sans (font variabile) 5.3.0, Geist Mono (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 8.4 KB; the libraries: GSAP + CustomEase 31 KB.

Testing

Tested on 27 October 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

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.

All animations