Bedazzle
Bedazzle is a JS animation library that allows you to do some pretty
tricky stuff without much effort. It's quite similar to
move.js but uses a frames rather
than a then
function.
Additionally, bedazzle is more or less a pure CSS manipulation library and doesn't support the additional easing functions that move does. It does work in partnership with your CSS though and aligns animation frames with your transition delays in the CSS (which is pretty neat).
Example Usage
Consider the following example, which animates a series of divs. First we have some stripped down html:
Then some css which is used across most of the examples:
Finally, a little bit of browserifiable css to make it all work:
var bedazzle = ; frame { thisx200y200; } frame { thisx-200 } frame { thisx200y50height-100 };
Reference
bedazzle(elements, opts?)
Create a new Bedazzler
instance which is used to orchestrate the
animation of the supplied elements
(or those elements matched by the
selector referred to by elements if it is a string).
Bedazzler#frame(action?)
Define a new frame in the animation loop. If an action function is
supplied, then it will be called (with this
bound to the Bedazzler) once
the frame becomes active.
Bedazzler#end(callback)
Once the current frame has completed, trigger the supplied function.
Bedazzler#loop()
When all of the defined frames have completed, restart from the beginning. An example of using loop can be found in the 'loopy' example, shown below:
var bedazzle = ;var stylar = ; { ;} frame { thisx50; ; } ;
Bedazzler#manual(helper)
TBC
Bedazzler#opts(opts)
TBC
Bedazzler#set(name, value)
TBC
Bedazzler#update(props, absolute?)
TBC
Internal Methods
_applyChanges()
_next(transitioners, timeout, callbacks)
License(s)
MIT
Copyright (c) 2013 Damon Oehlman damon.oehlman@gmail.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.