forever components

Cosmic & Space

Ringed Planet Rotate

Amber gas giant with tilted Saturn-like rings slowly rotates over a twinkling starfield; pointermove adjusts ring tilt and light angle dynamically.

canvasmedium complexitymoderate 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

Space/sci-fi hero backgrounds, ambient screensavers, dark-mode landing sections needing slow cosmic motion.

When not to

Light backgrounds (hardcoded dark canvas). Contexts needing legible text overlays — planet occupies center stage.

Working with an AI agent

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

Change the planet palette to icy blue by replacing bands array with ['#7ec8e3','#5ba8c4','#a8dff0','#3d8fa8','#b0e0f5'] and update the radial gradient stops to match.

Safe to edit

  • band colors (bands array)
  • ring segment radii and opacity (segs array)
  • rotation speed (rot += 0.006)
  • tilt range from pointermove (0.22 + offset * 0.5)
  • planet size (R = Math.min(W,H)*0.2)
  • star count (55)

Keep intact

  • IIFE wrapper
  • prefers-reduced-motion guard (reduce flag stops rot increment)
  • visibilitychange stop/start
  • DPR-aware canvas sizing

Known limitations

  • Background color hardcoded in CSS (#0a0710) — must edit to change from dark purple-black
  • Ring tilt resets to default 0.4 only on reload; no mouse-leave reset
  • reduce flag freezes rotation but still runs rAF loop drawing a single static frame repeatedly

planetspaceringscanvasambientpointergenerative

More Cosmic & Space components

  • Orbiting Planet SystemFour glowing planets orbit a radiant sun on tilted elliptical rings with depth-sorted rendering; the system drifts subtly toward the pointer.
  • Black-hole Accretion Swirl110 heat-colored particles spiral inward across a tilted accretion disk toward a glowing event horizon; pointer movement boosts swirl speed.
  • Twinkling Starfield115 multicolor stars twinkle via sine waves; sparkle crosses appear on larger stars; stars brighten near cursor. Static fallback for reduced-motion.
  • Spiral Galaxy Rotate115 stars form a two-armed spiral galaxy rotating around a violet radial-gradient core; pointer move briefly doubles spin speed.
  • Comet Streak LoopCyan and violet comets with glowing heads and gradient tails streak diagonally across a twinkling dark starfield; click spawns an extra comet (up to 5).
  • Constellation Connect46 drifting star nodes auto-connect with faint magenta lines when close; cursor draws lines to nearby stars and brightens them on hover.