Skip to content
animorio
IT
Back to the library

Three lights background

Backgrounds, WebGLWebGL, GSAPMediumCompressed weight: Demo 10 KBGSAP 28 KBFreeDownload the zip

An animated background for the hero of an AI app, on an almost solid black: three soft lights, coral, mint and blue, one per model, turn slowly around the heading. Where two overlap they mix like stage lights (yellow, cyan, magenta), where all three meet they turn white. Each light chases the pointer on a spring of its own, so a quick move splits the white into coloured fringes and a pause merges it again. A thin grid catches the light, a fine grain smooths the gradients, the heading gains weight as the lights merge and pressing Start free the white flares into a bloom with a ring that runs over the page.

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>
<!--
  "Three lights 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>Confluo</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 AI app that routes every prompt to three models. Behind the heading a WebGL shader draws three
       soft lights, coral, mint and blue, one per model: apart they keep their colour, where two overlap they mix
       (yellow, cyan, magenta) and where all three meet they turn into white. Each light chases the pointer on its
       own spring, so a quick move splits the white into coloured fringes and a stop merges them again -->
  <section class="stage" data-stage>
    <canvas class="light" aria-hidden="true" data-canvas></canvas>
    <div class="pools" aria-hidden="true" data-pools>
      <span class="pool pool--a"></span><span class="pool pool--b"></span><span class="pool pool--c"></span>
    </div>
    <div class="tags" aria-hidden="true">
      <span class="tag tag--a" data-tag>Reason</span>
      <span class="tag tag--b" data-tag>Vision</span>
      <span class="tag tag--c" data-tag>Code</span>
    </div>

    <header class="bar" data-in>
      <span class="brand">
        <svg class="brand__mark" viewBox="0 0 24 24" aria-hidden="true">
          <circle cx="12" cy="8.6" r="5.2"/><circle cx="8.4" cy="14.8" r="5.2"/><circle cx="15.6" cy="14.8" r="5.2"/>
        </svg>
        Confluo
      </span>
      <a class="bar__link" href="#">Sign in</a>
    </header>

    <div class="hero">
      <a class="chip" href="#" data-in>
        <span class="chip__new">New</span>
        <span class="chip__words">Model routing is live</span>
        <svg class="chip__arrow" viewBox="0 0 16 16" aria-hidden="true"><path d="M6 4l4 4-4 4"/></svg>
      </a>
      <h1 class="title" data-title><span class="title__line">Three models.</span> <span class="title__line">One clear answer.</span></h1>
      <p class="lede" data-in>Confluo sends every prompt to the models that know it best and blends them into a single reply.</p>
      <div class="actions" data-in>
        <button class="btn" type="button" data-btn data-autoclic>
          <span class="btn__rim" aria-hidden="true"></span>
          <span class="btn__face">
            <span class="btn__words" data-words>Start free</span>
            <svg class="btn__icon" viewBox="0 0 16 16" aria-hidden="true">
              <path class="btn__arrow" data-arrow d="M3 8h9M8.5 4.2L12.3 8 8.5 11.8"/>
              <path class="btn__check" data-check pathLength="1" d="M3.4 8.4l3 3 6.2-6.6"/>
            </svg>
          </span>
        </button>
        <a class="ghost" href="#">See how it routes</a>
      </div>
    </div>

    <p class="hint" data-in>Move fast to split the light</p>
    <p class="sr" aria-live="polite" data-live></p>
  </section>

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

32 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 “Three lights 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

On an almost solid black the hero of Confluo appears, an app that sends every question to three AI models: at the top the three-circle mark and ‘Sign in’, in the middle the ‘New, Model routing is live’ label, the heading ‘Three models. One clear answer.’, a line that explains and the ‘Start free’ and ‘See how it routes’ buttons. Behind them three soft lights come on, coral, mint and blue, in a triangle around the heading, each with the small name of its model (Reason, Vision, Code) just outside its glow. They turn slowly; where two overlap yellow, cyan and magenta appear, and a thin grid shows only where the light falls. Then the lights close in and sweep left and right behind the heading: since each has a different spring, in the quick move the white splits into coloured fringes and closes again when they stop. The heading gains weight as they merge and the three names fade. Finally they settle together on the button: its rim takes the three colours as they arrive, then a white halo; the button is pressed, gives and comes back on a spring, the light flares into a white bloom, a thin ring with the three tints runs over the whole page, the lights part by a breath and meet again, and the label turns into ‘You are in’ with a checkmark that draws itself. Then they go back to their triangle and the loop starts again. With the pointer the lights follow it, over the button they merge into white, and the button can really be pressed.

How it works

One triangle over the page

All the light is a WebGL shader on a single triangle covering the canvas, full page under the words. Without WebGL three blurred CSS circles with mix-blend-mode: screen do the same, moved by the same springs.

Three lights that add up

Each light is a gaussian with a long exponential tail, slightly oval and breathing. The three colours add up like real light, then a 1 - e^-x curve brings them into the screen: where all three meet the sum goes toward white without burning out.

Three different springs

The three lights chase the same point, each from its corner of a slowly turning triangle, on a spring integrated by hand in two steps per frame: stiffness 150 times 1.36, 1 and 0.7. The difference (LAG) is what splits the white into fringes when the point runs.

Grid, grain and ring

The 44 px grid lights up with the brightness at that point, the grain changes 24 times a second and weighs more where there is light. On a press, a white bloom on the button and a thin ring, coloured by angle, running to the edges in 1.6 s.

The heading and the button listen

From the average distance of the lights from their middle come three numbers: the heading's weight (500 to 640), the button's three-colour rim when they split over it and its white halo when they merge, and how much the three names show.

Values to change

NameFileDefaultWhat it changes
SPREADscript.js0.27How far apart the three lights rest, as a share of the page's shorter side.
SIZEscript.js0.2How big each light is.
EXPOSUREscript.js0.95How bright the lights are.
STIFFNESSscript.js150The spring pulling the lights to the pointer: higher is quicker.
DAMPINGscript.js15Lower lets the lights pass the mark and come back.
LAGscript.js0.4How different the three springs are: 0 = they move together, no coloured fringes.
GRIDscript.js1How much the thin grid catches the light (0 = no grid).
GRAINscript.js0.035How strong the grain is.
SPEEDscript.js12 = the walk on its own twice as fast, 0.5 = half.
LOOPscript.jstrueRepeats the lights' walk.

Try them in the Playground

When to use it

As the background of the first screen of an AI app, a service that brings several models or sources together, a SaaS startup, a dark landing page that wants colour without noise. The light colours are --light-a, --light-b and --light-c in the CSS.

On phones

The same animations at adapted sizes: lights and distances are measured on the shorter side, the heading on width and height, the model names stay inside the edges and the note at the bottom goes on short screens. With a finger the lights go where you touch.

With reduced motion

The lights stay still in their triangle around the heading and fade in; pressing the button there is a soft glow and the label and checkmark change with a fade.

Pitfalls

  • Adding the colours and clipping at 1 burns the middle into flat white and kills the tints: the 1 - e^-x curve keeps the colours and takes the meeting point toward white gently.
  • With three equal springs the lights move as a block and the white never splits: the fringes come only from the difference between the springs.
  • The heading's weight changes every frame: it is written only when it moves by at least two units, or the text is redrawn for nothing.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 1 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