@urso/core 0.7.72 → 0.7.74
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/build/js/index.js +1 -1
- package/package.json +1 -1
- package/src/js/lib/device.js +1 -1
- package/src/js/modules/assets/service.js +1 -1
- package/src/js/modules/objects/controller.js +13 -5
- package/src/js/modules/statesManager/all.js +1 -1
- package/src/js/modules/statesManager/race.js +2 -2
- package/src/js/modules/statesManager/sequence.js +1 -1
- package/src/js/modules/transport/service.js +7 -10
package/package.json
CHANGED
package/src/js/lib/device.js
CHANGED
|
@@ -11,17 +11,25 @@ class ModulesObjectsController {
|
|
|
11
11
|
this._applyClassesToWorld = this._applyClassesToWorld.bind(this);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @param {Array|ModulesObjectsBaseModel} objects - array of objects or single object model
|
|
17
|
+
* @param {Object} parent - parent object
|
|
18
|
+
* @param {boolean} doNotRefreshStylesFlag - create without refresh styles
|
|
19
|
+
* @param {boolean} _system - system create, do not use this in your code
|
|
20
|
+
* @returns
|
|
21
|
+
*/
|
|
22
|
+
create(objects, parent, doNotRefreshStylesFlag, _system = false) {
|
|
15
23
|
let result;
|
|
16
24
|
|
|
17
25
|
if (Array.isArray(objects)) {
|
|
18
26
|
result = [];
|
|
19
27
|
|
|
20
28
|
for (const object of objects) {
|
|
21
|
-
result.push(this._createSingleObject(object, parent, doNotRefreshStylesFlag));
|
|
29
|
+
result.push(this._createSingleObject(object, parent, doNotRefreshStylesFlag, _system));
|
|
22
30
|
}
|
|
23
31
|
} else
|
|
24
|
-
result = this._createSingleObject(objects, parent, doNotRefreshStylesFlag);
|
|
32
|
+
result = this._createSingleObject(objects, parent, doNotRefreshStylesFlag, _system);
|
|
25
33
|
|
|
26
34
|
if (!doNotRefreshStylesFlag)
|
|
27
35
|
this.refreshStyles(parent);
|
|
@@ -29,9 +37,9 @@ class ModulesObjectsController {
|
|
|
29
37
|
return result;
|
|
30
38
|
}
|
|
31
39
|
|
|
32
|
-
_createSingleObject(object, parent, doNotRefreshStylesFlag) {
|
|
40
|
+
_createSingleObject(object, parent, doNotRefreshStylesFlag, _system) {
|
|
33
41
|
//parse template for assets and objects (groups, components) Urso.types.objects.COMPONENT Urso.types.objects.GROUP
|
|
34
|
-
if (!object._parsed) { //todo only for objects, contains components && groups in future
|
|
42
|
+
if (!object._parsed && !_system) { //todo only for objects, contains components && groups in future
|
|
35
43
|
return Urso.scenes.addObject(object, parent, doNotRefreshStylesFlag);
|
|
36
44
|
}
|
|
37
45
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Action = require('./action.js');
|
|
1
|
+
const Action = require('./action.js');
|
|
2
2
|
|
|
3
3
|
class ModulesStatesManagerRace extends Action {
|
|
4
4
|
constructor(params) {
|
|
@@ -67,7 +67,7 @@ class ModulesStatesManagerRace extends Action {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
_onFinish() {
|
|
70
|
-
if(this._forceDestroying)
|
|
70
|
+
if (this._forceDestroying)
|
|
71
71
|
return;
|
|
72
72
|
|
|
73
73
|
this.finished = true;
|
|
@@ -15,7 +15,7 @@ class ModulesTransportService {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
send(message) {
|
|
18
|
-
if (!this.
|
|
18
|
+
if (!this._checkCommunicatorReady())
|
|
19
19
|
return false;
|
|
20
20
|
|
|
21
21
|
const decoratedMessage = this.getInstance('Decorator', { callbacks: this._callbacks }).toServer(message);
|
|
@@ -36,7 +36,7 @@ class ModulesTransportService {
|
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
reconnect() {
|
|
39
|
-
if (!this.
|
|
39
|
+
if (!this._checkCommunicatorReady())
|
|
40
40
|
return false;
|
|
41
41
|
|
|
42
42
|
this._communicator.reconnect(this._getAutoReconnetionDelay());
|
|
@@ -45,7 +45,7 @@ class ModulesTransportService {
|
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
close() {
|
|
48
|
-
if (!this.
|
|
48
|
+
if (!this._checkCommunicatorReady())
|
|
49
49
|
return false;
|
|
50
50
|
|
|
51
51
|
this._communicator.close();
|
|
@@ -62,14 +62,11 @@ class ModulesTransportService {
|
|
|
62
62
|
return result;
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
-
_checkCommunicator() {
|
|
66
|
-
if (!this._communicator)
|
|
67
|
-
Urso.logger.error('Communicator was not created!');
|
|
68
|
-
|
|
69
|
-
return true;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
65
|
_checkCommunicatorReady() {
|
|
66
|
+
if (!this._communicator) {
|
|
67
|
+
Urso.logger.error('Communicator was not created!');
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
73
70
|
return this._communicator.readyCheck();
|
|
74
71
|
};
|
|
75
72
|
|