controls the speed of the image in the direction given (adjusts the velocity system behind the scenes)
speed
Examples
const img = $.loadImage(
$.w/2,
$.h/2,
"/images/sir_cheesealot.png"
);
img.direction = 270;
img.speed = 2;
function update() {
img.draw();
if(img.x < 0) {
img.x=$.w;
img.speed += 0.1;
}
}