From 011014d6454d3542e7bbc006b6c37b35c7ea85ea Mon Sep 17 00:00:00 2001 From: Felipe Alfonso Date: Wed, 1 Mar 2017 14:56:04 -0300 Subject: [PATCH] camera scrolling affects canvas rendering --- v3/src/gameobjects/graphics/GraphicsCanvasRenderer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v3/src/gameobjects/graphics/GraphicsCanvasRenderer.js b/v3/src/gameobjects/graphics/GraphicsCanvasRenderer.js index d0c5ea88e..51530aa5f 100644 --- a/v3/src/gameobjects/graphics/GraphicsCanvasRenderer.js +++ b/v3/src/gameobjects/graphics/GraphicsCanvasRenderer.js @@ -46,7 +46,7 @@ var GraphicsCanvasRenderer = function (renderer, src, interpolationPercentage, c } ctx.save(); - ctx.translate(srcX, srcY); + ctx.translate(srcX - cameraScrollX, srcY - cameraScrollY); ctx.rotate(srcRotation); ctx.scale(srcScaleX, srcScaleY); ctx.fillStyle = '#fff';