@urso/core 0.4.37 → 0.4.40
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
package/src/js/lib/loader.js
CHANGED
|
@@ -36,14 +36,24 @@ class ModulesInstancesController {
|
|
|
36
36
|
return true;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
/**
|
|
40
|
+
* remove mode from system
|
|
41
|
+
* @param {String} mode
|
|
42
|
+
* @param {Boolean} passiveMode - do not refresh styles
|
|
43
|
+
* @returns
|
|
44
|
+
*/
|
|
45
|
+
removeMode(mode, passiveMode) {
|
|
40
46
|
let index = this._modes.indexOf(mode);
|
|
41
47
|
|
|
42
48
|
if (index === -1)
|
|
43
49
|
return false;
|
|
44
50
|
|
|
45
51
|
this._modes.splice(index, 1);
|
|
46
|
-
|
|
52
|
+
|
|
53
|
+
if (!passiveMode) {
|
|
54
|
+
Urso.observer.emit(Urso.events.MODULES_INSTANCES_MODES_CHANGED);
|
|
55
|
+
}
|
|
56
|
+
|
|
47
57
|
return true;
|
|
48
58
|
}
|
|
49
59
|
|
|
@@ -175,6 +175,52 @@ class ModulesObjectsModelsSpine extends Urso.Core.Modules.Objects.BaseModel {
|
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
+
/**
|
|
179
|
+
* returns skeleton's child by it's name
|
|
180
|
+
* @param {string} name
|
|
181
|
+
* @returns {DisplayObject}
|
|
182
|
+
*/
|
|
183
|
+
getChildByName(name) {
|
|
184
|
+
return this.children[this._baseObject.skeleton.findSlotIndex(name)];
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* returns skeleton's slot by it's name
|
|
189
|
+
* @param {string} name
|
|
190
|
+
* @returns {Slot}
|
|
191
|
+
*/
|
|
192
|
+
findSlot(name) {
|
|
193
|
+
return this._baseObject.skeleton.findSlot(name)
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* returns skeleton's bone by it's name
|
|
198
|
+
* @param {string} name
|
|
199
|
+
* @returns {Bone}
|
|
200
|
+
*/
|
|
201
|
+
findBone(name) {
|
|
202
|
+
return this._baseObject.skeleton.findBone(name)
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* returns animation from spineData by it's name
|
|
207
|
+
* @param {string} name
|
|
208
|
+
* @returns {Animation}
|
|
209
|
+
*/
|
|
210
|
+
findAnimation(name) {
|
|
211
|
+
return this._baseObject.spineData.findAnimation(name)
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* returns event from spineData by it's name
|
|
217
|
+
* @param {string} name
|
|
218
|
+
* @returns {EventData}
|
|
219
|
+
*/
|
|
220
|
+
findEvent(name) {
|
|
221
|
+
return this._baseObject.spineData.findEvent(name)
|
|
222
|
+
}
|
|
223
|
+
|
|
178
224
|
/**
|
|
179
225
|
* system function
|
|
180
226
|
* add object to pixi tree
|
|
@@ -55,7 +55,7 @@ class ModulesScenesResolutions {
|
|
|
55
55
|
this._currentOrientation = this._templateSize.orientation;
|
|
56
56
|
|
|
57
57
|
//update InstancesModes
|
|
58
|
-
Object.values(Urso.device.ScreenOrientation).forEach((orientationValue) => Urso.removeInstancesMode(orientationValue + 'Orientation'));
|
|
58
|
+
Object.values(Urso.device.ScreenOrientation).forEach((orientationValue) => Urso.removeInstancesMode(orientationValue + 'Orientation', true));
|
|
59
59
|
Urso.addInstancesMode(this._templateSize.orientation + 'Orientation');
|
|
60
60
|
|
|
61
61
|
this.emit(Urso.events.MODULES_SCENES_ORIENTATION_CHANGE, this._templateSize.orientation);
|