Cosmic & Space
Black-hole Accretion Swirl
110 heat-colored particles spiral inward across a tilted accretion disk toward a glowing event horizon; pointer movement boosts swirl speed.
canvasmedium complexityintense motionpointer
Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited
Worth keeping?
Votes steer what gets built next — sign in to cast one, free to read
When to use it
Dark-mode hero backgrounds, space/sci-fi themes, ambient loading screens where high-motion drama is appropriate.
When not to
Light-background layouts (background hardcoded near-black). Contexts where content must be read over the animation — particles are constant and distracting.
Working with an AI agent
Every component ships agent-ready metadata. An example instruction for this one:
Change particle count from N=110 to 160, shift heat colors to cool blue-white (replace '#ff5e2e' with '#4488ff', '#ffae4d' with '#aaddff', '#fff1c4' with '#ffffff'), and increase boost decay from 0.94 to 0.97 for longer pointer response.
Safe to edit
- particle count (N=110)
- heat color palette ('#ff5e2e', '#ffae4d', '#fff1c4')
- disk tilt and rotation (ctx.scale(1,0.42), ctx.rotate(0.35))
- boost decay rate (boost*=0.94)
- event horizon radius (30*scale inner, 21*scale solid core)
Keep intact
- DPR-aware canvas sizing
- visibilitychange pause/resume
- prefers-reduced-motion guard (freeze animation)
- IIFE wrapper
Known limitations
- Background color hardcoded in CSS (#05040a) — must edit to use on non-dark backgrounds
- No reduced-motion fallback beyond a static frame — animation fully stops rather than showing a gentle alternative
- Particle reset from r<26 to r=180 can cause brief visual pop
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.
- 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).
- Ringed Planet RotateAmber gas giant with tilted Saturn-like rings slowly rotates over a twinkling starfield; pointermove adjusts ring tilt and light angle dynamically.
- Constellation Connect46 drifting star nodes auto-connect with faint magenta lines when close; cursor draws lines to nearby stars and brightens them on hover.