Browse Source

removed instanceof from subMesh

David Catuhe 8 years ago
parent
commit
d334b308ae
1 changed files with 1 additions and 1 deletions
  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);