Skip to content
animorio
IT
Back to the library

Exploded espresso machine

3D, Scroll, WebGLGSAP, WebGL, CanvasAdvancedCompressed weight: Demo 14 KBGSAP + ScrollTrigger 45 KBLenis 5.3 KBThree.js + RoomEnvironment 176 KBFreeDownload the zip

Scroll inside the preview

The product page of a made-up espresso machine maker, in Three.js: a brushed steel machine that comes apart towards you as you scroll, cup, grille, the walnut-handled portafilter that unlocks with a quarter turn, drip tray and the water tank lifting off the back, with thin callouts on every part; it turns to its side, closes up again, the gauge climbs to nine bar and two streams of coffee fill the cup.

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>
<!--
  "Exploded espresso machine" 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>Brevello · Linea One</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/fraunces@5.3.0/full.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>
  <!-- the product page of a made-up espresso machine maker, Brevello. The stage sticks while you scroll: the machine,
       drawn in 3D, comes apart towards you (the cup, the grille, the portafilter that unlocks with a twist, the drip
       tray, the water tank lifting off the back), turns to show its side, then closes, locks the portafilter, the
       gauge climbs to nine bar and two streams of coffee fill the cup -->
  <main>
    <section class="vista" data-vista>
      <div class="palco" data-palco>
        <canvas class="tela" data-tela role="img" aria-label="An espresso machine coming apart in an exploded view as you scroll"></canvas>
        <svg class="fili" data-fili aria-hidden="true"></svg>
        <div class="etichette" data-etichette aria-hidden="true"></div>

        <header class="testata">
          <p class="marchio" data-marchio>Brevello</p>
          <p class="sotto">Espresso machines</p>
        </header>

        <div class="racconto" data-racconto>
          <div class="capitolo" data-capitolo>
            <p class="occhiello">Linea One · Single group</p>
            <h1 class="titolo">Espresso, <em>taken apart.</em></h1>
          </div>
          <div class="capitolo" data-capitolo>
            <p class="occhiello">Seven parts</p>
            <h2 class="titolo">Every piece, <em>pulled forward.</em></h2>
          </div>
          <div class="capitolo" data-capitolo>
            <p class="occhiello">From the side</p>
            <h2 class="titolo">A 1.8 litre tank, <em>at the back.</em></h2>
          </div>
          <div class="capitolo" data-capitolo>
            <p class="occhiello">Linea One · 58 mm</p>
            <h2 class="titolo">Locked in, <em>two streams.</em></h2>
            <p class="ordina"><span class="prezzo">€1,190</span><a class="pillola" href="#" data-pillola><span>Add to cart</span></a></p>
          </div>
        </div>

        <p class="nota" data-nota>Scroll to take it apart</p>
      </div>
    </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="https://cdn.jsdelivr.net/npm/lenis@1.3.26/dist/lenis.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.

30 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 “Exploded espresso machine” 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 warm grey background there is an espresso machine drawn in 3D, seen three quarters on: the brushed steel body with rounded edges, the round pressure gauge on the front, the chrome group head, the portafilter locked underneath with its walnut handle, the drip tray with its grille, the white cup sitting on top, and at the back the clear water tank, half full. Scrolling down, the machine comes apart towards you, one piece after another: the cup slides forward and aside, the grille lifts, the portafilter first unlocks with a quarter turn and then comes out forwards, the drip tray slides out, and the water tank lifts off the back with the water staying level. Beside every part there is a small copper cross and a thin line leading to the callout. Then the machine turns to its side to show the tank, comes back three quarters on, and the parts return to their places after a small swing back: the portafilter locks in again with its quarter turn, the machine jolts, the gauge needle climbs to nine bar with a slight tremble, and two streams of coffee run from the two spouts and fill the cup, with the crema spreading and a wisp of steam. The pointer or a finger tilts the machine on a spring. At the bottom, the price and the button to add it to the cart.

How it works

A machine made of simple shapes

Everything is Three.js geometry built in code: the body, the tank, the drip tray and the grille are boxes with rounded edges (RoundedBoxGeometry), the cup and the portafilter are turned profiles (LatheGeometry), the handle is a walnut cylinder. The brushed steel, the gauge dial and the badge are textures painted on a canvas, and the light comes from an environment (RoomEnvironment) that gives the metal its reflections.

Towards you

ScrollTrigger with scrub drives a number from 0 to 1. Opening happens between 0.08 and 0.42, and each part has its own start and its own direction: almost all of them come forward, towards the camera, the tank goes up and back. The portafilter has its own path: in the first third it turns a quarter to unlock, only then does it come out. Every frame the camera measures the box holding all the parts and pulls back just enough to keep them on screen.

Water that stays level

The water in the tank is a box cut by a clipping plane (clippingPlanes) that lives in the world: when the machine turns or tilts, the plane stays horizontal and the water stays level.

The final gesture

On closing, a back.in curve pushes the parts a little further out before bringing them home. Once the portafilter is in, a GSAP timeline starts: a jolt, the needle climbing to nine bar on an elastic, the two coffee streams (two cylinders stretched between the spouts and the surface) and a disc of coffee rising and widening inside the cup, then the steam. Scrolling back up empties the cup.

The callouts

Each callout has a point on its part, taken every frame into the world (localToWorld) and onto the screen (project): there a small cross and a line leading to the words. The words go right or left depending on the side of the machine, push each other so they never overlap, and stay inside the screen.

Values to change

NameFileDefaultWhat it changes
BRANDscript.js'Brevello'The brand, on the machine’s badge and at the top of the page.
SPREADscript.js1How far the parts move out when the machine comes apart.
BARscript.js9The pressure the gauge needle climbs to.
POURscript.js1How long the two streams of coffee run.
TILTscript.js1How much the pointer or a finger tilts the machine.
TANKscript.js0.62How full the water tank is.

Try them in the Playground

When to use it

For the product page or the hero of an espresso machine maker, an appliance brand, a coffee roaster or a kitchen shop, and in general to present an object made of parts that come off: the exploded view on scroll tells the materials and how it is used before the price.

On phones

The same animation with adapted sizes: the words sit at the top, the machine below, and the view pulls back as far as needed so that even when apart it all fits in the box; the callouts sit closer to the parts; a finger tilts it by dragging, and the page keeps scrolling.

With reduced motion

No long scroll, no jolt and no pouring coffee: the machine is already apart and still, with the callouts.

Pitfalls

  • The water’s clipping plane only works with renderer.localClippingEnabled on, and must be recomputed every frame after updateMatrixWorld, otherwise the water lags one frame behind the tank.
  • The tank and the water are transparent and do not write to the depth buffer: the order they are drawn in is set by renderOrder (the water first, then the plastic), otherwise the plastic covers the water at random.
  • The brewing is a timed timeline, not tied to the scroll: it must start only once when the machine closes and be emptied when it reopens, otherwise scrolling up and down leaves the cup full or fills it twice.

Libraries

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

Compressed with gzip, the three demo files weigh 14 KB; the libraries: GSAP + ScrollTrigger 45 KB, Lenis 5.3 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