@loaders.gl/tile-converter 3.3.0-alpha.1 → 3.3.0-alpha.2

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.
Files changed (67) hide show
  1. package/dist/3d-tiles-attributes-worker.js +3 -3
  2. package/dist/3d-tiles-attributes-worker.js.map +1 -1
  3. package/dist/converter.min.js +10 -10
  4. package/dist/dist.min.js +791 -554
  5. package/dist/es5/3d-tiles-attributes-worker.js +1 -1
  6. package/dist/es5/i3s-attributes-worker.js +1 -1
  7. package/dist/es5/i3s-converter/helpers/batch-ids-extensions.js +15 -4
  8. package/dist/es5/i3s-converter/helpers/batch-ids-extensions.js.map +1 -1
  9. package/dist/es5/i3s-converter/helpers/feature-attributes.js +60 -0
  10. package/dist/es5/i3s-converter/helpers/feature-attributes.js.map +1 -0
  11. package/dist/es5/i3s-converter/helpers/geometry-attributes.js +39 -7
  12. package/dist/es5/i3s-converter/helpers/geometry-attributes.js.map +1 -1
  13. package/dist/es5/i3s-converter/helpers/geometry-converter.js +161 -49
  14. package/dist/es5/i3s-converter/helpers/geometry-converter.js.map +1 -1
  15. package/dist/es5/i3s-converter/helpers/node-pages.js +102 -46
  16. package/dist/es5/i3s-converter/helpers/node-pages.js.map +1 -1
  17. package/dist/es5/i3s-converter/i3s-converter.js +235 -141
  18. package/dist/es5/i3s-converter/i3s-converter.js.map +1 -1
  19. package/dist/es5/lib/utils/write-queue.js +66 -28
  20. package/dist/es5/lib/utils/write-queue.js.map +1 -1
  21. package/dist/es5/pgm-loader.js +1 -1
  22. package/dist/esm/3d-tiles-attributes-worker.js +1 -1
  23. package/dist/esm/i3s-attributes-worker.js +1 -1
  24. package/dist/esm/i3s-converter/helpers/batch-ids-extensions.js +15 -4
  25. package/dist/esm/i3s-converter/helpers/batch-ids-extensions.js.map +1 -1
  26. package/dist/esm/i3s-converter/helpers/feature-attributes.js +34 -0
  27. package/dist/esm/i3s-converter/helpers/feature-attributes.js.map +1 -0
  28. package/dist/esm/i3s-converter/helpers/geometry-attributes.js +23 -7
  29. package/dist/esm/i3s-converter/helpers/geometry-attributes.js.map +1 -1
  30. package/dist/esm/i3s-converter/helpers/geometry-converter.js +132 -30
  31. package/dist/esm/i3s-converter/helpers/geometry-converter.js.map +1 -1
  32. package/dist/esm/i3s-converter/helpers/node-pages.js +3 -3
  33. package/dist/esm/i3s-converter/helpers/node-pages.js.map +1 -1
  34. package/dist/esm/i3s-converter/i3s-converter.js +32 -42
  35. package/dist/esm/i3s-converter/i3s-converter.js.map +1 -1
  36. package/dist/esm/lib/utils/write-queue.js +10 -0
  37. package/dist/esm/lib/utils/write-queue.js.map +1 -1
  38. package/dist/esm/pgm-loader.js +1 -1
  39. package/dist/i3s-attributes-worker.js +3 -3
  40. package/dist/i3s-attributes-worker.js.map +2 -2
  41. package/dist/i3s-converter/helpers/batch-ids-extensions.d.ts.map +1 -1
  42. package/dist/i3s-converter/helpers/batch-ids-extensions.js +12 -1
  43. package/dist/i3s-converter/helpers/feature-attributes.d.ts +24 -0
  44. package/dist/i3s-converter/helpers/feature-attributes.d.ts.map +1 -0
  45. package/dist/i3s-converter/helpers/feature-attributes.js +55 -0
  46. package/dist/i3s-converter/helpers/geometry-attributes.js +26 -7
  47. package/dist/i3s-converter/helpers/geometry-converter.d.ts +9 -2
  48. package/dist/i3s-converter/helpers/geometry-converter.d.ts.map +1 -1
  49. package/dist/i3s-converter/helpers/geometry-converter.js +124 -33
  50. package/dist/i3s-converter/helpers/node-pages.js +3 -3
  51. package/dist/i3s-converter/i3s-converter.d.ts +7 -14
  52. package/dist/i3s-converter/i3s-converter.d.ts.map +1 -1
  53. package/dist/i3s-converter/i3s-converter.js +56 -50
  54. package/dist/i3s-converter/types.d.ts +0 -48
  55. package/dist/i3s-converter/types.d.ts.map +1 -1
  56. package/dist/lib/utils/write-queue.d.ts +1 -0
  57. package/dist/lib/utils/write-queue.d.ts.map +1 -1
  58. package/dist/lib/utils/write-queue.js +13 -0
  59. package/package.json +15 -15
  60. package/src/i3s-converter/helpers/batch-ids-extensions.ts +22 -5
  61. package/src/i3s-converter/helpers/feature-attributes.ts +65 -0
  62. package/src/i3s-converter/helpers/geometry-attributes.ts +30 -7
  63. package/src/i3s-converter/helpers/geometry-converter.ts +161 -37
  64. package/src/i3s-converter/helpers/node-pages.ts +3 -3
  65. package/src/i3s-converter/i3s-converter.ts +41 -51
  66. package/src/i3s-converter/types.ts +0 -51
  67. package/src/lib/utils/write-queue.ts +12 -0
@@ -2,6 +2,8 @@
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
 
5
+ var _typeof3 = require("@babel/runtime/helpers/typeof");
6
+
5
7
  Object.defineProperty(exports, "__esModule", {
6
8
  value: true
7
9
  });
@@ -47,7 +49,7 @@ var _compressUtil = require("../lib/utils/compress-util");
47
49
 
48
50
  var _statisticUtills = require("../lib/utils/statistic-utills");
49
51
 
50
- var _geometryConverter = _interopRequireDefault(require("./helpers/geometry-converter"));
52
+ var _geometryConverter = _interopRequireWildcard(require("./helpers/geometry-converter"));
51
53
 
52
54
  var _coordinateConverter = require("./helpers/coordinate-converter");
53
55
 
@@ -81,6 +83,10 @@ var _constants = require("../constants");
81
83
 
82
84
  var _process$env;
83
85
 
86
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
87
+
88
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
89
+
84
90
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
85
91
 
86
92
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -405,7 +411,7 @@ var I3SConverter = function () {
405
411
 
406
412
  case 2:
407
413
  if (!this.isContentSupported(sourceRootTile)) {
408
- _context3.next = 14;
414
+ _context3.next = 20;
409
415
  break;
410
416
  }
411
417
 
@@ -423,22 +429,33 @@ var I3SConverter = function () {
423
429
  child = _yield$this$_createNo2[0];
424
430
  childPath = (0, _path.join)(this.layers0Path, 'nodes', child.path);
425
431
 
426
- if (this.options.slpk) {
427
- this.writeQueue.enqueue({
428
- archiveKey: 'nodes/1/3dNodeIndexDocument.json.gz',
429
- writePromise: (0, _fileUtils.writeFileForSlpk)(childPath, JSON.stringify(child), '3dNodeIndexDocument.json')
430
- });
431
- } else {
432
- this.writeQueue.enqueue({
433
- writePromise: (0, _fileUtils.writeFile)(childPath, JSON.stringify(child))
434
- });
432
+ if (!this.options.slpk) {
433
+ _context3.next = 16;
434
+ break;
435
435
  }
436
436
 
437
- _context3.next = 16;
438
- break;
437
+ _context3.next = 14;
438
+ return this.writeQueue.enqueue({
439
+ archiveKey: 'nodes/1/3dNodeIndexDocument.json.gz',
440
+ writePromise: (0, _fileUtils.writeFileForSlpk)(childPath, JSON.stringify(child), '3dNodeIndexDocument.json')
441
+ });
439
442
 
440
443
  case 14:
441
- _context3.next = 16;
444
+ _context3.next = 18;
445
+ break;
446
+
447
+ case 16:
448
+ _context3.next = 18;
449
+ return this.writeQueue.enqueue({
450
+ writePromise: (0, _fileUtils.writeFile)(childPath, JSON.stringify(child))
451
+ });
452
+
453
+ case 18:
454
+ _context3.next = 22;
455
+ break;
456
+
457
+ case 20:
458
+ _context3.next = 22;
442
459
  return this._addChildrenWithNeighborsAndWriteFile({
443
460
  parentNode: root0,
444
461
  sourceTiles: sourceRootTile.children,
@@ -446,11 +463,11 @@ var I3SConverter = function () {
446
463
  level: 1
447
464
  });
448
465
 
449
- case 16:
450
- _context3.next = 18;
466
+ case 22:
467
+ _context3.next = 24;
451
468
  return sourceRootTile.unloadContent();
452
469
 
453
- case 18:
470
+ case 24:
454
471
  case "end":
455
472
  return _context3.stop();
456
473
  }
@@ -472,18 +489,28 @@ var I3SConverter = function () {
472
489
  while (1) {
473
490
  switch (_context4.prev = _context4.next) {
474
491
  case 0:
475
- if (this.options.slpk) {
476
- this.writeQueue.enqueue({
477
- archiveKey: '3dSceneLayer.json.gz',
478
- writePromise: (0, _fileUtils.writeFileForSlpk)(this.layers0Path, JSON.stringify(this.layers0), '3dSceneLayer.json')
479
- });
480
- } else {
481
- this.writeQueue.enqueue({
482
- writePromise: (0, _fileUtils.writeFile)(this.layers0Path, JSON.stringify(this.layers0))
483
- });
492
+ if (!this.options.slpk) {
493
+ _context4.next = 5;
494
+ break;
484
495
  }
485
496
 
486
- case 1:
497
+ _context4.next = 3;
498
+ return this.writeQueue.enqueue({
499
+ archiveKey: '3dSceneLayer.json.gz',
500
+ writePromise: (0, _fileUtils.writeFileForSlpk)(this.layers0Path, JSON.stringify(this.layers0), '3dSceneLayer.json')
501
+ });
502
+
503
+ case 3:
504
+ _context4.next = 7;
505
+ break;
506
+
507
+ case 5:
508
+ _context4.next = 7;
509
+ return this.writeQueue.enqueue({
510
+ writePromise: (0, _fileUtils.writeFile)(this.layers0Path, JSON.stringify(this.layers0))
511
+ });
512
+
513
+ case 7:
487
514
  case "end":
488
515
  return _context4.stop();
489
516
  }
@@ -505,18 +532,28 @@ var I3SConverter = function () {
505
532
  while (1) {
506
533
  switch (_context5.prev = _context5.next) {
507
534
  case 0:
508
- if (this.options.slpk) {
509
- this.writeQueue.enqueue({
510
- archiveKey: "nodes/".concat(nodePath, "/3dNodeIndexDocument.json.gz"),
511
- writePromise: (0, _fileUtils.writeFileForSlpk)(rootPath, JSON.stringify(root0), '3dNodeIndexDocument.json')
512
- });
513
- } else {
514
- this.writeQueue.enqueue({
515
- writePromise: (0, _fileUtils.writeFile)(rootPath, JSON.stringify(root0))
516
- });
535
+ if (!this.options.slpk) {
536
+ _context5.next = 5;
537
+ break;
517
538
  }
518
539
 
519
- case 1:
540
+ _context5.next = 3;
541
+ return this.writeQueue.enqueue({
542
+ archiveKey: "nodes/".concat(nodePath, "/3dNodeIndexDocument.json.gz"),
543
+ writePromise: (0, _fileUtils.writeFileForSlpk)(rootPath, JSON.stringify(root0), '3dNodeIndexDocument.json')
544
+ });
545
+
546
+ case 3:
547
+ _context5.next = 7;
548
+ break;
549
+
550
+ case 5:
551
+ _context5.next = 7;
552
+ return this.writeQueue.enqueue({
553
+ writePromise: (0, _fileUtils.writeFile)(rootPath, JSON.stringify(root0))
554
+ });
555
+
556
+ case 7:
520
557
  case "end":
521
558
  return _context5.stop();
522
559
  }
@@ -865,9 +902,9 @@ var I3SConverter = function () {
865
902
  key: "_createNode",
866
903
  value: function () {
867
904
  var _createNode2 = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee10(parentTile, sourceTile, parentId, level) {
868
- var _sourceTile$content;
905
+ var _this$layers, _this$layers$attribut;
869
906
 
870
- var boundingVolumes, batchTable, resourcesData, nodes, nodesInPage, emptyResources, _iterator5, _step5, resources, lodSelection, maxScreenThresholdSQ, nodeInPage, node, _console;
907
+ var boundingVolumes, propertyTable, resourcesData, nodes, nodesInPage, emptyResources, _iterator5, _step5, resources, lodSelection, maxScreenThresholdSQ, nodeInPage, node, _console;
871
908
 
872
909
  return _regenerator.default.wrap(function _callee10$(_context10) {
873
910
  while (1) {
@@ -886,14 +923,14 @@ var I3SConverter = function () {
886
923
 
887
924
  case 5:
888
925
  boundingVolumes = (0, _coordinateConverter.createBoundingVolumes)(sourceTile, this.geoidHeightModel);
889
- batchTable = sourceTile === null || sourceTile === void 0 ? void 0 : (_sourceTile$content = sourceTile.content) === null || _sourceTile$content === void 0 ? void 0 : _sourceTile$content.batchTableJson;
926
+ propertyTable = (0, _geometryConverter.getPropertyTable)(sourceTile);
890
927
 
891
- if (batchTable) {
892
- this._convertAttributeStorageInfo(sourceTile.content);
928
+ if (propertyTable && !((_this$layers = this.layers0) !== null && _this$layers !== void 0 && (_this$layers$attribut = _this$layers.attributeStorageInfo) !== null && _this$layers$attribut !== void 0 && _this$layers$attribut.length)) {
929
+ this._convertPropertyTableToNodeAttributes(propertyTable);
893
930
  }
894
931
 
895
932
  _context10.next = 10;
896
- return this._convertResources(sourceTile);
933
+ return this._convertResources(sourceTile, propertyTable);
897
934
 
898
935
  case 10:
899
936
  resourcesData = _context10.sent;
@@ -1005,21 +1042,10 @@ var I3SConverter = function () {
1005
1042
 
1006
1043
  return _createNode;
1007
1044
  }()
1008
- }, {
1009
- key: "_convertAttributeStorageInfo",
1010
- value: function _convertAttributeStorageInfo(sourceTileContent) {
1011
- var _this$layers, _this$layers$attribut;
1012
-
1013
- var batchTable = sourceTileContent && sourceTileContent.batchTableJson;
1014
-
1015
- if (batchTable && !((_this$layers = this.layers0) !== null && _this$layers !== void 0 && (_this$layers$attribut = _this$layers.attributeStorageInfo) !== null && _this$layers$attribut !== void 0 && _this$layers$attribut.length)) {
1016
- this._convertBatchTableInfoToNodeAttributes(batchTable);
1017
- }
1018
- }
1019
1045
  }, {
1020
1046
  key: "_convertResources",
1021
1047
  value: function () {
1022
- var _convertResources2 = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee11(sourceTile) {
1048
+ var _convertResources2 = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee11(sourceTile, propertyTable) {
1023
1049
  var _this$layers2;
1024
1050
 
1025
1051
  var resourcesData;
@@ -1036,7 +1062,7 @@ var I3SConverter = function () {
1036
1062
 
1037
1063
  case 2:
1038
1064
  _context11.next = 4;
1039
- return (0, _geometryConverter.default)(sourceTile.content, Number(this.nodePages.nodesCounter), this.featuresHashArray, (_this$layers2 = this.layers0) === null || _this$layers2 === void 0 ? void 0 : _this$layers2.attributeStorageInfo, this.options.draco, this.generateBoundingVolumes, this.geoidHeightModel, this.workerSource);
1065
+ return (0, _geometryConverter.default)(sourceTile.content, Number(this.nodePages.nodesCounter), propertyTable, this.featuresHashArray, (_this$layers2 = this.layers0) === null || _this$layers2 === void 0 ? void 0 : _this$layers2.attributeStorageInfo, this.options.draco, this.generateBoundingVolumes, this.geoidHeightModel, this.workerSource);
1040
1066
 
1041
1067
  case 4:
1042
1068
  resourcesData = _context11.sent;
@@ -1050,7 +1076,7 @@ var I3SConverter = function () {
1050
1076
  }, _callee11, this);
1051
1077
  }));
1052
1078
 
1053
- function _convertResources(_x20) {
1079
+ function _convertResources(_x20, _x21) {
1054
1080
  return _convertResources2.apply(this, arguments);
1055
1081
  }
1056
1082
 
@@ -1203,7 +1229,7 @@ var I3SConverter = function () {
1203
1229
  }, _callee12, this);
1204
1230
  }));
1205
1231
 
1206
- function _writeResources(_x21, _x22) {
1232
+ function _writeResources(_x22, _x23) {
1207
1233
  return _writeResources2.apply(this, arguments);
1208
1234
  }
1209
1235
 
@@ -1218,35 +1244,59 @@ var I3SConverter = function () {
1218
1244
  while (1) {
1219
1245
  switch (_context13.prev = _context13.next) {
1220
1246
  case 0:
1221
- if (this.options.slpk) {
1222
- slpkGeometryPath = (0, _path.join)(childPath, 'geometries');
1223
- this.writeQueue.enqueue({
1224
- archiveKey: "".concat(slpkChildPath, "/geometries/0.bin.gz"),
1225
- writePromise: (0, _fileUtils.writeFileForSlpk)(slpkGeometryPath, geometryBuffer, '0.bin')
1226
- });
1227
- } else {
1228
- geometryPath = (0, _path.join)(childPath, 'geometries/0/');
1229
- this.writeQueue.enqueue({
1230
- writePromise: (0, _fileUtils.writeFile)(geometryPath, geometryBuffer, 'index.bin')
1231
- });
1247
+ if (!this.options.slpk) {
1248
+ _context13.next = 6;
1249
+ break;
1232
1250
  }
1233
1251
 
1234
- if (this.options.draco) {
1235
- if (this.options.slpk) {
1236
- slpkCompressedGeometryPath = (0, _path.join)(childPath, 'geometries');
1237
- this.writeQueue.enqueue({
1238
- archiveKey: "".concat(slpkChildPath, "/geometries/1.bin.gz"),
1239
- writePromise: (0, _fileUtils.writeFileForSlpk)(slpkCompressedGeometryPath, compressedGeometry, '1.bin')
1240
- });
1241
- } else {
1242
- compressedGeometryPath = (0, _path.join)(childPath, 'geometries/1/');
1243
- this.writeQueue.enqueue({
1244
- writePromise: (0, _fileUtils.writeFile)(compressedGeometryPath, compressedGeometry, 'index.bin')
1245
- });
1246
- }
1252
+ slpkGeometryPath = (0, _path.join)(childPath, 'geometries');
1253
+ _context13.next = 4;
1254
+ return this.writeQueue.enqueue({
1255
+ archiveKey: "".concat(slpkChildPath, "/geometries/0.bin.gz"),
1256
+ writePromise: (0, _fileUtils.writeFileForSlpk)(slpkGeometryPath, geometryBuffer, '0.bin')
1257
+ });
1258
+
1259
+ case 4:
1260
+ _context13.next = 9;
1261
+ break;
1262
+
1263
+ case 6:
1264
+ geometryPath = (0, _path.join)(childPath, 'geometries/0/');
1265
+ _context13.next = 9;
1266
+ return this.writeQueue.enqueue({
1267
+ writePromise: (0, _fileUtils.writeFile)(geometryPath, geometryBuffer, 'index.bin')
1268
+ });
1269
+
1270
+ case 9:
1271
+ if (!this.options.draco) {
1272
+ _context13.next = 19;
1273
+ break;
1247
1274
  }
1248
1275
 
1249
- case 2:
1276
+ if (!this.options.slpk) {
1277
+ _context13.next = 16;
1278
+ break;
1279
+ }
1280
+
1281
+ slpkCompressedGeometryPath = (0, _path.join)(childPath, 'geometries');
1282
+ _context13.next = 14;
1283
+ return this.writeQueue.enqueue({
1284
+ archiveKey: "".concat(slpkChildPath, "/geometries/1.bin.gz"),
1285
+ writePromise: (0, _fileUtils.writeFileForSlpk)(slpkCompressedGeometryPath, compressedGeometry, '1.bin')
1286
+ });
1287
+
1288
+ case 14:
1289
+ _context13.next = 19;
1290
+ break;
1291
+
1292
+ case 16:
1293
+ compressedGeometryPath = (0, _path.join)(childPath, 'geometries/1/');
1294
+ _context13.next = 19;
1295
+ return this.writeQueue.enqueue({
1296
+ writePromise: (0, _fileUtils.writeFile)(compressedGeometryPath, compressedGeometry, 'index.bin')
1297
+ });
1298
+
1299
+ case 19:
1250
1300
  case "end":
1251
1301
  return _context13.stop();
1252
1302
  }
@@ -1254,7 +1304,7 @@ var I3SConverter = function () {
1254
1304
  }, _callee13, this);
1255
1305
  }));
1256
1306
 
1257
- function _writeGeometries(_x23, _x24, _x25, _x26) {
1307
+ function _writeGeometries(_x24, _x25, _x26, _x27) {
1258
1308
  return _writeGeometries2.apply(this, arguments);
1259
1309
  }
1260
1310
 
@@ -1281,20 +1331,30 @@ var I3SConverter = function () {
1281
1331
  sharedData = (0, _jsonMapTransform.default)(sharedResources, (0, _sharedResources.SHARED_RESOURCES)());
1282
1332
  sharedDataStr = JSON.stringify(sharedData);
1283
1333
 
1284
- if (this.options.slpk) {
1285
- slpkSharedPath = (0, _path.join)(childPath, 'shared');
1286
- this.writeQueue.enqueue({
1287
- archiveKey: "".concat(slpkChildPath, "/shared/sharedResource.json.gz"),
1288
- writePromise: (0, _fileUtils.writeFileForSlpk)(slpkSharedPath, sharedDataStr, 'sharedResource.json')
1289
- });
1290
- } else {
1291
- sharedPath = (0, _path.join)(childPath, 'shared/');
1292
- this.writeQueue.enqueue({
1293
- writePromise: (0, _fileUtils.writeFile)(sharedPath, sharedDataStr)
1294
- });
1334
+ if (!this.options.slpk) {
1335
+ _context14.next = 11;
1336
+ break;
1295
1337
  }
1296
1338
 
1297
- case 6:
1339
+ slpkSharedPath = (0, _path.join)(childPath, 'shared');
1340
+ _context14.next = 9;
1341
+ return this.writeQueue.enqueue({
1342
+ archiveKey: "".concat(slpkChildPath, "/shared/sharedResource.json.gz"),
1343
+ writePromise: (0, _fileUtils.writeFileForSlpk)(slpkSharedPath, sharedDataStr, 'sharedResource.json')
1344
+ });
1345
+
1346
+ case 9:
1347
+ _context14.next = 14;
1348
+ break;
1349
+
1350
+ case 11:
1351
+ sharedPath = (0, _path.join)(childPath, 'shared/');
1352
+ _context14.next = 14;
1353
+ return this.writeQueue.enqueue({
1354
+ writePromise: (0, _fileUtils.writeFile)(sharedPath, sharedDataStr)
1355
+ });
1356
+
1357
+ case 14:
1298
1358
  case "end":
1299
1359
  return _context14.stop();
1300
1360
  }
@@ -1302,7 +1362,7 @@ var I3SConverter = function () {
1302
1362
  }, _callee14, this);
1303
1363
  }));
1304
1364
 
1305
- function _writeShared(_x27, _x28, _x29, _x30) {
1365
+ function _writeShared(_x28, _x29, _x30, _x31) {
1306
1366
  return _writeShared2.apply(this, arguments);
1307
1367
  }
1308
1368
 
@@ -1399,7 +1459,7 @@ var I3SConverter = function () {
1399
1459
  }, _callee15, this);
1400
1460
  }));
1401
1461
 
1402
- function _writeTexture(_x31, _x32, _x33) {
1462
+ function _writeTexture(_x32, _x33, _x34) {
1403
1463
  return _writeTexture2.apply(this, arguments);
1404
1464
  }
1405
1465
 
@@ -1414,21 +1474,31 @@ var I3SConverter = function () {
1414
1474
  while (1) {
1415
1475
  switch (_context16.prev = _context16.next) {
1416
1476
  case 0:
1417
- if (this.options.slpk) {
1418
- slpkTexturePath = (0, _path.join)(childPath, 'textures');
1419
- compress = false;
1420
- this.writeQueue.enqueue({
1421
- archiveKey: "".concat(slpkChildPath, "/textures/").concat(name, ".").concat(format),
1422
- writePromise: (0, _fileUtils.writeFileForSlpk)(slpkTexturePath, textureData, "".concat(name, ".").concat(format), compress)
1423
- });
1424
- } else {
1425
- texturePath = (0, _path.join)(childPath, "textures/".concat(name, "/"));
1426
- this.writeQueue.enqueue({
1427
- writePromise: (0, _fileUtils.writeFile)(texturePath, textureData, "index.".concat(format))
1428
- });
1477
+ if (!this.options.slpk) {
1478
+ _context16.next = 7;
1479
+ break;
1429
1480
  }
1430
1481
 
1431
- case 1:
1482
+ slpkTexturePath = (0, _path.join)(childPath, 'textures');
1483
+ compress = false;
1484
+ _context16.next = 5;
1485
+ return this.writeQueue.enqueue({
1486
+ archiveKey: "".concat(slpkChildPath, "/textures/").concat(name, ".").concat(format),
1487
+ writePromise: (0, _fileUtils.writeFileForSlpk)(slpkTexturePath, textureData, "".concat(name, ".").concat(format), compress)
1488
+ });
1489
+
1490
+ case 5:
1491
+ _context16.next = 10;
1492
+ break;
1493
+
1494
+ case 7:
1495
+ texturePath = (0, _path.join)(childPath, "textures/".concat(name, "/"));
1496
+ _context16.next = 10;
1497
+ return this.writeQueue.enqueue({
1498
+ writePromise: (0, _fileUtils.writeFile)(texturePath, textureData, "index.".concat(format))
1499
+ });
1500
+
1501
+ case 10:
1432
1502
  case "end":
1433
1503
  return _context16.stop();
1434
1504
  }
@@ -1436,7 +1506,7 @@ var I3SConverter = function () {
1436
1506
  }, _callee16, this);
1437
1507
  }));
1438
1508
 
1439
- function writeTextureFile(_x34, _x35, _x36, _x37, _x38) {
1509
+ function writeTextureFile(_x35, _x36, _x37, _x38, _x39) {
1440
1510
  return _writeTextureFile.apply(this, arguments);
1441
1511
  }
1442
1512
 
@@ -1465,27 +1535,51 @@ var I3SConverter = function () {
1465
1535
  childPath = _args17.length > 1 ? _args17[1] : undefined;
1466
1536
  slpkChildPath = _args17.length > 2 ? _args17[2] : undefined;
1467
1537
 
1468
- if (attributes !== null && attributes !== void 0 && attributes.length && (_this$layers4 = this.layers0) !== null && _this$layers4 !== void 0 && (_this$layers4$attribu = _this$layers4.attributeStorageInfo) !== null && _this$layers4$attribu !== void 0 && _this$layers4$attribu.length) {
1469
- for (index = 0; index < attributes.length; index++) {
1470
- folderName = this.layers0.attributeStorageInfo[index].key;
1471
- fileBuffer = new Uint8Array(attributes[index]);
1472
-
1473
- if (this.options.slpk) {
1474
- slpkAttributesPath = (0, _path.join)(childPath, 'attributes', folderName);
1475
- this.writeQueue.enqueue({
1476
- archiveKey: "".concat(slpkChildPath, "/attributes/").concat(folderName, ".bin.gz"),
1477
- writePromise: (0, _fileUtils.writeFileForSlpk)(slpkAttributesPath, fileBuffer, '0.bin')
1478
- });
1479
- } else {
1480
- attributesPath = (0, _path.join)(childPath, "attributes/".concat(folderName, "/0"));
1481
- this.writeQueue.enqueue({
1482
- writePromise: (0, _fileUtils.writeFile)(attributesPath, fileBuffer, 'index.bin')
1483
- });
1484
- }
1485
- }
1538
+ if (!(attributes !== null && attributes !== void 0 && attributes.length && (_this$layers4 = this.layers0) !== null && _this$layers4 !== void 0 && (_this$layers4$attribu = _this$layers4.attributeStorageInfo) !== null && _this$layers4$attribu !== void 0 && _this$layers4$attribu.length)) {
1539
+ _context17.next = 20;
1540
+ break;
1486
1541
  }
1487
1542
 
1488
- case 4:
1543
+ index = 0;
1544
+
1545
+ case 5:
1546
+ if (!(index < attributes.length)) {
1547
+ _context17.next = 20;
1548
+ break;
1549
+ }
1550
+
1551
+ folderName = this.layers0.attributeStorageInfo[index].key;
1552
+ fileBuffer = new Uint8Array(attributes[index]);
1553
+
1554
+ if (!this.options.slpk) {
1555
+ _context17.next = 14;
1556
+ break;
1557
+ }
1558
+
1559
+ slpkAttributesPath = (0, _path.join)(childPath, 'attributes', folderName);
1560
+ _context17.next = 12;
1561
+ return this.writeQueue.enqueue({
1562
+ archiveKey: "".concat(slpkChildPath, "/attributes/").concat(folderName, ".bin.gz"),
1563
+ writePromise: (0, _fileUtils.writeFileForSlpk)(slpkAttributesPath, fileBuffer, '0.bin')
1564
+ });
1565
+
1566
+ case 12:
1567
+ _context17.next = 17;
1568
+ break;
1569
+
1570
+ case 14:
1571
+ attributesPath = (0, _path.join)(childPath, "attributes/".concat(folderName, "/0"));
1572
+ _context17.next = 17;
1573
+ return this.writeQueue.enqueue({
1574
+ writePromise: (0, _fileUtils.writeFile)(attributesPath, fileBuffer, 'index.bin')
1575
+ });
1576
+
1577
+ case 17:
1578
+ index++;
1579
+ _context17.next = 5;
1580
+ break;
1581
+
1582
+ case 20:
1489
1583
  case "end":
1490
1584
  return _context17.stop();
1491
1585
  }
@@ -1631,16 +1725,16 @@ var I3SConverter = function () {
1631
1725
  };
1632
1726
  }
1633
1727
  }, {
1634
- key: "_convertBatchTableInfoToNodeAttributes",
1635
- value: function _convertBatchTableInfoToNodeAttributes(batchTable) {
1728
+ key: "_convertPropertyTableToNodeAttributes",
1729
+ value: function _convertPropertyTableToNodeAttributes(propertyTable) {
1636
1730
  var attributeIndex = 0;
1637
1731
 
1638
- var batchTableWithObjectId = _objectSpread({
1732
+ var propertyTableWithObjectId = _objectSpread({
1639
1733
  OBJECTID: [0]
1640
- }, batchTable);
1734
+ }, propertyTable);
1641
1735
 
1642
- for (var _key in batchTableWithObjectId) {
1643
- var firstAttribute = batchTableWithObjectId[_key][0];
1736
+ for (var _key in propertyTableWithObjectId) {
1737
+ var firstAttribute = propertyTableWithObjectId[_key][0];
1644
1738
  var attributeType = this.getAttributeType(_key, firstAttribute);
1645
1739
 
1646
1740
  var storageAttribute = this._createdStorageAttribute(attributeIndex, _key, attributeType);
@@ -1649,7 +1743,7 @@ var I3SConverter = function () {
1649
1743
 
1650
1744
  var fieldAttribute = this._createFieldAttribute(_key, fieldAttributeType);
1651
1745
 
1652
- var popupInfo = this._createPopupInfo(batchTableWithObjectId);
1746
+ var popupInfo = this._createPopupInfo(propertyTableWithObjectId);
1653
1747
 
1654
1748
  this.layers0.attributeStorageInfo.push(storageAttribute);
1655
1749
  this.layers0.fields.push(fieldAttribute);
@@ -1680,14 +1774,14 @@ var I3SConverter = function () {
1680
1774
  }
1681
1775
  }, {
1682
1776
  key: "_createPopupInfo",
1683
- value: function _createPopupInfo(batchTable) {
1777
+ value: function _createPopupInfo(propertyTable) {
1684
1778
  var title = '{OBJECTID}';
1685
1779
  var mediaInfos = [];
1686
1780
  var fieldInfos = [];
1687
1781
  var popupElements = [];
1688
1782
  var expressionInfos = [];
1689
1783
 
1690
- for (var _key2 in batchTable) {
1784
+ for (var _key2 in propertyTable) {
1691
1785
  fieldInfos.push({
1692
1786
  fieldName: _key2,
1693
1787
  visible: true,
@@ -1743,7 +1837,7 @@ var I3SConverter = function () {
1743
1837
  }, _callee18, this);
1744
1838
  }));
1745
1839
 
1746
- function _finishConversion(_x39) {
1840
+ function _finishConversion(_x40) {
1747
1841
  return _finishConversion2.apply(this, arguments);
1748
1842
  }
1749
1843