浏览代码

Fixed bug with sprites and delayed loading

David Catuhe 9 年之前
父节点
当前提交
bfe457fed0

文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/babylon.core.js


文件差异内容过多而无法显示
+ 772 - 772
dist/preview release/babylon.d.ts


文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/babylon.js


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

@@ -20179,7 +20179,7 @@ var BABYLON;
             return { width: 0, height: 0 };
         };
         BaseTexture.prototype.getBaseSize = function () {
-            if (!this.isReady())
+            if (!this.isReady() || !this._texture)
                 return { width: 0, height: 0 };
             if (this._texture._size) {
                 return { width: this._texture._size, height: this._texture._size };

文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/babylon.noworker.js


+ 1 - 1
src/Materials/Textures/babylon.baseTexture.js

@@ -54,7 +54,7 @@ var BABYLON;
             return { width: 0, height: 0 };
         };
         BaseTexture.prototype.getBaseSize = function () {
-            if (!this.isReady())
+            if (!this.isReady() || !this._texture)
                 return { width: 0, height: 0 };
             if (this._texture._size) {
                 return { width: this._texture._size, height: this._texture._size };

+ 1 - 1
src/Materials/Textures/babylon.baseTexture.ts

@@ -90,7 +90,7 @@
         }
 
         public getBaseSize(): ISize {
-            if (!this.isReady())
+            if (!this.isReady() || !this._texture)
                 return { width: 0, height: 0 };
 
             if (this._texture._size) {