Explorar o código

removed instanceof from subMesh

David Catuhe %!s(int64=8) %!d(string=hai) anos
pai
achega
d334b308ae
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Mesh/babylon.subMesh.ts

+ 1 - 1
src/Mesh/babylon.subMesh.ts

@@ -90,7 +90,7 @@
         public getMaterial(): Material {
             var rootMaterial = this._renderingMesh.material;
 
-            if (rootMaterial && rootMaterial.getClassName() === "MultiMaterial") {
+            if (rootMaterial && (<MultiMaterial>rootMaterial).getSubMaterial) {
                 var multiMaterial = <MultiMaterial>rootMaterial;
                 var effectiveMaterial = multiMaterial.getSubMaterial(this.materialIndex);