experiment 2 - slide in and out

The shoe follows the mouse left and right and when the mouse is moved all the way off the screen a different shoe image slides in. if the mouse is static then the shoe drifts to the centre until it stops.


function set up - sets up size frame rate, loads the bg image, and creates a list of the file names of the shoe images as png's with transparent bg.

function draw - first it checks if the mouse has moved enough. if it has moved enough, if it has it sets the new shoe position. if it hasn't moved enough it sets a new position to centralise the shoe. all new positions are moved to but the rate is slowed down by a drag factor.