Browse Source

Fixed cube texture bug

David Catuhe 8 năm trước cách đây
mục cha
commit
6947922e6c

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


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


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


+ 2 - 2
dist/preview release/babylon.max.js

@@ -23532,11 +23532,11 @@ var BABYLON;
                     this.delayLoadState = BABYLON.Engine.DELAYLOADSTATE_NOTLOADED;
                 }
             }
-            else {
+            else if (onLoad) {
                 if (this._texture.isReady) {
                     BABYLON.Tools.SetImmediate(function () { return onLoad(); });
                 }
-                else if (onLoad) {
+                else {
                     this._texture.onLoadedCallbacks.push(onLoad);
                 }
             }

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


+ 2 - 2
src/Materials/Textures/babylon.cubeTexture.js

@@ -39,11 +39,11 @@ var BABYLON;
                     this.delayLoadState = BABYLON.Engine.DELAYLOADSTATE_NOTLOADED;
                 }
             }
-            else {
+            else if (onLoad) {
                 if (this._texture.isReady) {
                     BABYLON.Tools.SetImmediate(function () { return onLoad(); });
                 }
-                else if (onLoad) {
+                else {
                     this._texture.onLoadedCallbacks.push(onLoad);
                 }
             }

+ 2 - 2
src/Materials/Textures/babylon.cubeTexture.ts

@@ -49,10 +49,10 @@
                 } else {
                     this.delayLoadState = Engine.DELAYLOADSTATE_NOTLOADED;
                 }
-            } else {
+            } else if (onLoad) {
                 if (this._texture.isReady) {
                     Tools.SetImmediate(() => onLoad());
-                } else if (onLoad) {
+                } else {
                     this._texture.onLoadedCallbacks.push(onLoad);
                 }
             }