|
|
@@ -102,17 +102,22 @@ const COLS = [
|
|
|
const NUM = new Set(["nodes", "tp", "port", "n", "pct", "tps1", "tps2", "stars"]);
|
|
|
const MEDAL = { 1: "🥇 ", 2: "🥈 ", 3: "🥉 " };
|
|
|
|
|
|
-// star grade of the latest completed bench: half-star precision (1 star =
|
|
|
-// 20 points), colored by score band — sort key is the ABSOLUTE score
|
|
|
+// star grade of the latest completed bench: 1 star = 10 points, half star
|
|
|
+// = 5; one color per decade (red → brown → orange → yellow → green ramp);
|
|
|
+// sort key is the ABSOLUTE score
|
|
|
+const STARS = 10;
|
|
|
+const PALETTE = [
|
|
|
+ "red", "firebrick", "brown", "sienna", "chocolate",
|
|
|
+ "darkorange", "gold", "yellowgreen", "limegreen", "green",
|
|
|
+];
|
|
|
function starInfo(r) {
|
|
|
const e = latest(r, x => x.done && x.pct != null);
|
|
|
- return e ? { pct: e.pct, s: Math.round(e.pct / 10) / 2 } : null;
|
|
|
+ return e ? { pct: e.pct, s: Math.round(e.pct / 5) / 2 } : null;
|
|
|
}
|
|
|
-const STAR_BAND = p => p < 20 ? "red" : p < 40 ? "brown" : p < 60 ? "orange" : p < 80 ? "gold" : "green";
|
|
|
function starGlyphs(si) {
|
|
|
- const col = STAR_BAND(si.pct);
|
|
|
let out = "";
|
|
|
- for (let i = 1; i <= 5; i++) {
|
|
|
+ for (let i = 1; i <= STARS; i++) {
|
|
|
+ const col = PALETTE[i - 1];
|
|
|
if (si.s >= i) out += `<span style="color:${col}">★</span>`;
|
|
|
else if (si.s >= i - 0.5)
|
|
|
out += `<span class="half" style="background-image:linear-gradient(90deg,${col} 50%,color-mix(in srgb,CanvasText 30%,transparent) 50%)">★</span>`;
|