January 17, 2016

Import Spine Animation in Cocos2d-x (Part 8): Export Spine to JSON and Atlas files.

Before taking a look on this post, please refer to the first post to create a worm sprite: Part 1Part 2Part 3Part 4Part 5Part 6, Part 7.

Now, I am going to export the Animated Worm to the JSON and Atlas files.

Step 1: Select "Export..." option in Spine menu...
Select "Export..." in Spine menu.
Fig 1. Select "Export..." in Spine menu.
Step 2: Select the options like screen shot below, make sure that you tick "Create atlas" option.
Settings in "Export" dialog.
Fig 2. Settings in "Export" dialog.
 Step 3: Click on "Export" and it will export the Worm object to output. If you export it successfully, it will display these messages in the bottom-left corner.
  • "JSON export complete".
  • "Paking complete".
Messages to inform you the result.
Fig 3. Messages to inform you the result.
In the output, you will see there are 3 files:
  • skeleton.atlas
  • skeleton.json
  • skeleton.png
They were named "skeleton" because in Hierarchy panel, the images all are put into "skeleton" parent node. And also note that the animation which we made willbe named as "animation", you can change it to any name you want.
Highlights are the name which you can change to another one.
Figs 4. Highlights are the name which you can change to another one.
We almost complete this "Import Spine Animation in Cocos2d-x" topic. In the last part, I will continue to add the JSON and Atlas to Cocos2d-x. To be published soon!

If you have any questions or concerns, please post your comments here, I will take a look and response ASAP.

Yumiki.

No comments :

Post a Comment