Skip to content

Commit

Permalink
Mesh: Fix back compat for sideOrientation when parsing mesh (#15206)
Browse files Browse the repository at this point in the history
* Fix back compat for sideOrientation when parsing mesh

* Exclude visu test
  • Loading branch information
Popov72 authored Jun 16, 2024
1 parent bc093c4 commit ebb22ff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions packages/dev/core/src/Meshes/mesh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion packages/tools/tests/test/visualization/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
{
"title": "NME Shadow Map",
"playgroundId": "#M3QR7E#83",
"referenceImage": "nmeshadowmap.png"
"referenceImage": "nmeshadowmap.png",
"excludedEngines": ["webgl1"]
},
{
"title": "NMEGLTF",
Expand Down

0 comments on commit ebb22ff

Please sign in to comment.