@urso/core 0.7.40 → 0.7.42
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
|
@@ -7,6 +7,7 @@ class ModulesStatesManagerAction {
|
|
|
7
7
|
this._terminating = false;
|
|
8
8
|
this.finished = false;
|
|
9
9
|
this._onFinishCallback = false;
|
|
10
|
+
this._startTime = 0;
|
|
10
11
|
|
|
11
12
|
this._onFinish = this._onFinish.bind(this);
|
|
12
13
|
}
|
|
@@ -18,6 +19,7 @@ class ModulesStatesManagerAction {
|
|
|
18
19
|
|
|
19
20
|
run(onFinishCallback) {
|
|
20
21
|
this._running = true;
|
|
22
|
+
this._startTime = Urso.time.get();
|
|
21
23
|
log(`%c action run ---> ${this.name}`, 'color: blue');
|
|
22
24
|
|
|
23
25
|
this.emit(Urso.events.MODULES_STATES_MANAGER_ACTION_START, this.name);
|
|
@@ -57,10 +59,11 @@ class ModulesStatesManagerAction {
|
|
|
57
59
|
this._running = false;
|
|
58
60
|
this._terminating = false;
|
|
59
61
|
this.finished = true;
|
|
62
|
+
const elapsedTime = Urso.time.get() - this._startTime;
|
|
60
63
|
|
|
61
64
|
this.emit(Urso.events.MODULES_STATES_MANAGER_ACTION_FINISH, this.name);
|
|
62
65
|
|
|
63
|
-
log(`%c action finish <--- ${this.name}`, 'color: blue');
|
|
66
|
+
log(`%c action finish <--- ${this.name} (${elapsedTime}ms)`, 'color: blue');
|
|
64
67
|
this._onFinishCallback();
|
|
65
68
|
}
|
|
66
69
|
}
|
|
@@ -28,6 +28,7 @@ class ModulesStatesManagerRace extends Action {
|
|
|
28
28
|
log(`%c action run ---> ${this.name}`, 'color: orange', this.params);
|
|
29
29
|
|
|
30
30
|
this.finished = false;
|
|
31
|
+
this._startTime = Urso.time.get();
|
|
31
32
|
this._onFinishCallback = onFinishCallback;
|
|
32
33
|
|
|
33
34
|
for (let action of this._actions)
|
|
@@ -67,7 +68,8 @@ class ModulesStatesManagerRace extends Action {
|
|
|
67
68
|
|
|
68
69
|
_onFinish() {
|
|
69
70
|
this.finished = true;
|
|
70
|
-
|
|
71
|
+
const elapsedTime = Urso.time.get() - this._startTime;
|
|
72
|
+
log(`%c action finish <--- ${this.name} (${elapsedTime}ms)`, 'color: orange');
|
|
71
73
|
this._onFinishCallback();
|
|
72
74
|
}
|
|
73
75
|
}
|
|
@@ -3,11 +3,11 @@ class ModulesTemplateService {
|
|
|
3
3
|
this.singleton = true;
|
|
4
4
|
|
|
5
5
|
this._currentTemplate = this.getInstance('Model');
|
|
6
|
-
this.
|
|
6
|
+
this._actualFullTemplate = this.getInstance('Model');
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
getTemplate() {
|
|
10
|
-
return this.
|
|
10
|
+
return this._actualFullTemplate;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
getSceneOrGroup(name, namespace) {
|
|
@@ -25,12 +25,12 @@ class ModulesTemplateService {
|
|
|
25
25
|
this._parseObjects(this._currentTemplate.objects, template._templatePath);
|
|
26
26
|
|
|
27
27
|
if (additionalTemplateFlag) {
|
|
28
|
-
this.
|
|
29
|
-
this.
|
|
30
|
-
this.
|
|
31
|
-
Urso.helper.mergeObjectsRecursive(this.
|
|
28
|
+
this._actualFullTemplate.assets = Urso.helper.mergeArrays(this._actualFullTemplate.assets, this._currentTemplate.assets);
|
|
29
|
+
this._actualFullTemplate.components = Urso.helper.mergeArrays(this._actualFullTemplate.components, this._currentTemplate.components);
|
|
30
|
+
this._actualFullTemplate.objects = Urso.helper.mergeArrays(this._actualFullTemplate.objects, this._currentTemplate.objects);
|
|
31
|
+
Urso.helper.mergeObjectsRecursive(this._actualFullTemplate.styles, this._currentTemplate.styles);
|
|
32
32
|
} else {
|
|
33
|
-
this.
|
|
33
|
+
this._actualFullTemplate = this._currentTemplate;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
return this._currentTemplate;
|