diff --git a/src/pixi/renderers/canvas/CanvasRenderer.js b/src/pixi/renderers/canvas/CanvasRenderer.js index 0c5c310..7d1c524 100644 --- a/src/pixi/renderers/canvas/CanvasRenderer.js +++ b/src/pixi/renderers/canvas/CanvasRenderer.js @@ -166,17 +166,20 @@ this.context.fillStyle = "black"; this.context.clear(); } - - if (!this.transparent && this.clearBeforeRender) + + if (this.clearBeforeRender) { - this.context.fillStyle = stage.backgroundColorString; - this.context.fillRect(0, 0, this.width , this.height); + if (this.transparent) + { + this.context.clearRect(0, 0, this.width, this.height); + } + else + { + this.context.fillStyle = stage.backgroundColorString; + this.context.fillRect(0, 0, this.width , this.height); + } } - else if (this.transparent && this.clearBeforeRender) - { - this.context.clearRect(0, 0, this.width, this.height); - } - + this.renderDisplayObject(stage); // run interaction!