forever components

CSS 3D & Perspective

Phantom Polytope

Glowing sage-green tesseract rotates through itself via dual perspective projection; edges glow hotter by 4D depth. Pointer/click boosts speed.

canvasheavy 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-theme hero backgrounds, math/generative-art showcases, sci-fi or cosmic aesthetic sections needing ambient depth.

When not to

Light backgrounds (hardcoded dark canvas). Contexts needing legible text overlays or strict reduced-motion compliance.

Working with an AI agent

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

Change glow to warm amber: set the fixed green channel from 210 to 190, raise the red coefficient base from 140 to 200, then slow base speed from 0.012 to 0.007. 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

  • base rotation speed (t += 0.012)
  • rotation plane speeds (0.31, 0.23, 0.17, 0.27)
  • perspective distances (wd=2.4, dd=3.2)
  • edge glow color (strokeStyle RGB formula)
  • pointer boost cap (Math.min(boost+0.5, 3))
  • theme tokens (:root dark defaults + [data-theme=light] overrides)

Keep intact

  • IIFE wrapper
  • DPR-aware canvas sizing
  • visibilitychange pause/resume
  • reduced-motion static frame guard
  • theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)

Known limitations

  • Reduced-motion renders only a single static frame — no fallback animation
  • Background hardcoded (#1B1E1A) — must edit both CSS and ctx.fillStyle to retheme
  • No aria semantics on canvas element

tesseract4dwireframecanvasperspectiverotationgenerativecosmic

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.