Ver código fonte

Fixed bug with sprites and delayed loading

David Catuhe 9 anos atrás
pai
commit
bfe457fed0

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
dist/preview release/babylon.core.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 772 - 772
dist/preview release/babylon.d.ts


Diferenças do arquivo suprimidas por serem muito extensas
+ 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 };

Diferenças do arquivo suprimidas por serem muito extensas
+ 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) {