From 08678efedb32803dacca6ddfde84040f1aa36a33 Mon Sep 17 00:00:00 2001 From: Jules Fouchy Date: Sat, 27 Mar 2021 18:35:01 +0100 Subject: [PATCH] Add random single black squares --- src/sketch.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/sketch.ts b/src/sketch.ts index b4466b0..63ff113 100644 --- a/src/sketch.ts +++ b/src/sketch.ts @@ -60,8 +60,14 @@ function draw() { colorSquare = colors[newIdx]; } } - fill(colorSquare); - stroke(colorSquare); + if (i >= 16 && colorSquare == colors[0] /*jaune*/ && r > 0.95) { + fill(colors[3] /*black*/) + stroke(colors[3] /*black*/) + } + else { + fill(colorSquare) // ton fill normal + stroke(colorSquare); + } rect(x,y,width/lineSquare,height/lineSquare); } }