@shapediver/viewer.session-engine.session-engine 2.10.1-rc.0 → 2.12.0
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/dist/implementation/OutputDelayException.js +5 -1
- package/dist/implementation/OutputDelayException.js.map +1 -1
- package/dist/implementation/OutputLoader.d.ts +4 -1
- package/dist/implementation/OutputLoader.d.ts.map +1 -1
- package/dist/implementation/OutputLoader.js +41 -30
- package/dist/implementation/OutputLoader.js.map +1 -1
- package/dist/implementation/SessionData.js +6 -2
- package/dist/implementation/SessionData.js.map +1 -1
- package/dist/implementation/SessionEngine.d.ts +22 -12
- package/dist/implementation/SessionEngine.d.ts.map +1 -1
- package/dist/implementation/SessionEngine.js +442 -301
- package/dist/implementation/SessionEngine.js.map +1 -1
- package/dist/implementation/SessionOutputData.js +6 -2
- package/dist/implementation/SessionOutputData.js.map +1 -1
- package/dist/implementation/SessionTreeNode.js +6 -2
- package/dist/implementation/SessionTreeNode.js.map +1 -1
- package/dist/implementation/dto/Export.js +17 -13
- package/dist/implementation/dto/Export.js.map +1 -1
- package/dist/implementation/dto/FileParameter.js +34 -7
- package/dist/implementation/dto/FileParameter.js.map +1 -1
- package/dist/implementation/dto/Output.d.ts +6 -6
- package/dist/implementation/dto/Output.d.ts.map +1 -1
- package/dist/implementation/dto/Output.js +21 -14
- package/dist/implementation/dto/Output.js.map +1 -1
- package/dist/implementation/dto/Parameter.js +60 -33
- package/dist/implementation/dto/Parameter.js.map +1 -1
- package/dist/index.js +20 -11
- package/dist/index.js.map +1 -1
- package/dist/interfaces/ISessionData.js +2 -1
- package/dist/interfaces/ISessionEngine.d.ts +12 -8
- package/dist/interfaces/ISessionEngine.d.ts.map +1 -1
- package/dist/interfaces/ISessionEngine.js +7 -5
- package/dist/interfaces/ISessionEngine.js.map +1 -1
- package/dist/interfaces/ISessionOutputData.js +2 -1
- package/dist/interfaces/ISessionTreeNode.js +2 -1
- package/dist/interfaces/dto/IExport.js +2 -1
- package/dist/interfaces/dto/IFileParameter.js +2 -1
- package/dist/interfaces/dto/IOutput.d.ts +1 -1
- package/dist/interfaces/dto/IOutput.d.ts.map +1 -1
- package/dist/interfaces/dto/IOutput.js +2 -1
- package/dist/interfaces/dto/IParameter.js +2 -1
- package/package.json +9 -9
- package/src/implementation/OutputLoader.ts +16 -5
- package/src/implementation/SessionEngine.ts +682 -500
- package/src/implementation/dto/Output.ts +16 -15
- package/src/interfaces/ISessionEngine.ts +51 -44
- package/src/interfaces/dto/IOutput.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shapediver/viewer.session-engine.session-engine",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.12.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "Michael Oppitz <michael@shapediver.com>",
|
|
@@ -40,16 +40,16 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@shapediver/sdk.geometry-api-sdk-v2": "1.6.0",
|
|
43
|
-
"@shapediver/viewer.data-engine.data-engine": "2.
|
|
44
|
-
"@shapediver/viewer.data-engine.shared-types": "2.
|
|
45
|
-
"@shapediver/viewer.settings": "0.5.
|
|
46
|
-
"@shapediver/viewer.shared.build-data": "2.
|
|
47
|
-
"@shapediver/viewer.shared.node-tree": "2.
|
|
48
|
-
"@shapediver/viewer.shared.services": "2.
|
|
49
|
-
"@shapediver/viewer.shared.types": "2.
|
|
43
|
+
"@shapediver/viewer.data-engine.data-engine": "2.12.0",
|
|
44
|
+
"@shapediver/viewer.data-engine.shared-types": "2.12.0",
|
|
45
|
+
"@shapediver/viewer.settings": "0.5.7",
|
|
46
|
+
"@shapediver/viewer.shared.build-data": "2.12.0",
|
|
47
|
+
"@shapediver/viewer.shared.node-tree": "2.12.0",
|
|
48
|
+
"@shapediver/viewer.shared.services": "2.12.0",
|
|
49
|
+
"@shapediver/viewer.shared.types": "2.12.0",
|
|
50
50
|
"@shapediver/viewer.utils.mime-type": "1.0.0",
|
|
51
51
|
"axios": "^1.2.6",
|
|
52
52
|
"gl-matrix": "3.3.0"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "4453bb1d704facd5722ffd81518e54b5453d991f"
|
|
55
55
|
}
|
|
@@ -31,7 +31,9 @@ export class OutputLoader {
|
|
|
31
31
|
};
|
|
32
32
|
} = {};
|
|
33
33
|
private readonly _lastOutputNodes: {
|
|
34
|
-
[key: string]:
|
|
34
|
+
[key: string]: {
|
|
35
|
+
[key: string]: ISessionTreeNode
|
|
36
|
+
};
|
|
35
37
|
} = {};
|
|
36
38
|
private readonly _performanceEvaluator: PerformanceEvaluator = PerformanceEvaluator.instance;
|
|
37
39
|
|
|
@@ -57,7 +59,7 @@ export class OutputLoader {
|
|
|
57
59
|
* @param outputs the outputs to load
|
|
58
60
|
* @returns promise with a scene graph node
|
|
59
61
|
*/
|
|
60
|
-
public async loadOutputs(nodeName: string, outputs: { [key: string]: ShapeDiverResponseOutput; }, outputsFreeze: { [key: string]: boolean; }, taskEventInfo: OutputLoaderTaskEventInfo): Promise<SessionTreeNode> {
|
|
62
|
+
public async loadOutputs(nodeName: string, outputs: { [key: string]: ShapeDiverResponseOutput; }, outputsFreeze: { [key: string]: boolean; }, taskEventInfo: OutputLoaderTaskEventInfo, throwDelay = true): Promise<SessionTreeNode> {
|
|
61
63
|
this._performanceEvaluator.startSection('outputLoading');
|
|
62
64
|
const node = new SessionTreeNode(nodeName);
|
|
63
65
|
let currentNodes: {
|
|
@@ -111,7 +113,7 @@ export class OutputLoader {
|
|
|
111
113
|
this._loadedOutputNodes[outputID] = {};
|
|
112
114
|
|
|
113
115
|
if(outputsFreeze[outputID]) {
|
|
114
|
-
currentNodes[outputID][outputInfo[outputID].version] = this._lastOutputNodes[outputID];
|
|
116
|
+
currentNodes[outputID][outputInfo[outputID].version] = this._lastOutputNodes[outputID][outputInfo[outputID].version];
|
|
115
117
|
// no loading necessary, progress done
|
|
116
118
|
progress[outputID] = 1;
|
|
117
119
|
} else if(outputs[outputID].delay) {
|
|
@@ -132,7 +134,7 @@ export class OutputLoader {
|
|
|
132
134
|
}
|
|
133
135
|
}
|
|
134
136
|
|
|
135
|
-
if(maxDelay)
|
|
137
|
+
if(maxDelay && throwDelay)
|
|
136
138
|
throw new OutputDelayException(maxDelay);
|
|
137
139
|
|
|
138
140
|
/**
|
|
@@ -159,7 +161,8 @@ export class OutputLoader {
|
|
|
159
161
|
if(!currentNodes[outputID][outputInfo[outputID].version]) continue;
|
|
160
162
|
this._loadedOutputNodes[outputID] = {};
|
|
161
163
|
this._loadedOutputNodes[outputID][outputInfo[outputID].version] = currentNodes[outputID][outputInfo[outputID].version];
|
|
162
|
-
this._lastOutputNodes[outputID] =
|
|
164
|
+
this._lastOutputNodes[outputID] = {};
|
|
165
|
+
this._lastOutputNodes[outputID][outputInfo[outputID].version] = currentNodes[outputID][outputInfo[outputID].version];
|
|
163
166
|
}
|
|
164
167
|
|
|
165
168
|
for (let outputID in outputInfo) {
|
|
@@ -179,6 +182,14 @@ export class OutputLoader {
|
|
|
179
182
|
return node;
|
|
180
183
|
}
|
|
181
184
|
|
|
185
|
+
public getCurrentOutputVersions(): { [key: string]: string } {
|
|
186
|
+
const versions: { [key: string]: string } = {};
|
|
187
|
+
for(const o in this._lastOutputNodes)
|
|
188
|
+
versions[o] = Object.keys(this._lastOutputNodes[o])[0];
|
|
189
|
+
|
|
190
|
+
return versions;
|
|
191
|
+
}
|
|
192
|
+
|
|
182
193
|
// #endregion Public Methods (1)
|
|
183
194
|
|
|
184
195
|
// #region Private Methods (2)
|