Environment lighting: - ship all eight desktop studiolights/world datasets (WBENV1 float32) and a shared loader used by both the main viewport and the offscreen worker - add the N-panel "studio 环境" selector - rotate the world background together with the environment (backgroundRotation/backgroundIntensity), so camera view and offscreen renders match the desktop Mapping-node behaviour Verification (Chromium, OPFS, NOT_CLAIMED): - environment lighting + 8 world pixel identity - camera-view rotation correspondence (camera matrices, 207 samples) - offscreen vs on-screen background parity after hiding geometry (1305 samples) - metals case extended with material-field OPFS roundtrip - material Principled edits and rename undo/redo - eight studio worlds: pairwise frame differences + luminance rank correlation - undo history depth capped at 64 steps and undo across OPFS save/reopen Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
35 lines
1.8 KiB
JavaScript
35 lines
1.8 KiB
JavaScript
#!/usr/bin/env node
|
|
/** Probe: console/GPU errors during an in-page (WASM) EEVEE render. */
|
|
import path from "node:path";
|
|
import { REPO, parseArgs, waitForServer, launchBrowser, newPage, openFile, waitScene } from "./course/lib/lesson-recorder.mjs";
|
|
|
|
const args = parseArgs();
|
|
const BASE = `http://127.0.0.1:${args.port}`;
|
|
const SCENE = path.join(REPO, "web/app/public/tutorial/rendering/render-studio.blend");
|
|
|
|
await waitForServer(`${BASE}/`);
|
|
const browser = await launchBrowser(args.gpu);
|
|
const { context } = await newPage(browser, { baseUrl: null });
|
|
const page = context.pages()[0] ?? await context.newPage();
|
|
const logs = [];
|
|
page.on("console", (m) => { const t = m.text().replace(/\s+/g, " "); if (!/EEVEE|eevee|shader|Shader|GPU|gpu|gl_|ERROR|error/i.test(t)) return; logs.push(`${m.type()}: ${t.slice(0, 400)}`); });
|
|
page.on("pageerror", (e) => logs.push(`pageerror: ${String(e).slice(0, 300)}`));
|
|
await page.goto(`${BASE}/`, { waitUntil: "domcontentloaded" });
|
|
await page.locator("main.blender-app").waitFor({ timeout: 120_000 });
|
|
await openFile(page, SCENE);
|
|
await waitScene(page, { objects: 7, timeout: 120_000 });
|
|
await page.waitForFunction(() => [...document.querySelectorAll(".workspace-tab")].some((t) => t.getAttribute("aria-current") !== null), null, { timeout: 90_000 });
|
|
|
|
// Ask the app's own engine directly: what does the scene say its engine is, and
|
|
// what does render.render report?
|
|
const out = await page.evaluate(async () => {
|
|
const client = globalThis.__webEngineClient;
|
|
if (!client) return { missing: true, keys: Object.keys(globalThis).filter((k) => /engine|Engine|client/i.test(k)) };
|
|
return { ok: true };
|
|
});
|
|
console.log("client", JSON.stringify(out).slice(0, 400));
|
|
console.log("LOGS", logs.length);
|
|
for (const l of logs.slice(0, 60)) console.log(l);
|
|
await context.close();
|
|
await browser.close();
|