xxxxxxxxxx
26
let x = 0;
let y = 0;
let spacing = 20;
function setup() {
createCanvas(400, 400);
background(4, 23, 266);
}
function draw() {
stroke(255);
strokeWeight(3);
if(random(1) < 0.5){
line(x, y + spacing, x + spacing, y);
} else {
line(x , y , x + spacing , y + spacing );
}
x = x + spacing;
if (x > width){
x = 0;
y = y + spacing;
}
}