Basic syntax for an animation loop?

Posted by Moshe on Stack Overflow See other posts from Stack Overflow or by Moshe
Published on 2010-03-07T13:52:04Z Indexed on 2010/03/08 18:36 UTC
Read the original article Hit count: 340

I know that jQuery, for example, can do animation of sorts. I also know that at the very core of the animation, there must me some sort of loop doing the animation. What is an example of such a loop?

A complete answer should ideally answer the following questions:

  • What is a basic syntax for an effective animation recursion that can animate a single property of a particular object at a time? The function should be able to vary its target object and property of the object.
  • What arguments/parameters should it take?
  • What is a good range of reiterating the loop? In milliseconds? (Should this be a parameter/argument to the function?)

REMEMBER:

  • The answer is NOT necessarily language specific, but if you are writing in a specific language, please specify which one.
  • Error handling is a plus. {Nothing is more irritating (for our purposes) than an animation that does something strange, like stopping halfway through.}

Thanks!

© Stack Overflow or respective owner

Related posts about animation

Related posts about loop