Spaces:
Running
Running
赛博层:霓虹网格、渐变发光标题与数字、HUD 角标、扫描线、流动边框、曲线辉光
Browse files- static/js/v1.js +11 -3
static/js/v1.js
CHANGED
|
@@ -250,6 +250,9 @@ Evo.boot(({ games, arms }) => {
|
|
| 250 |
const S = Evo.svg;
|
| 251 |
const svg = S("svg", { viewBox: `0 0 ${W} ${H}`, role: "img",
|
| 252 |
"aria-label": `${title}: mean Overall score after a development budget of k rounds, three methods` });
|
|
|
|
|
|
|
|
|
|
| 253 |
for (let t = lo; t <= hi + 1e-9; t += step) {
|
| 254 |
svg.append(S("line", { class: "grid-line", x1: L, x2: W - R, y1: y(t), y2: y(t) }),
|
| 255 |
S("text", { class: "val-label", x: L - 7, y: y(t) + 4, "text-anchor": "end" }, String(t)));
|
|
@@ -269,9 +272,13 @@ Evo.boot(({ games, arms }) => {
|
|
| 269 |
});
|
| 270 |
drawn.forEach((m) => {
|
| 271 |
const s = d.methods[m.k];
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 275 |
});
|
| 276 |
const hit = S("rect", { class: "hit", x: L, y: T, width: W - L - R, height: H - T - B, fill: "transparent" });
|
| 277 |
hit.addEventListener("mousemove", (e) => {
|
|
@@ -321,6 +328,7 @@ Evo.boot(({ games, arms }) => {
|
|
| 321 |
const y = y0 + ai * ROW + ROW / 2, color = `var(--${ARMCOL[a.model]})`;
|
| 322 |
svg.append(S("line", { x1: x(v0), x2: x(v1), y1: y, y2: y, stroke: color, "stroke-width": 2.4 }),
|
| 323 |
S("circle", { cx: x(v0), cy: y, r: 4.5, fill: "var(--surface)", stroke: color, "stroke-width": 2 }),
|
|
|
|
| 324 |
S("circle", { cx: x(v1), cy: y, r: 5.2, fill: color, class: "strip-dot" }),
|
| 325 |
S("text", { class: "val-label pair-val", x: W - R + 8, y: y + 4 }, `${v0.toFixed(1)} \u2192 ${v1.toFixed(1)}`));
|
| 326 |
const hit = S("rect", { class: "hit", x: L, y: y - ROW / 2, width: W - L, height: ROW, fill: "transparent" });
|
|
|
|
| 250 |
const S = Evo.svg;
|
| 251 |
const svg = S("svg", { viewBox: `0 0 ${W} ${H}`, role: "img",
|
| 252 |
"aria-label": `${title}: mean Overall score after a development budget of k rounds, three methods` });
|
| 253 |
+
// 只给"我们那条线"加辉光,其他两条保持素净,对比才立得住
|
| 254 |
+
svg.append(S("defs", {}, S("filter", { id: `glow-${key}`, x: "-30%", y: "-70%", width: "160%", height: "240%" },
|
| 255 |
+
S("feDropShadow", { dx: 0, dy: 0, stdDeviation: 3, "flood-color": "#34e3f0", "flood-opacity": "0.55" }))));
|
| 256 |
for (let t = lo; t <= hi + 1e-9; t += step) {
|
| 257 |
svg.append(S("line", { class: "grid-line", x1: L, x2: W - R, y1: y(t), y2: y(t) }),
|
| 258 |
S("text", { class: "val-label", x: L - 7, y: y(t) + 4, "text-anchor": "end" }, String(t)));
|
|
|
|
| 272 |
});
|
| 273 |
drawn.forEach((m) => {
|
| 274 |
const s = d.methods[m.k];
|
| 275 |
+
const ours = m.k === "evov";
|
| 276 |
+
const path = S("path", { d: rounds.map((r, i) => `${i ? "L" : "M"}${x(r)},${y(s.mean[i])}`).join(""),
|
| 277 |
+
fill: "none", stroke: m.color, "stroke-width": m.w, "stroke-dasharray": m.dash, "stroke-linecap": "round", "stroke-linejoin": "round" });
|
| 278 |
+
if (ours) path.setAttribute("filter", `url(#glow-${key})`);
|
| 279 |
+
svg.append(path);
|
| 280 |
+
svg.append(S("circle", { cx: x(30), cy: y(s.mean[10]), r: ours ? 4 : 3.4, fill: m.color,
|
| 281 |
+
stroke: "var(--surface)", "stroke-width": 1.6, class: ours ? "pulse-dot" : "" }));
|
| 282 |
});
|
| 283 |
const hit = S("rect", { class: "hit", x: L, y: T, width: W - L - R, height: H - T - B, fill: "transparent" });
|
| 284 |
hit.addEventListener("mousemove", (e) => {
|
|
|
|
| 328 |
const y = y0 + ai * ROW + ROW / 2, color = `var(--${ARMCOL[a.model]})`;
|
| 329 |
svg.append(S("line", { x1: x(v0), x2: x(v1), y1: y, y2: y, stroke: color, "stroke-width": 2.4 }),
|
| 330 |
S("circle", { cx: x(v0), cy: y, r: 4.5, fill: "var(--surface)", stroke: color, "stroke-width": 2 }),
|
| 331 |
+
S("circle", { cx: x(v1), cy: y, r: 10, fill: color, opacity: 0.16 }),
|
| 332 |
S("circle", { cx: x(v1), cy: y, r: 5.2, fill: color, class: "strip-dot" }),
|
| 333 |
S("text", { class: "val-label pair-val", x: W - R + 8, y: y + 4 }, `${v0.toFixed(1)} \u2192 ${v1.toFixed(1)}`));
|
| 334 |
const hit = S("rect", { class: "hit", x: L, y: y - ROW / 2, width: W - L, height: ROW, fill: "transparent" });
|