Blur horizontal rather than vertical

This commit is contained in:
Dragon Fire
2021-01-29 20:55:18 -05:00
parent a4115c57b8
commit 2e205a65af
+1 -1
View File
@@ -127,7 +127,7 @@ module.exports = class CanvasUtil {
static motionBlur(ctx, image, x, y, width, height) {
ctx.globalAlpha = 0.1;
for (let i = 0; i < 10; ++i) ctx.drawImage(image, x, y + i, width, height);
for (let i = 0; i < 10; ++i) ctx.drawImage(image, x + i, y, width, height);
ctx.globalAlpha = 1;
return ctx;
}