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:
@@ -9,8 +9,8 @@
|
||||
* globe3d=6: v4 math + latitude band fill (continuous arc paths).
|
||||
* globe3d=7: v4 math + wide centerline stroke bands (no fill quads).
|
||||
* globe3d=8: hub SVG ellipse trace (breaks under rotation — deprecated).
|
||||
* globe3d=9: reserved / same as 10.
|
||||
* globe3d=10: v4 latitude arcs + screen-Y strip thickness (hub ry), limb-clipped.
|
||||
* globe3d=9: v4 sphere grid only (thin E–W + N–S) — proper rotation baseline.
|
||||
* 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 };
|
||||
|
||||
@@ -599,22 +599,9 @@ function fillParallelScreenStrip(ctx, cx, cy, r, rotY, par) {
|
||||
});
|
||||
}
|
||||
flushFill();
|
||||
|
||||
strokeBodyRing(
|
||||
ctx,
|
||||
cx,
|
||||
cy,
|
||||
r,
|
||||
rotY,
|
||||
ring,
|
||||
function (z) {
|
||||
return parallelStyle(par.bright, 1, z, LIMB_Z);
|
||||
},
|
||||
LIMB_Z
|
||||
);
|
||||
}
|
||||
|
||||
/** globe3d=10 — v4 E–W arcs, screen-vertical band; v4 meridians. */
|
||||
/** globe3d=10 — v4 E–W screen strips + v4 meridians. */
|
||||
function drawSphereGridScreenStrip(ctx, cx, cy, r, rotY, layoutScale) {
|
||||
ctx.save();
|
||||
ctx.beginPath();
|
||||
@@ -780,10 +767,18 @@ function drawGlobeGrid(ctx, cx, cy, r, rotY, layoutScale, renderVersion) {
|
||||
drawSphereGridWideStroke(ctx, cx, cy, r, rotY, layoutScale, { parallelsOnly: false });
|
||||
return;
|
||||
}
|
||||
if (renderVersion === 8 || renderVersion === 9) {
|
||||
if (renderVersion === 8) {
|
||||
drawHubEllipseGridRotated(ctx, cx, cy, r, rotY, layoutScale);
|
||||
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) {
|
||||
drawSphereGrid(ctx, cx, cy, r, rotY, layoutScale, { parallelsOnly: false });
|
||||
return;
|
||||
@@ -1175,7 +1170,11 @@ export async function mountHubGlobe(stage, opts) {
|
||||
raf = requestAnimationFrame(tick);
|
||||
stage.dataset.globe3d = String(renderVersion);
|
||||
stage.dataset.globeAxis =
|
||||
renderVersion >= 8
|
||||
renderVersion === 10
|
||||
? 'ew-sphere-screenstrip'
|
||||
: renderVersion === 9
|
||||
? 'ew-ns-sphere-v4'
|
||||
: renderVersion >= 8
|
||||
? 'ew-hub-ellipse-rot'
|
||||
: renderVersion >= 7
|
||||
? 'ew-sphere-stroke'
|
||||
|
||||
@@ -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 = '20260704globe10';
|
||||
var logoBuild = '20260704globe11';
|
||||
|
||||
function hubAsset(rel) {
|
||||
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);
|
||||
globeModuleUrl.searchParams.set('v', logoBuild);
|
||||
globeModuleUrl.searchParams.set('globe3d', String(globe3dVersion));
|
||||
import(globeModuleUrl.href).then(function (mod) {
|
||||
return mod.mountHubGlobe(stage, globeOpts);
|
||||
}).then(function (handle) {
|
||||
|
||||
Reference in New Issue
Block a user