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

Hub globe3d=9: split from v8 — pure v4 sphere grid.

v9 thin latitude/meridian lines; v10 screen-Y strips without slit stroke.
Cache-bust globe11.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Anton Afanasyeu
2026-08-05 17:01:36 +02:00
parent d82bd4d78e
commit ec5f6f2b19
2 changed files with 31 additions and 31 deletions

View File

@@ -9,8 +9,8 @@
* globe3d=6: v4 math + latitude band fill (continuous arc paths). * globe3d=6: v4 math + latitude band fill (continuous arc paths).
* globe3d=7: v4 math + wide centerline stroke bands (no fill quads). * globe3d=7: v4 math + wide centerline stroke bands (no fill quads).
* globe3d=8: hub SVG ellipse trace (breaks under rotation — deprecated). * globe3d=8: hub SVG ellipse trace (breaks under rotation — deprecated).
* globe3d=9: reserved / same as 10. * globe3d=9: v4 sphere grid only (thin EW + NS) — proper rotation baseline.
* globe3d=10: v4 latitude arcs + screen-Y strip thickness (hub ry), limb-clipped. * globe3d=10: v4 latitude arcs + screen-Y strip (no center stroke).
*/ */
export const GLOBE_VIEW = { imgW: 1920, imgH: 1080, cx: 720, cy: 560, r: 322, rim: 330 }; export const GLOBE_VIEW = { imgW: 1920, imgH: 1080, cx: 720, cy: 560, r: 322, rim: 330 };
@@ -599,22 +599,9 @@ function fillParallelScreenStrip(ctx, cx, cy, r, rotY, par) {
}); });
} }
flushFill(); flushFill();
strokeBodyRing(
ctx,
cx,
cy,
r,
rotY,
ring,
function (z) {
return parallelStyle(par.bright, 1, z, LIMB_Z);
},
LIMB_Z
);
} }
/** globe3d=10 — v4 EW arcs, screen-vertical band; v4 meridians. */ /** globe3d=10 — v4 EW screen strips + v4 meridians. */
function drawSphereGridScreenStrip(ctx, cx, cy, r, rotY, layoutScale) { function drawSphereGridScreenStrip(ctx, cx, cy, r, rotY, layoutScale) {
ctx.save(); ctx.save();
ctx.beginPath(); ctx.beginPath();
@@ -780,10 +767,18 @@ function drawGlobeGrid(ctx, cx, cy, r, rotY, layoutScale, renderVersion) {
drawSphereGridWideStroke(ctx, cx, cy, r, rotY, layoutScale, { parallelsOnly: false }); drawSphereGridWideStroke(ctx, cx, cy, r, rotY, layoutScale, { parallelsOnly: false });
return; return;
} }
if (renderVersion === 8 || renderVersion === 9) { if (renderVersion === 8) {
drawHubEllipseGridRotated(ctx, cx, cy, r, rotY, layoutScale); drawHubEllipseGridRotated(ctx, cx, cy, r, rotY, layoutScale);
return; return;
} }
if (renderVersion === 9) {
drawSphereGrid(ctx, cx, cy, r, rotY, layoutScale, { parallelsOnly: false });
return;
}
if (renderVersion === 10) {
drawSphereGridScreenStrip(ctx, cx, cy, r, rotY, layoutScale);
return;
}
if (renderVersion >= 2) { if (renderVersion >= 2) {
drawSphereGrid(ctx, cx, cy, r, rotY, layoutScale, { parallelsOnly: false }); drawSphereGrid(ctx, cx, cy, r, rotY, layoutScale, { parallelsOnly: false });
return; return;
@@ -1175,19 +1170,23 @@ export async function mountHubGlobe(stage, opts) {
raf = requestAnimationFrame(tick); raf = requestAnimationFrame(tick);
stage.dataset.globe3d = String(renderVersion); stage.dataset.globe3d = String(renderVersion);
stage.dataset.globeAxis = stage.dataset.globeAxis =
renderVersion >= 8 renderVersion === 10
? 'ew-hub-ellipse-rot' ? 'ew-sphere-screenstrip'
: renderVersion >= 7 : renderVersion === 9
? 'ew-sphere-stroke' ? 'ew-ns-sphere-v4'
: renderVersion >= 6 : renderVersion >= 8
? 'ew-sphere-band' ? 'ew-hub-ellipse-rot'
: renderVersion >= 5 : renderVersion >= 7
? 'ew-hub-ellipse' ? 'ew-sphere-stroke'
: renderVersion >= 3 : renderVersion >= 6
? 'ew-sphere' ? 'ew-sphere-band'
: renderVersion >= 2 : renderVersion >= 5
? 'ew-ns-sphere' ? 'ew-hub-ellipse'
: 'ew-ns-grid'; : renderVersion >= 3
? 'ew-sphere'
: renderVersion >= 2
? 'ew-ns-sphere'
: 'ew-ns-grid';
return { return {
destroy() { destroy() {

View File

@@ -187,7 +187,7 @@ function hub_h(string $s): string {
var supportsLayout = !!(window.CSS && CSS.supports && CSS.supports('object-fit', 'cover')); var supportsLayout = !!(window.CSS && CSS.supports && CSS.supports('object-fit', 'cover'));
var logoEnabled = !!(stage && supportsSvg && supportsLayout); var logoEnabled = !!(stage && supportsSvg && supportsLayout);
var logoBuild = '20260704globe10'; var logoBuild = '20260704globe11';
function hubAsset(rel) { function hubAsset(rel) {
var link = document.querySelector('link[href*="hub.css"]'); var link = document.querySelector('link[href*="hub.css"]');
@@ -302,6 +302,7 @@ function hub_h(string $s): string {
} }
var globeModuleUrl = new URL('assets/hub-globe.js', window.location.href); var globeModuleUrl = new URL('assets/hub-globe.js', window.location.href);
globeModuleUrl.searchParams.set('v', logoBuild); globeModuleUrl.searchParams.set('v', logoBuild);
globeModuleUrl.searchParams.set('globe3d', String(globe3dVersion));
import(globeModuleUrl.href).then(function (mod) { import(globeModuleUrl.href).then(function (mod) {
return mod.mountHubGlobe(stage, globeOpts); return mod.mountHubGlobe(stage, globeOpts);
}).then(function (handle) { }).then(function (handle) {