Skip to content
All effects

Rotatable 3D product viewers

Product cards with a small 3D model you can grab and turn, all drawn by one shared 3D canvas.

Interactive

This is the real effect. Scroll or move your mouse inside the frame to try it.

The prompt

Turn the product images in [the cards I point to] into rotatable 3D product viewers with three.js: every card shows a 3D model you can grab and turn. Models: load the product models I give you (glTF), or build simple products from code when there are none. Give them realistic materials: an environment map for soft reflections (PMREMGenerator from a simple studio scene with a few bright panels), physical materials with the right roughness, metal where it is metal. Tech: use ONE WebGL renderer and ONE fixed canvas behind the whole page for all cards (browsers limit the number of WebGL contexts). Every frame, read the position of each card's image area with getBoundingClientRect and render that product into it with setViewport and setScissor. Skip cards that are off screen. Never resize the drawing buffer while scrolling, only on window resize. Behaviour: each product turns slowly by itself (about one turn every 25 seconds). Dragging on its card rotates it (with inertia); after letting go it eases back to its slow spin. A soft contact shadow under every product. Cap the device pixel ratio at 2. With prefers-reduced-motion, no auto spin. Style: build it in the existing design system of this website. Reuse its colours, fonts, spacing, corner radius and existing classes or components, and don't add new colours or fonts. Use real content from this website for any text or images in the effect (its headings, services and copy), never placeholder text. If the project has no design system yet, ask me for the brand colours and fonts before you start.

What it is

Product cards where the image is a real 3D object. Grab it, turn it around, let go and it slowly spins again.

When it works

A small range of products where shape matters: lamps, bottles, devices, panels. It works well for a small range of products, each in its own viewer. It feels like picking something up in a shop.

Get it right

  • Use one 3D canvas for all cards. Browsers only allow a handful of 3D canvases per page.
  • Skip the cards that are off screen.
  • Let go and the product finds its way back, the short way round.

Also called

  • 360 product view
  • Drag to rotate product
  • 3D product cards
  • Interactive product spin

More effects.

All effects