PRO

Scroll Tunnel 3D

An endless depth tunnel of images: photos ring an ellipse four at a time and stack back along the Z axis, while wheel, drag, and idle motion pull the camera forward through them. Each layer wraps in depth so the tunnel never ends, and a per-layer black overlay fogs frames in from the far end and out as they pass the lens. One requestAnimationFrame loop, no animation library.

Component

Through the archive

Scroll or drag to fall deeper into the stack.

Install
npx shadcn@latest add https://ui.aryank.space/r/scroll-tunnel-3d.json

Installs from ui.aryank.space. To add it by hand, copy the files in Usage below, or register the @compronents namespace via the docs.

Files

API
PropTypeDefaultDescription
imagesstring[]12 Compronents-hosted JPGsPhotos ringed four-to-a-layer along the tunnel.
title / captionstringundefinedOptional HUD copy in the lower-left corner.
backgroundstring"#000000"Tunnel background and depth-overlay color.
scrollSpeed / layerGap / lerpnumber2 / 2500 / 0.07Input sensitivity, ring depth spacing (px), and smoothing.
radiusX / radiusYnumber400 / 280Ellipse radii (px) the four images ring around each layer.
itemWidth / itemHeightnumber180 / 220Size of each image card in the tunnel, in px.
perspectivenumber1000CSS perspective applied to the 3D scene, in px.
autoplay / autoplaySpeedboolean / numbertrue / 6Idle forward drift so the tunnel moves before input.
Customize
backgroundcolor

Tunnel backdrop and the color the depth overlay fades to.

title / captiontext

Optional corner HUD copy laid over the tunnel.

scrollSpeed / layerGap / lerptext

Input sensitivity, ring spacing, and follow smoothing.

imagesasset-url

Twelve photos hosted through https://ui.aryank.space/assets/scroll-tunnel-3d/img-1.jpg and the numbered set.

Dependencies
None.