Skip to content

armgit / 67.js

Public Imported from GitHub
0

3D engine that AI agents drive

Put the reset button in the scene frame and give page headings room

Nguyen Xuan An5839964fe321
diff --git a/showcase.html b/showcase.html
index 17097d9e..953f3289 100644
--- a/showcase.html
+++ b/showcase.html
@@ -24,9 +24,10 @@
<h1 id="showcase-title">Showcase</h1>
<p id="showcase-blurb"></p>
</div>
- <div class="showcase-controls"><div id="showcase-tabs" class="showcase-tabs" role="group" aria-label="Scene"></div><button id="showcase-reset" type="button">Reset view</button></div>
+ <div class="showcase-controls"><div id="showcase-tabs" class="showcase-tabs" role="group" aria-label="Scene"></div></div>
</div>
<div class="showcase-frame">
+ <button id="showcase-reset" class="showcase-reset" type="button">Reset view</button>
<canvas id="showcase-viewport" tabindex="0" aria-label="Live 3D scene. Drag to orbit, right-drag or shift-drag to pan, scroll to zoom, WASD or arrow keys to move, Q and E to turn."></canvas>
<p id="showcase-status" role="status"></p>
</div>
diff --git a/src/showcase.css b/src/showcase.css
index e6d8dc3a..b6a1d833 100644
--- a/src/showcase.css
+++ b/src/showcase.css
@@ -1,5 +1,5 @@
/* The showcase page: one live scene at a time, picked with quiet text tabs. */
-.showcase-stage { display: grid; gap: 16px; }
+.showcase-stage { display: grid; gap: 16px; padding-top: 20px; }
.showcase-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px; }
.showcase-head > div:first-child { display: grid; gap: 10px; }
.showcase-head p { color: var(--muted); font-size: 17px; }
@@ -19,6 +19,25 @@
}
#showcase-viewport { display: block; width: 100%; height: clamp(360px, 62vh, 760px); touch-action: none; cursor: grab; transition: opacity .25s; }
#showcase-viewport:active { cursor: grabbing; }
+/* Same glass chip as the hero caption, in the frame's lower left. */
+.site .showcase-frame .showcase-reset {
+ position: absolute;
+ z-index: 1;
+ left: 16px;
+ bottom: 16px;
+ min-height: 34px;
+ padding: 6px 14px;
+ border: 0;
+ border-radius: 999px;
+ background: #0d0a16a6;
+ color: #fff;
+ font-size: 13px;
+ box-shadow: inset 0 0 0 1px #ffffff26;
+ -webkit-backdrop-filter: blur(14px) saturate(1.4);
+ backdrop-filter: blur(14px) saturate(1.4);
+ cursor: pointer;
+}
+.site .showcase-frame .showcase-reset:hover { background: #0d0a16d9; }
.showcase-frame[data-loading=true] #showcase-viewport { opacity: .45; }
/* The loading and error chip: glass, centred over the canvas. */
diff --git a/src/site.css b/src/site.css
index c900704c..3b011611 100644
--- a/src/site.css
+++ b/src/site.css
@@ -354,7 +354,8 @@ body.site > main > section { scroll-margin-top: 96px; }
/* Docs: the reading page keeps its own layout (documentation.css) on these tokens. */
.documentation.site { --page: min(1320px, calc(100% - 40px)); }
-.documentation.site > main { width: var(--page); padding-top: 12px; }
+.documentation.site > main { width: var(--page); padding-top: 32px; }
+.documentation.site .navigation { width: min(1060px, calc(100% - 40px)); }
.site .table-scroll { overflow-x: auto; }
.site table { width: 100%; border-collapse: collapse; }
.site td, .site th { text-align: left; vertical-align: top; }