mirror of
git://f0xx.org/ac/ac-be-hub
synced 2026-08-09 20:59:23 +03:00
Hub globe3d=10: E-W ellipses stroke-only, no solid fill.
Match hub grid overlay ring style (border not filled disk). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -587,7 +587,9 @@ function drawParallelScreenEllipse(ctx, cx, cy, r, rotY, par) {
|
|||||||
const ecx = cx + ((xMin + xMax) / 2) * r;
|
const ecx = cx + ((xMin + xMax) / 2) * r;
|
||||||
const ecy = cy - Math.sin(par.lat) * r;
|
const ecy = cy - Math.sin(par.lat) * r;
|
||||||
const rgb = par.bright ? '219,231,246' : '231,236,243';
|
const rgb = par.bright ? '219,231,246' : '231,236,243';
|
||||||
const alpha = par.bright ? 0.32 + 0.58 * t : 0.2 + 0.44 * t;
|
const alpha = par.bright ? 0.55 + 0.45 * t : 0.35 + 0.5 * t;
|
||||||
|
const layoutScale = r / GLOBE_VIEW.r;
|
||||||
|
const lineW = Math.max(par.bright ? 2.5 : 2, layoutScale * 0.0075) * (0.55 + 0.45 * t);
|
||||||
|
|
||||||
ctx.save();
|
ctx.save();
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
@@ -595,10 +597,10 @@ function drawParallelScreenEllipse(ctx, cx, cy, r, rotY, par) {
|
|||||||
ctx.clip();
|
ctx.clip();
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
ctx.ellipse(ecx, ecy, rx, ry, 0, 0, Math.PI * 2);
|
ctx.ellipse(ecx, ecy, rx, ry, 0, 0, Math.PI * 2);
|
||||||
ctx.fillStyle = 'rgba(' + rgb + ',' + alpha.toFixed(3) + ')';
|
ctx.strokeStyle = 'rgba(' + rgb + ',' + alpha.toFixed(3) + ')';
|
||||||
ctx.fill();
|
ctx.lineWidth = lineW;
|
||||||
ctx.strokeStyle = 'rgba(' + rgb + ',' + Math.min(1, alpha + 0.12).toFixed(3) + ')';
|
ctx.lineCap = 'round';
|
||||||
ctx.lineWidth = par.bright ? 1.6 : 1.1;
|
ctx.lineJoin = 'round';
|
||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
ctx.restore();
|
ctx.restore();
|
||||||
}
|
}
|
||||||
@@ -662,7 +664,7 @@ function drawSphereGridScreenStrip(ctx, cx, cy, r, rotY, layoutScale) {
|
|||||||
ctx.clip();
|
ctx.clip();
|
||||||
|
|
||||||
SPHERE_PARALLELS.forEach(function (par) {
|
SPHERE_PARALLELS.forEach(function (par) {
|
||||||
fillParallelScreenStrip(ctx, cx, cy, r, rotY, par);
|
drawParallelScreenEllipse(ctx, cx, cy, r, rotY, par);
|
||||||
});
|
});
|
||||||
|
|
||||||
SPHERE_MERIDIANS.forEach(function (mer) {
|
SPHERE_MERIDIANS.forEach(function (mer) {
|
||||||
@@ -1224,7 +1226,7 @@ export async function mountHubGlobe(stage, opts) {
|
|||||||
stage.dataset.globe3d = String(renderVersion);
|
stage.dataset.globe3d = String(renderVersion);
|
||||||
stage.dataset.globeAxis =
|
stage.dataset.globeAxis =
|
||||||
renderVersion === 10
|
renderVersion === 10
|
||||||
? 'ew-sphere-screenstrip'
|
? 'ew-sphere-ellipse'
|
||||||
: renderVersion === 9
|
: renderVersion === 9
|
||||||
? 'ew-ns-sphere-v4'
|
? 'ew-ns-sphere-v4'
|
||||||
: renderVersion >= 8
|
: renderVersion >= 8
|
||||||
|
|||||||
@@ -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 = '20260704globe12';
|
var logoBuild = '20260704globe13';
|
||||||
|
|
||||||
function hubAsset(rel) {
|
function hubAsset(rel) {
|
||||||
var link = document.querySelector('link[href*="hub.css"]');
|
var link = document.querySelector('link[href*="hub.css"]');
|
||||||
|
|||||||
Reference in New Issue
Block a user