Skip to content
animorio
IT
Back to the library

The ring of spheres

Scroll, TransitionsGSAP, CSS onlyMediumCompressed weight: Demo 4.5 KBGSAP + ScrollTrigger 45 KBFreeDownload the zip

Scroll inside the preview

Three glowing spheres scattered around a title: as you scroll the title blurs and the spheres swing together until they close into a ring, their names always upright; then the ring keeps turning by itself.

Rebuilt from scratch studying marimba.design by Myranda Wicks: 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 ring of spheres" 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>L’anello delle sfere</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/standard.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource/instrument-serif@5.3.0/index.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main>
    <section class="scena" data-scena>
      <p class="nota" data-nota>Scorri: il titolo si sfoca e le tre sfere girano fino a chiudersi in un anello.</p>
      <h1 class="titolo" data-titolo>Disegno cose che si guardano come si guarda il cielo.</h1>

      <!-- l’anello e il suo centro: compaiono quando le sfere ci arrivano -->
      <div class="anello" data-anello aria-hidden="true">
        <span class="anello__centro">Come lavoro</span>
      </div>

      <div class="sfera sfera--albicocca" data-sfera>
        <span class="sfera__corpo"><span class="sfera__lucido" data-lucido></span></span>
        <span class="sfera__nome" data-nome>Disegno</span>
      </div>
      <div class="sfera sfera--glicine" data-sfera>
        <span class="sfera__corpo"><span class="sfera__lucido" data-lucido></span></span>
        <span class="sfera__nome" data-nome>Codice</span>
      </div>
      <div class="sfera sfera--menta" data-sfera>
        <span class="sfera__corpo"><span class="sfera__lucido" data-lucido></span></span>
        <span class="sfera__nome" data-nome>Movimento</span>
      </div>
    </section>

    <section class="coda">
      <h2 class="coda__titolo">Tre cose, sempre insieme.</h2>
      <p class="coda__testo">Ognuna tira le altre: un disegno che non si muove è a metà, un movimento senza codice resta un’idea.</p>
    </section>
  </main>

  <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/ScrollTrigger.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 ring of spheres” 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 night background three glowing spheres, apricot, wisteria and mint, are scattered around a title in a thin serif. As you scroll, the scene holds still: the title blurs, drops and fades, and the three spheres move together along an arc, each towards its place on a ring, shrinking, while the sheen inside each sphere turns on itself. When they arrive their names appear (Disegno, Codice, Movimento: drawing, code, motion), always upright, along with a thin ring with a word at its centre. After the scroll the ring keeps turning slowly by itself; scrolling back up, it rewinds.

How it works

Polar coordinates

Each sphere starts from a point around the title and the script turns it into an angle and a radius from the centre. The place on the ring is an angle every 120 degrees. On every update the angle is start + delta × e(t) + 2π × 0.6 × t, where delta is the shortest way to the place and e(t) is power2.inOut: the spheres converge while the group turns six tenths of a revolution.

A single number

The timeline, pinned and tied to scrolling for 2.2 screens, animates a plain object, { t: 0 → 1 }, and on every update places the three spheres with gsap.set: x and y from cosine and sine, scale from 1 to 0.6. Meanwhile the title goes to blur(16px), opacity 0 and y 90 in the first fifth; the names appear at 0.72, the ring at 0.8.

Names always upright

The spheres do not rotate: they move. Only the sheen inside turns, a blurred conic-gradient with mix-blend-mode: soft-light, rotating 300, 270 and 140 degrees during the scene. That way the names stay upright with no counter-rotation.

The orbit afterwards

When the scene reaches 97%, an endless tween adds 2π to the angle in 50 seconds. Going back below 90% the tween stops, the extra angle is brought back within half a turn and returns to zero in 0.4 seconds: the way back is always short.

Values to change

NameFileDefaultWhat it changes
CORSAscript.js2.2How many screens of scrolling the scene lasts.
GIROscript.js0.6How many turns the group makes while the spheres go to the ring.
ORBITAscript.js50Seconds for a full turn of the ring after the scene.
--c1, --c2, --c3style.cssper sferaThe three colours of each sphere: the highlight, the body and the shaded edge.

Try them in the Playground

When to use it

To introduce three things that belong together, a method, three services, three values, at the top of a page: the title gives way to an image you remember.

On phones

The spheres start higher and lower, suited to a vertical screen, and the ring is larger relative to the width. The rest is the same: three elements, which a phone moves easily.

With reduced motion

No pinned scene: the spheres already sit on the ring with their names, the title sits above, and nothing turns.

Pitfalls

  • Interpolating x and y in a straight line makes the spheres pass over each other: you need angle and radius, and for the angle the shortest way, or a sphere goes almost a full turn.
  • The title is centred with translate(−50%, −50%): before animating y, hand it to GSAP as xPercent and yPercent, or its inline transform wipes the centring.
  • An endless tween with +=2π and repeat −1 always restarts from the same angle: it is invisible only because 2π is a full turn.
  • The turning sheen must sit inside a container with overflow: hidden and a round border, or the blurred conic-gradient spills out of the sphere.

Libraries

GSAP 3.15.0, Instrument Serif 5.3.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 4.5 KB; the libraries: GSAP + ScrollTrigger 45 KB.

Testing

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