velocity.y

gets/sets the y velocity

Examples

const img = $.loadImage(
    $.w/2, 
    $.h/2,
    "/images/sir_cheesealot.png"
);
img.velocity.y = -4;

function update() {
    img.draw();
    if(img.y < 0) {
        img.y=$.h;
    }
}