Skip to content
animorio
IT
Back to the library

Spinning smartwatch

3D, WebGL, HoverWebGL, Canvas, GSAPAdvancedCompressed weight: Demo 14 KBGSAP 28 KBThree.js + RoomEnvironment 176 KBFreeDownload the zip

A made-up brand’s smartwatch in 3D: an aluminium case with soft sides, a curved glass that catches a band of light, a knurled crown with an orange ring. You spin it with a finger and it keeps going by inertia until a spring brings it back to face you; a tap on the screen or a turn of the crown changes the watch face (analogue, activity rings, time and weather) and the swatches below change the band with a small snap. Morphin style with Libraries.dev light.

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>
<!--
  "Spinning smartwatch" 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>Kairn One</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/index.css">
  <link rel="stylesheet" href="style.css">
  <script type="importmap">
    { "imports": {
      "three": "https://cdn.jsdelivr.net/npm/three@0.178.0/build/three.module.min.js",
      "three/addons/": "https://cdn.jsdelivr.net/npm/three@0.178.0/examples/jsm/"
    } }
  </script>
</head>
<body>
  <!-- a made-up brand, Kairn, and its watch in 3D: drag spins it with inertia and a spring brings it back to face you,
       a tap on the screen or a turn of the crown changes the watch face, the swatches change the band -->
  <main class="palco" data-palco>
    <header class="testa" data-testa>
      <span class="etichetta">Kairn One</span>
      <span class="sotto"><span class="rullo" data-quadrante>Essential</span></span>
    </header>

    <div class="scena" data-scena>
      <canvas class="tela" data-tela role="img" aria-label="A smartwatch turning in 3D, with three watch faces and four band colours"></canvas>
      <!-- if WebGL is missing: a flat watch -->
      <div class="ripiego" data-ripiego aria-hidden="true"><span>10:09</span></div>
    </div>

    <div class="piede" data-piede>
      <div class="cinturini" role="radiogroup" aria-label="Band colour">
        <button class="campione attivo" type="button" role="radio" aria-checked="true" data-cinturino="0" aria-label="Fog band"><span style="--c: var(--fog)"></span></button>
        <button class="campione" type="button" role="radio" aria-checked="false" data-cinturino="1" aria-label="Clay band"><span style="--c: var(--clay)"></span></button>
        <button class="campione" type="button" role="radio" aria-checked="false" data-cinturino="2" aria-label="Moss band"><span style="--c: var(--moss)"></span></button>
        <button class="campione" type="button" role="radio" aria-checked="false" data-cinturino="3" aria-label="Ink band"><span style="--c: var(--ink)"></span></button>
      </div>
      <p class="nome-cinturino"><span class="rullo" data-nome-cinturino>Fog sport band</span></p>
    </div>

    <!-- the fake pointer of the autopilot -->
    <svg class="puntatore" data-puntatore viewBox="0 0 24 24" aria-hidden="true">
      <path d="M5 3l14 8-6.2 1.6L10 19z"/>
    </svg>
  </main>

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

22 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 “Spinning smartwatch” 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 background with a soft studio light in the middle stands the Kairn One, a made-up brand’s watch: an aluminium case with rounded sides, a curved glass in front with a band of light that slides as it turns, a knurled crown with an orange ring, the side button, the speaker slot and, at the back, the round sensor with its lens. Above and below come the two halves of the sport band, with their holes and the keeper. On the screen is a real, running watch face: the first is a plain analogue one (ticks, KAIRN, the date window, the hands and the orange seconds hand), the second has the three activity rings filling up (move, steps, stand) with their numbers, the third the day, a big time, the sun behind a cloud, the temperature and the coming hours. You spin it with a finger: thrown, it keeps going by inertia, slows down and a spring brings it back to face you. A tap on the screen or on the crown (which really turns) changes the face with a sliding crossfade, and the name above rolls. The four swatches below change the band colour with a small elastic snap and the band name rolls. The autopilot shows it all with a fake pointer.

How it works

Case and glass

The case is an ExtrudeGeometry of a rounded rectangle with a wide bevel, in an aluminium with metalness 1 and RoomEnvironment’s room as the reflection. The glass is the same shape, thinner, in a transparent MeshPhysicalMaterial with clearcoat; on top sits an additive blended plane with a band of light drawn on a canvas, which slides with the texture offset as the watch turns.

Watch faces on a canvas

The screen is a ShapeGeometry with its UVs remapped from 0 to 1 and a 720 pixel CanvasTexture, redrawn every frame while it changes and four times a second at rest. Each face is a function that takes the time and an appearance from 0 to 1: the change draws both, one leaving and one arriving, with a crossfade and a vertical slide.

Inertia, spring and crown

Dragging adds degrees to the spin and keeps an average of the speed; on release the speed, capped at MAX_SPIN, decays with exp(-FRICTION·dt) and below 160 degrees per second a spring of stiffness SPRING takes it to the nearest multiple of 360. A click without movement casts a ray: if it hits the crown it turns it, if it hits the screen or the glass it changes the face; the wheel and the arrow keys turn the crown too.

A band that snaps

Each half of the band is three RoundedBoxGeometry pieces in a row bending backwards, with a shared rubbery material: choosing a swatch moves the colour toward the new one and squeezes the band by 3.5 percent, which comes back with an elastic return.

Values to change

NameFileDefaultWhat it changes
TILTscript.js12How many degrees the watch leans toward the pointer.
FRICTIONscript.js1.8How fast a thrown spin slows down (higher = sooner).
MAX_SPINscript.js900The fastest spin a throw can give, in degrees per second.
SPRINGscript.js60How firm the spring that brings it back to face you is.
GLAREscript.js1How bright the band of light on the glass is.
IDLE_SWAYscript.js1How much the watch sways by itself at rest (0 = still).
AUTO_PILOTscript.js11 shows the gestures with a fake pointer when nobody touches the watch, 0 turns it off.

Try them in the Playground

When to use it

For the page of a smartwatch, a fitness tracker or another wrist piece: in an electronics shop or a product launch page, where you want people to turn it in their hand, try the colours and see what the screen shows.

On phones

The same watch, smaller: it spins as you drag with a finger, a tap on the screen or the crown changes the face, and the swatches stay below within thumb reach.

With reduced motion

The watch stays still, slightly tilted, without sway or spring: dragging brings it straight back to face you, and faces and bands change without sliding or snapping.

Pitfalls

  • The screen is a ShapeGeometry: its UVs are the shape’s coordinates and must be remapped from 0 to 1, otherwise the face repeats or runs off the glass.
  • The watch face CanvasTexture must be drawn without tone mapping (toneMapped: false), otherwise the screen colours turn grey and dull.
  • Click and drag start from the same pointerdown: decide on release, by how far the finger moved, and only then cast the ray to know whether it hit the crown or the screen.
  • In a browser without a GPU (SwiftShader) the canvas stays under half a million pixels, otherwise each frame takes more than a second.

Libraries

Three.js 0.178.0, GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 14 KB; the libraries: GSAP 28 KB, Three.js + RoomEnvironment 176 KB.

Testing

Tested on 28 October 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