From 7c22f83502b38e5af72e8476bd586a6ea4fe9bb8 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 7 Mar 2021 16:22:24 -0500 Subject: [PATCH] Clear Rect --- commands/edit-image/shake.js | 1 + 1 file changed, 1 insertion(+) diff --git a/commands/edit-image/shake.js b/commands/edit-image/shake.js index 591d25d4..c8982bd0 100644 --- a/commands/edit-image/shake.js +++ b/commands/edit-image/shake.js @@ -50,6 +50,7 @@ module.exports = class ShakeCommand extends Command { encoder.setQuality(200); const frames = this.generateFrames(amount); for (const { x, y } of frames) { + ctx.clearRect(0, 0, canvas.width, canvas.height); ctx.drawImage(base, x, y, 512, height); encoder.addFrame(ctx); }