UI Deploy

Curated, Short, Web UI Dev we Love.

Javascript Tutorial - Generic Animation V2.0

It is time again for more javascript animation! We have talked about animation in javascript multiple times before, starting with Sliding Panels, and then advancing to more complex capabilities in Generic Animation. This time we are taking the ideas in the previous Generic Animation tutorial and expanding on them in pretty much every way possible.

So what were the problems with the previous Generic Animation functions? Well, first off, there was no "control". Once you set an animation in motion, there was no way to control it - i.e., stop it, reset it, and so on. Second, it was not exactly exact. The completion time that was given to the function was almost a 'minimum value', and in fact, the slower the computer, the longer it would take for an animation to complete. Well, wait no more! The answers to both those problems, and more, are in the code below.

view post...

Advertisement