landxml 0.6.2 → 0.6.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # landxml
2
2
 
3
+ ## 0.6.3
4
+
5
+ ### Patch Changes
6
+
7
+ - e25e54b: bugfix: Parsing large LandXMLs now correctly parses on web workers
8
+
3
9
  ## 0.6.2
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -255,7 +255,7 @@ var parseXML = (xmlString) => __async(void 0, null, function* () {
255
255
  });
256
256
  }
257
257
  if (Faces.length > 1e4) {
258
- const sliceIndexes = [...Array(20).keys()].map((i) => Math.round(Faces.length / 20 * i));
258
+ const sliceIndexes = [...Array(20).keys()].map((i) => Math.round((faces.length - 1) / 20 * i));
259
259
  faceNeighbors = (yield Promise.all(
260
260
  sliceIndexes.map(
261
261
  (v, i, a) => new Promise((resolve3, reject3) => __async(void 0, null, function* () {
@@ -277,7 +277,7 @@ var parseXML = (xmlString) => __async(void 0, null, function* () {
277
277
  faces,
278
278
  range: {
279
279
  start: 0,
280
- end: faces.length
280
+ end: faces.length - 1
281
281
  }
282
282
  });
283
283
  }
package/dist/index.mjs CHANGED
@@ -220,7 +220,7 @@ var parseXML = (xmlString) => __async(void 0, null, function* () {
220
220
  });
221
221
  }
222
222
  if (Faces.length > 1e4) {
223
- const sliceIndexes = [...Array(20).keys()].map((i) => Math.round(Faces.length / 20 * i));
223
+ const sliceIndexes = [...Array(20).keys()].map((i) => Math.round((faces.length - 1) / 20 * i));
224
224
  faceNeighbors = (yield Promise.all(
225
225
  sliceIndexes.map(
226
226
  (v, i, a) => new Promise((resolve3, reject3) => __async(void 0, null, function* () {
@@ -242,7 +242,7 @@ var parseXML = (xmlString) => __async(void 0, null, function* () {
242
242
  faces,
243
243
  range: {
244
244
  start: 0,
245
- end: faces.length
245
+ end: faces.length - 1
246
246
  }
247
247
  });
248
248
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "landxml",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "Parse LandXML surfaces on the modern web.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",