diff --git a/index.html b/index.html
index 2ddb06a..af94e44 100644
--- a/index.html
+++ b/index.html
@@ -49,7 +49,7 @@
趣味功能
马赛克化
-
动画模式
+
动画模式
(很慢!)
下载
diff --git a/main.js b/main.js
index 3acf30a..09797ad 100644
--- a/main.js
+++ b/main.js
@@ -255,7 +255,6 @@ async function scale(index, scale_x, scale_y) {
if (ani_mode) {
document.getElementById("c2").style.display = "flex"
document.getElementById("c2").append(canvas2);
- document.getElementById("c1").style['justify-content'] = "center"
document.getElementById("c2").style['justify-content'] = "center"
document.getElementById("c1").style.width = 70 * vw / (scale_x + 1) + "px"
@@ -283,8 +282,9 @@ async function scale(index, scale_x, scale_y) {
alpha = datas[Math.floor(i / scale_y)][Math.floor(j / scale_x)][3];
ctx.fillStyle = "rgba(" + red + "," + green + "," + blue + "," + alpha + ")";
ctx.fillRect(j, i, 1, 1)
+ if (ani_mode) if (j % 100 == 0) await sleep(1);
}
- await sleep(10);
+ if (ani_mode) if (i % 2 == 0) await sleep(5);
}
let imgdata = canvas2.toDataURL();