p5((s) => {
let w = 600;
let h = 400;
let cw = 20;
let ch = 20;
s.setup = function () {
s.createCanvas(w, h);
s.frameRate(1);
};
s.draw = function () {
s.background(0)
for (let x = 0-cw; x < w; x += cw) {
for (let y = 0-ch; y < h; y += ch) {
s.translate(x, y)
s.translate(cw / 2, ch / 2)
s.stroke(s.random(0,255),0,0)
s.strokeWeight(cw/4)
s.line(cw, ch/2, cw, ch)
s.stroke(0,s.random(0,255),0)
s.line(cw*25/20, ch/2, cw*25/20, ch)
s.stroke(0,0,s.random(0,255))
s.line(cw*15/20, ch/2, cw*15/20, ch)
s.resetMatrix()
}
}
};
})