瀏覽代碼

Fixed cube texture bug

David Catuhe 8 年之前
父節點
當前提交
6947922e6c

文件差異過大導致無法顯示
+ 1 - 1
dist/preview release/babylon.core.js


文件差異過大導致無法顯示
+ 5216 - 5216
dist/preview release/babylon.d.ts


文件差異過大導致無法顯示
+ 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;
                     this.delayLoadState = BABYLON.Engine.DELAYLOADSTATE_NOTLOADED;
                 }
                 }
             }
             }
-            else {
+            else if (onLoad) {
                 if (this._texture.isReady) {
                 if (this._texture.isReady) {
                     BABYLON.Tools.SetImmediate(function () { return onLoad(); });
                     BABYLON.Tools.SetImmediate(function () { return onLoad(); });
                 }
                 }
-                else if (onLoad) {
+                else {
                     this._texture.onLoadedCallbacks.push(onLoad);
                     this._texture.onLoadedCallbacks.push(onLoad);
                 }
                 }
             }
             }

文件差異過大導致無法顯示
+ 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;
                     this.delayLoadState = BABYLON.Engine.DELAYLOADSTATE_NOTLOADED;
                 }
                 }
             }
             }
-            else {
+            else if (onLoad) {
                 if (this._texture.isReady) {
                 if (this._texture.isReady) {
                     BABYLON.Tools.SetImmediate(function () { return onLoad(); });
                     BABYLON.Tools.SetImmediate(function () { return onLoad(); });
                 }
                 }
-                else if (onLoad) {
+                else {
                     this._texture.onLoadedCallbacks.push(onLoad);
                     this._texture.onLoadedCallbacks.push(onLoad);
                 }
                 }
             }
             }

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

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