Restore smooth realtime fall ballistics

This commit is contained in:
Mikei386 committed 2026-08-05 20:39:19 +02:00
1 parent c6a1037611
commit 66110be76d
5 files changed
+55 -30

No files matched your search

+7
View File
@@ -4,6 +4,7 @@ import assert from 'node:assert/strict';
const html = fs.readFileSync(new URL('../www/index.html', import.meta.url), 'utf8');
const main = fs.readFileSync(new URL('../www/main.js', import.meta.url), 'utf8');
const audio = fs.readFileSync(new URL('../www/core/audio.js', import.meta.url), 'utf8');
const realtime = fs.readFileSync(new URL('../www/views/realtime.js', import.meta.url), 'utf8');
const styleSelect = html.match(/<select\b[^>]*\bid="styleSel"[^>]*>/)?.[0] || '';
assert(styleSelect, 'style selector is missing');
@@ -29,5 +30,11 @@ assert(!/requestAnimationFrame/.test(audio),
'audio transport must not create requestAnimationFrame loops that compete with the canvas loop');
assert(!/while\s*\(pendingPhoenixFrame\)/.test(audio),
'metrics transport must coalesce bursts instead of draining every queued state');
assert(!/syncNativePeakHold/.test(realtime),
'native RTA peak anchors must not be copied directly into the visible hold line');
assert((realtime.match(/applyPeakHold\(state, integrated, CONFIG, range\)/g) || []).length >= 3,
'every RTA engine must advance peak hold on the display clock');
assert(/useIirEngine[^]*?applyRealtimeBarBallistics\(state, displayBase, CONFIG, range\)/.test(realtime),
'native IIR bars must advance their visible release on the display clock');
console.log('GUI contract regression tests passed');