mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Contacts move back as smoothly as they move on
A snapshot timeline may declare spanMs: each record of a snapshot at a time then carries its own fixes from spanMs before the time to spanMs after it. Flights, military flights and vessels following the clock are placed on those fixes, so a seek or a move back within the fixes loaded is no jump: nothing is cleared and play does not wait. The step there is asked for once and stands in for every contact; those it has keep their place. Fixes are merged across snapshots at least 20 s apart, at most 240 a contact, and a contact is not drawn more than a minute before its first fix.
This commit is contained in:
1 parent
b8a320edce
commit
2b5fb51684
27 files changed
+1377
-182
No files matched your search
@@ -124,6 +124,26 @@ test('a camera that stops inside the cadence gets exactly one trailing frame', (
|
||||
assert.equal(timers.size, 0);
|
||||
});
|
||||
|
||||
test('following the clock, a time moved inside the cadence gets one trailing frame', () => {
|
||||
const { layer, requests, timers, advance, frame } = setup();
|
||||
layer.testing._followClockForTest(1_000_000);
|
||||
frame();
|
||||
advance(100);
|
||||
// A seek while paused: the camera is still, the time drawn is not.
|
||||
layer.testing._followClockForTest(940_000);
|
||||
frame();
|
||||
assert.equal(timers.size, 1);
|
||||
advance(VISIBILITY_UPDATE_MS);
|
||||
assert.deepEqual(requests, ['ais-vessels-visibility']);
|
||||
frame();
|
||||
for (let i = 0; i < 20; i += 1) {
|
||||
advance(100);
|
||||
frame();
|
||||
}
|
||||
assert.deepEqual(requests, ['ais-vessels-visibility']);
|
||||
assert.equal(timers.size, 0);
|
||||
});
|
||||
|
||||
test('a forced pass requests its own frame', () => {
|
||||
const { layer, requests } = setup();
|
||||
layer.testing._runVisibilityPassForTest(true);
|
||||
|
||||
Reference in new issue
Block a user