From 138e9e6ee89ce4055a5584edeb8da93737928bbe Mon Sep 17 00:00:00 2001 From: Anton Afanasyeu Date: Wed, 5 Aug 2026 19:21:25 +0200 Subject: [PATCH] fix(globe3d=11): N-S squeeze lat*0.5 on raw latitude MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Revert wrong lat/0.5 and lat/1.75; initial ll.lat scaled by 0.5 (÷2). Co-authored-by: Cursor --- assets/hub-globe.js | 4 ++-- index.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/hub-globe.js b/assets/hub-globe.js index 1d20c76..4f12718 100644 --- a/assets/hub-globe.js +++ b/assets/hub-globe.js @@ -29,7 +29,7 @@ const CONTINENT_INNER_SX = 1.2408477842003853; const CONTINENT_INNER_SY = 1.2408477842003853; /** Map plate center longitude (extract_red_polygons.py CENTER_LON). */ const MERCATOR_LON_CENTER = (12 * Math.PI) / 180; -/** N–S squeeze divisor on sampled latitude (0.5 → lat/0.5, compresses disk N–S). */ +/** N–S squeeze: lat × 0.5 (same as lat ÷ 2) before mercator row lookup. */ const CONTINENT_NS_SQUEEZE = 0.5; const RASTER_SCALE = 2; const AXIS_STEPS = 160; @@ -956,7 +956,7 @@ function sampleFlatPlateFromHub(mercFlat, hpX, hpY) { function sampleMercFlatFromTex(mercFlat, tex) { const ll = texLonLat(tex); const lon = wrapLon(ll.lon + MERCATOR_LON_CENTER); - const lat = Math.max(-1.52, Math.min(1.52, ll.lat * CONTINENT_NS_SQUEEZE)); + const lat = Math.max(-1.52, Math.min(1.52, ll.lat / CONTINENT_NS_SQUEEZE)); return sampleMercFlat(mercFlat, lon, lat); } diff --git a/index.php b/index.php index a36ef7c..7cdc0bf 100644 --- a/index.php +++ b/index.php @@ -187,7 +187,7 @@ function hub_h(string $s): string { var supportsLayout = !!(window.CSS && CSS.supports && CSS.supports('object-fit', 'cover')); var logoEnabled = !!(stage && supportsSvg && supportsLayout); - var logoBuild = '20260704globe20'; + var logoBuild = '20260704globe21'; function hubAsset(rel) { var link = document.querySelector('link[href*="hub.css"]');