I'm having trouble with the success callback. The code is working fine besides the animation part, I can't get it to work.
new spine.SpinePlayer("player-container", {
skeleton: `${filename}.json`,
atlas: `${filename}.atlas`,
rawDataURIs: {
[`${filename}.json`]: jsonDataUri,
[`${filename}.atlas`]: atlasDataUri,
[pngFilenameFromAtlas]: pngDataUri
},
alpha: true, // Enable player translucency
backgroundColor: "#00000000", // Background is fully transparent
premultipliedAlpha: false,
skin: filename,
success: function (player) {
player.setAnimation("run", true);
},
error: function (player, reason) {
alert(reason);
}
});
I keep getting this error, and I'm not sure where its coming from
Uncaught SyntaxError: Missing catch or finally after try