mirror of
git://f0xx.org/android_cast
synced 2026-07-29 06:18:42 +03:00
initiaal 3d
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
})();
|
||||
</script>
|
||||
<link rel="stylesheet" href="/app/androidcast_project/crashes/assets/css/app.css">
|
||||
<link rel="stylesheet" href="hub.css?v=20260530t">
|
||||
<link rel="stylesheet" href="hub-logo-layers.css">
|
||||
<link rel="stylesheet" href="hub.css?v=20260601earth3d">
|
||||
<link rel="stylesheet" href="hub-logo-layers.css?v=20260601earth3d">
|
||||
<script src="assets/analytics.config.js"></script>
|
||||
<script src="/app/androidcast_project/crashes/assets/js/analytics.js" defer></script>
|
||||
</head>
|
||||
@@ -158,7 +158,7 @@
|
||||
var supportsLayout = !!(window.CSS && CSS.supports && CSS.supports('object-fit', 'cover'));
|
||||
var logoEnabled = !!(stage && supportsSvg && supportsLayout);
|
||||
|
||||
var logoBuild = '20260530t';
|
||||
var logoBuild = '20260601earth3d';
|
||||
|
||||
function hubAsset(rel) {
|
||||
var link = document.querySelector('link[href*="hub.css"]');
|
||||
@@ -224,30 +224,57 @@
|
||||
return base + '?v=' + logoBuild;
|
||||
}
|
||||
|
||||
if (logoEnabled) {
|
||||
list.forEach(function (name) {
|
||||
var img = document.createElement('img');
|
||||
img.className = 'hub-logo-layer hub-logo-layer--' + name;
|
||||
img.src = fragmentSrc(name);
|
||||
img.alt = '';
|
||||
img.decoding = 'async';
|
||||
img.loading = 'lazy';
|
||||
if (name === 'compass') {
|
||||
img.id = 'hub-compass-layer';
|
||||
img.setAttribute('role', 'button');
|
||||
img.setAttribute('tabindex', '0');
|
||||
img.setAttribute('aria-label', 'Open deployment model');
|
||||
}
|
||||
stage.appendChild(img);
|
||||
});
|
||||
var useGlobe3d = logoEnabled && (params.get('globe3d') || '1') !== '0';
|
||||
var globe3dSkip = { globe: true, continents: true, gridOverlay: true };
|
||||
|
||||
var logoOpacity = params.get('logoOpacity');
|
||||
if (logoOpacity) {
|
||||
stage.style.opacity = logoOpacity;
|
||||
function appendLogoLayers() {
|
||||
list.forEach(function (name) {
|
||||
if (useGlobe3d && globe3dSkip[name]) return;
|
||||
var img = document.createElement('img');
|
||||
img.className = 'hub-logo-layer hub-logo-layer--' + name;
|
||||
img.src = fragmentSrc(name);
|
||||
img.alt = '';
|
||||
img.decoding = 'async';
|
||||
img.loading = 'lazy';
|
||||
if (name === 'compass') {
|
||||
img.id = 'hub-compass-layer';
|
||||
img.setAttribute('role', 'button');
|
||||
img.setAttribute('tabindex', '0');
|
||||
img.setAttribute('aria-label', 'Open deployment model');
|
||||
}
|
||||
stage.appendChild(img);
|
||||
});
|
||||
}
|
||||
|
||||
stage.hidden = false;
|
||||
stage.setAttribute('aria-hidden', 'true');
|
||||
if (logoEnabled) {
|
||||
appendLogoLayers();
|
||||
|
||||
var logoOpacity = params.get('logoOpacity');
|
||||
if (logoOpacity) {
|
||||
stage.style.opacity = logoOpacity;
|
||||
}
|
||||
|
||||
stage.hidden = false;
|
||||
stage.setAttribute('aria-hidden', 'true');
|
||||
|
||||
if (useGlobe3d) {
|
||||
var reducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
||||
var globeModuleUrl = new URL('assets/hub-globe.js', window.location.href);
|
||||
globeModuleUrl.searchParams.set('v', logoBuild);
|
||||
import(globeModuleUrl.href).then(function (mod) {
|
||||
return mod.mountHubGlobe(stage, { build: logoBuild, reducedMotion: reducedMotion });
|
||||
}).catch(function (err) {
|
||||
console.warn('HubGlobe: falling back to static layers', err);
|
||||
['globe', 'continents', 'gridOverlay'].forEach(function (name) {
|
||||
if (list.indexOf(name) === -1) return;
|
||||
var img = document.createElement('img');
|
||||
img.className = 'hub-logo-layer hub-logo-layer--' + name;
|
||||
img.src = fragmentSrc(name);
|
||||
img.alt = '';
|
||||
stage.appendChild(img);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/* Nav dock overlaps globe left hemisphere; stack top → bottom. */
|
||||
|
||||
Reference in New Issue
Block a user