Skip to content
animorio
IT
Back to the library

The burning veil

Transitions, WebGLGSAP, WebGLAdvancedCompressed weight: Demo 4.6 KBGSAP 28 KBFreeDownload the zip

An orange veil covers the page while the number climbs to a hundred, then it catches fire from the bottom: a ragged front with embers on the edge, drawn by a shader.

Rebuilt from scratch studying meermohsin.me by Meer Mohsin: 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>
<!--
  "The burning veil" 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>Il velo che brucia</title>
  <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>
  <!-- la pagina vera, sotto il velo -->
  <main class="pagina">
    <p class="sopra">Benvenuto</p>
    <h1 class="titolo">
      <span class="riga"><span>Il sito compare</span></span>
      <span class="riga"><span>dietro la carta</span></span>
      <span class="riga"><span>che brucia.</span></span>
    </h1>
    <p class="sotto">Il velo è un solo triangolo a tutto schermo: il fronte del fuoco lo disegna lo shader, con un rumore frattale che sale dal basso.</p>
  </main>

  <!-- il velo: in WebGL se c'è, altrimenti un div che si ritira -->
  <div class="velo" aria-hidden="true">
    <canvas class="velo__tela"></canvas>
    <div class="velo__piano"></div>
    <div class="conta">
      <p class="conta__numero"><span class="conta__cifre">000</span></p>
      <p class="conta__sotto">caricamento</p>
    </div>
  </div>

  <button type="button" class="rivedi" hidden>Rivedi il fuoco</button>

  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.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.

17 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 “The burning veil” 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 covered by an orange veil with a big number climbing from zero to a hundred. At a hundred the number disappears and the veil starts burning from the bottom: the edge of the fire is not a straight line but a ragged front rising and swaying, with a dark band of burnt paper, a line of glowing embers and, below it, the page appearing. When the fire reaches the top the veil is gone and the title rises from its mask.

How it works

One triangle for the whole screen

The veil is a WebGL canvas with a single triangle bigger than the screen (vertices -1,-1 / 3,-1 / -1,3): three vertices and no library. All the work is done by the fragment shader, one pixel at a time.

The ragged front

A fractal noise (five octaves of value noise) moves the front line: d = y + (noise - 0.5) * 0.55 - front. Where d is negative the veil is burnt and the pixel is transparent. The noise scrolls upwards over time: the little flames rise.

Char, ember, core

Three smoothsteps on the same distance d: a wide band that darkens the veil, a narrower one in the ember colour that flickers over time, a very thin almost white one. Below the edge an orange glow settles on the page.

GSAP keeps the time

A timeline takes the number to a hundred and then uFronte from 0 to 1; GSAP's ticker draws the canvas only while needed. Without WebGL the same timing pulls back a div with clip-path.

Values to change

NameFileDefaultWhat it changes
FUOCOscript.js2.6Seconds for the front to cross the screen. Under two seconds it looks like a cut, not a fire.
ONDEscript.js3.0How ragged the front is: higher, more small flames.
VELO / BRACEscript.jsarancio / rosso fuocoThe colours of the veil and the ember, in RGB from 0 to 1. The veil must match --velo in the CSS, used without WebGL.
CONTEGGIOscript.js2.2Seconds for the number to climb to a hundred.

Try them in the Playground

When to use it

For the entrance of a site that wants a theatrical moment on the first visit: an event, a label, a portfolio. Once only, then remember you have already shown it.

On phones

It works the same; the canvas is drawn at most at 1.5 times the screen's pixels, so even weaker phones keep up.

With reduced motion

No veil and no number: the page is there straight away.

Pitfalls

  • With premultipliedAlpha (the default) the colour coming out of the shader must be multiplied by alpha: with alpha alone at zero a light halo stays on the edges.
  • Start the front below the screen and end it above (here from -0.4 to 1.4): the noise moves the line by half a screen, and without a margin you already see a hole at the start.
  • The sine-based caso() function loses precision in mediump: ask for highp when available, otherwise on some phones the noise turns blocky.
  • When the fire is over, get the canvas out of the way and stop drawing: a full-screen shader running for nothing heats the phone.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 4.6 KB; the libraries: GSAP 28 KB.

Testing

Tested on 26 September 2026

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

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