Visualization: in-memory round-trip for Serialize-without-materials test#18569
Conversation
|
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
There was a problem hiding this comment.
Pull request overview
Updates the visualization test configuration to point the “Serialize scene without materials” test at a newer Playground revision that performs an in-memory serialization round-trip (better suited for non-DOM environments like BabylonNative) while keeping the same expected rendered output.
Changes:
- Repointed the “Serialize scene without materials” visualization test Playground ID from
#PH4DEZ#1to#PH4DEZ#4.
|
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
|
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/18569/merge/index.html#WGZLGJ#4600 Links to test your changes to core in the published versions of the Babylon tools (does not contain changes you made to the tools themselves): https://playground.babylonjs.com/?snapshot=refs/pull/18569/merge To test the snapshot in the playground with a playground ID add it after the snapshot query string: https://playground.babylonjs.com/?snapshot=refs/pull/18569/merge#BCU1XR#0 If you made changes to the sandbox or playground in this PR, additional comments will be generated soon containing links to the dev versions of those tools. |
|
WebGL2 visualization test reporter: |
|
Visualization tests for WebGPU |
🟢 Memory Leak Test Results13 passed, 0 leaked out of 13 scenarios 🟢 All memory leak tests passed — no leaks detected. Passed Scenarios (13)
|
⚡ Performance Test Results🟢 All performance tests passed — no regressions detected. |
|
WebGL2 visualization test reporter: |
|
WebGL2 visualization test reporter: |
🟢 Memory Leak Test Results13 passed, 0 leaked out of 13 scenarios 🟢 All memory leak tests passed — no leaks detected. Passed Scenarios (13)
|
|
Visualization tests for WebGPU |
#PH4DEZ now does an in-memory serialization round-trip (serialize ->
SceneLoader.ImportMeshAsync("data:" + json) -> render the deserialized
scene) instead of a DOM file download, modeled on the glTF serializer
#KU72PX. This validates serialization correctness with no DOM dependency
and lets BabylonNative run the same shared test without faking DOM APIs
(mirrors BabylonNative PR BabylonJS#1708). The browser-only download is kept but
guarded on document.createEvent. The rendered scene is unchanged (same
sphere hierarchy), so the reference image is expected to still match.
Picks up nightly Playground 20260612.1 which bundles the texture-upload use-after-free fix from BabylonJS/BabylonNative#1758 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
11c914f to
206184d
Compare
🟢 Memory Leak Test Results13 passed, 0 leaked out of 13 scenarios 🟢 All memory leak tests passed — no leaks detected. Passed Scenarios (13)
|
|
WebGL2 visualization test reporter: |
|
Visualization tests for WebGPU |
⚡ Performance Test Results🟢 All performance tests passed — no regressions detected. |
Summary
Repoints the Serialize scene without materials visualization test (
#PH4DEZ#1->#PH4DEZ#4).The previous revision's only DOM usage was a file download (
createElement('a')+createEvent+link.dispatchEvent) with no visual effect.#PH4DEZ#4instead performs a real in-memory serialization round-trip:SceneSerializer.SerializeMesh;SceneLoader.ImportMeshAsync(null, "", "data:" + json, scene);This actually validates serialization correctness (not just that it doesn't throw), modeled on the glTF serializer round-trip
#KU72PX. The browser-only.babylondownload is kept but guarded ondocument.createEvent, so it is skipped where the DOM isn't available.Motivation: the same shared snippet is used by BabylonNative's visual suite, which has no DOM. The round-trip lets both web and native run the test without faking DOM APIs. Mirrors BabylonNative PR BabylonJS/BabylonNative#1708.
Visual impact
The rendered scene is unchanged (same sphere hierarchy), so the
serializeWithoutMaterials.pngreference is expected to still match — the BabylonNative side validates against the same reference with the new revision (248 px diff, well within tolerance). No reference image regeneration is included; CI's Playwright run will confirm.