camera scrolling affects canvas rendering

This commit is contained in:
Felipe Alfonso 2017-03-01 14:56:04 -03:00
parent a70ee2e22a
commit 011014d645

View file

@ -46,7 +46,7 @@ var GraphicsCanvasRenderer = function (renderer, src, interpolationPercentage, c
} }
ctx.save(); ctx.save();
ctx.translate(srcX, srcY); ctx.translate(srcX - cameraScrollX, srcY - cameraScrollY);
ctx.rotate(srcRotation); ctx.rotate(srcRotation);
ctx.scale(srcScaleX, srcScaleY); ctx.scale(srcScaleX, srcScaleY);
ctx.fillStyle = '#fff'; ctx.fillStyle = '#fff';