∞ forever components

Particles & Physics

Pixel Particle Fountain

Pixel Particle Fountain control in the 8-Bit Gaming system, with a verdigris read-out and NES-style red, yellow and olive pixels.

canvasmedium complexitymoderate motionclickaccessible

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 →
1

When to use it

Retro game or arcade UIs that want a small physics toy with one control: a gravity switch plus tap-to-burst pixels.

When not to

Layouts that need a light theme or a full-width canvas: the card is a fixed black panel (380px max) with white pixel borders.

Working with an AI agent

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

Add a fifth gravity mode by appending { label: 'GRAV: 0.5G (MARS)', g: 0.06 } to the gravModes array, raise maxP from 64 to 96, and recolour the control by changing #FFCC00 in .bg02-btn and its :focus-visible outline to #E52521. The gravity control is a native button; Enter or Space on the focused canvas bursts pixels.

Safe to edit

  • gravity modes (gravModes array: label and g)
  • particle cap (maxP = 64)
  • pixel colours (colors array)
  • button and read-out colours (.bg02-btn, .bg02-stat in the style block)
  • burst size (the loop count of 20 in burst())
  • card width (max-width: 380px on .bg02-wrap)

Keep intact

  • bg02- class prefix and the single .bg02-wrap root
  • gravity control stays a native <button>; the canvas keeps tabindex=0, role=button and its Enter/Space burst handler
  • disabled styling (:disabled, [aria-disabled="true"]) and the off() guard in the click handlers
  • prefers-reduced-motion guard and visibilitychange pause
  • demo-v1 preview lifecycle: initialize demoEnabled from window.__foreverPreview and stop attract work on the window forever:interactive event; retain manual feedback, settling, cleanup and explicit sessions

Known limitations

  • The particle read-out changes every frame and is not announced to screen readers
  • Gravity label length changes as it cycles, so the control row can reflow at very narrow widths
  • State remains local to each mounted instance; format/theme remount preserves takeover, not component values.

arcade8-bitpixelretrogamingmicroswitchpixel-particle-fountainparticlesphysicsfountaingravity8-bit-gamingsimulation

More Particles & Physics components

  • Gravity Dot RainMatte verdigris, mauve, rose, moss and ochre dots fall under gravity with motion trails, bounce off the floor, and scatter away from the cursor on a dark…
  • Firework BurstColorful glowing sparks burst radially, fall under gravity, and fade against a dark sky. Initial automatic launches stop after first input; canvas clicks…
  • Confetti CannonOchre festival-paper palette: broad confetti rectangles fire from bottom corners, tumble and flip. First input stops automatic launches; a manual burst…
  • Bouncing Balls7–14 glossy matte-toned balls (verdigris, dusty rose, ochre, slate blue, lilac, moss) bounce off walls and collide with elastic physics; cursor repels…
  • Spring ChainA 16-node spring chain whips and follows the cursor in a lime-to-gold gradient; initial figure-eight attract motion stops after first input; manual chain…
  • Cloth Wave GridA 10x10 wireframe grid ripples like cloth via sine/cosine waves through dusted sky-blue, aqua and lilac hues; mesh nodes bulge away from the cursor on hover.