Is Spine still supported in Cocos2d-JS

Hi! I’m testing with several files exported from Spine, including the ones that came with the engine tests, and the only character I managed to get working was the “spineboy” that came with Cocos, I couldn’t load any other files without some wired issues (like parts of the character ending as children of the background image).

Was Spine support dropped at some point and only certain versions are still working?

which version of cocos are you using?

I’ve downloaded it a few days ago, it’s the full 3.9 JS version.

Hello,

I have used Spine exported file for Cocos2d JS Web version. Its working fine for me.

  1. Have you Preloaded the Exported File before?
  2. Are you able to load file in Web browser? Are you trying to load in Device through JS binding?

Thanks
Gurudath

Yes I’ve preloaded the 3 files (json, atlas and png) in each test, and I can open them with the browser. The buggy behavior changes if I play different animations for the same object.
I’m running this tests on Chrome and Firefox, both for desktop.

I’ll try to gather more info and some screenshots later when I get back to this tests.
Thanks!

After a another testing session, I think I’ve found that the main problem is when the objects has skins defined in Spine.
I managed to test several objects in Unity and what I see in Cocos is the default skin for the object.
I couldn’t find any documentation on specific feature support in the Cocos2d-JS implementation of Spine. I looked through the .js files and I didn’t see any setSkin-like functions…

However, this example doesn’t have any skins and it’s not working at all in Cocos JS: https://drive.google.com/file/d/0BwHeY7kQclHNcVA0OTcyY2dadTA/view

I don’t have Spine (I’m still evaluating it before purchasing) so I can’t create animations and test which feature is not supported.

there is a .txt in your atlas file, maybe that’s the problem?

The ‘.txt’ extension doesn’t seem to be the problem, the content of the file are OK.
I still couldn’t figure out why this happens.

There is a setSkin function for spine:

{spine.Skin} setSkin(skinName)
Finds a skin by name and makes it the active skin. This does a string comparison for every skin. Note that setting the skin does not change which attachments are visible.

Parameters:
{string} skinName

http://www.cocos2d-x.org/reference/html5-js/V3.8/symbols/sp.Skeleton.html

You may also check spine examples at:

I’ve already check that examples, but they didn’t test any skins.
I’ll try to test that setSkin function to see if this fixes the issue, not sure why I couldn’t find it. Thanks for pointing it to me! :smiley:

Hi Antaka!

Did you solve your problem?
I’m with the same problem on my project.

Best Regards,

Fábio

The ‘setSkin’ function worked for some of the examples I was testing, but unfortunately we had to move to another project and I couldn’t investigate further into Cocos2d-JS and Spine.
So, at the moment all I can say is that this seems to work OK, but we havent’t made any custom testing with our own animations to see which features are fully supported.