{"repo":"josh-perry/peachy","free":true,"listed":false,"github":"https://github.com/josh-perry/peachy","clone":"git clone https://github.com/josh-perry/peachy.git","description":"A parser/renderer for Aseprite animations in LÖVE. :peach:","language":"Lua","stars":113,"topics":["love2d","love","love2d-framework","animation","graphics","game-development"],"license":"MIT","category":"game-templates","readme_excerpt":"Peachy 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. 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. Examples See main.lua for further examples: Slices We can also draw and use slices. These are essentially named regions on the image which can also contain custom user data. API Reference - peachy.new(data: string table, image?: Image, initialTag?: string) - peachy - Creates a new animation object Peachy Functions - :play() - Resumes the animation - :pause() - Pauses the animation - :stop(onLast?: boolean) - Stops the animation and returns to first (or last) frame - :togglePlay() - Toggles between playing and paused - :setTag(tag: string) - Switches to a different animation tag - :setFrame(frame: integer) - Jumps to a specific frame index (1-based) - :getTag() - string? - Returns the current tag name - :getFrame() - integer? - Returns the current frame index - :draw(x: number, y: number, rot?: number, sx?: number, sy?: number, ox?: number, oy?: number) - Draws the current frame - :update(dt: number) - Updates the animation timer - :getWidth() - number ","default_branch":null,"files":null,"tree":[],"storefront":"/r/josh-perry","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/josh-perry/peachy/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}