xxxxxxxxxx
21
// Inspired by https://twitter.com/mattdesl/status/1180028624763789312/photo/1
const padding = 20
function setup() {
createCanvas(400, 400);
noLoop() // Looks cool also
strokeWeight(2)
}
function draw() {
background(240);
for (let y = padding; y <= height - padding;) {
const h = random(10, 150)
for (let x = padding; x < width - padding; x += random(0, random([0, 3, 5, 10]))) {
random(1) > 0.5 ? stroke(0) : stroke(240)
line(x, y, x, y + h > height - padding ? height- padding : y + h )
}
y += h + 2
}
}