Browse Source

removed instanceof from subMesh

David Catuhe 8 năm trước cách đây
mục cha
commit
d334b308ae
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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);