From be776cc35bbfb733dcacdcca55e2caa0ac34942a Mon Sep 17 00:00:00 2001 From: BoulderBadgeDad Date: Sat, 6 Jun 2026 14:45:20 -0700 Subject: [PATCH] Worker orbs: comet tails on telemetry pulses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Each inbound pulse draws 3 fading ghost positions behind its head. The path is parametric (eased t), so the tail is the same easing evaluated slightly in the past — no position history, and it naturally stretches as the pulse accelerates into the nucleus. Makes the energy flow legible at a glance. --- webui/static/worker-orbs.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/webui/static/worker-orbs.js b/webui/static/worker-orbs.js index 506a6cb4..364004a5 100644 --- a/webui/static/worker-orbs.js +++ b/webui/static/worker-orbs.js @@ -366,6 +366,22 @@ const alpha = 0.55 * (1 - Math.abs(p.t - 0.5) * 0.6); // fade in/out at the ends const radius = 2.2; + // Comet tail — ghost positions at trailing t values. The path is + // parametric, so no position history is needed; the same easing + // evaluated slightly in the past gives a tail that stretches as + // the pulse accelerates into the hub. + for (let i = 3; i >= 1; i--) { + const tt = p.t - i * p.speed * 2.4; + if (tt <= 0) continue; + const te = tt * tt; + const tx = p.orb.x + (hub.x - p.orb.x) * te; + const ty = p.orb.y + (hub.y - p.orb.y) * te; + ctx.beginPath(); + ctx.arc(tx, ty, Math.max(0.4, radius * (1 - i * 0.24)), 0, Math.PI * 2); + ctx.fillStyle = `rgba(${r}, ${g}, ${b}, ${alpha * (1 - i / 4) * 0.5})`; + ctx.fill(); + } + drawGlow(ctx, x, y, radius * 3, r, g, b, alpha * 0.5); ctx.beginPath();