mirror of
git://f0xx.org/ac/ac-be-hub
synced 2026-08-09 20:59:23 +03:00
Hub globe v2: mercator wrap, GPU path, landing layout updates.
Refine 3D globe rendering, layer CSS, landing page wiring and TOC UX. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
86
index.php
86
index.php
@@ -40,8 +40,8 @@ function hub_h(string $s): string {
|
||||
<link rel="apple-touch-icon" href="/app/androidcast_project/apple-touch-icon.ico">
|
||||
<link rel="stylesheet" href="/app/androidcast_project/issues/assets/css/app.css">
|
||||
<link rel="stylesheet" href="hub.css?v=20260711overlay">
|
||||
<link rel="stylesheet" href="hub-logo-layers.css?v=20260711overlay">
|
||||
<link rel="stylesheet" href="hub-landing.css?v=20260711layout">
|
||||
<link rel="stylesheet" href="hub-logo-layers.css?v=20260704globe39">
|
||||
<link rel="stylesheet" href="hub-landing.css?v=20260704cards">
|
||||
<script src="/app/androidcast_project/issues/assets/js/nav_shell.js" defer></script>
|
||||
<script src="assets/hub-i18n.js" defer></script>
|
||||
<script src="assets/hub-landing.js" defer></script>
|
||||
@@ -187,7 +187,10 @@ function hub_h(string $s): string {
|
||||
var supportsLayout = !!(window.CSS && CSS.supports && CSS.supports('object-fit', 'cover'));
|
||||
var logoEnabled = !!(stage && supportsSvg && supportsLayout);
|
||||
|
||||
var logoBuild = '20260704globe31';
|
||||
var logoBuild = '20260704globe56';
|
||||
|
||||
var GLOBE3D_DEFAULT = 11;
|
||||
var GLOBE_SPIN_DEFAULT = 5;
|
||||
|
||||
function hubAsset(rel) {
|
||||
var link = document.querySelector('link[href*="hub.css"]');
|
||||
@@ -254,8 +257,8 @@ 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 globe3dVersion = globe3dRaw === null || globe3dRaw === '' ? GLOBE3D_DEFAULT : parseInt(globe3dRaw, 10);
|
||||
if (!isFinite(globe3dVersion)) globe3dVersion = GLOBE3D_DEFAULT;
|
||||
var globeLandZoom = {};
|
||||
['latf', 'lngf', 'zy', 'zx', 'pp', 'pe'].forEach(function (key) {
|
||||
var raw = params.get(key);
|
||||
@@ -269,11 +272,68 @@ function hub_h(string $s): string {
|
||||
if (isFinite(fLegacy)) globeLandZoom.latf = fLegacy;
|
||||
}
|
||||
var globeAxRaw = params.get('ax');
|
||||
var globeSpinFactor = 1;
|
||||
var globeSpinFactor = GLOBE_SPIN_DEFAULT;
|
||||
if (globeAxRaw !== null && globeAxRaw !== '') {
|
||||
var axParsed = parseFloat(globeAxRaw);
|
||||
if (isFinite(axParsed)) globeSpinFactor = axParsed;
|
||||
}
|
||||
var globeContinentStyle = {};
|
||||
var globeSunlightStyle = {};
|
||||
var globeFogStyle = {};
|
||||
var globePerf = {};
|
||||
if (globe3dVersion >= 11) {
|
||||
var continentParamMap = {
|
||||
cfa: 'fillAlpha',
|
||||
cba: 'borderAlpha',
|
||||
cbr: 'borderBoostR',
|
||||
cbg: 'borderBoostG',
|
||||
cbb: 'borderBoostB',
|
||||
ceps: 'coastEps'
|
||||
};
|
||||
Object.keys(continentParamMap).forEach(function (key) {
|
||||
var raw = params.get(key);
|
||||
if (raw === null || raw === '') return;
|
||||
var n = parseFloat(raw);
|
||||
if (isFinite(n)) globeContinentStyle[continentParamMap[key]] = n;
|
||||
});
|
||||
var sunlightParamMap = {
|
||||
slx: 'lx',
|
||||
sly: 'ly',
|
||||
slx2: 'lx2',
|
||||
sly2: 'ly2',
|
||||
sld: 'dir',
|
||||
sll: 'span',
|
||||
sli: 'intensity',
|
||||
slhi: 'highlight',
|
||||
slsh: 'shadow'
|
||||
};
|
||||
Object.keys(sunlightParamMap).forEach(function (key) {
|
||||
var raw = params.get(key);
|
||||
if (raw === null || raw === '') return;
|
||||
var n = parseFloat(raw);
|
||||
if (isFinite(n)) globeSunlightStyle[sunlightParamMap[key]] = n;
|
||||
});
|
||||
var fogParamMap = { fogi: 'intensity', fogr: 'outer', fogin: 'inner' };
|
||||
Object.keys(fogParamMap).forEach(function (key) {
|
||||
var raw = params.get(key);
|
||||
if (raw === null || raw === '') return;
|
||||
var n = parseFloat(raw);
|
||||
if (isFinite(n)) globeFogStyle[fogParamMap[key]] = n;
|
||||
});
|
||||
var globeFpsRaw = params.get('globeFps');
|
||||
if (globeFpsRaw !== null && globeFpsRaw !== '') {
|
||||
var fpsParsed = parseFloat(globeFpsRaw);
|
||||
if (isFinite(fpsParsed)) globePerf.spinFps = fpsParsed;
|
||||
}
|
||||
var globeDprRaw = params.get('globeDpr');
|
||||
if (globeDprRaw !== null && globeDprRaw !== '') {
|
||||
var dprParsed = parseFloat(globeDprRaw);
|
||||
if (isFinite(dprParsed)) globePerf.dprMax = dprParsed;
|
||||
}
|
||||
var globeGpuRaw = params.get('globeGpu');
|
||||
if (globeGpuRaw === '0') globePerf.useGpu = false;
|
||||
if (params.get('globeProfile') === '1') globePerf.profile = true;
|
||||
}
|
||||
var useGlobe3d = logoEnabled && globe3dVersion !== 0;
|
||||
var globe3dLayers = { globe: true, continents: true, gridOverlay: true };
|
||||
|
||||
@@ -321,9 +381,21 @@ function hub_h(string $s): string {
|
||||
if (Object.keys(globeLandZoom).length > 0) {
|
||||
globeOpts.landZoom = globeLandZoom;
|
||||
}
|
||||
if (globeSpinFactor !== 1) {
|
||||
if (globeSpinFactor !== GLOBE_SPIN_DEFAULT) {
|
||||
globeOpts.spinFactor = globeSpinFactor;
|
||||
}
|
||||
if (Object.keys(globeContinentStyle).length > 0) {
|
||||
globeOpts.continentStyle = globeContinentStyle;
|
||||
}
|
||||
if (Object.keys(globeSunlightStyle).length > 0) {
|
||||
globeOpts.sunlightStyle = globeSunlightStyle;
|
||||
}
|
||||
if (Object.keys(globeFogStyle).length > 0) {
|
||||
globeOpts.fogStyle = globeFogStyle;
|
||||
}
|
||||
if (Object.keys(globePerf).length > 0) {
|
||||
globeOpts.globePerf = globePerf;
|
||||
}
|
||||
var globeModuleUrl = new URL('assets/hub-globe.js', window.location.href);
|
||||
globeModuleUrl.searchParams.set('v', logoBuild);
|
||||
globeModuleUrl.searchParams.set('globe3d', String(globe3dVersion));
|
||||
|
||||
Reference in New Issue
Block a user