forever components

CSS 3D & Perspective

Perspective Tunnel

18 neon rings recede through a CSS 3D perspective tunnel, cycling rainbow hues and rotating as they rush toward the viewer. Pointer X-axis steers the spin rate.

cssmedium complexityintense motionpointer

Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited

Live demo — the real component, running in a sandbox. One self-contained HTML file, zero dependencies. Open it on the canvas →
Worth keeping? Votes steer what gets built next — sign in to cast one, free to read

When to use it

Dark-mode hero backgrounds, sci-fi or cyberpunk themes, immersive loading screens or intros needing strong depth illusion.

When not to

Light backgrounds (hardcoded dark navy), motion-sensitive audiences (no static fallback beyond pause), or contexts where legible text must overlay the animation.

Working with an AI agent

Every component ships agent-ready metadata. An example instruction for this one:

Change ring count to 24, set base spin to 0.5, and shift the hue formula to start at blue tones by replacing `o.z*0.12` with `o.z*0.08+180`. Theme: dark tokens live in :root, the light variant in :root[data-theme="light"]; ?theme=light or a {type:'forever:theme'} postMessage switches at runtime.

Safe to edit

  • ring count (N=18)
  • base spin speed (spin=0.25)
  • perspective depth (SPAN=1800)
  • hue shift formula (o.z*0.12+roll*2)
  • ring border-radius (10px)
  • pointer influence range (1.6 multiplier)
  • theme tokens (:root dark defaults + [data-theme=light] overrides)

Keep intact

  • visibilitychange stop/start guard
  • prefers-reduced-motion check
  • IIFE-style scoped constants
  • SPAN-based z wrapping (o.z -= SPAN)
  • theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)

Known limitations

  • No reduced-motion static fallback — animation is fully stopped but no still frame is shown
  • Background color hardcoded in CSS; must edit to change from dark navy
  • Ring count and SPAN tightly coupled — changing N without adjusting SPAN shifts spacing

tunnel3dcss-3dperspectiveneonrainbowloop

More CSS 3D & Perspective components

  • Rotating CubeGlowing sage-green wireframe cube slowly auto-rotates in CSS 3D with a subtle sine-wave tilt; pointer movement offsets the rotation to follow the cursor.
  • Card Deck FanSeven gold-and-mauve playing cards fan open and closed in a sine-wave 3D arc using CSS rotateZ and perspective transform.
  • Coverflow RingEight vivid gradient cards orbit in a 3D coverflow ring with CSS perspective and per-card reflections. Pointer X position steers rotation speed.
  • Folding Paper4-panel paper accordion folds and unfolds in a zig-zag CSS 3D motion, slowly rotating on a dark green background. Cream front and sage back faces alternate.
  • Isometric Blocks3x3 grid of soft lilac CSS 3D cubes bobs in a staggered sine wave on a dark lilac-tinted ground. Three shaded faces per cube simulate isometric lighting.
  • Parallax DepthA glowing sun with colored orbiting dots on layered CSS 3D planes that tilt and parallax toward the pointer; auto-orbits until interaction.