diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 0595cd5..6481ad1 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -421,7 +421,7 @@ Container.prototype.renderWebGL = function (renderer) { // if the object is not visible or the alpha is 0 then no need to render this element - if (this.isMask || !this.visible || this.alpha <= 0) + if (this.isMask || !this.visible || this.alpha <= 0 || !this.renderable) { return; } @@ -493,7 +493,7 @@ */ Container.prototype.renderCanvas = function (renderer) { - if (!this.visible || this.alpha <= 0) + if (!this.visible || this.alpha <= 0 || !this.renderable) { return; } diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 0595cd5..6481ad1 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -421,7 +421,7 @@ Container.prototype.renderWebGL = function (renderer) { // if the object is not visible or the alpha is 0 then no need to render this element - if (this.isMask || !this.visible || this.alpha <= 0) + if (this.isMask || !this.visible || this.alpha <= 0 || !this.renderable) { return; } @@ -493,7 +493,7 @@ */ Container.prototype.renderCanvas = function (renderer) { - if (!this.visible || this.alpha <= 0) + if (!this.visible || this.alpha <= 0 || !this.renderable) { return; } diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index baeb1de..7b7421a 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -761,7 +761,7 @@ Graphics.prototype.renderCanvas = function (renderer) { // if the sprite is not visible or the alpha is 0 then no need to render this element - if (!this.visible || this.alpha <= 0 || this.isMask === true) + if (!this.visible || this.alpha <= 0 || this.isMask === true || !this.renderable) { return; } diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 0595cd5..6481ad1 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -421,7 +421,7 @@ Container.prototype.renderWebGL = function (renderer) { // if the object is not visible or the alpha is 0 then no need to render this element - if (this.isMask || !this.visible || this.alpha <= 0) + if (this.isMask || !this.visible || this.alpha <= 0 || !this.renderable) { return; } @@ -493,7 +493,7 @@ */ Container.prototype.renderCanvas = function (renderer) { - if (!this.visible || this.alpha <= 0) + if (!this.visible || this.alpha <= 0 || !this.renderable) { return; } diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index baeb1de..7b7421a 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -761,7 +761,7 @@ Graphics.prototype.renderCanvas = function (renderer) { // if the sprite is not visible or the alpha is 0 then no need to render this element - if (!this.visible || this.alpha <= 0 || this.isMask === true) + if (!this.visible || this.alpha <= 0 || this.isMask === true || !this.renderable) { return; } diff --git a/src/core/particles/ParticleContainer.js b/src/core/particles/ParticleContainer.js index 5339d4c..bfab3ac 100644 --- a/src/core/particles/ParticleContainer.js +++ b/src/core/particles/ParticleContainer.js @@ -52,17 +52,14 @@ */ ParticleContainer.prototype.renderWebGL = function (renderer) { - if (!this.visible || this.alpha <= 0 || !this.children.length) + if (!this.visible || this.alpha <= 0 || !this.children.length || !this.renderable) { return; } renderer.setObjectRenderer( renderer.plugins.particle ); - - renderer.plugins.particle.render( this ); - }; /** @@ -73,7 +70,7 @@ */ ParticleContainer.prototype.renderCanvas = function (renderer) { - if (!this.visible || this.alpha <= 0 || !this.children.length) + if (!this.visible || this.alpha <= 0 || !this.children.length || !this.renderable) { return; } diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 0595cd5..6481ad1 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -421,7 +421,7 @@ Container.prototype.renderWebGL = function (renderer) { // if the object is not visible or the alpha is 0 then no need to render this element - if (this.isMask || !this.visible || this.alpha <= 0) + if (this.isMask || !this.visible || this.alpha <= 0 || !this.renderable) { return; } @@ -493,7 +493,7 @@ */ Container.prototype.renderCanvas = function (renderer) { - if (!this.visible || this.alpha <= 0) + if (!this.visible || this.alpha <= 0 || !this.renderable) { return; } diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index baeb1de..7b7421a 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -761,7 +761,7 @@ Graphics.prototype.renderCanvas = function (renderer) { // if the sprite is not visible or the alpha is 0 then no need to render this element - if (!this.visible || this.alpha <= 0 || this.isMask === true) + if (!this.visible || this.alpha <= 0 || this.isMask === true || !this.renderable) { return; } diff --git a/src/core/particles/ParticleContainer.js b/src/core/particles/ParticleContainer.js index 5339d4c..bfab3ac 100644 --- a/src/core/particles/ParticleContainer.js +++ b/src/core/particles/ParticleContainer.js @@ -52,17 +52,14 @@ */ ParticleContainer.prototype.renderWebGL = function (renderer) { - if (!this.visible || this.alpha <= 0 || !this.children.length) + if (!this.visible || this.alpha <= 0 || !this.children.length || !this.renderable) { return; } renderer.setObjectRenderer( renderer.plugins.particle ); - - renderer.plugins.particle.render( this ); - }; /** @@ -73,7 +70,7 @@ */ ParticleContainer.prototype.renderCanvas = function (renderer) { - if (!this.visible || this.alpha <= 0 || !this.children.length) + if (!this.visible || this.alpha <= 0 || !this.children.length || !this.renderable) { return; } diff --git a/src/extras/Strip.js b/src/extras/Strip.js index 113ef8f..ff3cfbe 100644 --- a/src/extras/Strip.js +++ b/src/extras/Strip.js @@ -74,7 +74,7 @@ Strip.prototype.renderWebGL = function (renderer) { // if the sprite is not visible or the alpha is 0 then no need to render this element - if (!this.visible || this.alpha <= 0) + if (!this.visible || this.alpha <= 0 || !this.renderable) { return; } @@ -217,6 +217,12 @@ */ Strip.prototype.renderCanvas = function (renderer) { + // if the sprite is not visible or the alpha is 0 then no need to render this element + if (!this.visible || this.alpha <= 0 || !this.renderable) + { + return; + } + var context = renderer.context; var transform = this.worldTransform;