• Runtimes
  • Spine Runtimes WebPlayer source loading problem

Hello, I'm a beginner at spine runtimes, and I just started learning the basics from esotericsoftware.com/spine-player. I have a problem of loading files.

I copied the demonstration from the tutorial, and everything worked well, but once I replaced the jsonUrl/atlasUrl with local file path or file URLs from my server, it didn't work.

example from the tutorial:

<script>
   new spine.SpinePlayer("player-container1", {
      jsonUrl: "http://esotericsoftware.com/files/examples/4.0/spineboy/export/spineboy-pro.json",
      atlasUrl: "http://esotericsoftware.com/files/examples/4.0/spineboy/export/spineboy.atlas"
           });
   </script>

loading my local files

<script>
new spine.SpinePlayer("player-container2", {
    jsonUrl: "/assets/4.1/spineboy-pro.json",
    atlasUrl: "/assets/4.1/spineboy.altas"
        });
</script>

loading from my server

<script>
new spine.SpinePlayer("player-container4", {
    jsonUrl: "https://voxakuma.top/assets/4.1/spineboy-pro.json",
    atlasUrl: "https://voxakuma.top/assets/4.1/spineboy.atlas",
    });
</script>

I also considered the export version requirement, so I tried the 4.0 and 4.1 versions, but it still doesn't work.
I created and attached an HTML file to illustrate different ways of loading json and altas files. I hope it might help you understand my problems.

HTML screenshot

Thank you!

Related Discussions
...

Hi, I checked out your issue and got CORS errors in my browser. You can see more information here, right above the section about the default animation:
Spine Web Player: JSON and atlas URL

Also, the scripts for your local files are trying to load your atlases with an extension of .altas; please change that to .atlas.