From be81ddfd5192271599467f9cc51220c606a69eb4 Mon Sep 17 00:00:00 2001 From: Felipe Alfonso Date: Mon, 12 Mar 2018 13:30:05 -0300 Subject: [PATCH] Fixed issue on RenderTexture canvas clear. The clearRect was affected by previous transformations --- src/gameobjects/rendertexture/RenderTextureCanvas.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gameobjects/rendertexture/RenderTextureCanvas.js b/src/gameobjects/rendertexture/RenderTextureCanvas.js index 90b8f5a0e..36f2a43ff 100644 --- a/src/gameobjects/rendertexture/RenderTextureCanvas.js +++ b/src/gameobjects/rendertexture/RenderTextureCanvas.js @@ -13,7 +13,10 @@ var RenderTextureCanvas = { clear: function () { + this.context.save(); + this.context.setTransform(1, 0, 0, 1, 0, 0); this.context.clearRect(0, 0, this.canvas.width, this.canvas.height); + this.context.restore(); return this; },