diff --git a/Gruntfile.js b/Gruntfile.js index 90c64ba..af6a371 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -131,7 +131,7 @@ }, jshint: { options: { - jshintrc: '.jshintrc' + jshintrc: './.jshintrc' }, source: srcFiles.filter(function(v) { return v.match(/(Intro|Outro|Spine|Pixi)\.js$/) === null; }).concat('Gruntfile.js'), test: { diff --git a/Gruntfile.js b/Gruntfile.js index 90c64ba..af6a371 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -131,7 +131,7 @@ }, jshint: { options: { - jshintrc: '.jshintrc' + jshintrc: './.jshintrc' }, source: srcFiles.filter(function(v) { return v.match(/(Intro|Outro|Spine|Pixi)\.js$/) === null; }).concat('Gruntfile.js'), test: { diff --git a/bin/pixi.dev.js b/bin/pixi.dev.js index 70b5eda..0205fe9 100644 --- a/bin/pixi.dev.js +++ b/bin/pixi.dev.js @@ -1756,6 +1756,9 @@ 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); diff --git a/Gruntfile.js b/Gruntfile.js index 90c64ba..af6a371 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -131,7 +131,7 @@ }, jshint: { options: { - jshintrc: '.jshintrc' + jshintrc: './.jshintrc' }, source: srcFiles.filter(function(v) { return v.match(/(Intro|Outro|Spine|Pixi)\.js$/) === null; }).concat('Gruntfile.js'), test: { diff --git a/bin/pixi.dev.js b/bin/pixi.dev.js index 70b5eda..0205fe9 100644 --- a/bin/pixi.dev.js +++ b/bin/pixi.dev.js @@ -1756,6 +1756,9 @@ 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); diff --git a/src/pixi/display/Sprite.js b/src/pixi/display/Sprite.js index 0c0c5ad..34fa410 100644 --- a/src/pixi/display/Sprite.js +++ b/src/pixi/display/Sprite.js @@ -299,6 +299,9 @@ 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);