Creative Juices Bo. Co.

Satisfy Your Thirst For Something Refreshing!

A Nice Find, Animator.js

It's Like script.aculo.us and moo.fx, but Half the Calories

Right before I left on my vacation I came across a very nice JavaScript Animation class called Animator.js. In the past, I've switched between using script.aculo.us and moo.fx for various projects, but at times it seemed I would run into problems. Their frameworks sometimes interfere with the latest version of prototype.js, or they were overkill for whatever task I was trying to perform. I think that's why I kind of like Animator.js. It's a self contained class that allows you to perform various animation task. It's lightweight and extremely easy to implement.

I recommend checking out the authors site [BernieCode] to find out more and also, I've created a little demo (edit: deactive) that duplicates one of WebKit's new CSS animations. Check it out and let me know what you think.

Note: It wasn't really explained on Bernie's website, but you need to return window[Animator][Control Function] after you call new Animator() to get the animation to work.

function AnimatorTest() {
   ani = new Animator({duration: 1500})
      .addSubject(new NumericalStyleSubject($('CB'), 'opacity', 0, 1));
   return window['ani']['play'](); // return the ani window variable and intiate "play"
}
window.addEventListener?window.addEventListener("load", AnimatorTest,false):window.attachEvent("onload", AnimatorTest);