From ebb22ff01180dceaa02aaa0c5285ac059534afdd Mon Sep 17 00:00:00 2001 From: Popov72 Date: Sun, 16 Jun 2024 19:53:37 +0200 Subject: [PATCH] Mesh: Fix back compat for sideOrientation when parsing mesh (#15206) * Fix back compat for sideOrientation when parsing mesh * Exclude visu test --- packages/dev/core/src/Meshes/mesh.ts | 5 +++++ packages/tools/tests/test/visualization/config.json | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/dev/core/src/Meshes/mesh.ts b/packages/dev/core/src/Meshes/mesh.ts index ac8bba5d607..776596528c3 100644 --- a/packages/dev/core/src/Meshes/mesh.ts +++ b/packages/dev/core/src/Meshes/mesh.ts @@ -4109,6 +4109,11 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData { mesh.ellipsoidOffset = Vector3.FromArray(parsedMesh.ellipsoidOffset); } + // For Backward compatibility ("!=" to exclude null and undefined) + if (parsedMesh.overrideMaterialSideOrientation != null) { + mesh.sideOrientation = parsedMesh.overrideMaterialSideOrientation; + } + if (parsedMesh.sideOrientation !== undefined) { mesh.sideOrientation = parsedMesh.sideOrientation; } diff --git a/packages/tools/tests/test/visualization/config.json b/packages/tools/tests/test/visualization/config.json index 49177896a43..083edbc2940 100644 --- a/packages/tools/tests/test/visualization/config.json +++ b/packages/tools/tests/test/visualization/config.json @@ -4,7 +4,8 @@ { "title": "NME Shadow Map", "playgroundId": "#M3QR7E#83", - "referenceImage": "nmeshadowmap.png" + "referenceImage": "nmeshadowmap.png", + "excludedEngines": ["webgl1"] }, { "title": "NMEGLTF",