@urso/core 0.7.15 → 0.7.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -71,6 +71,15 @@ class ModulesObjectsModelsSpine extends Urso.Core.Modules.Objects.BaseModel {
|
|
|
71
71
|
this._baseObject.skeleton.setToSetupPose();
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
/**
|
|
75
|
+
* set skin by name and reset animation to first frame
|
|
76
|
+
* @param {String} skinName
|
|
77
|
+
*/
|
|
78
|
+
setSkinByNameAndReset(skinName) {
|
|
79
|
+
this.setSkinByName(skinName);
|
|
80
|
+
this.setToSetupPose();
|
|
81
|
+
}
|
|
82
|
+
|
|
74
83
|
/**
|
|
75
84
|
* play spine animation and execute function after animation completes
|
|
76
85
|
* @param {String} animation - name of the animation to be played
|
|
@@ -130,6 +139,16 @@ class ModulesObjectsModelsSpine extends Urso.Core.Modules.Objects.BaseModel {
|
|
|
130
139
|
* @param {Number} [track] - you can define track number to stop
|
|
131
140
|
*/
|
|
132
141
|
stopTrack(track) {
|
|
142
|
+
this.clearTrack(track);
|
|
143
|
+
this._baseObject.state.addEmptyAnimation(track, 0.2, 0); //int trackIndex, float mixDuration, float delay
|
|
144
|
+
this.setToSetupPose();
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* clear track animation
|
|
149
|
+
* @param {Number} [track] - you can define track number to stop
|
|
150
|
+
*/
|
|
151
|
+
clearTrack(track) {
|
|
133
152
|
this._baseObject.state.clearTrack(track);
|
|
134
153
|
}
|
|
135
154
|
|