kolamSketcher
Click to turn draw on/off. Press any key to clear the canvas. This is not working for mobile devices.
n=15
let drawBool=true
function setup() {
createCanvas(windowWidth, windowHeight);
background(130)
noStroke()
for(let i=1;i<n;i++){
for(let j=1;j<n;j++){
circle(width/n*i,width/n*j,5);
}
}
}
function draw() {
fill(255)
if (drawBool){
circle(mouseX,mouseY,4)
}
}
function mousePressed(){
drawBool=!drawBool;
}
function keyPressed(){
setup()
}