Jump to content

List animations in an atlas


vukasin
 Share

Recommended Posts

Hi Lewseter,

This is true. I was hoping that I could automate the loading of a sprite from atlas->phaser to eliminate the need for hardcoding frame id's etc. I'll just do it by loading the data myself and post the method here once i'm done.

Best,
Vukasin

Link to comment
Share on other sites

Hi samme,

 

true, some apps don't store animation data in atlas. Some however, do. One example is Aseprite. It stores the animation data in metadata. And that's the crux of the whole thing. That part of the JSON is thrown away by the parser. But as @lewster32 pointed out, I can still load the JSON again and extract the information. I was just hoping to get it from Phaser. I guess I should change the way I load and first load the JSON and pass the data to Phaser afterwards via jsonData.

Best,
Vukasin

Link to comment
Share on other sites

Ah, shoot! My misunderstanding -- I thought Cache.getImage would give you back JSON for some reason, which, DUH, of course not.

You might be better off using loader.json to load it, find whatever information you need out of it, then add it directly to the cache as a texture atlas. Or store it in some registry where you can pull the frame names out later.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...