Skip to content
animorio
IT
Back to the library

Assistant orb

WebGL, HoverWebGL, GSAPAdvancedCompressed weight: Demo 12 KBGSAP 28 KBFreeDownload the zip

A WebGL animation on a real panel: Orla, the assistant of a calendar app, is a coral and lilac orb of light with two eyes. The eyes are its face and change with its state: while it listens they follow the pointer, while it thinks they narrow and look up as a light turns inside the orb, while it replies they read along and the orb pulses with every letter, when it is done they become two happy half moons. Now and then it blinks, sometimes twice.

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>
<!--
  "Assistant orb" 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 AI assistant orb whose eyes change expression</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>
  <main class="stage">
    <!-- the assistant panel of a calendar app. Orla, the assistant, is a sphere of light drawn by a WebGL shader
         (gradient, inner light and grain); its two eyes are SVG shapes that change with the state: listening (they
         follow the pointer), thinking (the light turns inside, the eyes narrow), replying (the orb pulses with every
         letter), happy (half moon eyes). Now and then it blinks -->
    <section class="panel" data-panel aria-label="Orla, the assistant">
      <header class="panel__head">
        <div class="who">
          <span class="who__name">Orla</span>
          <span class="who__sub">Assistant in Tessel</span>
        </div>
        <span class="state" data-state-pill>
          <span class="state__track" data-state-track>
            <span class="state__word" data-word="listen">Listening</span>
            <span class="state__word" data-word="think">Thinking</span>
            <span class="state__word" data-word="reply">Replying</span>
            <span class="state__word" data-word="happy">Done</span>
          </span>
        </span>
      </header>

      <div class="orb" data-orb>
        <div class="orb__body" data-orb-body>
          <canvas class="orb__canvas" data-canvas aria-hidden="true"></canvas>
          <span class="orb__fallback" aria-hidden="true"></span>
          <svg class="orb__eyes" data-eyes viewBox="-100 -100 200 200" aria-hidden="true">
            <path class="eye" data-eye="l" d=""/>
            <path class="eye" data-eye="r" d=""/>
          </svg>
        </div>
        <span class="orb__shadow" data-shadow aria-hidden="true"></span>
      </div>

      <div class="thread" data-thread aria-live="polite">
        <p class="ask"><span class="ask__text" data-ask></span></p>
        <p class="answer"><span data-answer></span><span class="caret" data-caret aria-hidden="true"></span></p>
        <span class="chip" data-chip>
          <svg class="chip__icon" viewBox="0 0 16 16" aria-hidden="true"><path data-chip-check pathLength="1" d="M3.6 8.4l2.9 2.9 5.9-6.4"/></svg>
          <span data-chip-text>Calendar updated</span>
        </span>
      </div>

      <div class="bar">
        <span class="bar__hint" data-hint>Ask Orla anything</span>
        <svg class="wave" data-wave viewBox="0 0 76 20" aria-hidden="true"></svg>
        <button class="mic" type="button" data-mic aria-label="Talk to Orla">
          <span class="mic__face" data-mic-face>
            <svg viewBox="0 0 20 20" aria-hidden="true">
              <rect x="7.2" y="2.6" width="5.6" height="9.4" rx="2.8"/>
              <path d="M4.6 9.4a5.4 5.4 0 0 0 10.8 0M10 14.8v2.6"/>
            </svg>
          </span>
        </button>
      </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 “Assistant orb” 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 a near black page with two soft lights, coral at the top and lilac at the bottom, and a little grain, a dark panel rises with very round corners and an edge that catches the light at the top: on the left ‘Orla’ and below it ‘Assistant in Tessel’, on the right a pill with the state. In the middle the orb: a ball of light where coral and lilac flow into each other, with a warm core, a rim lit like glass, a highlight, grain and a halo that falls on the panel, with a soft shadow beneath. On the orb, two light eyes with a faint glow. The orb breathes slowly. It starts listening: the pill says ‘Listening’, at the bottom the voice wave next to the mic moves and a faint ring opens around the mic; the question ‘Move my 3 pm to tomorrow’ writes itself in a bubble on the right and the eyes look down at it, then back at whoever is watching. Then it thinks: ‘Thinking’ shimmers, the eyes narrow, one more than the other, and look up from one side to the other, while inside the orb two arcs of light turn and the liquid twists towards the middle. Then it replies: the eyes go down and move from left to right as if reading, the answer writes itself letter by letter with a coral caret and with every letter the orb swells a breath and brightens, while the eyes hop by a pixel. At the end ‘Done’: the eyes become two happy half moons, the orb squashes and bounces like jelly and below it the mint pill ‘Calendar updated’ pops with a check that draws itself. Then everything fades and the next question arrives: the ad spend, then a reminder. Now and then it blinks, sometimes twice in a row. With a pointer the eyes really follow it on a spring and the orb leans a little towards it; hovering it the eyes open wide, tapping it makes it laugh with half moons and a bounce, the mic jumps to the next question.

