Bring launches up as the world time passes them, and play the whole track

Away from live, a launch shows from its lift-off on: its marker, label,
paths and orbit stay hidden while the world time is before it, so scrubbing
or playing brings the launches up in the order they flew. The selected
mission stays whenever it flies, and live shows every launch as before.

Play on the timeline runs the whole track in about a minute, from its start
when at live, and runs the clock itself past weather's own replay. It goes
live when it reaches now, or holds at an end that lies ahead of now. Going
live puts the rate back to 1.
This commit is contained in:
Sameh Khamis committed 2026-11-02 07:21:01 -08:00
1 parent 48093108b1
commit 0aa54dfa97
9 files changed
+326 -25

No files matched your search

+9 -5
View File
@@ -152,23 +152,27 @@ export function createWorldClock({
anchorMono = monotonicNow();
changed();
},
/** Back to the wall clock; playback stops. */
/** Back to the wall clock; playback stops and its rate goes back to 1. */
goLive() {
if (live && !playing) return;
if (live && !playing && rate === 1) return;
const stepping = active;
live = true;
cursorMs = null;
playing = false;
active = null;
rate = 1;
// Its driven(false) finds nothing left to stop.
stepping?.driver.pause();
changed();
},
/** Play from the cursor (from now, when live). */
play({ rate: nextRate } = {}) {
/**
* Play from the cursor (from now, when live). A driver steps it unless
* `continuous`, which runs the cursor at the rate past every driver.
*/
play({ rate: nextRate, continuous: runOn = false } = {}) {
if (nextRate !== undefined) api.setRate(nextRate);
if (playing) return;
for (let index = drivers.length - 1; index >= 0; index -= 1) {
for (let index = drivers.length - 1; !runOn && index >= 0; index -= 1) {
if (drivers[index].driver.play() !== false) return;
}
if (live) {