Skip to content

armgit / 67.js

Public Imported from GitHub
0

3D engine that AI agents drive

Share the scene nav on modeling, 2D and asset pages, even the film transport gaps, centre button icons (#499)

Nguyen Xuan An46d3c289b1de
diff --git a/assets.html b/assets.html
index 2c5aee89..fa673a4f 100644
--- a/assets.html
+++ b/assets.html
@@ -17,7 +17,8 @@
<button data-view="front" aria-pressed="false">Front</button>
<button data-view="right" aria-pressed="false">Right</button>
<button data-view="top" aria-pressed="false">Top</button>
- <a href="./docs.html">Docs</a><a href="./index.html#examples">Showcase</a></nav>
+ </nav>
+ <nav class="studio-nav" aria-label="Scenes"><a href="./object.html">Object</a><a href="./nature.html">Nature</a><a href="./film.html">Film</a><a href="./motion.html">Motion</a><a href="./docs.html">Docs</a><a href="./index.html#examples">Showcase</a></nav>
<div class="toolbar-actions"><button id="fit">Fit</button><button id="open" class="primary">Open GLB</button></div>
<input id="file" type="file" accept=".glb,model/gltf-binary" hidden />
</header>
diff --git a/changes/499.md b/changes/499.md
index f1234ba7..3dd5f85e 100644
--- a/changes/499.md
+++ b/changes/499.md
@@ -1 +1,2 @@
- Object, nature, film and motion pages share one nav with an icon on every link; footer GitHub and npm links show their logos; nature slider labels share a baseline with their value (#499).
+- The modeling, 2D and asset viewer pages use the same scene nav as the other scene pages, the film transport row and scrubber use one even gap, and the icon in the Save PNG, Export GLB and docs Next buttons sits on the text centre (#499).
diff --git a/modeling.html b/modeling.html
index 507b3a90..3a331589 100644
--- a/modeling.html
+++ b/modeling.html
@@ -11,7 +11,7 @@
<a class="skip-link" href="#content">Skip to content</a>
<header class="navigation">
<a class="brand" href="/" aria-label="67js home">67js</a>
- <nav aria-label="Library"><a href="/downloads.html">Downloads</a><a href="/docs.html">Docs</a><a href="/changelog.html">Changelog</a></nav>
+ <nav aria-label="Scenes"><a href="/object.html">Object</a><a href="/nature.html">Nature</a><a href="/film.html">Film</a><a href="/motion.html">Motion</a><a href="/docs.html">Docs</a><a href="/index.html#examples">Showcase</a></nav>
</header>
<main id="content" class="modeling-study">
<div class="study-heading"><div><h1>Aster lantern</h1><p>A turned porcelain base, a spiral brass cage, and a little clockwork.</p></div><a href="/docs.html#parts">Modeling tools</a></div>
diff --git a/src/brand.css b/src/brand.css
index 64bf996c..f0b3f020 100644
--- a/src/brand.css
+++ b/src/brand.css
@@ -17,6 +17,9 @@ body input[type=range] { accent-color:#d7d7d7; }
.studio-nav a { padding:10px 14px; border-radius:var(--radius); }
nav a:has(> .icon) { display:flex; align-items:center; gap:8px; }
nav a > .icon { margin-right:0; }
+/* Centre the icon and the arrow glyph on the label instead of the inline text baseline. */
+button:has(> .icon), .doc-pagination strong { display:inline-flex; align-items:center; gap:7px; }
+button:has(> .icon) > .icon { margin-right:0; }
.nav-label { display:block; line-height:1.4; }
.studio-nav a[aria-current] { background-color:var(--surface); background-image:var(--dither); }
.controls button:not(.swatch)[aria-pressed=true], .demo-presets button[aria-pressed=true] { background-image:var(--dither); }
diff --git a/src/film-style.css b/src/film-style.css
index 40066e90..98e964f8 100644
--- a/src/film-style.css
+++ b/src/film-style.css
@@ -35,14 +35,15 @@ button:focus-visible, a:focus-visible, input:focus-visible {
position: absolute; inset: auto 0 0; padding: 55px 32px 24px;
background: linear-gradient(#08090900, #080909ed);
}
-.transport-actions { display: flex; align-items: center; gap: 16px; }
+.transport { --transport-gap: 16px; }
+.transport-actions { display: flex; align-items: center; gap: var(--transport-gap); }
button { min-height: 44px; padding: 10px 14px; cursor: pointer; border: 0; border-radius: 7px; color: #f3f1eb; background: #ffffff0d; }
button:hover { background: #ffffff1c; }
.play-button { display: flex; align-items: center; gap: 10px; min-width: 128px; background: #eeece4; color: #191a18; }
.play-button:hover { background: white; }
-.download { margin-left: auto; font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; }
-.scrubber { display: flex; align-items: center; gap: 18px; margin-top: 17px; }
-#film-time { flex: 1; width: 100%; min-width: 0; accent-color: #e7c89b; cursor: pointer; height: 28px; }
+.download { font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; }
+.scrubber { display: flex; align-items: center; gap: var(--transport-gap); margin-top: 17px; }
+#film-time { flex: 1; margin: 0; width: 100%; min-width: 0; accent-color: #e7c89b; cursor: pointer; height: 28px; }
#film-clock { font-variant-numeric: tabular-nums; font-size: 13px; color: #d6d5cf; white-space: nowrap; }
.film-caption { margin: 8px 0 0; font-size: 12px; color: #bdbdb5; }
.film-error { position: absolute; top: 100px; left: 32px; right: 32px; padding: 16px; border-radius: 8px; background: #181817; color: #ffbfaf; }
@@ -57,7 +58,8 @@ button:hover { background: #ffffff1c; }
.film-name { font-size: 12px; }
.film-header nav { gap: 16px; font-size: 13px; }
.transport { padding: 60px 20px 24px; }
- .transport-actions { flex-wrap: wrap; gap: 10px; }
+ .transport { --transport-gap: 12px; }
+ .transport-actions { flex-wrap: wrap; }
.download { font-size: 12px; }
.play-button { min-width: 118px; }
button { padding: 10px 12px; font-size: 13px; }
diff --git a/src/home.css b/src/home.css
index bb7825f8..42f1dabb 100644
--- a/src/home.css
+++ b/src/home.css
@@ -165,7 +165,7 @@ body:has(.navigation) { --navigation-height:80px; }
.navigation nav a { padding:10px 12px; }
}
@media (max-width:440px) {
- .navigation nav { flex-wrap:nowrap; }
+ .navigation nav { flex-wrap:wrap; }
.navigation nav a { padding:10px 8px; gap:6px; font-size:12px; white-space:nowrap; }
.package-managers { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
}
diff --git a/src/view2d.css b/src/view2d.css
index 25b1c868..1eb1516b 100644
--- a/src/view2d.css
+++ b/src/view2d.css
@@ -16,6 +16,8 @@ h1 { font-size: 16px; font-weight: 500; margin: 0 12px 0 0; }
.scene-picker { display: flex; align-items: center; gap: 10px; color: #b6c2c5; }
select { color: #eef1ef; border: 0; background: #ffffff0b; border-radius: 8px; padding: 9px 12px; }
nav { display: flex; gap: 4px; }
+.toolbar .studio-nav a { color: #b6c2c5; text-decoration: none; font-size: 13px; }
+.toolbar .studio-nav a:hover { color: #eef1ef; }
[hidden] { display: none !important; }
.toolbar-actions { display: flex; gap: 8px; margin-left: auto; }
.primary { color: #213016; background: #c5f091; font-weight: 600; }
@@ -46,6 +48,8 @@ output { font-variant-numeric: tabular-nums; color: #bec9cc; min-width: 98px; fo
select { padding: 8px; max-width: 130px; }
.toolbar-actions { margin-left: 0; }
nav { order: 2; flex: 1; }
+ .toolbar .studio-nav { order: 3; flex: 1 1 100%; }
+ .toolbar .studio-nav a { padding: 8px 10px; }
nav button { padding: 9px 11px; font-size: 12px; }
.toolbar-actions button { padding: 9px 12px; font-size: 12px; }
.stage { min-height: 310px; }
diff --git a/view2d.html b/view2d.html
index 8e8a88f6..1a1838cd 100644
--- a/view2d.html
+++ b/view2d.html
@@ -18,7 +18,8 @@
<button data-view="top" aria-pressed="false">Top</button>
<button data-view="right" aria-pressed="false">Right</button>
<button data-view="perspective" aria-pressed="false">Perspective</button>
- <a href="./docs.html">Docs</a><a href="./index.html#examples">Showcase</a></nav>
+ </nav>
+ <nav class="studio-nav" aria-label="Scenes"><a href="./object.html">Object</a><a href="./nature.html">Nature</a><a href="./film.html">Film</a><a href="./motion.html">Motion</a><a href="./docs.html">Docs</a><a href="./index.html#examples">Showcase</a></nav>
<div class="toolbar-actions"><button id="fit">Fit view</button><button id="download" class="primary">Save PNG <span aria-hidden="true">↗</span></button></div>
</header>
<section class="stage" aria-label="Interactive scene">