• Editor
  • JSON Skeleton Export Labels

Hi,

I'm trying to discern what certain labels in the JSON export refer to. Specifically the hierarchy under skins in the skeleton data:

...

		
                "torso": {
			"torso": { "x": 44.57, "y": -7.08, "rotation": -94.95, "width": 68, "height": 92 }
		},
		"neck": {
			"neck": { "x": 9.42, "y": -3.66, "rotation": -100.15, "width": 34, "height": 28 }
		},
		"head": {
			"head": { "x": 53.94, "y": -5.75, "rotation": -86.9, "width": 121, "height": 132 }
		},
		"eyes": {
			"eyes": { "x": 28.94, "y": -32.92, "rotation": -86.9, "width": 34, "height": 27 },
			"eyes-closed": { "x": 28.77, "y": -32.86, "rotation": -86.9, "width": 34, "height": 27 }
		},
		"right shoulder": {
			"right-shoulder": { "x": 25.86, "y": 0.03, "rotation": 134.44, "width": 52, "height": 51 }
		},

...
SOURCE: http://esotericsoftware.com/spine/files/example-skeleton.json

What does the first "eyes" refer to and then what do the "eyes" and "eyes-closed" refer to? Are these poorly labeled filenames where we're supposed to guess where they are stored and what filetype they are? Is there any documentation available regarding the JSON data?

Thanks,
Riley

Related Discussions
...
  • Изменено

Which SDK are you using?

I think these are the references that are in the atlas data, which I believe is the binding between the actual graphics and the skeleton.

The atlas data is stored in a .atlas file for the C++ and Java runtimes.

For Lua the data is derived from the filenames of the files in the data directory.

If you take a look at the spine-cpp runtime example you'll see these labels being used to reference the actual sprite sheet data:


../data/spineboy.png
format: RGBA8888
filter: Nearest,Nearest
repeat: none
head
  rotate: false
  xy: 1, 122
  size: 121, 132
  orig: 121, 132
  offset: 0, 0
  index: -1
torso
  rotate: false
  xy: 1, 28
  size: 68, 92
  orig: 68, 92
  offset: 0, 0
  index: -1
left-pant-bottom
  rotate: false
  xy: 1, 4
  size: 44, 22
  orig: 44, 22
  offset: 0, 0
  index: -1

There are docs:
http://esotericsoftware.com/spine-json-format
The strings used to reference texture regions can be resolved at runtime any way you like: look up in a texture atlas, read file from disk, render SVG, etc.

Okay - I think I understand now. Thanks for the reference docs Nate. I'm using Game Maker Studio.

I'll be honest in saying I had to look up half of what you said - I'm definitely more of an artist than a programmer, so this is going slower than typical. But I'm learning and I think I've successfully loaded the data into a readable format for GM:S.

Thanks again,
Riley