He who laughs last

Barks

The dog who laughs last barks the loudest.

Turn the helix to switch photos with the left and right arrow keys, the previous and next buttons, the tick marks on the right, or by dragging and swiping.

Back to all animations

Three.js Helix 3D Image Slider

Ten photos wrap around a tall cylinder in a spiral. Each step turns and raises the helix to bring a new photo to center stage. Rounded corners, paper edges, and drop shadows are all drawn in a shader so the cards blend into the white background.

Built with
  • Three.js
  • WebGL
  • GSAP
  • JavaScript
Published

Where to use it

  • Photographer portfolios
  • Brand lookbooks
  • Product galleries
  • Exhibition and artwork showcases

How it works

  • Ten photos sit on the side of a tall cylinder, wrapping about 1.8 turns at roughly 65° per photo
  • Each step moves the whole stack down while the next card descends from the upper right
  • Positions are calculated relative to the active card and wrap around, so the slider has no start or end
  • A fragment shader draws the rounded corners, paper edges, and drop shadows so the cards blend into the white background
  • Cards fade into the white background the farther they are from center, drawing the eye inward
  • Navigate with the previous/next buttons, the tick marks on the right, the arrow keys, or by dragging and swiping
  • Mouse wheel input is ignored, so page scrolling is never hijacked
  • Photos are downscaled to display size before upload, and rendering stops entirely off-screen

Make it your own

  • Helix radius and rotation per photo
  • Rise per photo
  • Shadow strength and corner radius
  • How many cards before they fade into the background

Before you ship

Mobile & touch
On phones, the helix radius tightens to make the cards larger, and the tick marks and buttons gather at the bottom of the screen. Vertical scrolling stays with the page; only horizontal swipes are captured.
Browser support
Works in major modern browsers that support WebGL2 and ES modules. If WebGL can't start, the first photo is shown as a still image.
Performance (load: High)
Photos are served as AVIF and downscaled to at most 1280px (640px on phones) before upload, and the pixel ratio is kept between 1 and 1.75. Cards far from center are skipped, and the render loop stops off-screen and in background tabs.
Accessibility
Native button elements work with the keyboard, including the left and right arrow keys. The new slide's position and title are announced with aria-live.
Reduced motion
With prefers-reduced-motion, floating, parallax, and the intro animation stop, leaving only a short 0.25-second transition.

FAQ

How do I build a spiral image slider with Three.js?

Place cards along the side of a cylinder, shifting each one by a fixed angle and height. Ten cards over about 1.8 turns works out to roughly 65° each — enough for neighboring cards to show their sides.

How do I make the slider loop endlessly?

Wrap each card's position relative to the active slide by the slide count, and swap the first and last cards where they leave the view. With no start or end point, it can spin either way forever.

How do I add rounded corners and drop shadows to WebGL cards?

Compute the signed distance to a rounded rectangle in the fragment shader, painting the photo inside and a soft falloff outside as the shadow. You get the corners and the shadow at once without cropping the image.

How do I keep a 3D slider from blocking page scrolling?

Don't listen to the wheel. Use the buttons, arrow keys, and horizontal drags only. Vertical finger movement stays with the page, so phone users can keep reading.

Won't more photos make it slower?

Photos are downscaled to display size before upload, and far-off cards are skipped when rendering. The render loop itself stops off-screen and in background tabs.

“Can you build this?”
is a great place to start.

From coding and animation to WordPress — talk directly with TANE-⁠be engineers.
The TANE to CODE site is in Japanese.

Visit TANE to CODE

Get in touch

Website projects, memorable motion ideas — we'd love to hear about them.
Our contact form is in Japanese.