@configura/babylon-view 2.1.0-alpha.3 → 2.1.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.
|
@@ -108,6 +108,7 @@ export class CfgStretchData {
|
|
|
108
108
|
this.getAlongness = (p) => calculateAlongness(p, this.sp, this.spToEpLength, this.normalNormalized);
|
|
109
109
|
}
|
|
110
110
|
static make(logger, symNode, detailLevel) {
|
|
111
|
+
var _a;
|
|
111
112
|
const symMeasure = symNode.getMeasure();
|
|
112
113
|
if (symMeasure === undefined) {
|
|
113
114
|
throw new Error("No symMeasure found");
|
|
@@ -149,11 +150,7 @@ export class CfgStretchData {
|
|
|
149
150
|
if (name.startsWith("divider")) {
|
|
150
151
|
const nodeChildren = node.children(logger, true, true);
|
|
151
152
|
for (const [subLevelNodeName, subNode] of nodeChildren) {
|
|
152
|
-
const
|
|
153
|
-
if (trans === undefined) {
|
|
154
|
-
continue;
|
|
155
|
-
}
|
|
156
|
-
const pos = trans.pos;
|
|
153
|
+
const pos = (_a = subNode.symTransform()) === null || _a === void 0 ? void 0 : _a.pos;
|
|
157
154
|
if (pos === undefined) {
|
|
158
155
|
continue;
|
|
159
156
|
}
|
|
@@ -184,7 +184,17 @@ export class CfgSymRootNode extends CfgSymNode {
|
|
|
184
184
|
if (!childNode.isStretch(logger, detailLevel)) {
|
|
185
185
|
continue;
|
|
186
186
|
}
|
|
187
|
-
|
|
187
|
+
let stretchData;
|
|
188
|
+
try {
|
|
189
|
+
stretchData = CfgStretchData.make(logger, childNode, detailLevel);
|
|
190
|
+
}
|
|
191
|
+
catch (e) {
|
|
192
|
+
const file = this._identifier.split("/").pop();
|
|
193
|
+
const error = new Error(`Invalid stretch data in model (${file}): ${e.message}`);
|
|
194
|
+
logger.errorAsObject(error);
|
|
195
|
+
this._stretchDatas = []; // No use to try again
|
|
196
|
+
throw error;
|
|
197
|
+
}
|
|
188
198
|
if (stretchData === undefined) {
|
|
189
199
|
continue;
|
|
190
200
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@configura/babylon-view",
|
|
3
|
-
"version": "2.1.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@babylonjs/core": "4.2.0",
|
|
19
|
-
"@configura/web-core": "2.1.0
|
|
20
|
-
"@configura/web-utilities": "2.1.0
|
|
19
|
+
"@configura/web-core": "2.1.0",
|
|
20
|
+
"@configura/web-utilities": "2.1.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@configura/web-api": "2.1.0
|
|
23
|
+
"@configura/web-api": "2.1.0",
|
|
24
24
|
"del-cli": "^3.0.0",
|
|
25
25
|
"typescript": "4.2"
|
|
26
26
|
},
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "caedf95f12d9b911f239c7a976242d166fb33a7c"
|
|
31
31
|
}
|