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

Method setSkinByName

packages/spine-plugin/src/Spine.js:589–591  ·  view source on GitHub ↗

* Sets a skin by name. * @param {string} skinName * @example * // create a new Spine Renderable * let spineChar = new Spine(100, 100, {atlasFile: "mix-and-match-pma.atlas", jsonFile: "mix-and-match-pro.json"}); * * // set default animation * spineChar.setAnimation(0, "dance", true);

(skinName)

Source from the content-addressed store, hash-verified

587 * me.game.world.addChild(spineChar);
588 */
589 setSkinByName(skinName) {
590 this.skeleton.setSkin(skinName);
591 }
592
593 /**
594 * Create a combined skin from multiple skin names (mix-and-match).

Callers 1

loadCharacterFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected