xxxxxxxxxx
const bg = [0, 0, 20];
const fg = [0, 0, 80];
const sketch = {
centerX: () => width / 2,
centerY: () => height / 2,
}
function setup() {
createCanvas(512, 512);
// defaults
colorMode(HSB);
rectMode(CENTER);
stroke(fg);
strokeWeight(2);
noFill();
}
function draw() {
background(bg);
rect(sketch.centerX(), sketch.centerY(), 256, 256);
}