There was an error while loading. Please reload this page.
2 parents 85b0b5c + 8b7a503 commit f3d76a4Copy full SHA for f3d76a4
1 file changed
src/index.js
@@ -37,7 +37,7 @@ export default class blurify {
37
38
blurify(canvas, blur) {
39
let ctx = canvas.getContext('2d');
40
- ctx.globalAlpha = 0.5;
+ ctx.globalAlpha = 1 / (2 * blur);
41
for (let y = -blur; y <= blur; y += 2) {
42
for (let x = -blur; x <= blur; x += 2) {
43
ctx.drawImage(canvas, x, y);
0 commit comments