vk522

  • 2022년 11월 23일
  • 2022년 11월 22일에 가입함
  • 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!