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>
24 lines
1.2 KiB
TypeScript
24 lines
1.2 KiB
TypeScript
import { expect, test } from "@playwright/test";
|
|
import path from "node:path";
|
|
|
|
test("probe: compare JS snapshot revision with Python-side revision", async ({ page }) => {
|
|
test.setTimeout(120_000);
|
|
await page.goto("/");
|
|
await page.getByTestId("blend-file-input").setInputFiles(path.resolve(import.meta.dirname, "../../../tests/files/web/basic_scene.blend"));
|
|
await expect(page.getByTestId("engine-status")).toContainText(/SceneIR r\d+/, { timeout: 60_000 });
|
|
const samples = await page.evaluate(async () => {
|
|
const { WebEngineClient } = await import("/src/engine-client/WebEngineClient.ts");
|
|
const client = new WebEngineClient({ timeoutMs: 30_000 });
|
|
const rows: Array<{ js: number; py: unknown; pyState: string }> = [];
|
|
for (let index = 0; index < 6; index++) {
|
|
const js = (await client.snapshot()).snapshot.revision;
|
|
const py = await client.executeEmbeddedPython("import web_blender\nprint('REV', web_blender.snapshot().get('revision'))", "Probe.py", false);
|
|
rows.push({ js, py: py.python?.output?.trim(), pyState: py.python?.state });
|
|
await new Promise((resolve) => setTimeout(resolve, 600));
|
|
}
|
|
client.terminate();
|
|
return rows;
|
|
});
|
|
console.log("REVISION_COMPARE " + JSON.stringify(samples));
|
|
});
|