Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

fix(play): fix the camera to a consistent vantage before play-scene-cost screenshots

nirholas7a0538fd5796
diff --git a/scripts/play-scene-cost.mjs b/scripts/play-scene-cost.mjs
index 083c279cf..ae9271335 100644
--- a/scripts/play-scene-cost.mjs
+++ b/scripts/play-scene-cost.mjs
@@ -101,6 +101,20 @@ if (notes.length) {
for (const n of [...new Set(notes)].slice(0, 10)) console.log(' ' + n);
}
+// Frame the same vantage in every run before capturing, so two runs are
+// comparable pixel for pixel. The follow camera is driven from localPos/camYaw
+// every frame, so steering those is the only way to aim it from outside; the
+// pause lets the camera's own smoothing settle.
+if (process.env.SHOT) {
+ await page.evaluate(() => {
+ const g = window.__CC__;
+ g.localPos.set(0, 0, 0);
+ g.camYaw = Math.PI * 0.75;
+ g.camPitch = 0.12;
+ });
+ await page.waitForTimeout(6000);
+}
+
// Capture through CDP rather than page.screenshot(): the world runs a rAF loop
// forever, so Playwright's wait-for-stability never settles on a busy main
// thread and the capture times out with the numbers already in hand.