@shapediver/viewer.data-engine.sdtf-engine 3.15.11 → 3.16.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/SDTFEngine.d.ts +4 -29
- package/dist/SDTFEngine.d.ts.map +1 -1
- package/dist/SDTFEngine.js +128 -170
- package/dist/SDTFEngine.js.map +1 -1
- package/package.json +7 -7
package/dist/SDTFEngine.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export declare class SDTFEngine {
|
|
|
4
4
|
private readonly _logger;
|
|
5
5
|
private static _instance;
|
|
6
6
|
private _parsedFile;
|
|
7
|
+
private _overview;
|
|
7
8
|
static get instance(): SDTFEngine;
|
|
8
9
|
/**
|
|
9
10
|
* Load the sdtf content into a scene graph node.
|
|
@@ -13,36 +14,10 @@ export declare class SDTFEngine {
|
|
|
13
14
|
*/
|
|
14
15
|
loadContent(content: ResOutputContent, jwtToken?: string): Promise<ITreeNode>;
|
|
15
16
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* It is structured as a dictionary with the name as the key and an array of Objects as the value.
|
|
19
|
-
* The array of objects contains the different types that can be found in the SDTF file under the same name.
|
|
20
|
-
*
|
|
21
|
-
* Example:
|
|
22
|
-
* {
|
|
23
|
-
* "color": [
|
|
24
|
-
* {
|
|
25
|
-
* typeHint: 'string',
|
|
26
|
-
* count: 2,
|
|
27
|
-
* values: ["red", "blue"]
|
|
28
|
-
* },
|
|
29
|
-
* {
|
|
30
|
-
* typeHint: 'numberArray',
|
|
31
|
-
* count: 2,
|
|
32
|
-
* values: [[1,0,0,1], [0,0,1,1]]
|
|
33
|
-
* },
|
|
34
|
-
* ]
|
|
35
|
-
* }
|
|
36
|
-
*
|
|
37
|
-
* The overview contains the following information:
|
|
38
|
-
* - name of the attribute + type of the attribute
|
|
39
|
-
* - the count
|
|
40
|
-
* - for numerical attributes, the min and max values
|
|
41
|
-
* - for string attributes, the unique values
|
|
42
|
-
*
|
|
43
|
-
* @returns
|
|
17
|
+
* Update the overview with a single attribute entry.
|
|
18
|
+
* Called during item loading so we avoid a separate pass over all items.
|
|
44
19
|
*/
|
|
45
|
-
private
|
|
20
|
+
private updateOverview;
|
|
46
21
|
/**
|
|
47
22
|
* Load the attributes into a SDTFAttributesData data item.
|
|
48
23
|
*
|
package/dist/SDTFEngine.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDTFEngine.d.ts","sourceRoot":"","sources":["../src/SDTFEngine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,qCAAqC,CAAC;AAUrE,OAAO,
|
|
1
|
+
{"version":3,"file":"SDTFEngine.d.ts","sourceRoot":"","sources":["../src/SDTFEngine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,qCAAqC,CAAC;AAUrE,OAAO,EACN,SAAS,EAMT,MAAM,qCAAqC,CAAC;AAO7C,qBAAa,UAAU;IAGtB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA2B;IAEnD,OAAO,CAAC,MAAM,CAAC,SAAS,CAAa;IAErC,OAAO,CAAC,WAAW,CAAsB;IAEzC,OAAO,CAAC,SAAS,CAAqB;IAMtC,WAAkB,QAAQ,eAEzB;IAMD;;;;;OAKG;IACU,WAAW,CACvB,OAAO,EAAE,gBAAgB,EACzB,QAAQ,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,SAAS,CAAC;IAqCrB;;;OAGG;IACH,OAAO,CAAC,cAAc;IA6DtB;;;;;OAKG;YACW,cAAc;IA0D5B;;;;;;OAMG;YACW,SAAS;IA6BvB;;;;;;OAMG;YACW,QAAQ;IAwCtB;;;;;;OAMG;YACW,QAAQ;CA8BtB"}
|
package/dist/SDTFEngine.js
CHANGED
|
@@ -14,14 +14,14 @@ const sdk_sdtf_primitives_1 = require("@shapediver/sdk.sdtf-primitives");
|
|
|
14
14
|
const sdk_sdtf_v1_1 = require("@shapediver/sdk.sdtf-v1");
|
|
15
15
|
const viewer_shared_node_tree_1 = require("@shapediver/viewer.shared.node-tree");
|
|
16
16
|
const viewer_shared_services_1 = require("@shapediver/viewer.shared.services");
|
|
17
|
-
const viewer_shared_types_1 = require("@shapediver/viewer.shared.types");
|
|
18
17
|
class SDTFEngine {
|
|
19
18
|
constructor() {
|
|
20
|
-
// #region Properties (
|
|
19
|
+
// #region Properties (4)
|
|
21
20
|
this._logger = viewer_shared_services_1.Logger.instance;
|
|
21
|
+
this._overview = {};
|
|
22
22
|
// #endregion Private Methods (5)
|
|
23
23
|
}
|
|
24
|
-
// #endregion Properties (
|
|
24
|
+
// #endregion Properties (4)
|
|
25
25
|
// #region Public Static Accessors (1)
|
|
26
26
|
static get instance() {
|
|
27
27
|
return this._instance || (this._instance = new this());
|
|
@@ -48,126 +48,75 @@ class SDTFEngine {
|
|
|
48
48
|
const parser = sdk.createParser();
|
|
49
49
|
// parse the file
|
|
50
50
|
this._parsedFile = yield parser.readFromUrl(content.href);
|
|
51
|
-
//
|
|
52
|
-
|
|
53
|
-
//
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
// reset overview — it will be populated during item loading
|
|
52
|
+
this._overview = {};
|
|
53
|
+
// load all chunks in parallel
|
|
54
|
+
const chunks = yield Promise.all(this._parsedFile.chunks.map((chunk, i) => this.loadChunk(chunk, i)));
|
|
55
|
+
for (const chunk of chunks)
|
|
56
|
+
node.children.push(chunk);
|
|
57
|
+
// create the overview from data collected during item loading
|
|
58
|
+
node.data.push(new viewer_shared_node_tree_1.SDTFOverviewData(this._overview));
|
|
56
59
|
return node;
|
|
57
60
|
});
|
|
58
61
|
}
|
|
59
62
|
// #endregion Public Methods (1)
|
|
60
63
|
// #region Private Methods (5)
|
|
61
64
|
/**
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
* It is structured as a dictionary with the name as the key and an array of Objects as the value.
|
|
65
|
-
* The array of objects contains the different types that can be found in the SDTF file under the same name.
|
|
66
|
-
*
|
|
67
|
-
* Example:
|
|
68
|
-
* {
|
|
69
|
-
* "color": [
|
|
70
|
-
* {
|
|
71
|
-
* typeHint: 'string',
|
|
72
|
-
* count: 2,
|
|
73
|
-
* values: ["red", "blue"]
|
|
74
|
-
* },
|
|
75
|
-
* {
|
|
76
|
-
* typeHint: 'numberArray',
|
|
77
|
-
* count: 2,
|
|
78
|
-
* values: [[1,0,0,1], [0,0,1,1]]
|
|
79
|
-
* },
|
|
80
|
-
* ]
|
|
81
|
-
* }
|
|
82
|
-
*
|
|
83
|
-
* The overview contains the following information:
|
|
84
|
-
* - name of the attribute + type of the attribute
|
|
85
|
-
* - the count
|
|
86
|
-
* - for numerical attributes, the min and max values
|
|
87
|
-
* - for string attributes, the unique values
|
|
88
|
-
*
|
|
89
|
-
* @returns
|
|
65
|
+
* Update the overview with a single attribute entry.
|
|
66
|
+
* Called during item loading so we avoid a separate pass over all items.
|
|
90
67
|
*/
|
|
91
|
-
|
|
68
|
+
updateOverview(key, dataTypehint, value) {
|
|
92
69
|
var _a, _b, _c, _d;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
? overview[key].filter((o) => o.typeHint === dataTypehint)
|
|
112
|
-
: [];
|
|
113
|
-
if (overview[key] && existingEntries.length > 0) {
|
|
114
|
-
// update the existing entry
|
|
115
|
-
const entry = existingEntries[0];
|
|
116
|
-
// update the count
|
|
117
|
-
entry.count++;
|
|
118
|
-
// update the values
|
|
119
|
-
if (sdk_sdtf_primitives_1.SdtfPrimitiveTypeGuard.isStringType(dataTypehint)) {
|
|
120
|
-
if (!((_a = entry.values) === null || _a === void 0 ? void 0 : _a.includes(value))) {
|
|
121
|
-
(_b = entry.values) === null || _b === void 0 ? void 0 : _b.push(value);
|
|
122
|
-
(_c = entry.countForValue) === null || _c === void 0 ? void 0 : _c.push(1);
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
const index = (_d = entry.values) === null || _d === void 0 ? void 0 : _d.indexOf(value);
|
|
126
|
-
if (index !== undefined && index > -1)
|
|
127
|
-
entry.countForValue[index] += 1;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
// update the min and max
|
|
131
|
-
if (sdk_sdtf_primitives_1.SdtfPrimitiveTypeGuard.isNumberType(dataTypehint)) {
|
|
132
|
-
entry.min = Math.min(value, entry.min);
|
|
133
|
-
entry.max = Math.max(value, entry.max);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
else {
|
|
137
|
-
// create a new entry, if the name already exists, but the type does not
|
|
138
|
-
if (overview[key]) {
|
|
139
|
-
overview[key].push({
|
|
140
|
-
typeHint: dataTypehint,
|
|
141
|
-
count: 1,
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
// create completely new entry
|
|
145
|
-
else {
|
|
146
|
-
overview[key] = [
|
|
147
|
-
{
|
|
148
|
-
typeHint: dataTypehint,
|
|
149
|
-
count: 1,
|
|
150
|
-
},
|
|
151
|
-
];
|
|
152
|
-
}
|
|
153
|
-
// update the values
|
|
154
|
-
if (sdk_sdtf_primitives_1.SdtfPrimitiveTypeGuard.isStringType(dataTypehint)) {
|
|
155
|
-
overview[key][overview[key].length - 1].values = [
|
|
156
|
-
value,
|
|
157
|
-
];
|
|
158
|
-
overview[key][overview[key].length - 1].countForValue =
|
|
159
|
-
[1];
|
|
160
|
-
}
|
|
161
|
-
// update the min and max
|
|
162
|
-
if (sdk_sdtf_primitives_1.SdtfPrimitiveTypeGuard.isNumberType(dataTypehint)) {
|
|
163
|
-
overview[key][overview[key].length - 1].min = (value);
|
|
164
|
-
overview[key][overview[key].length - 1].max = (value);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
70
|
+
const overview = this._overview;
|
|
71
|
+
// check if the attribute is already in the overview
|
|
72
|
+
const existingEntries = overview[key]
|
|
73
|
+
? overview[key].filter((o) => o.typeHint === dataTypehint)
|
|
74
|
+
: [];
|
|
75
|
+
if (overview[key] && existingEntries.length > 0) {
|
|
76
|
+
// update the existing entry
|
|
77
|
+
const entry = existingEntries[0];
|
|
78
|
+
entry.count++;
|
|
79
|
+
if (sdk_sdtf_primitives_1.SdtfPrimitiveTypeGuard.isStringType(dataTypehint)) {
|
|
80
|
+
if (!((_a = entry.values) === null || _a === void 0 ? void 0 : _a.includes(value))) {
|
|
81
|
+
(_b = entry.values) === null || _b === void 0 ? void 0 : _b.push(value);
|
|
82
|
+
(_c = entry.countForValue) === null || _c === void 0 ? void 0 : _c.push(1);
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
const index = (_d = entry.values) === null || _d === void 0 ? void 0 : _d.indexOf(value);
|
|
86
|
+
if (index !== undefined && index > -1)
|
|
87
|
+
entry.countForValue[index] += 1;
|
|
167
88
|
}
|
|
168
89
|
}
|
|
169
|
-
|
|
170
|
-
|
|
90
|
+
if (sdk_sdtf_primitives_1.SdtfPrimitiveTypeGuard.isNumberType(dataTypehint)) {
|
|
91
|
+
entry.min = Math.min(value, entry.min);
|
|
92
|
+
entry.max = Math.max(value, entry.max);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
if (overview[key]) {
|
|
97
|
+
overview[key].push({
|
|
98
|
+
typeHint: dataTypehint,
|
|
99
|
+
count: 1,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
overview[key] = [
|
|
104
|
+
{
|
|
105
|
+
typeHint: dataTypehint,
|
|
106
|
+
count: 1,
|
|
107
|
+
},
|
|
108
|
+
];
|
|
109
|
+
}
|
|
110
|
+
const newEntry = overview[key][overview[key].length - 1];
|
|
111
|
+
if (sdk_sdtf_primitives_1.SdtfPrimitiveTypeGuard.isStringType(dataTypehint)) {
|
|
112
|
+
newEntry.values = [value];
|
|
113
|
+
newEntry.countForValue = [1];
|
|
114
|
+
}
|
|
115
|
+
if (sdk_sdtf_primitives_1.SdtfPrimitiveTypeGuard.isNumberType(dataTypehint)) {
|
|
116
|
+
newEntry.min = value;
|
|
117
|
+
newEntry.max = value;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
171
120
|
}
|
|
172
121
|
/**
|
|
173
122
|
* Load the attributes into a SDTFAttributesData data item.
|
|
@@ -176,31 +125,45 @@ class SDTFEngine {
|
|
|
176
125
|
* @returns
|
|
177
126
|
*/
|
|
178
127
|
loadAttributes(attributes) {
|
|
179
|
-
var _a
|
|
128
|
+
var _a;
|
|
180
129
|
return __awaiter(this, void 0, void 0, function* () {
|
|
181
|
-
const data = new
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
130
|
+
const data = new viewer_shared_node_tree_1.SDTFAttributesData();
|
|
131
|
+
const keys = Object.keys(attributes.entries);
|
|
132
|
+
// Separate keys into primitive (need content now) and non-primitive (lazy)
|
|
133
|
+
const primitiveKeys = [];
|
|
134
|
+
const lazyKeys = [];
|
|
135
|
+
for (const key of keys) {
|
|
136
|
+
const typeName = (_a = attributes.entries[key].typeHint) === null || _a === void 0 ? void 0 : _a.name;
|
|
137
|
+
if (sdk_sdtf_primitives_1.SdtfPrimitiveTypeGuard.isBooleanType(typeName) ||
|
|
138
|
+
sdk_sdtf_primitives_1.SdtfPrimitiveTypeGuard.isColorType(typeName) ||
|
|
139
|
+
sdk_sdtf_primitives_1.SdtfPrimitiveTypeGuard.isNumberType(typeName) ||
|
|
140
|
+
sdk_sdtf_primitives_1.SdtfPrimitiveTypeGuard.isStringType(typeName)) {
|
|
141
|
+
primitiveKeys.push(key);
|
|
193
142
|
}
|
|
194
143
|
else {
|
|
195
|
-
|
|
196
|
-
const typeHint = attributes.entries[key].typeHint === undefined
|
|
197
|
-
? "undefined"
|
|
198
|
-
: attributes.entries[key].typeHint.name;
|
|
199
|
-
data.attributes[key] = new viewer_shared_types_1.SDTFAttributeData(typeHint, () => __awaiter(this, void 0, void 0, function* () {
|
|
200
|
-
return yield attributes.entries[key].getContent();
|
|
201
|
-
}));
|
|
144
|
+
lazyKeys.push(key);
|
|
202
145
|
}
|
|
203
146
|
}
|
|
147
|
+
// Fetch all primitive attribute contents in parallel
|
|
148
|
+
const primitiveContents = yield Promise.all(primitiveKeys.map((key) => attributes.entries[key].getContent()));
|
|
149
|
+
for (let i = 0; i < primitiveKeys.length; i++) {
|
|
150
|
+
const key = primitiveKeys[i];
|
|
151
|
+
const typeHint = attributes.entries[key].typeHint === undefined
|
|
152
|
+
? "undefined"
|
|
153
|
+
: attributes.entries[key].typeHint.name;
|
|
154
|
+
data.attributes[key] = new viewer_shared_node_tree_1.SDTFAttributeData(typeHint, primitiveContents[i]);
|
|
155
|
+
// Update overview inline to avoid a second pass
|
|
156
|
+
this.updateOverview(key, typeHint, primitiveContents[i]);
|
|
157
|
+
}
|
|
158
|
+
// Non-primitive attributes stay lazy
|
|
159
|
+
for (const key of lazyKeys) {
|
|
160
|
+
const typeHint = attributes.entries[key].typeHint === undefined
|
|
161
|
+
? "undefined"
|
|
162
|
+
: attributes.entries[key].typeHint.name;
|
|
163
|
+
data.attributes[key] = new viewer_shared_node_tree_1.SDTFAttributeData(typeHint, () => __awaiter(this, void 0, void 0, function* () {
|
|
164
|
+
return yield attributes.entries[key].getContent();
|
|
165
|
+
}));
|
|
166
|
+
}
|
|
204
167
|
return data;
|
|
205
168
|
});
|
|
206
169
|
}
|
|
@@ -218,20 +181,19 @@ class SDTFEngine {
|
|
|
218
181
|
if (chunk.attributes !== undefined) {
|
|
219
182
|
chunkDef.data.push(yield this.loadAttributes(chunk.attributes));
|
|
220
183
|
}
|
|
221
|
-
//
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
}
|
|
184
|
+
// load items and nodes in parallel
|
|
185
|
+
const [items, nodes] = yield Promise.all([
|
|
186
|
+
chunk.items !== undefined && chunk.items.length > 0
|
|
187
|
+
? Promise.all(chunk.items.map((item, i) => this.loadItem(item, i)))
|
|
188
|
+
: [],
|
|
189
|
+
chunk.nodes !== undefined && chunk.nodes.length > 0
|
|
190
|
+
? Promise.all(chunk.nodes.map((n, i) => this.loadNode(n, i)))
|
|
191
|
+
: [],
|
|
192
|
+
]);
|
|
193
|
+
if (items.length > 0)
|
|
194
|
+
chunkDef.addChild(items);
|
|
195
|
+
if (nodes.length > 0)
|
|
196
|
+
chunkDef.addChild(nodes);
|
|
235
197
|
return chunkDef;
|
|
236
198
|
});
|
|
237
199
|
}
|
|
@@ -251,19 +213,16 @@ class SDTFEngine {
|
|
|
251
213
|
attributes = yield this.loadAttributes(item.attributes);
|
|
252
214
|
// create the typehint
|
|
253
215
|
const typeHint = item.typeHint === undefined ? "undefined" : item.typeHint.name;
|
|
254
|
-
|
|
255
|
-
// create the data and save it in the item node
|
|
256
|
-
if (sdk_sdtf_primitives_1.SdtfPrimitiveTypeGuard.isBooleanType(typeHint) ||
|
|
216
|
+
const isPrimitive = sdk_sdtf_primitives_1.SdtfPrimitiveTypeGuard.isBooleanType(typeHint) ||
|
|
257
217
|
sdk_sdtf_primitives_1.SdtfPrimitiveTypeGuard.isColorType(typeHint) ||
|
|
258
218
|
sdk_sdtf_primitives_1.SdtfPrimitiveTypeGuard.isNumberType(typeHint) ||
|
|
259
|
-
sdk_sdtf_primitives_1.SdtfPrimitiveTypeGuard.isStringType(typeHint)
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
219
|
+
sdk_sdtf_primitives_1.SdtfPrimitiveTypeGuard.isStringType(typeHint);
|
|
220
|
+
// For primitive items, fetch content in parallel with attributes (already done above)
|
|
221
|
+
const itemData = isPrimitive
|
|
222
|
+
? new viewer_shared_node_tree_1.SDTFItemData(typeHint, yield item.getContent(), attributes === null || attributes === void 0 ? void 0 : attributes.attributes)
|
|
223
|
+
: new viewer_shared_node_tree_1.SDTFItemData(typeHint, () => __awaiter(this, void 0, void 0, function* () {
|
|
264
224
|
return yield item.getContent();
|
|
265
225
|
}), attributes === null || attributes === void 0 ? void 0 : attributes.attributes);
|
|
266
|
-
}
|
|
267
226
|
itemDef.data.push(itemData);
|
|
268
227
|
return itemDef;
|
|
269
228
|
});
|
|
@@ -282,20 +241,19 @@ class SDTFEngine {
|
|
|
282
241
|
if (node.attributes !== undefined) {
|
|
283
242
|
nodeDef.data.push(yield this.loadAttributes(node.attributes));
|
|
284
243
|
}
|
|
285
|
-
//
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
}
|
|
244
|
+
// load items and nodes in parallel
|
|
245
|
+
const [items, nodes] = yield Promise.all([
|
|
246
|
+
node.items !== undefined && node.items.length > 0
|
|
247
|
+
? Promise.all(node.items.map((item, i) => this.loadItem(item, i)))
|
|
248
|
+
: [],
|
|
249
|
+
node.nodes !== undefined && node.nodes.length > 0
|
|
250
|
+
? Promise.all(node.nodes.map((n, i) => this.loadNode(n, i)))
|
|
251
|
+
: [],
|
|
252
|
+
]);
|
|
253
|
+
if (items.length > 0)
|
|
254
|
+
nodeDef.addChild(items);
|
|
255
|
+
if (nodes.length > 0)
|
|
256
|
+
nodeDef.addChild(nodes);
|
|
299
257
|
return nodeDef;
|
|
300
258
|
});
|
|
301
259
|
}
|
package/dist/SDTFEngine.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDTFEngine.js","sourceRoot":"","sources":["../src/SDTFEngine.ts"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AG,MAAM,OAAO,CAAC,GAAG,CAAC;gBACxC,IAAI,CAAC,KAAK,KAAK,SAAS,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC;oBAChD,CAAC,CAAC,OAAO,CAAC,GAAG,CACX,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CACnD;oBACF,CAAC,CAAC,EAAE;gBACL,IAAI,CAAC,KAAK,KAAK,SAAS,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC;oBAChD,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;oBAC5D,CAAC,CAAC,EAAE;aACL,CAAC,CAAC;YAEH,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;gBAAE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YAC9C,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;gBAAE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YAE9C,OAAO,OAAO,CAAC;QAChB,CAAC;KAAA;CAGD;AA9TD,gCA8TC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shapediver/viewer.data-engine.sdtf-engine",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.16.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "Michael Oppitz <michael@shapediver.com>",
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@shapediver/sdk.geometry-api-sdk-v2": "3.1.0",
|
|
42
42
|
"@shapediver/sdk.sdtf-v1": "1.7.0",
|
|
43
|
-
"@shapediver/viewer.data-engine.shared-types": "3.
|
|
44
|
-
"@shapediver/viewer.shared.build-data": "3.
|
|
45
|
-
"@shapediver/viewer.shared.node-tree": "3.
|
|
46
|
-
"@shapediver/viewer.shared.services": "3.
|
|
47
|
-
"@shapediver/viewer.shared.types": "3.
|
|
43
|
+
"@shapediver/viewer.data-engine.shared-types": "3.16.0",
|
|
44
|
+
"@shapediver/viewer.shared.build-data": "3.16.0",
|
|
45
|
+
"@shapediver/viewer.shared.node-tree": "3.16.0",
|
|
46
|
+
"@shapediver/viewer.shared.services": "3.16.0",
|
|
47
|
+
"@shapediver/viewer.shared.types": "3.16.0",
|
|
48
48
|
"gl-matrix": "3.3.0"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "51ec55e0309ab4a08dbd40ead42024e5a03783c2"
|
|
51
51
|
}
|