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

feat(globe3d=11): ?f= URL param for N-S latitude factor tuning

Default remains 0.66; exposed on #hub-logo-stage as data-globe-lat-factor.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Anton Afanasyeu
2026-08-05 19:27:56 +02:00
parent dbea1c53da
commit ae83a64042
2 changed files with 28 additions and 8 deletions

View File

@@ -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 = '20260704globe24';
var logoBuild = '20260704globe25';
function hubAsset(rel) {
var link = document.querySelector('link[href*="hub.css"]');
@@ -256,6 +256,10 @@ function hub_h(string $s): string {
var globe3dRaw = params.get('globe3d');
var globe3dVersion = globe3dRaw === null || globe3dRaw === '' ? 1 : parseInt(globe3dRaw, 10);
if (!isFinite(globe3dVersion)) globe3dVersion = 1;
var globeLatFactorRaw = params.get('f');
var globeLatFactor = globeLatFactorRaw === null || globeLatFactorRaw === ''
? NaN
: parseFloat(globeLatFactorRaw);
var useGlobe3d = logoEnabled && globe3dVersion !== 0;
var globe3dLayers = { globe: true, continents: true, gridOverlay: true };
@@ -300,6 +304,9 @@ function hub_h(string $s): string {
if (isFinite(globeYawDeg)) {
globeOpts.initialRotationY = globeYawDeg * Math.PI / 180;
}
if (isFinite(globeLatFactor)) {
globeOpts.continentLatFactor = globeLatFactor;
}
var globeModuleUrl = new URL('assets/hub-globe.js', window.location.href);
globeModuleUrl.searchParams.set('v', logoBuild);
globeModuleUrl.searchParams.set('globe3d', String(globe3dVersion));