You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A parser/renderer for Aseprite animations in LÖVE.
How to use
Draw some animations in Aseprite and export the file as a spritesheet:
Make sure that you export JSON data with frame tags and that you have at least one tag defined. Even if there is a single animation in the file, you still need to set up frame tags.
-- Load an aseprite animation file called spinner.json, with the image-- spinner.png & start with the animation tag "Spin"spinner=peachy.new("spinner.json", love.graphics.newImage("spinner.png"), "Spin")
functionlove.draw()
-- Draw at 50,50spinner:draw(50, 50)
endfunctionlove.update(dt)
spinner:update(dt)
end
If you don't specify an image to load in new by passing nil or false as the second argument, then peachy will attempt to load the image specified in the data file. This can cause problems: see limitations below.
By default Aseprite will export a non-relative path as the image file. This is problematic because LÖVE will refuse to load it and it's non-portable. There's a workaround listed here. Either specify the image yourself in peachy.new, edit the JSON manually or use the CLI.
Exported sprite sheets must be exported as an array, not as a hash table.
About
A parser/renderer for Aseprite animations in LÖVE. 🍑