======= AnAL ======= AnAL (or Animations And LÖVE) is a library to bring back fully-compatible animation support to LÖVE after it’s removal in version 0.6.0.
Create a new animation. Replaces love.graphics.newAnimation.
image
The image that contains the frames.fw
The frame width.fh
The frame height.delay
The delay between two frames.frames
The number of frames, 0 for autodetect.anim
The created animation.Update the animation.
dt
Time that has passed since last call.Draw the animation, the parameters match a call to love.graphics.draw, after the drawable.
Add a frame.
x
The X coordinate of the frame on the original image.y
The Y coordinate of the frame on the original image.w
The width of the frame.h
The height of the frame.delay
The delay before the next frame is shown.Play the animation. Starts it if it was stopped.
Stop the animation.
Reset: Go back to the first frame.
Seek to frame number frame
.
frame
The frame to display now.Get the currently shown frame.
frame
The number representing the current frame.Get the number of frames.
numFrames
The number of frames.Set the delay between frames.
frame
Which frame to set the delay for.delay
The delay.Set the speed of the animation.
speed
The speed to play at (1 is normal, 2 is double, etc).Get the width of the current frame.
width
The width of the current frame.Get the height of the current frame.
height
The height of the current frameSet the playback mode, one of:
loop
To loop it.once
To play it once.bounce
To play it, reverse it, and play it again (looping).reverse
To play it backwards, from the last frame to the first.Add legacy support, basically set love.graphics.newAnimation again, and allows you to use love.graphics.draw.