Skip to content

Commit be81ddf

Browse files
committed
Fixed issue on RenderTexture canvas clear. The clearRect was affected by previous transformations
1 parent 9585a1c commit be81ddf

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/gameobjects/rendertexture/RenderTextureCanvas.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ var RenderTextureCanvas = {
1313

1414
clear: function ()
1515
{
16+
this.context.save();
17+
this.context.setTransform(1, 0, 0, 1, 0, 0);
1618
this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);
19+
this.context.restore();
1720
return this;
1821
},
1922

0 commit comments

Comments
 (0)