diff --git a/src/pixi/display/Sprite.js b/src/pixi/display/Sprite.js index cdb083f..9d488c8 100644 --- a/src/pixi/display/Sprite.js +++ b/src/pixi/display/Sprite.js @@ -36,8 +36,8 @@ * @property texture * @type Texture */ - this.texture = texture; - + this.texture = texture || PIXI.Texture.emptyTexture;; + /** * The width of the sprite (this is initially set by the texture) * @@ -83,7 +83,7 @@ */ this.shader = null; - if(texture.baseTexture.hasLoaded) + if(this.texture.baseTexture.hasLoaded) { this.onTextureUpdate(); } diff --git a/src/pixi/display/Sprite.js b/src/pixi/display/Sprite.js index cdb083f..9d488c8 100644 --- a/src/pixi/display/Sprite.js +++ b/src/pixi/display/Sprite.js @@ -36,8 +36,8 @@ * @property texture * @type Texture */ - this.texture = texture; - + this.texture = texture || PIXI.Texture.emptyTexture;; + /** * The width of the sprite (this is initially set by the texture) * @@ -83,7 +83,7 @@ */ this.shader = null; - if(texture.baseTexture.hasLoaded) + if(this.texture.baseTexture.hasLoaded) { this.onTextureUpdate(); } diff --git a/src/pixi/text/Text.js b/src/pixi/text/Text.js index 7cd251a..3f0a5ca 100644 --- a/src/pixi/text/Text.js +++ b/src/pixi/text/Text.js @@ -374,7 +374,7 @@ context.textBaseline = 'alphabetic'; context.fillStyle = '#000'; - context.fillText('|Mq', 0, baseline); + context.fillText('|MÉq', 0, baseline); var imagedata = context.getImageData(0, 0, width, height).data; var pixels = imagedata.length;