MCPcopy Create free account
hub / github.com/melonjs/melonJS / loadAsset

Method loadAsset

packages/spine-plugin/src/AssetManager.js:82–91  ·  view source on GitHub ↗

* Load a spine atlas and skeleton file pair. * @param {string} atlas - atlas filename (e.g. "alien.atlas") * @param {string} skel - skeleton filename (.json or .skel) * @example * // manually load spine assets * plugin.assetManager.setPrefix("data/spine/"); * plugin.assetManager.loadAsse

(atlas, skel)

Source from the content-addressed store, hash-verified

80 * await plugin.assetManager.loadAll();
81 */
82 loadAsset(atlas, skel) {
83 if (atlas) {
84 this.loadTextureAtlas(atlas);
85 }
86 if (skel.endsWith(".skel")) {
87 this.loadBinary(skel);
88 } else {
89 this.loadText(skel);
90 }
91 }
92
93 /**
94 * Load a texture atlas file.

Callers

nothing calls this directly

Calls 3

loadTextureAtlasMethod · 0.95
loadBinaryMethod · 0.95
loadTextMethod · 0.95

Tested by

no test coverage detected