How it works

An orb made of light in one shader

One shader on a canvas 1.8 times the orb, so the halo has room. Inside the circle the depth is z = √(1 − r²): with it the colour darkens towards the edge, the highlight is worked out as on a real sphere and the rim lights up with (1 − z) to the power of 2.6, like glass. The colour is a field of interwoven sines flowing between coral and lilac, plus a warm core shifted towards the gaze and a grain that changes every frame.

The arcs that turn while it thinks

While it thinks a THINK value rises to 1: the colour field turns and twists more towards the middle, and two arcs of light, a wide one and an inner one, run round with a gaussian on the angle and one on the radius. The spin speeds up with THINK_SPIN and slows down when the answer starts.

One eye, four expressions

Each eye is one closed shape: two cubic curves between two corners, with their control points above and below the corners. Open it is a pill; narrowed the top curve comes down; happy the bottom curve rises past the middle and it becomes a half moon; closed the two curves meet in a line. The path is rewritten every frame from the numbers of the expressions, so it goes from one state to the next with no jumps.

The gaze on a spring, with perspective

Where the eyes look is decided by the pointer when there is one, by the conversation otherwise (the question bubble, up while thinking, the line while replying); a spring carries them there passing the mark by a hair. Looking sideways the far eye narrows a little and the two come closer, as on a real ball, and looking down the lid lowers.

The pulse of the letters and the blinks

Each written letter adds energy (less for spaces and punctuation) that fades with e to the −8t: the orb swells, the core and the halo light up and the eyes hop by a pixel. The blinks follow a random with a fixed seed, every BLINK_EVERY seconds on average and sometimes twice in a row: the same instant always shows the same face.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#ff8a5cThe warm light of the orb.
ACCENT_2script.js#a98bffThe cool light of the orb.
EYE_SIZEscript.js1How big the eyes are.
BLINK_EVERYscript.js3.4On average, the seconds between two blinks.
PULSEscript.js1How much the orb pulses with each letter of the reply.
THINK_SPINscript.js1How fast the light turns inside the orb while it thinks.
GRAINscript.js1The grain inside the orb.
TYPE_SPEEDscript.js34The letters written per second.
SPEEDscript.js12 = the whole conversation twice as fast, 0.5 = half.
LOOPscript.jstrueGoes through the requests again and again.

Try them in the Playground

When to use it

For the panel or the widget of the assistant in an AI app, for a voice assistant, for the support chat of a SaaS or a shop, for the onboarding of a product that wants a friendly face instead of an icon: when the user has to see at a glance whether the assistant is listening, thinking or replying.

On phones

The same animation with adapted sizes: the panel is as wide as the box, the orb is sized on the screen's width and height and the canvas redraws at the new size; the eyes follow the finger when it touches the screen, and a tap on the orb makes it laugh.

With reduced motion

The orb does not breathe, pulse or bounce, the light inside stays still and the eyes look straight ahead without blinking: they only change shape with the state, the questions and answers appear whole with a fade and the pill changes word without rolling.

Pitfalls

  • The script writes the orb's transform every frame (breath, pulse, bounce and the little lean towards the gaze together): GSAP only tweens numbers in an object, never the orb itself, otherwise one tween wipes out the other.
  • A shape made of cubic curves can morph from pill to half moon only if it always has the same commands in the same order: that is why the closed and the happy eye are the same two curves with their points moved.
  • Blinks with Math.random would land at random in the poster too: a seeded random and the demo's own clock make the same instant always show the same face.
  • The canvas is bigger than the orb because the halo needs room, but it has to be redrawn at every change of the orb's size (ResizeObserver), which on a phone depends on the height too.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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