mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Blur horizontal rather than vertical
This commit is contained in:
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user