Loop kit — backgrounds that close, on tileable and dssCollapse

Five drop-in animated backgrounds. Every one of them repeats exactly: the last frame of the period is the first frame of the next, to floating-point roundoff, with no cross-fade hiding the join. That is not a rendering trick, it is a property of the field. tileable: true snaps every wavevector to the integer lattice, so u(x + 2πn) ≡ u(x) for any integer vector n — walk the sampling point along n over the loop and you land back on the same field, exactly. dssCollapse is the other half: it repeats every log λ of renormalisation time, so one rendered period tiles an endless zoom.

The motion in the first four looks is us moving through the field, not the field evolving. That distinction is the whole design: the library's own clock (churn) advances each mode's phase at ω(k) = χ·kmin⅓·k⅔, and those rates are incommensurate reals — there is no finite period. So the kit sets churn: 0 and animates the sample point instead. Because the field is fully three-dimensional, sliding the rendered plane along z makes the picture genuinely change shape rather than slide, and that motion still wraps at 2π. Drift depth is the through control.

helix-noise · field.glsl() · webgl2
compiling…
wrapped · phase 1 → 0
→ tileable: false

The receipt

wrap Δu is the measured difference between the two ends of one period: the library's velocity is sampled on a 20×13 lattice across the visible window at loop phase 0 and again at loop phase 1, and the readout prints rms|u₁ − u₀| / rms|u₀|. It sits at ~1e-15 — that residual is pure floating-point, because 2π is not a representable number, not because the wrap is approximate. pixels ≠ is the same test one level down: this shader is re-rendered to a 160×100 offscreen buffer at both ends of the period and the two 8-bit frames are differenced, so the count is over the picture rather than the field. It reads 0 while the loop is exact — eight bits cannot resolve 1e-15 — and lights up across the frame when it is not.

Press detune the loop to make both move. For the drift looks the field is rebuilt with tileable: false: same seed, same spectrum, same picture to the eye, wavevectors just off the integer lattice. Measured here, wrap Δu goes aurora 1.9e-15 → 1.2e+0, ink drift 8.1e-16 → 1.9e+0, embers 2.3e-15 → 1.5e+0, deep current 2.0e-15 → 1.7e+0. On the tunnel the same button instead advances playback 12% faster than log λ — the real-world version of exporting a 6.00 s file for a 6.72 s loop — which drives wrap Δu to 1.6e-1 and puts a visible pop at the seam. Every one of those figures is reproduced by a standalone node script against src/index, not read off this page.

What the tunnel's wrap Δu does not prove, and the number that fixes it. The Droste stack blends six copies of the field at scales spaced by λb and advances one layer index per period, under a Hann window that is identically zero at both ends. So its frames repeat by bookkeeping, and its wrap Δu reads a flat 0 — not 1e-15, zero, because the two ends are the same floating-point numbers in a different order. A panel that only ever prints 0 is worth nothing, so the tunnel prints a second line. λ-identity measures the thing dssCollapse actually guarantees and the stack silently assumes: that consecutive layers are consecutive frames of one collapse, u(x,t₂) = λa·u(λbx, t₁) when (T−t₂) = (T−t₁)/λ. It reads ~3e-16 and it is independent of the stack. Press freezeProfile ✗ and watch the honest split: λ-identity jumps to ~3e-1 while wrap Δu stays 0 — the picture still loops perfectly, it has just stopped being a collapse. That is the receipt this page would have shipped a lie without.

Paste this into your project

…
compiling…
Kinematic, not simulated. There is no pressure solve, no advected density, no viscosity, no collision: each pixel is a line-integral convolution of an analytic divergence-free velocity field, and the animation is the sampling point moving. Nothing is conserved on screen except what the field carries. The streak texture is deliberately a sum of integer-frequency sinusoids — a hash-lattice value noise would have broken the loop even though the field did not, and that failure would have been invisible until the wrap.