From 122307fa158f649df3b13fb9f0ee3e2d225db4c3 Mon Sep 17 00:00:00 2001 From: openclaw-bot Date: Sun, 24 May 2026 04:30:19 +0000 Subject: [PATCH] =?UTF-8?q?fix(live):=20per-packet=20animation=20always=20?= =?UTF-8?q?1=C3=97=20=E2=80=94=20decouple=20from=20VCR.speed=20(#1346)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit VCR.speed is the inter-packet replay-gap multiplier, not a per-packet animation cadence multiplier. Dividing the constants by VCR.speed made LIVE mode appear instantaneous whenever a prior REPLAY had cycled to 4×/8× (the speed persists in localStorage across page loads). Changes: - drawAnimatedLine: stepMs = 33 (was 33 / VCR.speed) - drawMatrixLine: DURATION_MS = 1100 (was 1100 / VCR.speed) Inter-packet replay timing (delay = realGap / VCR.speed, line 507) is left untouched — that is the legitimate slow-mo / fast-forward axis. Fixes #1346 --- public/live.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/live.js b/public/live.js index a8249fbc..341b89ba 100644 --- a/public/live.js +++ b/public/live.js @@ -3231,7 +3231,7 @@ const matrixGreen = '#00ff41'; const TRAIL_LEN = Math.min(6, bytes.length); - const DURATION_MS = 1100 / VCR.speed; + const DURATION_MS = 1100; // #1346: per-packet animation is constant; VCR.speed governs INTER-packet replay gap only const CHAR_INTERVAL = 0.06; // spawn a char every 6% of progress const charMarkers = []; let nextCharAt = CHAR_INTERVAL; @@ -3363,7 +3363,7 @@ return; } const elapsed = now - lastStep; - const stepMs = 33 / VCR.speed; + const stepMs = 33; // #1346: per-packet animation cadence is constant (~30fps); VCR.speed governs INTER-packet replay gap only if (elapsed >= stepMs) { const ticks = Math.min(Math.floor(elapsed / stepMs), 4); lastStep = now;