fixed bug where sprites where always visible

This commit is contained in:
Mat Groves 2013-12-31 18:06:09 +00:00
parent 8138dbd3bb
commit 1bc122aa05
3 changed files with 7 additions and 1 deletions

View file

@ -1756,6 +1756,9 @@ 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)return;
if(this._mask)
{
renderSession.maskManager.pushMask(this._mask, renderSession.context);