By including matrix multiplication operations, transforms can be combined in any way you want. The end result is then set via CSS3 transform matrices.
snabbt.js is built to be fast. It will only animate things that modern browsers can animate cheaply: transforms and opacity. The goal is to make a library that will let the user make smooth animations without needing to know too much about browser rendering.
Note: For convenience, width and height are animatable too, but beware since they may cause page reflows and slow down your animations.
All transforms work on pixels or radians. Any unit conversion has to be done beforehand.
No arbitrary property animations, e.g. colors, padding, margin or line height animations.
For performance reasons, snabbt never queries the DOM. This means that in some cases you need to transforms yourself.(Specifically when using value feeding)
snabbt.js needs requestAnimationFrame and matrix3d to work, so no IE < 10
Animations are started with the snabbt-function call. The function takes an element as first parameter(or list there of) and a configutation-object as second.
Animation can be chained by using `snabbt()` on the returned animation object. All fromXxx properties will be set to the end state of the previous animation.
Make it stop
Animation can be stopped at any time by replacing the animation configuration with the string literal 'stop':
If a new animation is started with the same element it will start from the stopped position unless the 'from'-properties are used.
Check out some of the demos to see the capabilities of snabbt.js: