Browse Source

Fix mesh.isReady

David Catuhe 7 năm trước cách đây
mục cha
commit
27b47601f2

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 6008 - 6008
Playground/babylon.d.txt


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 7679 - 7679
dist/preview release/babylon.d.ts


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 3 - 3
dist/preview release/babylon.js


+ 3 - 0
dist/preview release/babylon.max.js

@@ -25352,6 +25352,9 @@ var BABYLON;
             if (!_super.prototype.isReady.call(this)) {
                 return false;
             }
+            if (!this.subMeshes || this.subMeshes.length === 0) {
+                return true;
+            }
             var engine = this.getEngine();
             var scene = this.getScene();
             var hardwareInstancedRendering = forceInstanceSupport || engine.getCaps().instancedArrays && this.instances.length > 0;

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 3 - 3
dist/preview release/babylon.worker.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 8266 - 8266
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 3 - 3
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js


+ 3 - 0
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.max.js

@@ -25352,6 +25352,9 @@ var BABYLON;
             if (!_super.prototype.isReady.call(this)) {
                 return false;
             }
+            if (!this.subMeshes || this.subMeshes.length === 0) {
+                return true;
+            }
             var engine = this.getEngine();
             var scene = this.getScene();
             var hardwareInstancedRendering = forceInstanceSupport || engine.getCaps().instancedArrays && this.instances.length > 0;

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 3 - 3
dist/preview release/viewer/babylon.viewer.js


+ 4 - 0
src/Mesh/babylon.mesh.ts

@@ -611,6 +611,10 @@
                 return false;
             }
 
+            if (!this.subMeshes || this.subMeshes.length === 0) {
+                return true;
+            }
+
             let engine = this.getEngine();
             let scene = this.getScene();
             let hardwareInstancedRendering = forceInstanceSupport || engine.getCaps().instancedArrays && this.instances.length > 0;