Skip to content

Commit c186a18

Browse files
committed
feat(showcase): refresh README GIFs (Mixamo for jumping-jacks/squat) + fix dev capture
capture-gifs.mjs: bind the vite dev server to IPv4 (127.0.0.1) and read the actual listening port, and load via /play.html#doc=<id> (the /play/<id> route is a prod-only rewrite that vite dev doesn't resolve). jumping-jacks + squat GIFs now render the retargeted Mixamo mocap; deadlift + lateral-raise get the improved L2-L4 procedural motion.
1 parent 0b01e03 commit c186a18

5 files changed

Lines changed: 7 additions & 3 deletions

File tree

docs/media/deadlift.gif

97 KB
Loading

docs/media/jumping-jacks.gif

51.7 KB
Loading

docs/media/lateral-raise.gif

97.4 KB
Loading

docs/media/squat.gif

-67.1 KB
Loading

scripts/capture-gifs.mjs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,13 @@ if (targets.length === 0) {
5353

5454
const server = await createServer({
5555
configFile: resolve(repoRoot, "playground/vite.config.ts"),
56-
server: { port: 0 },
56+
server: { port: 0, host: "127.0.0.1" },
5757
logLevel: "error",
5858
});
5959
await server.listen();
60-
const port = server.config.server.port ?? server.httpServer.address().port;
60+
// Use the ACTUAL bound port: with `port: 0`, config.server.port stays 0 (and
61+
// `0 ?? …` keeps 0), so read the listening socket instead.
62+
const port = server.httpServer.address().port;
6163
const origin = `http://127.0.0.1:${port}`;
6264

6365
const browser = await chromium.launch({ executablePath: chromiumPath() });
@@ -66,7 +68,9 @@ page.on("pageerror", (e) => console.error("[page]", e.message));
6668

6769
for (const t of targets) {
6870
const [w, h] = t.size;
69-
await page.goto(`${origin}/play/${t.id}`, { waitUntil: "load" });
71+
// `/play/<id>` is a production rewrite (vercel); in the vite dev server used
72+
// here it doesn't resolve, so use the SPA entry + hash which loads the doc.
73+
await page.goto(`${origin}/play.html#doc=${t.id}`, { waitUntil: "load" });
7074
await page.reload({ waitUntil: "load" });
7175
await page.waitForFunction(() => window.__posecodeViewer?.duration > 0, null, {
7276
timeout: 60000,

0 commit comments

Comments
 (0)