Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Aseprite export format (.json) for animations #321

Open
steffen-wilke opened this issue Mar 15, 2020 · 3 comments
Open

Support Aseprite export format (.json) for animations #321

steffen-wilke opened this issue Mar 15, 2020 · 3 comments
Labels

Comments

@steffen-wilke
Copy link
Contributor

steffen-wilke commented Mar 15, 2020

Format Documentation:_ https://www.aseprite.org/docs/cli/#filename-format

Aseprite provides a JSON based export format for animation data. It would be great if the engine could support importing this format. Maybe even an export could be useful.

gurke-idle-right-sheet.png

Example JSON for: "gurke-idle-right-sheet.png"

{ "frames": {
   "gurke-idle-right 0.png": {
    "frame": { "x": 0, "y": 0, "w": 40, "h": 40 },
    "rotated": false,
    "trimmed": false,
    "spriteSourceSize": { "x": 0, "y": 0, "w": 40, "h": 40 },
    "sourceSize": { "w": 40, "h": 40 },
    "duration": 120
   },
   "gurke-idle-right 1.png": {
    "frame": { "x": 40, "y": 0, "w": 40, "h": 40 },
    "rotated": false,
    "trimmed": false,
    "spriteSourceSize": { "x": 0, "y": 0, "w": 40, "h": 40 },
    "sourceSize": { "w": 40, "h": 40 },
    "duration": 120
   },
   "gurke-idle-right 2.png": {
    "frame": { "x": 80, "y": 0, "w": 40, "h": 40 },
    "rotated": false,
    "trimmed": false,
    "spriteSourceSize": { "x": 0, "y": 0, "w": 40, "h": 40 },
    "sourceSize": { "w": 40, "h": 40 },
    "duration": 120
   }
 },
 "meta": {
  "app": "http://www.aseprite.org/",
  "version": "1.2.16.3-x64",
  "image": "gurke-idle-right-sheet.png",
  "format": "RGBA8888",
  "size": { "w": 120, "h": 40 },
  "scale": "1",
  "frameTags": [
  ],
  "layers": [
   { "name": "Layer", "opacity": 255, "blendMode": "normal" }
  ],
  "slices": [
  ]
 }
}
@danhalv
Copy link
Contributor

danhalv commented Mar 3, 2021

I'm working in a group with @DD2480-Group-11 and we were interested in working on this. The project doesn't seem to be using any JSON libraries, would json-simple work? Also, what files would require integration (importing from toolbar etc.)?

@Gamebuster19901
Copy link
Contributor

I would recommend gson https://github.com/google/gson

@Gamebuster19901
Copy link
Contributor

I think this requires Animation to become a Resource.

Currently, you can export a spritesheet, but that's not the same as exporting an animation, as a spritesheet can have multiple animations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants