SVG — Ambient Looping Scene

The final arc piece: motion that just lives. Seamless parallax loops plus a lightweight requestAnimationFrame particle system — an ambient scene that runs forever on a tiny budget.

a forever-looping night scene

50
seamless loop: translate, then wrap by tile width
// the layer is two identical tiles side by side (width W each)
let x = (x - speed * dt) % W;          // drift left, wrap at one tile
layer.setAttribute('transform', `translate(${x} 0)`);

// a particle that rises and wraps to the bottom — never ends
p.y -= p.vy * dt;
if (p.y < -4) { p.y = 244; p.x = Math.random() * 480; }
p.el.setAttribute('opacity', 0.4 + 0.6 * Math.abs(Math.sin(t + p.phase)));

A seamless loop = translate a duplicated tile by exactly its own width, then wrap. Fireflies rise, twinkle via a sine on opacity, and recycle at the bottom — a fixed pool of nodes, so cost stays flat (Part 19).