
The glass word
WebGL, 3D, Scroll, Text
Scroll inside the preview
The product page of a made-up camera maker, in Three.js: a rangefinder camera, brushed chrome, black leatherette, a knurled speed dial and a 35 mm lens, that comes apart layer by layer along the axis of its lens as you scroll, with thin callouts on every part, turns to show the row of parts from the side and finally snaps back together with a click.
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 camera" 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>Vantor R2 · Rangefinder</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">
<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 camera maker, Vantor. The stage sticks while you scroll: a rangefinder camera,
drawn in 3D, comes apart along the axis of its lens (front glass, focus ring, barrel, aperture blades, mount,
body, shutter, sensor, back door; the speed dial and the shutter button lift off the top plate), turns to show
the stack from the side, then snaps back together with a click -->
<main>
<section class="vista" data-vista>
<div class="palco" data-palco>
<canvas class="tela" data-tela role="img" aria-label="A rangefinder camera 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">
<svg viewBox="0 0 32 32" aria-hidden="true"><rect x="4" y="9" width="24" height="16" rx="3"/><circle cx="16" cy="17" r="4.6"/><path d="M8 9V7h5v2"/></svg>
<span data-marchio>Vantor</span>
</p>
<p class="sotto">Optical works</p>
</header>
<div class="racconto" data-racconto>
<div class="capitolo" data-capitolo>
<p class="occhiello">R2 Rangefinder</p>
<h1 class="titolo">A camera you can <em>see through.</em></h1>
</div>
<div class="capitolo" data-capitolo>
<p class="occhiello">Nine layers</p>
<h2 class="titolo">Every part, <em>apart.</em></h2>
</div>
<div class="capitolo" data-capitolo>
<p class="occhiello">From the side</p>
<h2 class="titolo">Seven elements, <em>one</em> straight line.</h2>
</div>
<div class="capitolo" data-capitolo>
<p class="occhiello">Vantor R2 · 35 mm f/2</p>
<h2 class="titolo">Back together with a <em>click.</em></h2>
<p class="ordina"><span class="prezzo">€3,290</span><a class="pillola" href="#" data-pillola><span>Reserve yours</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>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.
32 values to change
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 camera” from Animorio and fit it into my siteEverything is Three.js geometry built in code: the body, the top plate and the back door are boxes with rounded edges (RoundedBoxGeometry), the lens is a row of cylinders and rings along the z axis, the glass elements are caps of very wide spheres, and the iris blades are an extruded 2D shape (ExtrudeGeometry) repeated ten times round the axis.
The light comes from a fake room (RoomEnvironment): that is what makes the chrome and the glass reflect. The leatherette, the brushed metal, the knurling, the numbers on the speed dial and the aperture ring, the engraved brand and the sensor are textures painted in a 2D canvas, painted again once the variable font arrives.
ScrollTrigger with scrub drives a number from 0 to 1. Three curves come from it: how far it opens (between 0.1 and 0.44), how far it turns to the side (between 0.5 and 0.7, and back) and how far it closes again (between 0.8 and 0.93). Every part sits in a group with its own direction: its position is where it starts plus the direction times the opening, plus a small float on its own sine.
Closing uses a back.in curve written by hand: the parts first move a little further out, then rush home. When they arrive, a number goes from 1 to 0 in nine tenths of a second: it shrinks the body a hair, shakes it, lights a point light in front and snaps the shutter blades.
Each callout has a point on its part. Every frame the point is taken into the world (localToWorld) and onto the screen (project): there a small cross is drawn, and a line that grows from the part out to the words. The words on each side push each other so they never overlap, and always stay inside the screen.
| Name | File | Default | What it changes |
|---|---|---|---|
BRAND | script.js | 'Vantor' | The brand on the top plate, on the lens and at the top of the page. |
SPREAD | script.js | 1 | How far the parts move apart when the camera comes apart. |
TILT | script.js | 1 | How much the pointer or a finger tilts the camera. |
TURN | script.js | 1 | How far the camera turns to show the row of parts from the side. |
FLOAT | script.js | 1 | How much each part floats on its own while the camera is apart. |
SNAP | script.js | 1 | How strong the click is when the parts snap back together. |
For the product page or the hero of a camera maker, a photography or optics shop, and in general to present a product made of parts (headphones, a watch, a pen, an appliance): the exploded view on scroll tells how it is made and how much care went into it.
The same animation with adapted sizes: the words sit at the top, the camera below, and the view pulls back as far as needed so that even when apart it all fits in the box; a finger tilts the camera by dragging sideways, and the page keeps scrolling.
No long scroll and no motion: the camera is already apart and still, with the callouts.
Three.js 0.178.0, GSAP 3.15.0, Lenis 1.3.26, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 12 KB; the libraries: GSAP + ScrollTrigger 45 KB, Lenis 5.3 KB, Three.js + RoomEnvironment 176 KB.
Tested on 27 October 2026
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.
Support Animorio
Animorio stays free thanks to the people who support it. If you like, buy us a coffee: it helps us make the next animations.
You asked for
We made it for you: it’s in the library, with the preview, the Playground and the code to copy.
An animation you can’t find, or a site to take apart in the journal: tell us which. We pick the next ones from here.
With your account’s email and password.
or with your email
You’re signed in as .
With your account, you can download the zip of every animation and every pack, for free.