• RuntimesBugs
  • Spine player "Assets could not be loaded."

I am trying to load a spine animation in my website but i get the erorr "Assets could not be loaded" even though the files are there.

This is what im doing

and this is the error i get once the player is added to my page

It doesnt really say why it cant load, ive tried uploading them to a domain and using the url to access them too but its not working at all, filenames are correct, the data URIs are correct too, i really dont know why this is happening

Related Discussions
...

The error message tells you what's wrong: the atlas references a .dds file, which the player can not load. .dds files aren't supported by any browser I know of. Your best bet for atlas page image formats are png and webp (with transparency)-

It's also unclear to me what res.data contains. Maybe you could post the data URIs somewhere.

    Mario Hey mario, thanks for your answer, so I should modify the file right? to make it reference a .png instead of .dds

    As for the contents of res.data, i can upload them once i get home, but theyre the data URIs of my atlas, skel and png files, I will send them to you here when i upload them

    SilverStraw No, do they have to be there? i removed them because someone told me they were not needed 😅

    Well... after adding them the errors were solved.. im so sorry 😂

    But now i get another one:

    Do you know whats the cause of this?

      sharkk
      All bones must have a valid name in the Spine binary. What version of the Spine Player are you using? I noticed you have a version 3.8.59 Spine binary.

        SilverStraw How can I check the spine player version? I got it by building it from the spine-runtimes/spine-ts repo, so i guess its the latest

          sharkk
          Yes, it should be what ever branch you got the Spine player from. Do you have the original Spine files? JSON export would be much easier for human to locate the problematic bone(s).

            SilverStraw How would i go about turning the skel file into a json? Do i download spine and load then export again or do i have to use something else?

              sharkk
              You can try to import the skel file into Spine but the version have to match for each. The skel file had to have been exported with non-essential data or it won't import I believe.

                SilverStraw Yeah, the files' version doesnt match with the current spine, do you know if theres any other way to convert the skel into json? Ive tried loading it with another package called pixi-spine (The character doesnt load with that either) and i've logged the skeleton to json, it has an array of bones, etc.

                Would that be useful?

                You can run the old version of the Spine editor, import, save the .spine project file, run the new version of the editor, and export. This can also be done via the command line, eg if you have many files.

                  Nate Sorry for all these deleted questions.. I managed to solve it.

                  But one last thing, why is the quality of the animation so bad?

                  animation-badquality.mp4
                  6MB

                  Here's how it should look (recorded from another website)

                  animation-normalquality.mp4
                  627kB

                  I guess you mean the quality of the lightning bolt. I can't really say. Does it look right in the Spine editor?

                    Nate Yeah, ive also tried other files and its always the same issue, in other places it looks just fine

                    Did you export with pre-multiplied alpha? What is your pre-multiplied alpha setting for the player?

                      Mario They were not exported with pre-multiplied alpha, I've read that it comes enabled by default in spine player, how can i disable it?

                        sharkk Nevermind, adding premultipliedAlpha: false to the player constructor worked perfectly.

                        Thanks a lot to all of you who helped me here 🙂