commit 56a4dc193c3f50d269260545992ec524e9c9e1e0
parent 1c42d338285bba6c730a6810bfa87bf549339100
Author: Yuval Langer <yuval.langer@gmail.com>
Date: Fri, 25 Mar 2022 20:35:36 +0300
Prettier, maybe.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/html/shades-of-grey/main.js b/html/shades-of-grey/main.js
@@ -1,5 +1,5 @@
(function() {
- let number_of_rectangles = 1;
+ let number_of_rectangles = 2;
let factor = 2;
const INTERVAL = 750;
@@ -84,7 +84,7 @@
if (number_of_rectangles > canvas.width) {
factor = 0.5;
number_of_rectangles = 2**Math.floor(Math.log2(canvas.width));
- } else if (number_of_rectangles < 1) {
+ } else if (number_of_rectangles <= 2) {
factor = 2;
number_of_rectangles = 2;
}