mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 02:15:10 +02:00
Clear Rect
This commit is contained in:
@@ -50,6 +50,7 @@ module.exports = class ShakeCommand extends Command {
|
|||||||
encoder.setQuality(200);
|
encoder.setQuality(200);
|
||||||
const frames = this.generateFrames(amount);
|
const frames = this.generateFrames(amount);
|
||||||
for (const { x, y } of frames) {
|
for (const { x, y } of frames) {
|
||||||
|
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
||||||
ctx.drawImage(base, x, y, 512, height);
|
ctx.drawImage(base, x, y, 512, height);
|
||||||
encoder.addFrame(ctx);
|
encoder.addFrame(ctx);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user