• Editor
  • How to export atlas as a .json file with texture packer?

Hello.
Is it possible to export the texture atlas file as a .json file instead of an .atlas file? I want to use the atlas in a Phaser project, but they only accept .json atlases.

I tried changing the "Atlas extension" to .json instead, but it did not work. I am using Spine version 3.8.96

Related Discussions
...
  • Düzenlendi

Thanks for the prompt reply.
I should have been more clear in my question I think. I am not using the Spine Plugin.

I want to load an atlas using Phaser's LoaderPlugin, like this:

this.load.atlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.json');

Here is a practical example from their web site: https://phaser.io/examples/v3/view/animation/texture-atlas-animation

I really like the texture packer from Spine, so I was hoping I could export the atlas in .json format, if possible.

Sorry, Spine only supports the .atlas texture atlas file format. You could write a tool that converts the data to JSON or you could probably port the Phaser code that loads the .atlas files to do what you need. Otherwise you'd need to use a different texture packing tool, eg this one is fully featured:
https://www.codeandweb.com/texturepacker

Thanks again for the prompt reply.

Understood, and thanks for the suggestions 😉