Merge main (e4708a81, #1745) into the renderer branch

Main brings the reviewed one-time-control and timeline-mark changes. They
keep this branch's renderer work: earthquakes draw through the draw port and
register their strong quakes as marks; the weather clock keeps `follows` beside
`world`; the weather layer measures ages and delays from the timeline time;
the Visual panel keeps its sky and weather groups under Effects. Tests that
moved time through the weather clock now move it on the world clock.
This commit is contained in:
Sameh Khamis committed 2026-11-14 22:08:39 -08:00
commit 0ecbfbecd0
123 files changed
+5917 -1471

No files matched your search

+21 -6
View File
@@ -147,6 +147,9 @@ function restoreCameraView(viewer, view, landedView) {
camera.setView(view);
}
/** The longest name a timeline mark carries, as in the mission index. */
const MARK_LABEL_LENGTH = 27;
export function createLifecycle({
state: layerState,
services,
@@ -156,18 +159,30 @@ export function createLifecycle({
const { holdContinuousRender, releaseContinuousRender } = services.render;
let hover = null;
// While on, the launches loaded span the time from the first to the last,
// each one a mark. Registered once; off, the layer has no time to show, and
// each step tells the clock once it has settled.
// each one a mark labelled with its mission's name (the launch's where it
// has none), cut short and in capitals as the mission index shows names.
// Registered once; off, the layer has no time to show, and each step tells
// the clock once it has settled.
worldClock.register({
id: 'rocket-launches',
coverage: () => {
if (!layerState._enabled) return null;
const marks = layerState._launches
.map((launch) => Date.parse(launch.launchTime))
.filter(Number.isFinite)
.sort((a, b) => a - b);
.map((launch) => ({
time: Date.parse(launch.launchTime),
label: parts.overlays
.shortMissionLabel(
launch.missionName || launch.name,
MARK_LABEL_LENGTH,
)
.toUpperCase(),
...(launch.id != null ? { id: String(launch.id) } : {}),
kind: 'launch',
}))
.filter(({ time }) => Number.isFinite(time))
.sort((a, b) => a.time - b.time);
if (!marks.length) return null;
return { start: marks[0], end: marks.at(-1), marks };
return { start: marks[0].time, end: marks.at(-1).time, marks };
},
});