I am trying to customize a button using the p5js DOM library.
I have looked at the p5js reference and other sources, but there doesn't seem to be anything there.
var button;
function setup() {
createCanvas(100, 100);
background(0);
button = createButton('click me');
button.position(19, 19);
button.mousePressed(changeBG);
}
function changeBG() {
var val = random(255);
background(val);
}
What I want is a way to give the button a color or change the size of the button if that is possible (the code above just makes a button that changes the background of the screen).