Skip to content

Commit 91c58c5

Browse files
committed
New plugin build
1 parent 7b96356 commit 91c58c5

2 files changed

Lines changed: 75 additions & 2 deletions

File tree

plugins/spine/dist/SpinePlugin.js

Lines changed: 74 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10921,6 +10921,37 @@ var SpineGameObject = new Class({
1092110921
return output;
1092210922
},
1092310923

10924+
getSkinList: function ()
10925+
{
10926+
var output = [];
10927+
10928+
var skeletonData = this.skeletonData;
10929+
10930+
if (skeletonData)
10931+
{
10932+
for (var i = 0; i < skeletonData.skins.length; i++)
10933+
{
10934+
output.push(skeletonData.skins[i].name);
10935+
}
10936+
}
10937+
10938+
return output;
10939+
},
10940+
10941+
getSlotList: function ()
10942+
{
10943+
var output = [];
10944+
10945+
var skeleton = this.skeleton;
10946+
10947+
for (var i = 0; i < skeleton.slots.length; i++)
10948+
{
10949+
output.push(skeleton.slots[i].data.name);
10950+
}
10951+
10952+
return output;
10953+
},
10954+
1092410955
getAnimationList: function ()
1092510956
{
1092610957
var output = [];
@@ -10986,7 +11017,13 @@ var SpineGameObject = new Class({
1098611017

1098711018
setSkinByName: function (skinName)
1098811019
{
10989-
this.skeleton.setSkinByName(skinName);
11020+
var skeleton = this.skeleton;
11021+
11022+
skeleton.setSkinByName(skinName);
11023+
11024+
skeleton.setSlotsToSetupPose();
11025+
11026+
this.state.apply(skeleton);
1099011027

1099111028
return this;
1099211029
},
@@ -11011,6 +11048,42 @@ var SpineGameObject = new Class({
1101111048
return this;
1101211049
},
1101311050

11051+
getAttachment: function (slotIndex, attachmentName)
11052+
{
11053+
return this.skeleton.getAttachment(slotIndex, attachmentName);
11054+
},
11055+
11056+
getAttachmentByName: function (slotName, attachmentName)
11057+
{
11058+
return this.skeleton.getAttachmentByName(slotName, attachmentName);
11059+
},
11060+
11061+
setAttachment: function (slotName, attachmentName)
11062+
{
11063+
return this.skeleton.setAttachment(slotName, attachmentName);
11064+
},
11065+
11066+
setToSetupPose: function ()
11067+
{
11068+
this.skeleton.setToSetupPose();
11069+
11070+
return this;
11071+
},
11072+
11073+
setSlotsToSetupPose: function ()
11074+
{
11075+
this.skeleton.setSlotsToSetupPose();
11076+
11077+
return this;
11078+
},
11079+
11080+
setBonesToSetupPose: function ()
11081+
{
11082+
this.skeleton.setBonesToSetupPose();
11083+
11084+
return this;
11085+
},
11086+
1101411087
getRootBone: function ()
1101511088
{
1101611089
return this.skeleton.getRootBone();

plugins/spine/dist/SpinePlugin.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)