mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 00:32:21 +00:00
The main timeline is the only time control; the Weather panel shows its frame time
The Weather panel kept a second time transport of its own: a slider, step buttons, Latest and Play, backed by a replay in the weather clock that stepped the observed frames every two seconds and went round from the last to the first. The weather clock also attached itself to the world clock as a driver, so the timeline's Play became that replay whenever weather was on. The panel now shows the frame time only: the newest frame and its age while live, the timeline time alone at a past time. The weather clock no longer has setTarget, step, latest, play, pause or togglePlay, its state no longer has playing, and it no longer drives the world clock. It still follows the world time, registers each product's frames as marks the timeline's arrow keys step to, holds its products, and gates the world's continuous play at each next frame until it loads. weatherClock.world names the world clock it follows. A weather row's play, latest and step params move the world clock as the timeline does: play toggles continuous play (from the start of the covered time when live), latest goes live, and step goes to the previous or next mark. The rail timeline component, which only the panel used, is removed, along with its unused messages in every locale.
This commit is contained in:
1 parent
4ddce7f38b
commit
5150279ccf
35 files changed
+331
-1040
No files matched your search
@@ -390,20 +390,24 @@ test('sample stays fixed across model, field and unit changes; dismissal and dis
|
||||
test('observed history labels wind as a forecast without changing its data or parameters', async () => {
|
||||
const { createWeatherClock } = await import('../weather/clock.js');
|
||||
const clock = createWeatherClock();
|
||||
const { world } = clock;
|
||||
const layer = createWindLayer({ feed: { getSnapshot: async () => snapshot('gfs') }, clock });
|
||||
let changes = 0;
|
||||
layer.setRowControlsListener(() => changes++);
|
||||
const params = layer.getParams();
|
||||
await clock.setTarget('2026-09-14T12:00:00.000Z');
|
||||
world.seek(Date.parse('2026-09-14T12:00:00.000Z'));
|
||||
await Promise.resolve();
|
||||
assert.equal(layer.getRowControls().summary.status, null, 'history does not mask source status');
|
||||
assert.ok(changes > 0);
|
||||
assert.match(layer.getRowControls().info, /Forecast · does not follow history/);
|
||||
assert.deepEqual(layer.getParams(), params);
|
||||
await clock.latest();
|
||||
world.goLive();
|
||||
await Promise.resolve();
|
||||
assert.equal(layer.getRowControls().summary.status, null);
|
||||
layer.destroy();
|
||||
const before = changes;
|
||||
await clock.setTarget('2026-09-14T12:00:00.000Z');
|
||||
world.seek(Date.parse('2026-09-14T12:00:00.000Z'));
|
||||
await Promise.resolve();
|
||||
assert.equal(changes, before);
|
||||
clock.destroy();
|
||||
});
|
||||
@@ -462,7 +466,8 @@ test('wind whose source follows the timeline drops the note that it does not fol
|
||||
const clock = createWeatherClock({ world });
|
||||
const layer = createWindLayer({ feed: { getSnapshot: async () => snapshot('gfs') }, clock });
|
||||
world.follow('wind');
|
||||
await clock.setTarget('2026-09-14T12:00:00.000Z');
|
||||
world.seek(Date.parse('2026-09-14T12:00:00.000Z'));
|
||||
await Promise.resolve();
|
||||
assert.equal(clock.getState().mode, 'history');
|
||||
assert.doesNotMatch(layer.getRowControls().info, /does not follow history/);
|
||||
world.follow('wind', false);
|
||||
|
||||
Reference in new issue
Block a user