mirror of
https://github.com/photonstorm/phaser
synced 2024-11-16 17:58:23 +00:00
Added renderable check to Pixi.Sprite.
This commit is contained in:
parent
683f1a3a10
commit
395171b660
1 changed files with 2 additions and 2 deletions
|
@ -271,7 +271,7 @@ PIXI.Sprite.prototype.getBounds = function(matrix)
|
|||
PIXI.Sprite.prototype._renderWebGL = function(renderSession)
|
||||
{
|
||||
// if the sprite is not visible or the alpha is 0 then no need to render this element
|
||||
if(!this.visible || this.alpha <= 0)return;
|
||||
if (!this.visible || this.alpha <= 0 || !this.renderable) return;
|
||||
|
||||
var i,j;
|
||||
|
||||
|
@ -334,7 +334,7 @@ PIXI.Sprite.prototype._renderWebGL = function(renderSession)
|
|||
PIXI.Sprite.prototype._renderCanvas = function(renderSession)
|
||||
{
|
||||
// If the sprite is not visible or the alpha is 0 then no need to render this element
|
||||
if (this.visible === false || this.alpha === 0 || this.texture.crop.width <= 0 || this.texture.crop.height <= 0) return;
|
||||
if (this.visible === false || this.alpha === 0 || this.renderable === false || this.texture.crop.width <= 0 || this.texture.crop.height <= 0) return;
|
||||
|
||||
if (this.blendMode !== renderSession.currentBlendMode)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue