This is the code to load the skeleton:
skel0 = new spine.SpinePlayer("div_el", {
jsonUrl: "assets/" + param2,
atlasUrl: "assets/" + param3,
backgroundColor: "#00000000",
alpha: true,
showControls: false
});
This is how .json looks like. It contains the skeleton (body) and the data for skins (t-shirt). I removed parts for readability.
`{
"skeleton":{
},
"bones":[
{
"name":"root"
},
{
"name":"Center",
"parent":"root",
"y":238.74000000000001,
"transform":"noScale",
"color":"4a14ecff"
},
{
"name":"Hips",
"parent":"Center",
"length":34,
"rotation":82.010000000000005,
"transform":"noScale",
"color":"4a14ecff"
}
],
"slots":[
{
"name":"lul2_LeftUpperLeg_col1",
"bone":"LeftUpperLeg",
"attachment":"lul2_LeftUpperLeg_col1",
"position":"LEFT_UPPER_LEG"
}
],
"skins":{
"default":{
"lul2_LeftUpperLeg_col1":{
"lul2_LeftUpperLeg_col1":{
"height":375,
"x":7.559999942779541,
"scaleY":0.20000000298023224,
"rotation":90.279998779296875,
"y":4.8499999046325684,
"name":"Symbol 41",
"color":"e3c5a6ff",
"width":320,
"scaleX":0.20000000298023224
}
},
"spkl_Torso_nocol":{
"spkl_Torso_nocol":{
"height":535,
"x":42.400001525878906,
"scaleY":0.20000000298023224,
"rotation":-94.169998168945312,
"y":-3.6500000953674316,
"name":"Symbol 21",
"width":425,
"scaleX":0.20000000298023224
}
}
}
},
"animations":{
"default":[
]
}
}`
Somehow, only the t-shirt is displayed without the body. "slots" and "skins" are taken from an external tshirt_file.json and are merged into the body_file.json