fixed bug where sprites where always visible
This commit is contained in:
parent
8138dbd3bb
commit
1bc122aa05
3 changed files with 7 additions and 1 deletions
|
@ -131,7 +131,7 @@ module.exports = function(grunt) {
|
||||||
},
|
},
|
||||||
jshint: {
|
jshint: {
|
||||||
options: {
|
options: {
|
||||||
jshintrc: '.jshintrc'
|
jshintrc: './.jshintrc'
|
||||||
},
|
},
|
||||||
source: srcFiles.filter(function(v) { return v.match(/(Intro|Outro|Spine|Pixi)\.js$/) === null; }).concat('Gruntfile.js'),
|
source: srcFiles.filter(function(v) { return v.match(/(Intro|Outro|Spine|Pixi)\.js$/) === null; }).concat('Gruntfile.js'),
|
||||||
test: {
|
test: {
|
||||||
|
|
|
@ -1756,6 +1756,9 @@ PIXI.Sprite.prototype._renderWebGL = function(renderSession)
|
||||||
|
|
||||||
PIXI.Sprite.prototype._renderCanvas = 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)
|
if(this._mask)
|
||||||
{
|
{
|
||||||
renderSession.maskManager.pushMask(this._mask, renderSession.context);
|
renderSession.maskManager.pushMask(this._mask, renderSession.context);
|
||||||
|
|
|
@ -299,6 +299,9 @@ PIXI.Sprite.prototype._renderWebGL = function(renderSession)
|
||||||
|
|
||||||
PIXI.Sprite.prototype._renderCanvas = 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)
|
if(this._mask)
|
||||||
{
|
{
|
||||||
renderSession.maskManager.pushMask(this._mask, renderSession.context);
|
renderSession.maskManager.pushMask(this._mask, renderSession.context);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue