Skip to content

176 web animation techniques, each a live demo with plain settings and a ready-made prompt for your AI assistant. No dependencies, no build step.

feat: our version of the twisting ribbon of light, a WebGL ribbon of fine strands behind a headline (checked on its site 2026-10-22)

matin14771efce06b
diff --git a/famous/index.html b/famous/index.html
index faa478e2..3c14c512 100644
--- a/famous/index.html
+++ b/famous/index.html
@@ -215,19 +215,24 @@ button{font:inherit;color:inherit}
.js .tile:not(.playing) .gp *,.js .tile:not(.playing) .gp *::before,.js .tile:not(.playing) .gp *::after,
.fx-open .tile .gp *,.fx-open .tile .gp *::before,.fx-open .tile .gp *::after{animation-play-state:paused!important}
-/* the twisting ribbon: soft bands of light crossing, with fine strands */
+/* the twisting ribbon: a bow tie of fine strands that change places at the pinch, over soft bands of light. Its two halves open and close in turn. */
.gp-ribbon{background:radial-gradient(90% 100% at 50% 45%,#10163a,#08080a 72%);isolation:isolate}
-.gp-ribbon i{left:-18cqw;width:136cqw;border-radius:50%;mix-blend-mode:screen}
-.gp-ribbon .rb{height:22cqh;filter:blur(8px);opacity:.85}
-.gp-ribbon .rb1{top:26cqh;background:linear-gradient(90deg,var(--c1),var(--c6));transform:rotate(-12deg) translateY(-18%) scaleY(.8)}
-.gp-ribbon .rb2{top:42cqh;background:linear-gradient(90deg,var(--c3),var(--c1));transform:rotate(-3deg) translateY(6%) scaleY(1.1)}
-.gp-ribbon .rb3{top:56cqh;background:linear-gradient(90deg,var(--c5),var(--c3));transform:rotate(7deg) translateY(22%) scaleY(.6)}
-.gp-ribbon .rs{height:2px;border-radius:2px;background:linear-gradient(90deg,transparent,#fff 35%,var(--c1) 75%,transparent);opacity:.85}
-.gp-ribbon .rs1{top:38cqh;transform:rotate(-9deg)}
-.gp-ribbon .rs2{top:46cqh;transform:rotate(-5deg)}
-.gp-ribbon .rs3{top:54cqh;transform:rotate(-1deg)}
-.gp-ribbon .rs4{top:62cqh;transform:rotate(4deg);background:linear-gradient(90deg,transparent,#fff 35%,var(--c5) 75%,transparent)}
-.gp-ribbon .rs5{top:70cqh;transform:rotate(8deg);background:linear-gradient(90deg,transparent,#fff 35%,var(--c3) 75%,transparent)}
+.gp-ribbon .rb{left:-18cqw;width:136cqw;height:15cqh;border-radius:50%;mix-blend-mode:screen;filter:blur(8px);opacity:.36}
+.gp-ribbon .rb1{top:50cqh;background:linear-gradient(90deg,var(--c6),var(--c1));transform:rotate(-16deg) scaleY(.9)}
+.gp-ribbon .rb2{top:40cqh;background:linear-gradient(90deg,var(--c1),var(--c3));transform:rotate(-10deg) scaleY(1.1)}
+.gp-ribbon .rb3{top:30cqh;background:linear-gradient(90deg,var(--c3),var(--c5));transform:rotate(-6deg) scaleY(.7)}
+.gp-ribbon .rw{position:absolute;inset:0;transform:rotate(-12deg) scale(1.2)}
+.gp-ribbon svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
+.gp-ribbon .la{transform:scaleY(.95)}
+.gp-ribbon .ra{transform:scaleY(.62)}
+.gp-ribbon path{fill:none;stroke-width:.5;stroke-linecap:round}
+.gp-ribbon .a{stroke:var(--c6)}
+.gp-ribbon .b{stroke:var(--c1)}
+.gp-ribbon .c{stroke:var(--c3)}
+.gp-ribbon .d{stroke:var(--c5)}
+.gp-ribbon path:nth-child(3n){stroke-opacity:.5}
+.gp-ribbon path:nth-child(4n+1){stroke-width:.8}
+.gp-ribbon .rp{left:50%;top:50%;width:22cqw;height:12cqh;margin:-6cqh 0 0 -11cqw;border-radius:50%;background:radial-gradient(closest-side,rgba(255,255,255,.85),rgba(185,230,255,.35) 45%,transparent);mix-blend-mode:screen}
/* the headset: the visor drawn as four plates (glass, frame ring, lenses, coral band ring). At rest they are taken apart and seen at
a tilt, glass on top; the loop brings the stack up from below, carries the glass and the frame off the top while the lenses and the
@@ -377,8 +382,11 @@ button{font:inherit;color:inherit}
.tb-bar .t{left:12cqw;width:22cqw;height:2cqw;margin-top:-1cqw;border-radius:1cqw;background:#5d6580}
.tb-bar .m{right:5cqw;width:4.6cqw;height:3.2cqw;margin-top:-1.6cqw;background:linear-gradient(#5d6580 0 .7cqw,transparent .7cqw 1.25cqw,#5d6580 1.25cqw 1.95cqw,transparent 1.95cqw 2.5cqw,#5d6580 2.5cqw)}
-@keyframes g-rib{from{transform:rotate(-16deg) translateY(-30%) scaleY(.5)}to{transform:rotate(10deg) translateY(30%) scaleY(1.3)}}
-@keyframes g-rs{from{transform:rotate(-14deg) translateY(-12cqh) scaleX(.92)}to{transform:rotate(11deg) translateY(12cqh) scaleX(1.06)}}
+@keyframes g-rib{from{transform:rotate(-20deg) translateY(-12%) scaleY(.6)}to{transform:rotate(-6deg) translateY(12%) scaleY(1.2)}}
+@keyframes g-sway{from{transform:rotate(-17deg) scale(1.2)}to{transform:rotate(-8deg) scale(1.2)}}
+@keyframes g-la{from{transform:scaleY(1)}to{transform:scaleY(.45)}}
+@keyframes g-ra{from{transform:scaleY(.5)}to{transform:scaleY(1.05)}}
+@keyframes g-pinch{from{opacity:.55}to{opacity:1}}
@keyframes g-lift{0%,26%{transform:translateZ(calc(var(--u) * var(--z1)))}44%{transform:translateZ(calc(var(--u) * var(--z1)))}70%,100%{transform:translateZ(calc(var(--u) * var(--z0)))}}
@keyframes g-away{0%,24%{opacity:1;transform:translateZ(calc(var(--u) * var(--z1)))}44%{opacity:1;transform:translateZ(calc(var(--u) * var(--z2)))}46%,100%{opacity:0;transform:translateZ(calc(var(--u) * var(--z2)))}}
@keyframes g-tip{0%,4%{transform:translateY(62cqh) rotateX(64deg) rotateY(-16deg)}28%,44%{transform:translateY(0) rotateX(64deg) rotateY(-16deg)}70%,84%{transform:translateY(0) rotateX(188deg) rotateY(12deg)}98%,100%{transform:translateY(-72cqh) rotateX(188deg) rotateY(12deg)}}
@@ -407,11 +415,10 @@ button{font:inherit;color:inherit}
.gp-ribbon .rb{animation:g-rib 8s ease-in-out infinite alternate backwards}
.gp-ribbon .rb2{animation-duration:10s;animation-delay:-3s}
.gp-ribbon .rb3{animation-duration:12s;animation-delay:-6s}
- .gp-ribbon .rs{animation:g-rs 9s ease-in-out infinite alternate backwards}
- .gp-ribbon .rs2{animation-duration:11s;animation-delay:-4s}
- .gp-ribbon .rs3{animation-duration:13s;animation-delay:-7s}
- .gp-ribbon .rs4{animation-duration:10s;animation-delay:-2s}
- .gp-ribbon .rs5{animation-duration:12s;animation-delay:-5s}
+ .gp-ribbon .rw{animation:g-sway 14s ease-in-out infinite alternate backwards}
+ .gp-ribbon .la{animation:g-la 9s ease-in-out infinite alternate backwards}
+ .gp-ribbon .ra{animation:g-ra 9s ease-in-out infinite alternate backwards}
+ .gp-ribbon .rp{animation:g-pinch 9s ease-in-out infinite alternate backwards}
.gp-visor{--x:2.4s}
.gp-visor .vz{animation:g-tip 9s ease-in-out infinite backwards;animation-delay:calc(0s - var(--x))}
.gp-visor .vz>i{animation:g-lift 9s ease-in-out infinite backwards;animation-delay:calc(var(--d,0s) - var(--x))}
@@ -704,7 +711,7 @@ html.fx-open{overflow:hidden;padding-right:var(--fx-gap,0px)} /* the page does n
<ul class="fx-grid" role="list">
<li class="tile" data-fx-tile="stripe-ribbon">
<div class="t-stage">
- <div class="gp gp-ribbon" aria-hidden="true"><i class="rb rb1"></i><i class="rb rb2"></i><i class="rb rb3"></i><i class="rs rs1"></i><i class="rs rs2"></i><i class="rs rs3"></i><i class="rs rs4"></i><i class="rs rs5"></i></div>
+ <div class="gp gp-ribbon" aria-hidden="true"><i class="rb rb1"></i><i class="rb rb2"></i><i class="rb rb3"></i><div class="rw"><svg class="la" viewBox="0 0 160 100"><path class="a" d="M-30 15C10 9 50 43.4 80 47.8"/><path class="a" d="M-30 19.1C10 13.8 50 43.7 80 48.1"/><path class="a" d="M-30 23.3C10 23.8 50 44.1 80 48.4"/><path class="b" d="M-30 27.5C10 28.6 50 44.4 80 48.7"/><path class="b" d="M-30 37C10 33.3 50 44.7 80 49.1"/><path class="b" d="M-30 41.2C10 38.1 50 45 80 49.4"/><path class="b" d="M-30 45.3C10 42.8 50 50.6 80 49.7"/><path class="c" d="M-30 49.5C10 47.6 50 51 80 50"/><path class="c" d="M-30 53.7C10 57.6 50 51.3 80 50.3"/><path class="c" d="M-30 57.9C10 62.4 50 51.6 80 50.6"/><path class="c" d="M-30 67.3C10 67.1 50 51.9 80 50.9"/><path class="c" d="M-30 71.5C10 71.9 50 57.5 80 51.3"/><path class="c" d="M-30 75.7C10 76.7 50 57.9 80 51.6"/><path class="d" d="M-30 79.9C10 86.7 50 58.2 80 51.9"/><path class="d" d="M-30 84.1C10 91.4 50 58.5 80 52.2"/></svg><svg class="ra" viewBox="0 0 160 100"><path class="a" d="M80 47.8C110 57.5 150 72.6 190 81.9"/><path class="a" d="M80 48.1C110 55.5 150 68.2 190 76.7"/><path class="a" d="M80 48.4C110 53.6 150 69.1 190 71.4"/><path class="b" d="M80 48.7C110 51.6 150 64.7 190 66.2"/><path class="b" d="M80 49.1C110 54.9 150 60.3 190 60.9"/><path class="b" d="M80 49.4C110 53 150 55.9 190 61"/><path class="b" d="M80 49.7C110 51 150 51.5 190 55.7"/><path class="c" d="M80 50C110 49 150 52.4 190 50.5"/><path class="c" d="M80 50.3C110 47.1 150 48 190 45.2"/><path class="c" d="M80 50.6C110 50.4 150 43.6 190 40"/><path class="c" d="M80 50.9C110 48.4 150 39.2 190 34.7"/><path class="c" d="M80 51.3C110 46.5 150 34.8 190 34.8"/><path class="c" d="M80 51.6C110 44.5 150 30.5 190 29.5"/><path class="d" d="M80 51.9C110 42.6 150 31.3 190 24.3"/><path class="d" d="M80 52.2C110 40.6 150 27 190 19"/></svg><i class="rp"></i></div></div>
<div class="t-tags"><span class="t-tag">Our version</span><span class="t-tag t-start">Loops</span></div>
</div>
<div class="t-meta">
@@ -834,9 +841,19 @@ html.fx-open{overflow:hidden;padding-right:var(--fx-gap,0px)} /* the page does n
<div class="fx-list">
<section class="fx" id="stripe-ribbon" aria-labelledby="stripe-ribbon-t" data-fx-site="Stripe" data-fx-start="loop">
- <p class="fx-seen">Seen on <a href="https://stripe.com/" target="_blank" rel="noopener">stripe.com<span class="sr"> (opens in a new tab)</span></a> in&nbsp;<time datetime="2026-10-13">2026</time></p>
+ <p class="fx-seen">Seen on <a href="https://stripe.com/" target="_blank" rel="noopener">stripe.com<span class="sr"> (opens in a new tab)</span></a> in&nbsp;<time datetime="2026-10-22">2026</time></p>
<h2 id="stripe-ribbon-t" tabindex="-1">The twisting ribbon of light</h2>
<p class="fx-chips"><span class="fx-chip">Loops</span><span class="fx-chip">Made from 3 animations</span></p>
+ <div class="fx-version">
+ <div class="fx-stage">
+ <iframe title="Our version: The twisting ribbon of light" data-src="versions/stripe-ribbon.html"></iframe>
+ <span class="fx-vlabel" aria-hidden="true">Our version</span>
+ </div>
+ <div class="fx-player">
+ <button type="button" class="fx-pbtn" data-fx-cmd="pause">Pause</button>
+ <p class="fx-phint">Built from the prompt below. It moves by itself.</p>
+ </div>
+ </div>
<h3 class="fx-sub">What you see</h3>
<p class="fx-what">Behind the headline, a wide ribbon made of fine strands of glowing color slowly twists in depth, some strands sharp and others soft, as if filmed by a camera, under a fine grain. Before 2026 the same place held a flat band of blended colors that flowed like slow paint, the look <a href="../animations/07-ambient-background/mesh-gradient/">Mesh Gradient Animation</a> makes.</p>
<h3 class="fx-sub">Good to know</h3>
diff --git a/famous/versions/stripe-ribbon.html b/famous/versions/stripe-ribbon.html
new file mode 100644
index 00000000..ae46d3f7
--- /dev/null
+++ b/famous/versions/stripe-ribbon.html
@@ -0,0 +1,181 @@
+<!doctype html>
+<html lang="en">
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<meta name="robots" content="noindex">
+<title>Our version: The twisting ribbon of light</title>
+<style>
+@font-face{font-family:'Schibsted Grotesk';src:url('../../assets/fonts/schibsted-latin-ext.woff2') format('woff2');font-weight:400 900;font-display:swap;unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
+@font-face{font-family:'Schibsted Grotesk';src:url('../../assets/fonts/schibsted-latin.woff2') format('woff2');font-weight:400 900;font-display:swap;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
+*{box-sizing:border-box}
+html,body{height:100%;margin:0}
+html{background:#0b0b0f;color-scheme:dark;overflow:hidden;overscroll-behavior:contain}
+body{color:#f4f4f2;font:400 15px/1.5 'Schibsted Grotesk',system-ui,-apple-system,'Segoe UI',sans-serif;-webkit-font-smoothing:antialiased}
+/* the still picture: soft bands of the ribbon's colors, shown until the first drawn frame is ready */
+.hero{position:relative;height:100%;min-height:160px;overflow:hidden;display:grid;place-items:center;background:radial-gradient(70% 38% at 24% 76%,rgba(63,214,196,.3),transparent 72%),radial-gradient(64% 40% at 74% 26%,rgba(185,140,255,.34),transparent 72%),radial-gradient(60% 30% at 50% 52%,rgba(110,168,255,.3),transparent 72%),#0b0b0f}
+.art{position:absolute;inset:0}
+canvas{display:block;width:100%;height:100%;opacity:0;transition:opacity .8s}
+canvas[hidden]{display:none}
+.ready canvas{opacity:1}
+.copy{position:relative;z-index:1;width:min(32em,100%);padding:0 clamp(16px,6vw,40px);text-align:center;text-shadow:0 0 20px rgba(8,8,12,.8),0 1px 2px rgba(8,8,12,.5)}
+.copy::before{content:"";position:absolute;z-index:-1;inset:-34px -8px;border-radius:60px;background:rgba(8,8,12,.8);filter:blur(24px)}
+h1{margin:0;font-size:clamp(28px,4.2vw + 10px,56px);line-height:1.08;font-weight:700;letter-spacing:-.02em;text-wrap:balance}
+p{margin:.6em 0 0;font-size:clamp(14px,.8vw + 11px,18px);text-wrap:balance}
+@media(prefers-reduced-motion:reduce){canvas{transition:none}}
+</style>
+<script>
+{
+ const q = '(max-width:600px),(max-height:500px)';
+ let lite;
+ try { lite = window.parent.matchMedia(q).matches; } catch (e) { lite = screen.width <= 600 || screen.height <= 500; }
+ document.documentElement.classList.toggle('lite', lite);
+}
+</script>
+</head>
+<body>
+<main class="hero">
+ <div class="art" role="img" aria-label="A wide ribbon of fine glowing strands in blue, teal and violet, twisting slowly in depth behind the headline. Strands near you are sharp and those far away are soft, under a fine grain."><canvas id="gl"></canvas><canvas id="c2" hidden></canvas></div>
+ <div class="copy"><h1>Your headline</h1><p>A short line of text sits here, in front of the ribbon.</p></div>
+</main>
+<script>
+const $ = s => document.querySelector(s), frac = x => x - Math.floor(x), smooth = x => { x = Math.min(Math.max(x, 0), 1); return x * x * (3 - 2 * x); };
+const reduce = matchMedia('(prefers-reduced-motion: reduce)'), FRAME = 1000 / 60, root = document.documentElement;
+const LITE = root.classList.contains('lite'), NS = LITE ? 48 : 80, STILL = 3, scale = LITE ? .6 : Math.min(devicePixelRatio || 1, 1.25);
+const PAL = [[63, 214, 196], [110, 168, 255], [185, 140, 255], [255, 111, 139]]; // teal, blue, violet, a touch of coral
+// The ribbon's shape, written once for the shader and the Canvas 2D fallback: u runs along it, ts is the 60 s loop from 0 to 1.
+const F = { th: '2.2*u+.35+.2*sin(TAU*3.*ts-1.7*u)+.35*sin(TAU*ts+.9*u+1.)', wd: '.31*(1.+.18*sin(1.9*u+TAU*3.*ts))',
+ bd: '.16*sin(1.7*u+TAU*2.*ts)+.06*sin(3.1*u-TAU*3.*ts+2.)', zd: '.22*sin(1.5*u+TAU*2.*ts+.6)-.3*u' };
+const FS = `#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+uniform vec2 R, A; uniform float ts, G;
+const int NS = ${NS}; const float TAU = 6.2831853;
+${PAL.map((c, i) => `const vec3 C${i} = vec3(${c.map(v => (v / 255).toFixed(3))});`).join('\n')}
+float th(float u){return ${F.th};}
+float wd(float u){return ${F.wd};}
+float bd(float u){return ${F.bd};}
+float zd(float u){return ${F.zd};}
+vec3 pal(float x){ vec3 c = mix(C0, C1, smoothstep(0., .34, x)); c = mix(c, C2, smoothstep(.3, .64, x)); return mix(c, C3, smoothstep(.8, 1., x) * .9); }
+float hash(vec2 p){ vec3 q = fract(vec3(p.xyx) * .1031); q += dot(q, q.yzx + 33.33); return fract((q.x + q.y) * q.z); }
+void main(){
+ float m = min(R.x, R.y), px = 1. / m;
+ vec2 p = (gl_FragCoord.xy - .5 * R) / m;
+ float u = dot(p, A) / (.56 * length(R) / m), d = dot(p, vec2(-A.y, A.x));
+ float t0 = th(u), w = wd(u), b0 = bd(u), z0 = zd(u), ct = cos(t0), st = sin(t0);
+ vec3 sum = vec3(0.);
+ if (abs(d - b0) < 1.5 * (w + .09) + .06) {
+ for (int i = 0; i < NS; i++) {
+ float k = float(i), n = float(NS);
+ float v = (k + .5) / n * 2. - 1. + (fract(k * .7548777 + .31) - .5) * 1.1 / n;
+ float r2 = fract(k * .5698403 + .77), r3 = fract(k * .618034 + .13);
+ float ph = (r2 - .5) * .26 + .14 * v, cp = 1. - ph * ph * .5, sp = ph - ph * ph * ph * .1667;
+ float c = ct * cp - st * sp, sn = st * cp + ct * sp, bow = .09 * (1. - v * v);
+ float z = z0 + v * w * sn + bow * c;
+ float dy = d - (b0 + v * w * c - bow * sn) / (1. - .45 * z);
+ float bl = .0007 + .013 * (1. - smoothstep(-.45, .1, z)) + .004 * smoothstep(.35, .6, z);
+ float s0 = max(.0017 + .001 * r3, .85 * px), sg = sqrt(s0 * s0 + bl * bl);
+ if (abs(dy) > 6. * sg) continue;
+ float nl = abs(.862 * c - .507 * sn), spec = pow(abs(.965 * c - .263 * sn), 80.);
+ float x = .4 + .46 * v + .1 * u + (r3 - .5) * .14 + .14 * (1. - smoothstep(-.2, .2, c));
+ float br = (.5 + .7 * r3) * (.88 + .12 * sin(TAU * 5. * ts + k * 1.7));
+ float line = s0 / sg * exp(-.5 * dy * dy / (sg * sg)), halo = .3 * s0 / (2.5 * sg) * exp(-.08 * dy * dy / (sg * sg));
+ sum += (pal(x) * (.25 + .75 * nl) + spec * .3) * br * (line + halo) * 60. / n;
+ }
+ }
+ vec3 bg = vec3(.043, .043, .059) + vec3(.02, .03, .065) * exp(-2.2 * dot(p, p));
+ vec3 col = 1. - (1. - bg) * exp(-1.7 * sum);
+ col += (hash(floor(gl_FragCoord.xy) + G * vec2(37., 17.)) - .5) * (.035 + .06 * (col.r + col.g + col.b) / 3.);
+ gl_FragColor = vec4(col, 1.);
+}`;
+const cv = $('#gl'), c2 = $('#c2'), wrap = $('.hero');
+let gl, U, g2, pat, W = 1, H = 1, ax = [1, 0], T = STILL, paused = reduce.matches, vis = true, lastT = null, raf = 0;
+
+function initGL() {
+ try { gl = cv.getContext('webgl', { antialias: false, alpha: false, powerPreference: 'low-power', failIfMajorPerformanceCaveat: true }); } catch (e) {}
+ if (!gl) return false;
+ const sh = (t, s) => { const o = gl.createShader(t); gl.shaderSource(o, s); gl.compileShader(o); return o; }, p = gl.createProgram();
+ gl.attachShader(p, sh(gl.VERTEX_SHADER, 'attribute vec2 a;void main(){gl_Position=vec4(a,0.,1.);}')); gl.attachShader(p, sh(gl.FRAGMENT_SHADER, FS)); gl.linkProgram(p);
+ if (!gl.getProgramParameter(p, gl.LINK_STATUS)) return false;
+ gl.useProgram(p); gl.bindBuffer(gl.ARRAY_BUFFER, gl.createBuffer());
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-1, -1, 1, -1, -1, 1, 1, 1]), gl.STATIC_DRAW);
+ const a = gl.getAttribLocation(p, 'a'); gl.enableVertexAttribArray(a); gl.vertexAttribPointer(a, 2, gl.FLOAT, false, 0, 0);
+ U = {}; ['R', 'A', 'ts', 'G'].forEach(n => U[n] = gl.getUniformLocation(p, n));
+ return true;
+}
+// Canvas 2D fallback: the same strands as lines (fewer, with no true blur: far ones are wider and fainter), under a tiled grain.
+const fn = e => { const f = new Function('u', 'ts', 'sin', 'TAU', 'return ' + e); return (u, ts) => f(u, ts, Math.sin, Math.PI * 2); };
+const [th, wd, bd, zd] = ['th', 'wd', 'bd', 'zd'].map(k => fn(F[k]));
+const pal = x => { let c = PAL[0]; [[1, 0, .34, 1], [2, .3, .64, 1], [3, .8, 1, .9]].forEach(([i, a, b, k]) => { const f = smooth((x - a) / (b - a)) * k; c = c.map((v, j) => v + (PAL[i][j] - v) * f); }); return c; };
+function useFallback() {
+ gl = null; cv.hidden = true; c2.hidden = false; g2 = c2.getContext('2d');
+ const n = document.createElement('canvas'), g = n.getContext('2d'), im = g.createImageData(96, 96);
+ n.width = n.height = 96;
+ for (let i = 0; i < im.data.length; i += 4) { im.data[i] = im.data[i + 1] = im.data[i + 2] = Math.random() * 255; im.data[i + 3] = 255; }
+ g.putImageData(im, 0, 0); pat = g2.createPattern(n, 'repeat'); size();
+}
+function draw2d(ts) {
+ const m = Math.min(W, H), LH = .56 * Math.hypot(W, H) / m, N = LITE ? 26 : 56, J = LITE ? 22 : 34, k = Math.max(scale, .75);
+ g2.setTransform(1, 0, 0, 1, 0, 0); g2.globalAlpha = 1; g2.globalCompositeOperation = 'source-over'; g2.fillStyle = '#0b0b0f'; g2.fillRect(0, 0, W, H);
+ g2.globalCompositeOperation = 'lighter'; g2.lineCap = 'butt';
+ for (let i = 0; i < N; i++) {
+ const v = (i + .5) / N * 2 - 1, r3 = frac(i * .618034 + .13), ph = (frac(i * .5698403 + .77) - .5) * .26 + .14 * v, bow = .09 * (1 - v * v);
+ let px, py;
+ for (let j = 0; j <= J; j++) {
+ const u = -1 + 2 * j / J, a = th(u, ts) + ph, c = Math.cos(a), sn = Math.sin(a), w = wd(u, ts);
+ const z = zd(u, ts) + v * w * sn + bow * c, yq = (bd(u, ts) + v * w * c - bow * sn) / (1 - .45 * z), s = u * LH;
+ const x = W / 2 + (s * ax[0] - yq * ax[1]) * m, y = H / 2 - (s * ax[1] + yq * ax[0]) * m;
+ if (j) {
+ const far = 1 - smooth((z + .45) / .55), lit = .25 + .75 * Math.abs(.862 * c - .507 * sn);
+ const rgb = pal(.4 + .46 * v + .1 * u + (r3 - .5) * .14 + .14 * (1 - smooth((c + .2) / .4))).map(Math.round), al = (.3 + .6 * r3) * lit * (1 - .5 * far);
+ g2.beginPath(); g2.moveTo(px, py); g2.lineTo(x, y); // a soft glow under a core line: wider and fainter for strands far away
+ g2.strokeStyle = `rgba(${rgb},${(al * .16).toFixed(3)})`; g2.lineWidth = (4 + 11 * far) * k; g2.stroke();
+ g2.strokeStyle = `rgba(${rgb},${al.toFixed(3)})`; g2.lineWidth = (1.1 + 4 * far) * k; g2.stroke();
+ }
+ px = x; py = y;
+ }
+ }
+ const o = (Math.floor(T * 14) * 37) % 96;
+ g2.globalCompositeOperation = 'overlay'; g2.globalAlpha = .2; g2.translate(o, o * .6); g2.fillStyle = pat; g2.fillRect(-o, -o * .6, W + 96, H + 96);
+}
+function draw() {
+ const ts = (T % 60) / 60;
+ if (gl) {
+ gl.viewport(0, 0, W, H); gl.uniform2f(U.R, W, H); gl.uniform2f(U.A, ax[0], ax[1]); gl.uniform1f(U.ts, ts); gl.uniform1f(U.G, Math.floor(T * 14) % 997);
+ gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
+ } else if (g2) draw2d(ts);
+ root.classList.add('ready');
+}
+function size() {
+ const r = wrap.getBoundingClientRect(), a = Math.atan2(r.height, r.width) * .85;
+ cv.width = c2.width = W = Math.max(1, Math.round(r.width * scale)); cv.height = c2.height = H = Math.max(1, Math.round(r.height * scale));
+ ax = [Math.cos(a), Math.sin(a)]; draw();
+}
+// The loop steps by elapsed time and runs only while the ribbon moves: not paused, on screen and in a visible tab.
+const go = () => !paused && vis && !document.hidden;
+function frame(ts) {
+ raf = 0;
+ const dt = lastT === null ? 0 : Math.min(ts - lastT, 50);
+ lastT = ts; T += (dt / FRAME) / 60; draw();
+ if (go()) raf = requestAnimationFrame(frame); else lastT = null;
+}
+const kick = () => { if (!raf && go()) { lastT = null; raf = requestAnimationFrame(frame); } };
+const halt = () => { cancelAnimationFrame(raf); raf = 0; lastT = null; };
+const setPaused = p => { paused = p; if (p) halt(); else kick(); };
+
+addEventListener('message', e => {
+ if (e.source !== parent || !e.data) return;
+ if (e.data.fx === 'pause') setPaused(true); else if (e.data.fx === 'play') setPaused(false);
+});
+document.addEventListener('visibilitychange', () => { if (document.hidden) halt(); else kick(); });
+cv.addEventListener('webglcontextlost', e => { e.preventDefault(); useFallback(); });
+reduce.addEventListener('change', () => { if (reduce.matches) { setPaused(true); T = STILL; draw(); } else setPaused(false); });
+try { new IntersectionObserver(es => { vis = es[es.length - 1].isIntersecting; if (vis) kick(); else halt(); }).observe(wrap); } catch (e) {}
+if (!initGL()) useFallback(); else size();
+new ResizeObserver(size).observe(wrap);
+kick();
+</script>
+</body>
+</html>
diff --git a/tests/famous.test.js b/tests/famous.test.js
index d79777f3..c101d094 100644
--- a/tests/famous.test.js
+++ b/tests/famous.test.js
@@ -489,7 +489,7 @@ const SITE_PHRASES = [
const CHECKED_IDS = ['stripe-ribbon', 'apple-scroll', 'landonorris-reveal', 'linear-intro', 'apple-menu', 'wikipedia-previews', 'apple-sweep', 'spotify-cards', 'youtube-loading', 'pudding-chart', 'medium-top-bar'];
const CHECKED_DAY = '2026-10-13';
// Entries checked again on their site before the gallery release, and the day of that check.
-const RECHECKED = { 'apple-scroll': '2026-10-22' };
+const RECHECKED = { 'apple-scroll': '2026-10-22', 'stripe-ribbon': '2026-10-22' };
// The text a visitor reads, with each tag ending a word (textOf above joins the end of one element to the start of the next, so a
// slogan at the end of a card label would run into the card's name and go unseen).