Bläddra i källkod

Merge branch 'master' of https://github.com/BabylonJS/Babylon.js

Borut 7 år sedan
förälder
incheckning
36afeac6e0
1 ändrade filer med 5 tillägg och 3 borttagningar
  1. 5 3
      src/Mesh/babylon.abstractMesh.ts

+ 5 - 3
src/Mesh/babylon.abstractMesh.ts

@@ -893,12 +893,14 @@
                 for (var descendant of descendants) {
                     let childMesh = <AbstractMesh>descendant;
 
+                    //make sure we have the needed params to get mix and max
+                    if (!childMesh.getBoundingInfo || childMesh.getTotalVertices() === 0) {
+                        continue;
+                    }
+
                     childMesh.computeWorldMatrix(true);
                     let childBoundingInfo = childMesh.getBoundingInfo();
 
-                    if (childMesh.getTotalVertices() === 0) {
-                        continue;
-                    }
                     let boundingBox = childBoundingInfo.boundingBox;
 
                     var minBox = boundingBox.minimumWorld;