Pārlūkot izejas kodu

removed instanceof from subMesh

David Catuhe 8 gadi atpakaļ
vecāks
revīzija
d334b308ae
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  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);