I know that there are very good JS packages that are included in animation libraries, but writing a simple animation that I am Slide a div around that one page. All this requires Jacquery, it looks like Overkill. Animation is a great job, and now I want to tune it so that it can be as smooth as possible.
Say I want to move DIV to X pixels in N seconds. I can adjust the sleep time between the animation loop and the distance is done by Div in each box. What are some good rules of thumb to tune the animation, so it looks comfortable on most browsers / computers? Are there any good ways to profile the current user and to tune the animation parameters on the fly?
Thank you!
If you know speed (in milliseconds in pixels) that you want to use animation, then You can save the current time ( new date () ) in each animation tick, then check how much time has passed since the previous tick and multiply that to get the number of pixels to increase speed for.
Comments
Post a Comment