direction

sets the direction the button will go once it is given a speed

Examples

const btn = $.makeButton(
    $.w/2, 
    $.h/2,
    100,
    35,
    "label"
);
btn.direction = 180;
btn.speed = 10;

function update() {
    if(btn.y > $.h) {
        btn.y = 0;
    }
    btn.draw();
}