Ring code: sine wipe over 60% of the interval; ringlab ?fade= and ?ease= knobs

This commit is contained in:
2026-11-16 23:01:46 +01:00
parent 478e30b2fe
commit 486b793328
3 changed files with 12 additions and 5 deletions
+1 -1
View File
@@ -78,7 +78,7 @@ function ringLoop(t) {
if (c.width !== size) { c.width = c.height = size; }
const ctx = c.getContext("2d");
ctx.clearRect(0, 0, size, size);
const fadeMs = Math.min(400, qr.interval_ms * 0.45);
const fadeMs = Math.min(500, qr.interval_ms * 0.6);
const k = prevBits ? Math.min(1, (t - switchedAt) / fadeMs) : 1;
drawRing(ctx, size / 2, size / 2, (size / 2) / DISC * 0.98, (t / 1000) * (2 * Math.PI / 45), qr.bits, t / 1000,
prevBits ? { from: prevBits, k, seed: qr.slot } : null);