xxxxxxxxxx
31
let bgsketch = function(p) {
let arcStartPos;
let spacing = 100;
var bgcanvas;
p.setup = function() {
arcStartPos = [p.HALF_PI, p.QUARTER_PI];
bgcanvas = p.createCanvas(innerWidth, innerHeight);
p.background('#FEF3F7');
bgcanvas.position(0,0);
bgcanvas.style('z-index', '-1');
p.noFill();
p.strokeWeight(5);
p.stroke(200);
for (let rows=0; rows < p.windowWidth / spacing; rows++){
for (let cols=0; cols < 10; cols++){
let start = p.random(0, 2*p.PI);
let length = p.random(arcStartPos);
p.arc(rows * spacing, cols * spacing, 30, 30, start, start + length);
}
}
};
};
let myp5 = new p5(bgsketch);