EDIT: I have just released anim8 v2.1.0. The only thing that changes in this version is LÖVE 0.9 compatibility.
Anim8 is always available on github:
https://github.com/kikito/anim8
So - what is this lib?
Its aim is making animations in a single call, in a human-friendly way - minimizing the amount of typing, when possible.
One way of reducing the amount of typing was "splitting" the information in two parts. The first part, I called "Grids", and basically are heavy-duty "Quad creators". Once a grid is created, I initially tought of specifiying the frames of an animation like this:
Code: Select all
grid({1,1}, {1,2}, {1,3}, {1,4}, {1,5}, {1,6}, {1,7})
Code: Select all
grid(1,1, 1,2, 1,3, 1,4, 1,5, 1,6, 1,7)
Code: Select all
grid(1,"1-7")
Code: Select all
grid(1,"1-6", 1,7)
Once you have the frames(aka quads) you want, you just pass them on to the "animation". Although very convenient, you don't need to use a grid to provide the animation with the quads; you can create them by other means if you so wish. I recommend using grids whenever possible, because quads are "reused" aggressively; the lib never creates the same quad twice; it "caches" all quads in case it wants to reuse them.
Please give the demo and the README in github a look. Let me know if you have questions or find any bugs!
Attaching demos for LÖVE 0.8 / anim8 2.0 and LÖVE 0.9 / anim8 2.1
Changelog:
v2.3.0
- Adds support for shearing (kx, ky parameters when drawing)
- Adds Animation:getFrameInfo()
- Adds Animation:getDimensions()
- LÖVE version upped to 0.9.x