forever components

Particles & Physics

Verlet Rope Bridge

Amber glowing rope sags between two pegs under invisible rolling weights via Verlet physics; pointer disturbs it, clicks launch new loads.

canvasheavy 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

Physics demo backgrounds, portfolio heroes, ambient canvases with tactile interaction.

When not to

Layouts needing legible text overlays; low-end mobile where 14-iteration constraint relaxation per frame may stutter.

Working with an AI agent

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

Change rope color to electric blue by setting r=72, g=194, bl=240 in the velocity-tint segment loop, and raise GRAV from 0.32 to 0.55 for heavier sag. 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

  • gravity constant (GRAV=0.32)
  • damping factor (DAMP=0.985)
  • constraint iterations (ITER=14)
  • rope color base (r=240,g=194,bl=72)
  • rolling weight mass range (1.6+random*2.6)
  • weight spawn interval (120+random*150)
  • theme tokens (:root dark defaults + [data-theme=light] overrides)

Keep intact

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

Known limitations

  • 14 constraint-relaxation iterations per frame — CPU-bound on low-end devices
  • No aria semantics on canvas element
  • Background color hardcoded in CSS (#161108)

ropeverletphysicscanvassimulationambientglow

More Particles & Physics components

  • Gravity Dot RainMulticolored dots fall under gravity with motion trails, bounce off the floor, and scatter away from the cursor on a dark navy canvas.
  • Firework BurstColorful glowing sparks burst radially, fall under gravity, and fade against a dark sky. Auto-launches bursts; click anywhere to add more.
  • Confetti CannonColored rectangles fire from bottom corners in auto-cycling bursts, tumbling with gravity and flip animation. Click anywhere to trigger a cursor burst.
  • Bouncing Balls7–14 glossy pastel balls bounce off walls and collide with elastic physics; cursor repels balls within a 70px radius.
  • Spring ChainA 16-node spring chain whips and follows the cursor in a lime-to-gold gradient; drifts in a figure-eight pattern when idle.
  • Cloth Wave GridAn 11x11 wireframe grid ripples like cloth via sine/cosine waves in cyan-to-violet hues; mesh nodes bulge away from the cursor on hover.