Explorar o código

Fix Material.Parse

Should call StandardMaterial.Parse() while the parsedMaterial.customType is "BABYLON.StandardMaterial".
TANG Chong %!s(int64=7) %!d(string=hai) anos
pai
achega
d5a3609b37
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/Materials/babylon.material.ts

+ 2 - 2
src/Materials/babylon.material.ts

@@ -1307,7 +1307,7 @@
          * @returns - Parsed material.
          */
         public static Parse(parsedMaterial: any, scene: Scene, rootUrl: string): any {
-            if (!parsedMaterial.customType) {
+            if (!parsedMaterial.customType || parsedMaterial.customType === "BABYLON.StandardMaterial" ) {
                 return StandardMaterial.Parse(parsedMaterial, scene, rootUrl);
             }
 
@@ -1323,4 +1323,4 @@
             return materialType.Parse(parsedMaterial, scene, rootUrl);;
         }
     }
-} 
+}