mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-08-28 00:14:07 +00:00
fix(live): per-packet animation always 1× — decouple from VCR.speed (#1346)
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
This commit is contained in:
+2
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user