Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mesh: Fix back compat for sideOrientation when parsing mesh #15206

Merged
merged 2 commits into from
Jun 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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