velocity.x

gets/sets the x velocity

Examples

const btn = $.makeButton(
    $.w/2, 
    $.h/2,
    100,
    35,
    "label"
);
btn.velocity.x = 5;

function update() {
    if(btn.x > $.w) {
        btn.x=0;
    }
    btn.draw();
}