mirror of
git://f0xx.org/ac/ac-be-hub
synced 2026-08-09 20:59:23 +03:00
Hub globe3d=2: mercator hemisphere wrap + sphere grid rings.
globe3d=1 keeps legacy hybrid ortho/mercator; globe3d=2 samples hub-logo-continents-mercator-flat on visible z>0 and draws full parallel/meridian rings so axes and continents survive rotation. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
12
index.php
12
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 = '20260606globe14';
|
||||
var logoBuild = '20260704globe2';
|
||||
|
||||
function hubAsset(rel) {
|
||||
var link = document.querySelector('link[href*="hub.css"]');
|
||||
@@ -253,7 +253,10 @@ function hub_h(string $s): string {
|
||||
return base + '?v=' + logoBuild;
|
||||
}
|
||||
|
||||
var useGlobe3d = logoEnabled && (params.get('globe3d') || '1') !== '0';
|
||||
var globe3dRaw = params.get('globe3d');
|
||||
var globe3dVersion = globe3dRaw === null || globe3dRaw === '' ? 1 : parseInt(globe3dRaw, 10);
|
||||
if (!isFinite(globe3dVersion)) globe3dVersion = 1;
|
||||
var useGlobe3d = logoEnabled && globe3dVersion !== 0;
|
||||
var globe3dLayers = { globe: true, continents: true, gridOverlay: true };
|
||||
|
||||
function appendStaticLayers() {
|
||||
@@ -291,7 +294,8 @@ function hub_h(string $s): string {
|
||||
var globeYawDeg = parseFloat(params.get('globeYawDeg'));
|
||||
var globeOpts = {
|
||||
build: logoBuild,
|
||||
reducedMotion: reducedMotion
|
||||
reducedMotion: reducedMotion,
|
||||
renderVersion: globe3dVersion
|
||||
};
|
||||
if (isFinite(globeYawDeg)) {
|
||||
globeOpts.initialRotationY = globeYawDeg * Math.PI / 180;
|
||||
@@ -302,7 +306,7 @@ function hub_h(string $s): string {
|
||||
return mod.mountHubGlobe(stage, globeOpts);
|
||||
}).then(function (handle) {
|
||||
if (handle) {
|
||||
stage.dataset.globe3d = 'active';
|
||||
stage.dataset.globe3d = String(globe3dVersion);
|
||||
}
|
||||
if (!handle) {
|
||||
['globe', 'continents', 'gridOverlay'].forEach(function (name) {
|
||||
|
||||
Reference in New Issue
Block a user