feedback1 integrate: a form fx handed out late skips a change clip that would already have ended; browser check stalls then lets the clips catch up

This commit is contained in:
sganggs committed 2026-10-03 08:36:16 +08:00
1 parent f26e2014c4
commit 4bab58e508
4 files changed
+34 -16

No files matched your search

+3 -1
View File
@@ -372,7 +372,9 @@ test('render/app.js hands the `form` of a sim fx (shared/protocol.js fxForm) wit
assert.match(src, /const form = fxForm\(e\);[\s\S]{0,250}inf\.form = form[\s\S]{0,250}setForm\?\.\(form, x\)/);
// a form fx handed out late (render/interp.js takeEvents `late`) switches the model with its closing clip shortened by
// the lateness and without replaying its telegraph
assert.match(src, /const x = late > 0 && Number\(e\[4\]\.dur\) > 0 \? \{ \.\.\.e\[4\], dur: Math\.max\(0, Number\(e\[4\]\.dur\) - late\) \} : e\[4\];/);
assert.match(src, /const x = late > 0 \? \{ \.\.\.e\[4\], late, \.\.\.\(Number\(e\[4\]\.dur\) > 0 \? \{ dur: Math\.max\(0, Number\(e\[4\]\.dur\) - late\) \} : \{\}\) \} : e\[4\];/);
// …and UnitView.setForm skips a change clip that would already have ended
assert.match(readFileSync(path.join(ROOT, 'public/js/render/units.js'), 'utf8'), /!\(late > 0 && late >= \(this\.actor\.dur\?\.\(f\.change\) \?\? Infinity\)\)/);
assert.match(src, /if \(!\(late > 0\)\) fx\.simFx\(/);
assert.match(src, /interp\.takeEvents\(renderT, EVS, renderT - 1\.5, LATE\);/);
});