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

feat(globe3d): ?ax spin factor and v11 continent transparency

Expose URL ?ax=N as auto-spin speed multiplier for all interactive globe
versions. On globe3d=11, render semi-transparent continent fill with
brighter coastline/border pixels matching the static SVG art.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Anton Afanasyeu
2026-08-05 22:37:20 +02:00
parent 2d31fa4f46
commit 9cfe5ff5bd
2 changed files with 79 additions and 7 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 = '20260704globe29';
var logoBuild = '20260704globe31';
function hubAsset(rel) {
var link = document.querySelector('link[href*="hub.css"]');
@@ -268,6 +268,12 @@ function hub_h(string $s): string {
var fLegacy = parseFloat(globeLatfLegacy);
if (isFinite(fLegacy)) globeLandZoom.latf = fLegacy;
}
var globeAxRaw = params.get('ax');
var globeSpinFactor = 1;
if (globeAxRaw !== null && globeAxRaw !== '') {
var axParsed = parseFloat(globeAxRaw);
if (isFinite(axParsed)) globeSpinFactor = axParsed;
}
var useGlobe3d = logoEnabled && globe3dVersion !== 0;
var globe3dLayers = { globe: true, continents: true, gridOverlay: true };
@@ -315,6 +321,9 @@ function hub_h(string $s): string {
if (Object.keys(globeLandZoom).length > 0) {
globeOpts.landZoom = globeLandZoom;
}
if (globeSpinFactor !== 1) {
globeOpts.spinFactor = globeSpinFactor;
}
var globeModuleUrl = new URL('assets/hub-globe.js', window.location.href);
globeModuleUrl.searchParams.set('v', logoBuild);
globeModuleUrl.searchParams.set('globe3d', String(globe3dVersion));