updated the visible check for display objects

This commit is contained in:
Mat Groves 2014-01-21 20:58:27 +00:00
parent 7364f86533
commit 1f67673793
4 changed files with 8 additions and 8 deletions

View file

@ -1452,8 +1452,8 @@ PIXI.DisplayObjectContainer.prototype.removeStageReference = function()
PIXI.DisplayObjectContainer.prototype._renderWebGL = function(renderSession)
{
if(this.visible === false || this.alpha === 0)return;
if(!this.visible || this.alpha <= 0)return;
var i,j;
if(this._mask || this._filters)
@ -1775,7 +1775,7 @@ PIXI.Sprite.prototype.getBounds = function()
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 === false || this.alpha === 0)return;
if(!this.visible || this.alpha <= 0)return;
var i,j;
@ -2011,7 +2011,7 @@ PIXI.SpriteBatch.prototype.updateTransform = function()
PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
{
if(!this.visible)return;
if(!this.visible || this.alpha <= 0 || !this.children.length)return;
if(!this.ready)this.initWebGL( renderSession.gl );

View file

@ -283,8 +283,8 @@ PIXI.DisplayObjectContainer.prototype.removeStageReference = function()
PIXI.DisplayObjectContainer.prototype._renderWebGL = function(renderSession)
{
if(this.visible === false || this.alpha === 0)return;
if(!this.visible || this.alpha <= 0)return;
var i,j;
if(this._mask || this._filters)

View file

@ -256,7 +256,7 @@ PIXI.Sprite.prototype.getBounds = function()
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 === false || this.alpha === 0)return;
if(!this.visible || this.alpha <= 0)return;
var i,j;

View file

@ -31,7 +31,7 @@ PIXI.SpriteBatch.prototype.updateTransform = function()
PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
{
if(!this.visible)return;
if(!this.visible || this.alpha <= 0 || !this.children.length)return;
if(!this.ready)this.initWebGL( renderSession.gl );