I am currently implementing a parallax effect that moves a ball based on the user's mouse position. I want to take it a step further and make the ball also rotate, creating the illusion of it rolling across the screen as the user moves the mouse.
Although I have come across some JavaScript examples that demonstrate how to rotate an item on a mouse click, my skills in JavaScript are not advanced enough to combine all the elements together.
For reference, here is a JSfiddle showcasing an example: