• Editor
  • Export multiple skeletons for one project in one JSON file

Hi everyone,

We are a company that make games for web in javascript and we recently adquire spine to enhance our games animations and views (and we are really happy with the results 😃 )

Now, we are make some test to define the way we can work between art and front departments. Because is web games we need to minimize the data to download and use. We already get from texturepacker options 1 .atlas and 1 .png file, but multiple json file ( 1 per skeleton created in the spine project ). So, we wonder if it is possible to achieve combine these skeletons in one file ( in order to minimize the files that need to download ).

The idea is to get from these 3 files ( 1 skeleton, 1 atlas and 1 png) multiple spine object each one with their owns animations, skins, etc.

Doing some research, we go with this topic: http://es.esotericsoftware.com/forum/Combining-multiple-jsons-skeletons-into-1-json-file-10908?p=49135&hilit=export+single+json#p49135 asking a similar question but is one year old topic and it seems that is not clear the solution (morever as 1 year topic I ignore if there is something new that we can use).

thanks,

Related Discussions
...

We had a similar need for our demos page, here:
Spine: Demos
What we did is manually (with a script) combine the JSON files. You can see the files here:
spine-runtimes/spine-ts/webgl/demos at 3.8
The skeleton JSON is there under assets/demos.json. It's simple:

{
"skeletonName": [skeleton JSON],
"anotherSkeletonName": [skeleton JSON],
}

Then to load it we get the demos.json object from the AssetManager, then grab which skeleton JSON object we need:
spine-runtimes/hoverboard.js at 3.8