From 6937f31bee1c1094dd97239c8adb9abe85ac7af6 Mon Sep 17 00:00:00 2001 From: David Catuhe Date: Fri, 14 Jun 2024 16:35:15 -0700 Subject: [PATCH] Stronger defense for Back compat (#15203) * Stronger defense for Back compat * . --- packages/dev/core/src/Materials/Node/nodeMaterial.ts | 3 +++ packages/dev/core/src/Meshes/abstractMesh.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/dev/core/src/Materials/Node/nodeMaterial.ts b/packages/dev/core/src/Materials/Node/nodeMaterial.ts index cff4bc8525f..51f9a4c407c 100644 --- a/packages/dev/core/src/Materials/Node/nodeMaterial.ts +++ b/packages/dev/core/src/Materials/Node/nodeMaterial.ts @@ -2469,6 +2469,9 @@ export class NodeMaterial extends PushMaterial { nodeMaterial.parseSerializedObject(serializationObject, undefined, undefined, urlRewriter); nodeMaterial.snippetId = snippetId; + // We reset sideOrientation to default value + nodeMaterial.sideOrientation = null; + try { if (!skipBuild) { nodeMaterial.build(); diff --git a/packages/dev/core/src/Meshes/abstractMesh.ts b/packages/dev/core/src/Meshes/abstractMesh.ts index 70552bee595..08eb1855f63 100644 --- a/packages/dev/core/src/Meshes/abstractMesh.ts +++ b/packages/dev/core/src/Meshes/abstractMesh.ts @@ -116,7 +116,7 @@ class _InternalAbstractMeshDataInfo { * Bounding info that is unnafected by the addition of thin instances */ public _rawBoundingInfo: Nullable = null; - /** + /** @internal * This value will indicate us that at some point, the mesh was specifically used with the opposite winding order * We use that as a clue to force the material to sideOrientation = null */