1
0
mirror of git://f0xx.org/ac/ac-be-hub synced 2026-08-09 20:59:23 +03:00

fix(globe3d=11): N-S squeeze lat*0.5 on raw latitude

Revert wrong lat/0.5 and lat/1.75; initial ll.lat scaled by 0.5 (÷2).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Anton Afanasyeu
2026-08-05 19:21:25 +02:00
parent f4324fa578
commit 138e9e6ee8
2 changed files with 3 additions and 3 deletions

View File

@@ -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;
/** NS squeeze divisor on sampled latitude (0.5 → lat/0.5, compresses disk NS). */
/** NS 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);
}