Skip to content

armgit / 67.js

Public Imported from GitHub
0

3D engine that AI agents drive

Show the quality tiers on a glow rail with nodes (Part of #890)

Nguyen Xuan An4599abaf9a7a
diff --git a/index.html b/index.html
index a06cd498..5f2cfcb9 100644
--- a/index.html
+++ b/index.html
@@ -176,9 +176,9 @@ renderer.render({ eye: [58, 31, 84], target: [-8, 3, -18] });</code></pre>
<section id="tiers" class="tiers" aria-labelledby="tiers-title">
<h2 id="tiers-title">Quality tiers, measured</h2>
- <p class="tiers-caption">Six scenes, 960×540, RTX 3060. Bars show the slowest scene; shorter is faster.</p>
+ <p class="tiers-caption">Six scenes, 960×540, RTX 3060. Time bars show the slowest scene.</p>
<div id="tiers-table">
- <div class="tier-rail" aria-hidden="true"><span>Cheapest</span><svg viewBox="0 0 200 12" preserveAspectRatio="none"><path d="M0 6h192M186 1l7 5-7 5" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg><span>Best looking</span></div>
+ <div class="tier-rail" aria-hidden="true"><span class="tier-line"></span><span class="tier-end is-start">Cheapest</span><span class="tier-end is-finish">Best looking</span></div>
<ol class="tier-cards">
<li class="tier-card" data-tier="draft" data-glaze-ms="0.54-1.04" data-eevee-ms="56-59" data-flip-glaze="0.045-0.188" data-flip-eevee="0.041-0.562">
<div class="tier-top"><svg class="tier-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M13 3 5 13.5h6L10 21l8-10.5h-6z"/></svg><h3>draft</h3></div>
@@ -189,6 +189,7 @@ renderer.render({ eye: [58, 31, 84], target: [-8, 3, -18] });</code></pre>
<div class="tier-row-bar is-other"><span class="tier-bar-label"><span>EEVEE 1 sample</span><span>56–59 ms</span></span><span class="tier-track"><span class="tier-fill" style="--w:100%"></span></span></div>
</div>
<div class="tier-bars is-quality" role="img" aria-label="FLIP error against Cycles, lower is better: Glaze 0.045 to 0.188, EEVEE 0.041 to 0.562">
+ <p class="tier-bars-title">Error vs Cycles, lower is better</p>
<div class="tier-row-bar is-67js"><span class="tier-bar-label"><span>Error, Glaze</span><span>0.045–0.188</span></span><span class="tier-track"><span class="tier-fill is-range" style="--l:7.5%;--w:23.8%"></span></span></div>
<div class="tier-row-bar is-other"><span class="tier-bar-label"><span>Error, EEVEE</span><span>0.041–0.562</span></span><span class="tier-track"><span class="tier-fill is-range" style="--l:6.8%;--w:86.8%"></span></span></div>
</div>
@@ -202,6 +203,7 @@ renderer.render({ eye: [58, 31, 84], target: [-8, 3, -18] });</code></pre>
<div class="tier-row-bar is-other"><span class="tier-bar-label"><span>EEVEE 64 samples</span><span>288–363 ms</span></span><span class="tier-track"><span class="tier-fill" style="--w:100%"></span></span></div>
</div>
<div class="tier-bars is-quality" role="img" aria-label="FLIP error against Cycles, lower is better: Glaze 0.03 to 0.197, EEVEE 0.042 to 0.562">
+ <p class="tier-bars-title">Error vs Cycles, lower is better</p>
<div class="tier-row-bar is-67js"><span class="tier-bar-label"><span>Error, Glaze</span><span>0.03–0.197</span></span><span class="tier-track"><span class="tier-fill is-range" style="--l:5%;--w:27.8%"></span></span></div>
<div class="tier-row-bar is-other"><span class="tier-bar-label"><span>Error, EEVEE</span><span>0.042–0.562</span></span><span class="tier-track"><span class="tier-fill is-range" style="--l:7%;--w:86.7%"></span></span></div>
</div>
@@ -219,12 +221,13 @@ renderer.render({ eye: [58, 31, 84], target: [-8, 3, -18] });</code></pre>
<li class="tier-card" data-tier="final" data-cook-ms="1.73-4.24" data-cycles-ms="6.81-26.41" data-noise-time-x="1.05-4.02">
<div class="tier-top"><svg class="tier-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M6.5 4h11l3.5 5-9 11L3 9z"/><path d="M3 9h18M9.5 9 12 20l2.5-11"/></svg><h3>final</h3></div>
<p class="tier-for">Finished stills</p>
- <p class="tier-big"><strong>1.73–4.24</strong> <span>ms a sample</span></p>
+ <p class="tier-big"><strong>1.73–4.24</strong> <span>ms per sample</span></p>
<div class="tier-bars" role="img" aria-label="Per sample: Cook native 1.73 to 4.24 ms, Cycles OptiX 6.81 to 26.41 ms">
<div class="tier-row-bar is-67js"><span class="tier-bar-label"><span>Cook native</span><span>1.73–4.24 ms</span></span><span class="tier-track"><span class="tier-fill" style="--w:16.1%"></span></span></div>
<div class="tier-row-bar is-other"><span class="tier-bar-label"><span>Cycles OptiX</span><span>6.81–26.41 ms</span></span><span class="tier-track"><span class="tier-fill" style="--w:100%"></span></span></div>
</div>
<div class="tier-bars is-quality" role="img" aria-label="Time to the same noise, Cycles is 1 times: Cook needs 1.05 to 4.02 times, on three of six scenes">
+ <p class="tier-bars-title">Time to same noise, lower is better</p>
<div class="tier-row-bar is-other"><span class="tier-bar-label"><span>Same noise, Cycles</span><span>1×</span></span><span class="tier-track"><span class="tier-fill" style="--w:22.2%"></span></span></div>
<div class="tier-row-bar is-67js"><span class="tier-bar-label"><span>Same noise, Cook</span><span>1.05–4.02×</span></span><span class="tier-track"><span class="tier-fill is-range" style="--l:23.3%;--w:66%"></span></span></div>
</div>
diff --git a/src/site.css b/src/site.css
index 3953a165..42f1c88d 100644
--- a/src/site.css
+++ b/src/site.css
@@ -382,9 +382,27 @@ body.site > main > section { scroll-margin-top: 96px; }
.site .tiers > * { margin: 0; }
.site .tiers p { color: var(--muted); max-width: none; }
.site .tiers p a { text-decoration: underline; }
-.site .tiers #tiers-table { display: grid; gap: 10px; }
-.site .tier-rail { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; user-select: none; }
-.site .tier-rail svg { flex: 1; height: 12px; min-width: 0; }
+.site .tiers #tiers-table { --rail-accent: #ff6a2b; --rail-size: 16px; position: relative; display: grid; padding-top: 54px; }
+.site .tier-rail { position: absolute; inset: 0 0 auto 0; height: 40px; color: var(--muted); font-size: 12.5px; line-height: 16px; user-select: none; pointer-events: none; }
+.site .tier-line { position: absolute; left: 0; right: 0; top: 29px; height: 4px; border-radius: 999px; overflow: hidden; background: linear-gradient(90deg, #ffffff26, #ff6a2bcc 70%, #f59e0b); box-shadow: 0 0 14px #ff6a2b40; }
+.site .tier-line::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 18%; background: linear-gradient(90deg, transparent, #fff8, transparent); transform: translateX(-100%); animation: tier-glow 4.8s ease-in-out infinite; }
+.site .tier-rail::after { content: ""; position: absolute; right: 3px; top: 25.5px; width: 9px; height: 9px; border-top: 2.5px solid #f59e0b; border-right: 2.5px solid #f59e0b; border-radius: 1px 3px 1px 1px; transform: rotate(45deg); }
+.site .tier-end { position: absolute; top: 0; white-space: nowrap; }
+.site .tier-end.is-start { left: 0; }
+.site .tier-end.is-finish { right: 0; color: #ffb877; }
+.site .tier-cards { position: relative; z-index: 1; }
+.site .tier-card { position: relative; }
+.site .tier-card::before { content: ""; position: absolute; z-index: 2; left: calc(50% - var(--rail-size) / 2); top: calc(-23px - var(--rail-size) / 2); width: var(--rail-size); height: var(--rail-size); box-sizing: border-box; border-radius: 50%; border: 2px solid var(--rail-accent); background: linear-gradient(var(--node-fill, transparent), var(--node-fill, transparent)), var(--window); }
+.site .tier-card:nth-child(1) { --node-fill: #ff6a2b26; }
+.site .tier-card:nth-child(2) { --node-fill: #ff6a2b70; }
+.site .tier-card:nth-child(4) { --node-fill: var(--rail-accent); }
+.site .tier-card:nth-child(4)::before { box-shadow: 0 0 0 4px #ff6a2b33, 0 0 16px #ff6a2b99; }
+.site .tier-card.is-planned::before { border: 0; border-radius: 0; background: repeating-conic-gradient(#ff6a2bcc 0 24deg, transparent 24deg 60deg); -webkit-mask: radial-gradient(circle, transparent 4.5px, #000 5px); mask: radial-gradient(circle, transparent 4.5px, #000 5px); }
+@keyframes tier-glow { 0% { transform: translateX(-100%); } 70%, 100% { transform: translateX(560%); } }
+@keyframes tier-glow-down { 0% { transform: translateY(-100%); } 70%, 100% { transform: translateY(560%); } }
+@media (prefers-reduced-motion: reduce) {
+ .site .tier-line::after { animation: none; display: none; }
+}
.site .tier-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.site .tier-card { display: grid; align-content: start; gap: 10px; min-width: 0; padding: 18px; border-radius: var(--panel-radius); background: var(--bg); }
.site .tier-card.is-planned { opacity: 0.55; background: #ffffff08; }
@@ -398,6 +416,7 @@ body.site > main > section { scroll-margin-top: 96px; }
.site .tier-big span { font-size: 12.5px; }
.site .tier-bars { display: grid; gap: 8px; user-select: none; }
.site .tier-bars.is-quality { padding-top: 6px; }
+.site .tier-bars-title { margin: 0 0 2px; font-size: 12px; }
.site .tier-bar-label { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.site .tier-bar-label > span:first-child { min-width: 0; }
.site .tier-bar-label > span:last-child { flex: none; color: var(--text); }
@@ -409,7 +428,16 @@ body.site > main > section { scroll-margin-top: 96px; }
.site .tier-plan { margin: 0; font-size: 12.5px; }
.site .tiers .tiers-note { font-size: 12.5px; }
@media (max-width: 1000px) {
- .site .tier-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
+ .site .tiers #tiers-table { padding: 0 0 0 48px; }
+ .site .tier-cards { grid-template-columns: minmax(0, 1fr); }
+ .site .tier-rail { inset: 0 auto 0 0; width: 40px; height: auto; }
+ .site .tier-line { left: 10px; right: auto; top: 0; bottom: 0; width: 4px; height: auto; background: linear-gradient(180deg, #ffffff26, #ff6a2bcc 70%, #f59e0b); }
+ .site .tier-line::after { top: 0; bottom: auto; left: 0; right: 0; width: auto; height: 18%; background: linear-gradient(180deg, transparent, #fff8, transparent); animation-name: tier-glow-down; }
+ .site .tier-rail::after { right: auto; left: 7.5px; top: auto; bottom: 1px; transform: rotate(135deg); }
+ .site .tier-end { writing-mode: vertical-rl; left: 24px; top: auto; right: auto; }
+ .site .tier-end.is-start { top: 0; left: 24px; }
+ .site .tier-end.is-finish { bottom: 0; right: auto; left: 24px; }
+ .site .tier-card::before { left: calc(-36px - var(--rail-size) / 2); top: 24px; }
}
@media (max-width: 560px) {
.site .tier-cards { grid-template-columns: minmax(0, 1fr); }