Skip to content
animorio
IT
Back to the library

Exploded camera

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

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.

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

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.

32 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 camera” 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 light grey background there is a rangefinder camera drawn in 3D, seen three quarters on: a brushed chrome top plate with the engraved brand, the rangefinder windows, the knurled speed dial and the shutter button with its orange ring, the black body with fine-grained leatherette and the strap lugs, and a 35 mm lens with its aperture ring, the knurled focus ring with its tab and coated glass that changes colour. On opening it rises from below and settles on a spring. Scrolling down, the camera comes apart along the axis of its lens: in front, one after another, the front element, the focus ring, the barrel, the rear element, the ten iris blades and the mount move out; behind the body the metal-bladed shutter, the violet sensor on its board with gold contacts and the back door with its screen drop away; the speed dial and the button lift off the top plate. As it opens the iris closes down, the shutter blades slide and the focus ring turns. Beside every part there is a small orange cross and a thin line drawing itself out to the callout. Then the camera turns to the side to show the whole row of parts, comes back three quarters on, and the parts, after pulling out a little further, rush home: the body jolts, there is a soft flash and the shutter blades snap. The pointer or a finger tilts the camera on a spring; when nobody touches it, it sways slowly on its own. At the bottom, the line to reserve it.

How it works

A camera made of simple shapes

Everything 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.

Materials painted in a canvas

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.

The scroll takes it apart

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.

The final click

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.

The callouts

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.

Values to change

NameFileDefaultWhat it changes
BRANDscript.js'Vantor'The brand on the top plate, on the lens and at the top of the page.
SPREADscript.js1How far the parts move apart when the camera comes apart.
TILTscript.js1How much the pointer or a finger tilts the camera.
TURNscript.js1How far the camera turns to show the row of parts from the side.
FLOATscript.js1How much each part floats on its own while the camera is apart.
SNAPscript.js1How strong the click is when the parts snap back together.

Try them in the Playground

When to use it

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.

On phones

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.

With reduced motion

No long scroll and no motion: the camera is already apart and still, with the callouts.

Pitfalls

  • The camera has a setViewOffset to move the object to the right of the words (or below, on the phone): projecting the callouts already accounts for it, because project() uses the same matrix.
  • The transparent glass does not write to the depth buffer (depthWrite false), otherwise it hides the iris blades behind it.
  • Canvas-painted textures must be marked sRGB, otherwise colour management washes them out; the ones with lettering are painted again once the font has loaded.

Libraries

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.

Testing

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