EnricDelgado Sounds nice! But don't I need also the atlas too for a project to be able to generate the images inside spine?
You need an atlas file (and the respective atlas pages PNG), when you don't have access to the original image. In such a case, the Spine Editor offers you the texture unpacker feature to generate single images from the atlas pages. And that should be your case, since your application uses the player that needs atlas TXT/PNGs.
As you can see from the code above, you are creating a runtime atlas with a single page having a single region, without any padding, rotation, and so on. So basically, the atlas page PNG of your runtime atlas is your original image. Using this approach, you don't need to unpack anything. Even if you created an atlas text file from your runtime atlas, the texture unpack process would output your original image. If you don't have access to the original images, you might need to use the original atlas TXT/PNGs to obtain them.
Eventually, you could provide as a download option a zip containing: the new JSON, a folder with the new images, and the initial atlas TXT/PNGs. With that, the user should be able to: import the JSON, add the new images to the project's image folder, unpack the atlas, and also add the output images to the project image folder.
EnricDelgado Is there an example or a way on how to retrieve all the images currently displayed in the player, as well as the atlas? 🙂
As I already explained in previous messages, even if you see the region/mesh images as single pieces, what you are currently seeing is WebGL showing you portions of textures, which are the atlas PNG pages. So, unfortunately, the answer is no, there is no example that cleanly does that (other than the dress-up example I mentioned above that creates thumbnails), because there isn't any texture unpacking feature in spine-ts
and most other runtimes, like in the editor.
If you really need to unpack the atlas, you can do it by yourself using the runtime atlas generated by the player during the initialization process contains all the information about the position, rotation, padding, etc., of each image. You might also use the atlas TXT file directly and interpret it, if you prefer. Be aware that there might be several use cases to support.