mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 01:02:23 +00:00
Wait for each frame while the world timeline plays, and quiet the bar
Play no longer runs ahead of the data. The world clock gains a wait, which holds continuous play where it is while a layer loads what the time needs, and a gate, which keeps play from passing a time a layer has yet to load. Weather gates play at its next frame and waits there until the frame shows, so every frame is seen however fast play runs; it waits no more than eight seconds on a frame that never comes, and takes a wait only when its frames change. Play pressed while a frame loads waits for it too. A scrub still drops what loads and moves on. The bar loses its long date and the dates at its ends: the time rides in a bubble over the handle, which pulses while play waits, and the bar runs left to right in every language. Play starts at real time.
This commit is contained in:
1 parent
d04e304502
commit
056b3b58c6
9 files changed
+357
-40
No files matched your search
@@ -149,7 +149,7 @@ test('the track runs over the time the layers show, to now, and scrubs', async (
|
||||
assert.equal(worldClock.now(), ahead);
|
||||
});
|
||||
|
||||
test('play runs a day a second, from the start of the track when at live', async (t) => {
|
||||
test('play runs in real time, from the start of the track when at live', async (t) => {
|
||||
const bar = mount(t);
|
||||
const now = Date.now();
|
||||
const start = now - 10 * 86_400_000;
|
||||
@@ -176,7 +176,7 @@ test('play runs a day a second, from the start of the track when at live', async
|
||||
assert.deepEqual(stepped, []);
|
||||
const rate = worldClock.getRate();
|
||||
assert.ok(worldClock.now() - start < rate * 1_000, 'from the start of the track');
|
||||
assert.equal(rate, 86_400, 'a day a second');
|
||||
assert.equal(rate, 1, 'real time to start with');
|
||||
worldClock.play({ continuous: true });
|
||||
|
||||
// Playing on to now goes live.
|
||||
@@ -231,7 +231,7 @@ test('the speed chosen sets how fast play runs, at once while playing', async (t
|
||||
});
|
||||
await nextTick();
|
||||
const select = bar().querySelector('select.world-timeline-speed');
|
||||
assert.equal(select.value, 'day');
|
||||
assert.equal(select.value, 'real');
|
||||
select.value = 'week';
|
||||
select.dispatchEvent(new Event('change'));
|
||||
await nextTick();
|
||||
|
||||
Reference in new issue
Block a user