xxxxxxxxxx
19
let smaller_base, larger_base;
function setup() {
const base_x = 100;
const base_y = 400;
createCanvas(base_x, base_y);
smaller_base = base_x;
larger_base = base_y;
if(smaller_base > larger_base){
smaller_base = base_y;
larger_base = base_x;
}
}
function draw() {
background(220);
rectMode(CENTER);
translate(width/2, height/2);
square(0,0, smaller_base/2);
}