How to rotate a canvas object following mouse move event with easing?
问题 I am not sure if I have used the right word here. I guess easing means it does not follow the mouse immediately but with some delay? At the moment the iris is rotating to my mouse direction. What if I want it to have same effect as this?. Is it very hard to do so or just require simple code changes? Is there a standard way/solution for this kind of problem? Here is my current code. It can also be found at Rotating Iris . var canvas = document.getElementById('canvas'); var ctx = canvas