Skip to content
animorio
IT
Back to the library

Stage aurora background

Backgrounds, Hover, WebGLGSAP, WebGL, CSS onlyMediumCompressed weight: Demo 9.4 KBGSAP 28 KBFreeDownload the zip

The background of the first screen of an invented evening of talks, Halfdark: on a stage black a soft aurora in three colours, amber, rose and a cold ice blue, sways slowly like stage light behind the heading. From the top a stage spotlight cone follows the pointer on a spring: inside it the aurora brightens, the grain trembles like dust in a beam, the stage line catches the light and the words of the heading grow fuller. Over the Get tickets pill the cone opens up. A single hand-written WebGL shader.

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>
<!--
  "Stage aurora background" 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>Halfdark, an evening of ideas</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <!-- the hero of an invented evening of talks, Halfdark. Behind the words one WebGL shader draws a soft aurora in
       three colours, amber, rose and a cold teal, drifting like stage light; from the top a spotlight cone follows
       the pointer, the grain inside it trembles and the stage line catches it. With nobody touching, the spotlight
       sweeps the stage on its own -->
  <main class="pagina" data-pagina>
    <canvas class="fondo" aria-hidden="true" data-fondo></canvas>

    <header class="testa" data-entra>
      <p class="marchio">Halfdark</p>
      <nav class="voci" aria-label="Sections">
        <a href="#">Speakers</a>
        <a href="#">Programme</a>
        <a href="#">Venue</a>
      </nav>
    </header>

    <section class="eroe">
      <div class="blocco" data-blocco>
        <p class="occhiello" data-entra>An evening of ideas</p>
        <h1 class="titolo" data-titolo>Ideas, in a new light.</h1>
        <div class="riga" data-entra>
          <p class="quando">
            <span class="quando__giorno">Thu 18 March 2027</span>
            <span class="quando__filo" aria-hidden="true"></span>
            <span class="quando__luogo">Harbour Hall, Port Ellis</span>
          </p>
          <a class="pillola" href="#" data-pillola>
            <span class="pillola__fondo" aria-hidden="true"></span>
            <span class="pillola__scritta">Get tickets</span>
            <svg class="pillola__freccia" viewBox="0 0 16 16" aria-hidden="true"><path d="M2.5 8h10.5M9 3.8 13.2 8 9 12.2" /></svg>
          </a>
        </div>
      </div>
    </section>
  </main>

  <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.

25 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 “Stage aurora background” 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

A whole page black as a stage with the lights down, the first screen of an invented evening of talks, Halfdark. At the top the brand and three small links (Speakers, Programme, Venue); in the middle a small line, An evening of ideas, the heading Ideas, in a new light. in Mona Sans, the date (Thu 18 March 2027) with the venue and the light Get tickets pill with its arrow. Behind the words a soft aurora in three colours: an amber curtain on the left, a rose one in the middle and an ice blue one on the right, brighter at their lower edge and fading upwards, with soft vertical folds that drift slowly. The curtains sway, breathe and overlap in the middle, where the colours mix. From the top a stage spotlight cone comes down, in warm light, following the pointer on a spring with a hint of bounce: its top moves a little, its tip a lot, like a turning stage lamp. Inside the cone the air gets lighter, the aurora crossing it lights up and the grain, still on the rest of the page, trembles like dust in a beam of light; where the cone lands there is a faint pool and the thin stage line at the bottom catches the light. The words of the heading the cone passes over grow fuller, a touch wider and warmer. Over the Get tickets pill the cone opens by half and gets stronger, the pill swells with a bounce, the label widens and the arrow moves forward; on click the lamp gives an elastic flash. With nobody touching, the cone sweeps the stage on its own and once per round settles on the pill. In sixteen seconds everything comes full circle and is back as it was. When the page opens the aurora rises from the dark, the lamp comes on with a small stage-lamp flicker and the words surface blurred, one after another.

How it works

One shader, three curtains

A full-page WebGL canvas with a single triangle covering the screen, at devicePixelRatio 1.5 at most. Each aurora curtain is a lower edge that sways (two nested sines, ONDA high) with a light that fades going up and stops sharply going down: a narrow gaussian below and a wide one above. The vertical folds are fbm noise stretched sideways; the three curtains live in different parts of the stage and add up in the middle, with strength AURORA.

Noise that comes back the same

The noise is read shifted along a circle that turns with the phase of the round, vec2(cos T, sin T): at the end of the round the point is back where it was and the aurora is identical, so the GSAP timeline of the phase repeats forever without a jump, GIRO seconds long.

The stage cone

For each pixel the angle between its direction from the apex and the direction from the apex to the aim is measured: under CONO degrees it is inside, with a soft smoothstep edge, and the light fades with distance. The apex sits above the page and moves only 38% as far as the aim, so the cone turns like a lamp. The aim follows the pointer on a spring (MOLLA) just under critical damping, which settles with a small bounce; without a pointer it follows a path of sines that once per round passes over the pill.

The trembling grain and the stage line

Outside the cone the grain is a still hash of the pixel coordinates; inside it is mixed with a hash that changes 24 times a second, stronger by VIBRA: it looks like dust in the beam. A one-pixel line under the block is the edge of the stage, faint at rest and bright where the cone touches it; below it the stage is a little darker. At the end a vignette and a 1 − e^(−x) curve keep the lights soft.

Words that catch the light, and the pill

The same angle sum is done in JavaScript for the centre of each word of the heading and becomes the CSS variable --l, followed gently: weight from 520 to 720, width +6%, colour towards the light and a glow. Over the pill a second spring opens the cone by half and makes it stronger; the click gives a flash with elastic.out. Without WebGL a still aurora of CSS gradients is left; IntersectionObserver and visibilitychange stop everything when the page is not visible.

Values to change

NameFileDefaultWhat it changes
GIROscript.js16How many seconds the aurora and the cone take to come full circle.
AURORAscript.js0.9How strong the aurora is, from 0 (only the stage) to 1.5.
ONDAscript.js0.08How much the aurora curtains sway, compared with the page height.
CONOscript.js15Half the opening of the light cone, in degrees.
LUCEscript.js0.55How strong the light cone is, from 0 (off) to 1.
VIBRAscript.js2.6How much the grain trembles inside the cone: 0 leaves it still as outside.
GRANAscript.js0.05How much film grain on the whole page: 0 removes it.
MOLLAscript.js9How quick the spring that brings the cone to the pointer is.

Try them in the Playground

When to use it

As the background of the first screen of an event website: a conference, an evening of talks, a festival, a theatre opening or a concert, with the date and the tickets button; also behind the heading of a dark landing page that wants the feel of a stage. The three colours, the stage and the light are set in the CSS.

On phones

The same aurora and the same cone with the sizes adapted: the heading wraps onto two lines, the venue and two menu links hide and the date and the pill remain. The finger brings the cone where it touches and drags; when it lifts, the cone goes back to its round.

With reduced motion

Aurora and cone still, already on, at the start of the round: no swaying, no trembling grain and no pointer. The words fade in.

Pitfalls

  • Noise that scrolls with time never comes back the same and the round jumps when it restarts: reading it along a circle that turns with the phase brings it back exactly to the start.
  • Grain trembling over the whole page fizzes like television snow and gets tiring: keeping it still outside and alive only inside the cone makes it look like dust in the light, and the cone is what you see.
  • If the apex of the cone follows the aim all the way the cone slides instead of turning and looks like a hand torch: with the apex above the page and a third of the travel it becomes a hanging lamp.
  • The summed lights of the aurora and the cone go over 1 and the white burns in patches: a 1 − e^(−x) curve at the end squeezes them gently and keeps the gradients.
  • Changing the weight of the words every frame shifts the lines a little: it is followed with a slow step (14% per frame), so the light swells them instead of making them jump.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 9 November 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