Clear Rect

This commit is contained in:
Dragon Fire
2021-03-07 16:22:24 -05:00
parent 4bed1f7176
commit 7c22f83502
+1
View File
@@ -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);
}