merge portal/solargod → main: the orrery gets a door — time-synced deep link (fable)

This commit is contained in:
monsterrobotparty 2026-07-16 14:34:49 +10:00
commit eb3d3cca96
4 changed files with 38 additions and 0 deletions

View File

@ -111,6 +111,24 @@ html, body {
font-weight: 700;
}
/* ---- portal to SOLARGOD (sibling orrery) ---- */
.portal-link {
display: block;
text-align: center;
padding: 6px 8px;
font-size: 11px;
color: var(--dim);
text-decoration: none;
background: rgba(255, 255, 255, 0.03);
border: 1px solid var(--border);
border-radius: 8px;
transition: all 0.15s;
}
.portal-link:hover {
color: var(--accent);
border-color: var(--accent);
}
/* ---- layer rows ---- */
#layers {
display: flex;

View File

@ -23,6 +23,8 @@
<button id="mode-photo" type="button">Photo</button>
</div>
<div id="layers"></div>
<a id="solargod-link" class="portal-link" href="http://127.0.0.1:8147/"
target="_blank" rel="noopener" title="Open SOLARGOD at this moment">🪐 SOLARGOD</a>
<footer>
<div>Public OSINT feeds · Celestrak · OpenSky · EOX Sentinel-2 · CARTO/OSM</div>
<div class="demo">Ships &amp; events are <b>[DEMO]</b> data</div>

View File

@ -74,6 +74,11 @@ function setMode(mode) {
document.getElementById('mode-data').addEventListener('click', () => setMode('data'));
document.getElementById('mode-photo').addEventListener('click', () => setMode('photo'));
// ---- portal to SOLARGOD (sibling orrery) ----
// Deep-links to the solar-system app at GODSIGH's current sim moment via its
// shared `#t=@<unixMs>` convention; the href is rebuilt fresh at click time.
ui.wireSolargodLink(() => Cesium.JulianDate.toDate(viewer.clock.currentTime).getTime());
// ---- clock configuration ----
viewer.clock.startTime = start.clone();
viewer.clock.stopTime = stop.clone();

View File

@ -111,6 +111,19 @@ export function setLiveChip(isLive) {
chip.dataset.state = isLive ? 'live' : 'scrub';
}
// Portal to SOLARGOD (sibling orrery). `getMs` returns GODSIGH's current sim
// time as unix ms; we rebuild the deep-link href fresh at click time so the
// orrery opens at whatever moment the clock is scrubbed to, via the shared
// `#t=@<unixMs>` hash convention. pointerdown fires before navigation, so this
// also covers ⌘/ctrl-click and middle-click new-tab opens.
export function wireSolargodLink(getMs) {
const a = document.getElementById('solargod-link');
if (!a) return;
const sync = () => { a.href = `http://127.0.0.1:8147/#t=@${getMs()}`; };
a.addEventListener('pointerdown', sync);
a.addEventListener('click', sync);
}
// Small fixed overlay for primitive picks (aircraft), which have no Cesium InfoBox.
export function showPickOverlay(title, rowPairs) {
const el = document.getElementById('pick-overlay');