I want to simulate eyeballs roll in eyes and I have found and forked this implementation in codepen.io. This is exactly what I need.
Smart way but I don't understand why it needs to work like this way. Why is it using `ratioX` and `ratioY` which are calculated from dividing `mouseX` and `mouseY` with their sum? Is there a simpler or even cleverer way to do similar simulation?
↧
What is the mathematical explanation behind this implementation of simulating eyeballs roll in eyes?
↧