xxxxxxxxxx
let testElement;
function setup() {
createCanvas(windowWidth, windowHeight);
background(100);
testElement = new Element({
xcor: 100,
ycor: 100,
width: 100,
height: 100,
collisionDetection: SquareDetection,
renderer: SimpleSquareRenderer,
fillColor: color(255, 255, 255),
updateFunc: RedWhenHovering,
});
}
function draw() {
testElement.render();
testElement.update();
}