From a72ddc30f80111280cfc61d61f62ffeac75c5721 Mon Sep 17 00:00:00 2001 From: Sirius DevOps Date: Thu, 19 Nov 2026 23:45:22 -0500 Subject: [PATCH] feat(hud): Blue Marble default basemap + constant-speed readable news ticker - initMap preferred chain: BlueMarble_ShadedRelief_Bathymetry first (static, gap-free); VIIRS/MODIS satellite remain selectable. No basemap persistence exists (osint.mapDefaults stores overlay prefs only), so first-load default is the whole change. has_time=false hides time controls via mapLayerChanged. - News ticker: animation-duration computed from rendered group width for a constant 28 px/s regardless of headline count, recomputed on every 3-min rebuild; CSS fallback raised 90s -> 240s. Seamless two-copy -50% loop kept; market ticker untouched (60s CSS, no inline override). Verified in real browser vs mock API + live GIBS tiles: fresh load selects Blue Marble (8/8 tiles), Terra satellite round-trip renders with time controls, measured ticker speed 28.01 px/s (was ~88), critical-news/blips toggles clean (1 shared canvas -> 0, no reload), zero console errors. --- app/static/index.html | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/app/static/index.html b/app/static/index.html index 3b9b430..28b058a 100644 --- a/app/static/index.html +++ b/app/static/index.html @@ -720,7 +720,7 @@ -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%); } .tick-track { display: flex; width: max-content; animation: marquee 60s linear infinite; } - .ticker.news .tick-track { animation-duration: 90s; } + .ticker.news .tick-track { animation-duration: 240s; } /* fallback; JS sets constant px/s */ .tick-wrap:hover .tick-track, .tick-wrap:focus-within .tick-track { animation-play-state: paused; } @keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } } .tick-group { display: flex; align-items: center; } @@ -1874,6 +1874,7 @@ function initMarketTicker() { /* ═══════════════ NEWS FEED + TICKER ═══════════════ */ let newsInterval = null; const NEWS_REFRESH_MS = 180000; // 3-min ticker/brief poll +const NEWS_TICKER_PX_PER_S = 28; // constant readable scroll speed for the news ticker let newsTickerBuilt = false; function newsEsc(s) { @@ -2016,6 +2017,13 @@ function renderNewsTicker(articles, summaries, tickerItems) { items = `No headlines yet — scraper idle`; } track.innerHTML = `${items}${items}`; + // Constant pixel speed regardless of headline count: the marquee travels + // one group width (track = two identical copies, keyframe goes to -50%). + // Recomputed on every rebuild; market ticker keeps its own CSS duration. + const groupWidth = track.scrollWidth / 2; + track.style.animationDuration = groupWidth > 0 + ? `${(groupWidth / NEWS_TICKER_PX_PER_S).toFixed(2)}s` + : ''; newsTickerBuilt = true; } @@ -2539,10 +2547,12 @@ async function initMap() { const sel = document.getElementById('map-layer'); sel.innerHTML = mapLayers.map(l => ``).join(''); + // Blue Marble first: static, gap-free basemap. Satellite true-color + // (VIIRS/MODIS) has cloud/coverage gaps — still selectable below. const preferred = - mapLayers.find(l => l.id === 'VIIRS_SNPP_CorrectedReflectance_TrueColor') + mapLayers.find(l => l.id === 'BlueMarble_ShadedRelief_Bathymetry') + || mapLayers.find(l => l.id === 'VIIRS_SNPP_CorrectedReflectance_TrueColor') || mapLayers.find(l => l.id === 'MODIS_Terra_CorrectedReflectance_TrueColor') - || mapLayers.find(l => l.id === 'BlueMarble_ShadedRelief_Bathymetry') || mapLayers.find(l => !l.has_time) || mapLayers[0]; if (preferred) sel.value = preferred.id;