xxxxxxxxxx
27
let grid=15;
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
stroke(255,178,255);
verticalLine(mouseX);
horizontalLine(mouseY);
stroke(170,204,178);
for(let x=0;x<=width;x+=grid){
for(let y=0;y<=height; y+=grid){
verticalLine(x);
horizontalLine(y);
}
}
}
function verticalLine(x){
line(x,0,x,height);
}
function horizontalLine(y){
line(0,y,width,y);
}