EsotericSoftware / spine-runtimes

2D skeletal animation runtimes for Spine.

Home Page:http://esotericsoftware.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[player] Unify asset location config

badlogic opened this issue · comments

Deprecate old asset location specifiers in config, and switch to this:

new spine.SpinePlayer("player", {
      skeleton: "raptor-pro.json",
      atlas: "raptor-pma.atlas",
      rawDataURIs: {
         "raptor-pro.json": "data:application/json;base64,<base64 encoded raptor-pro.json>",
         "raptor-pma.atlas": "data:application/octet-stream;base64,<base64 encoded raptor-pma.atlas>",
         "raptor-pma.png": "data:image/png;base64,<base64 encoded raptor-pma.png>"
      }
}

skeleton and atlas could also take data URIs directly, but users would still have to specify pngs via rawDataUris. As such, i think it's less confusing to keep data uris and skeleton and atlas separate from each other like above.

skeleton can receive URLs for both .skel and .json files.

Introduce in 4.2, while staying backwards compatible with the old way. Remove old way in 4.3.