From 1a06c3e4cf20dae0884a1ac0a1d95b64b7423a99 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 25 Oct 2026 06:11:39 +0000 Subject: [PATCH] =?UTF-8?q?tools(rpo-replay):=20v3=20=E2=80=94=20review=20?= =?UTF-8?q?fixes:=20pair-locked=20true-size=20shot,=20fixed=20scale=20per?= =?UTF-8?q?=20beat,=205=20chapters,=20safe=20zones,=20neutral=20copy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_0187rSCa4AKJPGw6uiuPSGyX --- tools/rpo-replay/hud.js | 10 ++++++---- tools/rpo-replay/scene.html | 2 +- tools/rpo-replay/scene.js | 23 +++++++++++++++++++---- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/tools/rpo-replay/hud.js b/tools/rpo-replay/hud.js index 5d51a7080..89418a7c9 100644 --- a/tools/rpo-replay/hud.js +++ b/tools/rpo-replay/hud.js @@ -21,7 +21,7 @@ export function createHud(ctx) { const CAPTIONS = [ { s0: -1, s1: 4.4, hook: true, - title: `A Russian military satellite shadowed a U.S.-registered one — to ~${CA_M} m`, + title: `A Russian military satellite shadowed a U.S.-registered one — to ~${CA_M} m`, body: 'How Cosmos 2612 matched ICEYE-X36\'s orbit over 22 days, rebuilt from public tracking data.', }, { @@ -207,9 +207,10 @@ export function createHud(ctx) { const [r, tt] = st.rel; let ctxLine; const caS = EVENTS.find((e) => e.kind === 'ca').s; - if (st.sep < 1500) ctxLine = `≈ ${Math.max(1, Math.round(st.sep / 100))} football fields${s > caS && s < 36.5 ? ` · closest ${CA_M} m` : ''}`; + if (st.sep < 1500) ctxLine = `≈ ${Math.max(1, Math.round(st.sep / 100))} football fields`; else if (st.sep < 2e6) ctxLine = `${Math.abs(tt) >= 1e4 ? fmtNum(Math.abs(tt) / 1000) + ' km' : (Math.abs(tt) / 1000).toFixed(1) + ' km'} ${tt < 0 ? 'behind' : 'ahead'}${Math.abs(r) > 20e3 ? ` · ${fmtNum(Math.abs(r) / 1000)} km ${r > 0 ? 'higher' : 'lower'}` : ''}`; else ctxLine = `${Math.abs(r) > 20e3 ? `${fmtNum(Math.abs(r) / 1000)} km higher · ` : ''}far side of the orbit`; + if (s > caS && s < 36.5) ctxLine += ` · closest ${CA_M} m`; ro.querySelector('.ctx').textContent = ctxLine; // Scale chip: amber when enlarged, white at true size. @@ -234,10 +235,11 @@ export function createHud(ctx) { // Event toasts (max two, newest on top) let html = ''; - if (st.lx < 0.5 && st.sep < 5e3 && s < 41.2) html += '
In Earth\'s shadow
orbital night · sunrise in minutes
'; + const quiet = s > 31.85 && s < 33.95; // true-size shot: headline + pulse carry it + if (!quiet && st.lx < 0.5 && st.sep < 5e3 && s < 41.2) html += '
In Earth\'s shadow
orbital night · sunrise in minutes
'; const active = EVENTS.map((e) => ({ e, a: fade(s, e.s, e.s + (e.kind === 'ca' ? 3.6 : e.kind === 'vantor' ? 2.8 : 2.0), 0.2) })) .filter((x) => x.a > 0).slice(-2).reverse(); - for (const { e, a } of active) { + for (const { e, a } of quiet ? [] : active) { html += `
${e.title}
${e.sub}
`; } evEl.innerHTML = html; diff --git a/tools/rpo-replay/scene.html b/tools/rpo-replay/scene.html index 7c6f35032..1443ee8db 100644 --- a/tools/rpo-replay/scene.html +++ b/tools/rpo-replay/scene.html @@ -39,7 +39,7 @@ #logo, #endlogo { position: absolute; display: flex; align-items: center; gap: calc(14 * var(--u)); } #logo { left: var(--pad); top: calc(44 * var(--u)); } #logo img { height: calc(58 * var(--u)); } - #logo span, #endlogo span { font: 800 calc(26 * var(--u))/1 Inter, sans-serif; letter-spacing: 0.16em; } + #logo span, #endlogo span { white-space: nowrap; font: 800 calc(26 * var(--u))/1 Inter, sans-serif; letter-spacing: 0.16em; } /* Chapters */ #chapters { position: absolute; left: calc(520 * var(--u)); right: calc(440 * var(--u)); top: calc(58 * var(--u)); diff --git a/tools/rpo-replay/scene.js b/tools/rpo-replay/scene.js index 99df608dc..2a0161135 100644 --- a/tools/rpo-replay/scene.js +++ b/tools/rpo-replay/scene.js @@ -192,8 +192,8 @@ const CAM = [ { s: 26.0, dist: 4.6e3, f: 2.4, az: 76, el: 30, look: 0.5, earth: 0, fov: 36, mag: 1, mx: 40, trail: 9 }, { s: 29.7, dist: 2.0e3, f: 2.2, az: 104, el: 24, look: 0.5, earth: 0, fov: 36, mag: 1, mx: 25, trail: 4 }, { s: 31.9, dist: 1.0e3, f: 2.2, az: 116, el: 22, look: 0.5, earth: 0, fov: 36, mag: 1, mx: 25, trail: 3 }, - { s: 31.9, cut: true, dist: 25, f: 0, az: 165, el: 8, look: 0.0, earth: 0, fov: 34, mag: 0, trail: 0.5, aimRel: [0, -60, 0] }, - { s: 33.9, dist: 22, f: 0, az: 170, el: 7, look: 0.0, earth: 0, fov: 34, mag: 0, trail: 0.5, aimRel: [0, -70, 0] }, + { s: 31.9, cut: true, dist: 26, f: 0, az: 160, el: 0, look: 0.0, earth: 0, fov: 34, mag: 0, trail: 0.5, comp: 0, pairD: 26, pairTh: 22 }, + { s: 33.9, dist: 22, f: 0, az: 163, el: 0, look: 0.0, earth: 0, fov: 34, mag: 0, trail: 0.5, comp: 0, pairD: 22, pairTh: 18 }, { s: 33.9, cut: true, dist: 1.3e3, f: 2.2, az: 96, el: 18, look: 0.5, earth: 0, fov: 36, mag: 1, mx: 25, trail: 1.6 }, { s: 35.6, dist: 1.6e3, f: 2.4, az: 100, el: 22, look: 0.5, earth: 0, fov: 36, mag: 1, mx: 25, trail: 2 }, { s: 37.0, dist: 1.2e4, f: 2.8, az: 110, el: 30, look: 0.4, earth: 0, fov: 36, mag: 1, mx: 40, trail: 4 }, @@ -227,6 +227,9 @@ function camAt(s) { earth: lerp(a.earth, b.earth), fov: lerp(a.fov, b.fov), mag: lerp(a.mag, b.mag), + comp: lerp(a.comp ?? 1, b.comp ?? 1), + pairD: lerp(a.pairD || 0, b.pairD || 0), + pairTh: lerp(a.pairTh || 0, b.pairTh || 0), mx: Math.exp(lerp(Math.log(a.mx || 1), Math.log(b.mx || 1))), trail: Math.exp(lerp(Math.log(a.trail), Math.log(b.trail))), aimRel: [0, 1, 2].map((k) => lerp(ar[k], br[k])), @@ -453,6 +456,18 @@ async function frame(s) { v3.normalize(v3.add(v3.multiplyByScalar(off, 1 - cam.sun, off), v3.multiplyByScalar(sunW, cam.sun, new v3()), off), off); } const camPos = v3.add(pivot, v3.multiplyByScalar(off, dist, new v3()), new v3()); + if (cam.pairD > 0) { + // Pair-locked: camera just off X36, angled pairTh from the X36->Cosmos line + // (sideways, in the orbit's horizontal), aimed at the bisector of the two. + const u = v3.normalize(v3.subtract(cosW, x36W, new v3()), new v3()); + const perp = v3.normalize(v3.subtract(NW, v3.multiplyByScalar(u, v3.dot(NW, u), new v3()), new v3()), new v3()); + const th = Cesium.Math.toRadians(cam.pairTh); + v3.add(x36W, v3.multiplyByScalar(u, -cam.pairD * Math.cos(th), new v3()), camPos); + v3.add(camPos, v3.multiplyByScalar(perp, cam.pairD * Math.sin(th), new v3()), camPos); + const a1 = v3.normalize(v3.subtract(x36W, camPos, new v3()), new v3()); + const a2 = v3.normalize(v3.subtract(cosW, camPos, new v3()), new v3()); + v3.add(camPos, v3.add(a1, a2, new v3()), aim); + } const minR = 6.371e6 + 1.2e5; if (v3.magnitude(camPos) < minR) v3.multiplyByScalar(v3.normalize(camPos, camPos), minR, camPos); const dir = v3.normalize(v3.subtract(aim, camPos, new v3()), new v3()); @@ -465,8 +480,8 @@ async function frame(s) { const aspect = W / H; const tanH = PORTRAIT ? Math.tan(fovR / 2) * aspect : Math.tan(fovR / 2); const tanV = PORTRAIT ? Math.tan(fovR / 2) : Math.tan(fovR / 2) / aspect; - const ndcX = PORTRAIT ? 0 : 0.2; - const ndcY = PORTRAIT ? -0.02 : -0.06; + const ndcX = (PORTRAIT ? 0 : 0.2) * cam.comp; + const ndcY = (PORTRAIT ? -0.02 : -0.06) * cam.comp; v3.normalize(v3.add(v3.add(dir, v3.multiplyByScalar(right, -ndcX * tanH, new v3()), new v3()), v3.multiplyByScalar(up, -ndcY * tanV, new v3()), new v3()), dir); right = v3.normalize(v3.cross(dir, RW, new v3()), new v3());