Skip to content
animorio
IT
Back to the library

Exploded perfume

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

Scroll inside the preview

The product page of a made-up perfume house, in Three.js: a slim bottle of clear glass with amber liquid that stays level, which comes apart upwards piece by piece as you scroll, cap, actuator, collar and pump, with the dip tube sliding out of the liquid and dripping, thin callouts on every part, turns to show its glass in profile and finally closes, gives one spray and puts its cap back on.

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 perfume" 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>Orlaine · Salt Cedar</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 perfume house, Orlaine. The stage sticks while you scroll: a bottle of eau de
       parfum, drawn in 3D, comes apart upwards (cap, actuator, collar, the crimp pump pulling its dip tube out of the
       liquid, which drips back), turns to show its thin glass in profile, then closes and gives one spray -->
  <main>
    <section class="vista" data-vista>
      <div class="palco" data-palco>
        <canvas class="tela" data-tela role="img" aria-label="A perfume bottle 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>Orlaine</p>
          <p class="sotto">Maison de parfum</p>
        </header>

        <div class="racconto" data-racconto>
          <div class="capitolo" data-capitolo>
            <p class="occhiello">Salt Cedar · Eau de parfum</p>
            <h1 class="titolo">A scent, <em>taken apart.</em></h1>
          </div>
          <div class="capitolo" data-capitolo>
            <p class="occhiello">Six parts</p>
            <h2 class="titolo">Lifted, <em>piece by piece.</em></h2>
          </div>
          <div class="capitolo" data-capitolo>
            <p class="occhiello">In profile</p>
            <h2 class="titolo">Fourteen millimetres of <em>glass.</em></h2>
          </div>
          <div class="capitolo" data-capitolo>
            <p class="occhiello">Salt Cedar · 50 ml</p>
            <h2 class="titolo">One spray, <em>then the cap.</em></h2>
            <p class="ordina"><span class="prezzo">€148</span><a class="pillola" href="#" data-pillola><span>Add to bag</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.

31 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 perfume” 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 paper-white background there is a perfume bottle drawn in 3D, seen three quarters on: a slim flacon of clear glass with a thick base, the amber liquid inside, a cotton paper label with the name of the house and of the scent, the neck with its lip, the collar and the cap in brushed gold metal with the initial engraved on top. On opening it rises from below and settles on a spring. Scrolling down, the bottle comes apart upwards one piece after another, the way you would open it: first the cap, then the polished actuator with its tiny nozzle, the collar, and finally the pump, with the steel spring inside its clear body and the crimp ring, pulling out of the liquid the dip tube that reaches all the way to the bottom; as it comes out, amber drops fall from the tip and leave a ring on the liquid, then the pump moves aside and stands next to the bottle. Beside every part there is a small amber cross and a thin line drawing itself out to the callout. Then the bottle turns to its profile to show how thin the glass is, while the pump circles round it to stay beside it, comes back three quarters on, and the parts, after lifting a little further, drop into place: the pump slides back into the neck, then the collar and the actuator, the bottle jolts, the actuator presses down once and a sand-coloured puff of mist comes out; last of all the cap comes down, with a small settle. The liquid always stays level and sloshes when the bottle moves; the pointer or a finger tilts it on a spring, and when nobody touches it, it sways slowly on its own. At the bottom, the price and the button to add it to the bag.

How it works

A bottle made of simple shapes

Everything is Three.js geometry built in code: the flacon, the liquid, the thick base and the cap are boxes with rounded edges (RoundedBoxGeometry), the neck, the collar, the actuator, the pump and the dip tube are cylinders, and the spring is a tube following a helix (TubeGeometry on a hand-written curve).

Liquid that stays level

The liquid is a box as big as the inside of the glass, cut by a clipping plane (clippingPlanes) that lives in the world rather than in the bottle: when the bottle tilts the plane stays horizontal and the liquid stays level. The plane tilts slightly on a spring, pushed by how fast the bottle turns: that is the slosh.

One piece after another

ScrollTrigger with scrub drives a number from 0 to 1. Opening happens between 0.08 and 0.42, and within that each part has its own start: the cap at once, the actuator and the collar a little later, the pump last. Each part lifts by its own distance; the pump has its own path, first up out of the liquid, then sideways, then down beside the bottle, and when the bottle turns it circles round it the other way to stay on the right. The camera pulls back just enough for everything to stay on screen.

Drops, rings and the spray

Once the tip of the dip tube is above the liquid, every three tenths of a second a drop falls under gravity and, when it touches the liquid, lights a ring that widens and fades. On closing, a back.in curve lifts the parts a little more before dropping them, the cap last; once the pump and the actuator are home, the actuator presses down and 150 soft points come out of the nozzle, slowing down, spreading and fading, and only then does the cap arrive.

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 that grows out to the words. The words go right or left depending on which side of the bottle’s axis the point is, push each other so they never overlap, and stay inside the screen.

Values to change

NameFileDefaultWhat it changes
BRANDscript.js'Orlaine'The perfume house, on the label, the cap and at the top of the page.
SCENTscript.js'Salt Cedar'The name of the scent on the label.
SPREADscript.js1How far the parts lift when the bottle comes apart.
FILLscript.js0.74How full the bottle is.
TILTscript.js1How much the pointer or a finger tilts the bottle.
SLOSHscript.js1How much the liquid sloshes when the bottle moves.
MISTscript.js1How big the spray is when the bottle closes.

Try them in the Playground

When to use it

For the product page or the hero of a perfume house, a cosmetics brand, a beauty or fashion shop, and in general to present a small precious object made of parts: the exploded view on scroll tells the materials and the care before the price.

On phones

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

With reduced motion

No long scroll, no drops and no spray: the bottle is already apart and still, with the callouts.

Pitfalls

  • The liquid’s clipping plane only works with renderer.localClippingEnabled on, and must be recomputed every frame after updateMatrixWorld, otherwise the liquid lags one frame behind the glass.
  • Glass, liquid and plastic are transparent and do not write to the depth buffer: the order they are drawn in is set by renderOrder (the liquid first, then the inner glass, then the outer glass, then the label), otherwise the glass covers the liquid at random.
  • The textures with lettering are painted again once the fonts have arrived; with the same random seed, otherwise the paper grain changes.

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