feat: modal logo artwork + sync colour variants from pollen site

- welcome modal now uses the Microduck sticker + wordmark press assets
  (LFS-tracked PNGs, signed like every other private-Space subresource)
- variants.js replaced with the site's 3d-module version: dedicated
  tongue/hips/sideShells slots, black leg motors, uniform yellow/orange
  shoe, and orange lower beak on the blue scheme
- swatches honour the per-variant swatch override (purple dot is purple)
- duck.js/variants.js dynamic imports reuse rl.js's ?v= cache-buster

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
tfrere
2026-08-20 13:40:59 +02:00
parent 3e94349c2c
commit ab9dec213e
6 changed files with 104 additions and 64 deletions
+29 -23
View File
@@ -281,31 +281,30 @@
from { transform: translateY(18px) scale(0.94); opacity: 0; }
to { transform: none; opacity: 1; }
}
#welcome .badge {
width: 4rem;
height: 4rem;
margin: 0 auto 1.1rem;
display: flex;
align-items: center;
justify-content: center;
font-size: 2rem;
border-radius: 50%;
background: rgba(255, 210, 63, 0.12);
border: 1px solid rgba(255, 210, 63, 0.35);
animation: badge-bob 3s ease-in-out infinite;
#welcome .logo-duck {
display: block;
height: 7.5rem;
margin: 0 auto 0.4rem;
filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45));
animation: badge-bob 3.2s ease-in-out infinite;
}
@keyframes badge-bob {
0%, 100% { transform: translateY(0) rotate(-3deg); }
50% { transform: translateY(-6px) rotate(3deg); }
0%, 100% { transform: translateY(0) rotate(-2deg); }
50% { transform: translateY(-6px) rotate(2deg); }
}
#welcome h1 {
font-size: 1.05rem;
#welcome .logo-wordmark {
display: block;
width: min(78%, 300px);
margin: 0 auto;
}
#welcome .subtitle {
margin-top: 0.55rem;
font-size: 0.62rem;
font-weight: 700;
letter-spacing: 0.18em;
letter-spacing: 0.32em;
text-transform: uppercase;
color: #fff;
color: rgba(255, 210, 63, 0.75);
}
#welcome h1 b { color: var(--yellow); font-weight: 700; }
#welcome .tagline {
margin-top: 0.5rem;
font-size: 0.8rem;
@@ -410,9 +409,10 @@
<div id="loading">Compiling physics&hellip;</div>
<div id="welcome" hidden>
<div class="card" role="dialog" aria-modal="true" aria-labelledby="welcome-title">
<div class="badge">🐤</div>
<h1 id="welcome-title"><b>Microduck</b> playground</h1>
<div class="card" role="dialog" aria-modal="true" aria-label="Microduck playground">
<img class="logo-duck" id="logo-duck" alt="" />
<img class="logo-wordmark" id="logo-wordmark" alt="Microduck" />
<div class="subtitle">RL playground</div>
<p class="tagline">
A real robot brain in your browser: MuJoCo physics compiled to
WebAssembly, driven by the duck's actual trained neural policies
@@ -434,6 +434,12 @@
// or clicking the blurred backdrop. The top-left brand reopens it.
(() => {
const modal = document.getElementById("welcome");
// Logo images need the same ?__sign JWT as every other subresource
// on the private Space (rl.js hasn't installed its signer yet).
const sign = new URLSearchParams(location.search).get("__sign");
const signedUrl = (u) => (sign ? `${u}?__sign=${encodeURIComponent(sign)}` : u);
document.getElementById("logo-duck").src = signedUrl("./assets/logo-duck.png");
document.getElementById("logo-wordmark").src = signedUrl("./assets/logo-wordmark.png");
const open = () => {
modal.hidden = false;
modal.classList.remove("closing");
@@ -464,7 +470,7 @@
appended: a plain src attribute can 401 when the browser blocks the
*.static.hf.space auth cookie inside the hub iframe. -->
<script type="module">
const V = "20"; // bump on rl.js changes to defeat heuristic caching
const V = "21"; // bump on rl.js changes to defeat heuristic caching
const sign = new URLSearchParams(location.search).get("__sign");
const suffix = sign ? `&__sign=${encodeURIComponent(sign)}` : "";
import(`./rl.js?v=${V}${suffix}`);