litiengine icon indicating copy to clipboard operation
litiengine copied to clipboard

Support Aseprite export format (.json) for animations

Open nwessman opened this issue 3 years ago • 2 comments

Adds support for importing/exporting animations as json

This adds the functionality of importing and exporting Aseprite formatted .json files.

Import

In the Resources menu there are now the option to Import Animation, which lets you select a .json file and it will import the corresponding spritesheet that is specified in that json import it to the engine with its data set (duration and so forth).

The import searches for the json like this:

  1. import searches 'image' element in .json,
  2. filename as the 'image' spritesheet but in same folder as .json,
  3. finally also searches same folder as .json for same name as .json with suffix from 'image' element so if 'image'=/animation.png and json=<jsonPath>/anim.json, also searches <jsonPath>/animation.png and <jsonPath>/anim.png

ResourceMenuAfter

Export

There is also now the option to export an animation as a json in the Aseprite format. exportSpritesheetAfter

Code coverage

codecoverage

resolve #321

nwessman avatar Mar 10 '21 22:03 nwessman

Amazing, thank you! Please allow us some more time to inspect and assess these changes in detail.

nightm4re94 avatar Mar 16 '21 17:03 nightm4re94

I've made a PR (https://github.com/DD2480-Group-11/litiengine/pull/30) to address some issues

Gamebuster19901 avatar Mar 16 '21 18:03 Gamebuster19901

Closing this due to inactivity. Thank you and feel free to resume at a later point :)

nightm4re94 avatar Dec 15 '22 21:12 nightm4re94