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 via lat * 0.5 not lat / 1.75

Invert coefficient direction — multiply sampled latitude by 0.5.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Anton Afanasyeu
2026-08-05 19:18:28 +02:00
parent 9b96a28586
commit 4a0184356d
2 changed files with 4 additions and 4 deletions

View File

@@ -29,8 +29,8 @@ const CONTINENT_INNER_SX = 1.2408477842003853;
const CONTINENT_INNER_SY = 1.2408477842003853; const CONTINENT_INNER_SY = 1.2408477842003853;
/** Map plate center longitude (extract_red_polygons.py CENTER_LON). */ /** Map plate center longitude (extract_red_polygons.py CENTER_LON). */
const MERCATOR_LON_CENTER = (12 * Math.PI) / 180; const MERCATOR_LON_CENTER = (12 * Math.PI) / 180;
/** NS squeeze on sphere land sample (higher = shorter poles on disk). */ /** NS squeeze multiplier on sampled latitude (0.5 = half vertical span). */
const CONTINENT_NS_SQUEEZE = 1.75; const CONTINENT_NS_SQUEEZE = 0.5;
const RASTER_SCALE = 2; const RASTER_SCALE = 2;
const AXIS_STEPS = 160; const AXIS_STEPS = 160;
const SPHERE_AXIS_STEPS = 180; const SPHERE_AXIS_STEPS = 180;
@@ -956,7 +956,7 @@ function sampleFlatPlateFromHub(mercFlat, hpX, hpY) {
function sampleMercFlatFromTex(mercFlat, tex) { function sampleMercFlatFromTex(mercFlat, tex) {
const ll = texLonLat(tex); const ll = texLonLat(tex);
const lon = wrapLon(ll.lon + MERCATOR_LON_CENTER); 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); return sampleMercFlat(mercFlat, lon, lat);
} }

View File

@@ -187,7 +187,7 @@ function hub_h(string $s): string {
var supportsLayout = !!(window.CSS && CSS.supports && CSS.supports('object-fit', 'cover')); var supportsLayout = !!(window.CSS && CSS.supports && CSS.supports('object-fit', 'cover'));
var logoEnabled = !!(stage && supportsSvg && supportsLayout); var logoEnabled = !!(stage && supportsSvg && supportsLayout);
var logoBuild = '20260704globe18'; var logoBuild = '20260704globe19';
function hubAsset(rel) { function hubAsset(rel) {
var link = document.querySelector('link[href*="hub.css"]'); var link = document.querySelector('link[href*="hub.css"]');