https://puresourcecode.com/uncategorized/start-edge-animate-when-is-in-the-screen/
Start Edge Animate when is in the screen