rotation - Javascript rotate image with mouse coordinates -


I am using a vertical effect which is the mouse position of users (http://webdev.stephband.info/ jparallax / Index.html). I am trying to find out in a way that the ball will rotate too. So it will appear as if the user transfers his area on the mouse, runs on the ball screen.

I have found some JavaScript examples that show how to rotate an item on a mouse click, I do not just put all this together in JS to make enough lid.

P> This is more tactical advice than a reply, but the rolling ball To look realistic, make sure that it rotates at the rate that corresponds to the circumference of the ball otherwise it will look fake.

Enter image details here

Comments