@urso/core 0.4.39 → 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@urso/core",
3
- "version": "0.4.39",
3
+ "version": "0.4.40",
4
4
  "description": "HTML5 game engine",
5
5
  "main": "build/js/index.js",
6
6
  "author": "Megbrimef",
@@ -23,6 +23,10 @@ class LibLoader {
23
23
  _getLoadPath(asset) {
24
24
  const { path } = asset;
25
25
 
26
+ if (path.indexOf('http') === 0) { //if absolute path - just return
27
+ return path;
28
+ }
29
+
26
30
  if (!Urso.config.useBinPath) {
27
31
  return `assets/${path}`;
28
32
  }
@@ -36,14 +36,24 @@ class ModulesInstancesController {
36
36
  return true;
37
37
  }
38
38
 
39
- removeMode(mode) {
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
- Urso.observer.emit(Urso.events.MODULES_INSTANCES_MODES_CHANGED);
52
+
53
+ if (!passiveMode) {
54
+ Urso.observer.emit(Urso.events.MODULES_INSTANCES_MODES_CHANGED);
55
+ }
56
+
47
57
  return true;
48
58
  }
49
59
 
@@ -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);