@loaders.gl/i3s 4.0.0-alpha.14 → 4.0.0-alpha.16

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 (115) hide show
  1. package/dist/dist.min.js +329 -211
  2. package/dist/es5/arcgis-webscene-loader.js +1 -1
  3. package/dist/es5/i3s-attribute-loader.js +1 -1
  4. package/dist/es5/i3s-building-scene-layer-loader.js +1 -1
  5. package/dist/es5/i3s-content-loader.js +1 -1
  6. package/dist/es5/i3s-loader.js +1 -1
  7. package/dist/es5/i3s-node-page-loader.js +1 -1
  8. package/dist/es5/i3s-slpk-loader.js +30 -2
  9. package/dist/es5/i3s-slpk-loader.js.map +1 -1
  10. package/dist/es5/index.js +7 -7
  11. package/dist/es5/index.js.map +1 -1
  12. package/dist/es5/lib/parsers/constants.js +14 -15
  13. package/dist/es5/lib/parsers/constants.js.map +1 -1
  14. package/dist/es5/lib/parsers/parse-slpk/parse-slpk.js +101 -76
  15. package/dist/es5/lib/parsers/parse-slpk/parse-slpk.js.map +1 -1
  16. package/dist/es5/lib/parsers/parse-slpk/slpk-archieve.js +54 -34
  17. package/dist/es5/lib/parsers/parse-slpk/slpk-archieve.js.map +1 -1
  18. package/dist/es5/lib/parsers/parse-zip/cd-file-header.js +76 -39
  19. package/dist/es5/lib/parsers/parse-zip/cd-file-header.js.map +1 -1
  20. package/dist/es5/lib/parsers/parse-zip/data-view-file-provider.js +129 -0
  21. package/dist/es5/lib/parsers/parse-zip/data-view-file-provider.js.map +1 -0
  22. package/dist/es5/lib/parsers/parse-zip/end-of-central-directory.js +100 -0
  23. package/dist/es5/lib/parsers/parse-zip/end-of-central-directory.js.map +1 -0
  24. package/dist/es5/lib/parsers/parse-zip/file-provider.js.map +1 -1
  25. package/dist/es5/lib/parsers/parse-zip/local-file-header.js +55 -14
  26. package/dist/es5/lib/parsers/parse-zip/local-file-header.js.map +1 -1
  27. package/dist/es5/lib/parsers/parse-zip/search-from-the-end.js +69 -0
  28. package/dist/es5/lib/parsers/parse-zip/search-from-the-end.js.map +1 -0
  29. package/dist/es5/types.js +1 -14
  30. package/dist/es5/types.js.map +1 -1
  31. package/dist/esm/arcgis-webscene-loader.js +1 -1
  32. package/dist/esm/i3s-attribute-loader.js +1 -1
  33. package/dist/esm/i3s-building-scene-layer-loader.js +1 -1
  34. package/dist/esm/i3s-content-loader.js +1 -1
  35. package/dist/esm/i3s-loader.js +1 -1
  36. package/dist/esm/i3s-node-page-loader.js +1 -1
  37. package/dist/esm/i3s-slpk-loader.js +8 -2
  38. package/dist/esm/i3s-slpk-loader.js.map +1 -1
  39. package/dist/esm/index.js +1 -1
  40. package/dist/esm/index.js.map +1 -1
  41. package/dist/esm/lib/parsers/constants.js +14 -15
  42. package/dist/esm/lib/parsers/constants.js.map +1 -1
  43. package/dist/esm/lib/parsers/parse-slpk/parse-slpk.js +50 -35
  44. package/dist/esm/lib/parsers/parse-slpk/parse-slpk.js.map +1 -1
  45. package/dist/esm/lib/parsers/parse-slpk/slpk-archieve.js +38 -22
  46. package/dist/esm/lib/parsers/parse-slpk/slpk-archieve.js.map +1 -1
  47. package/dist/esm/lib/parsers/parse-zip/cd-file-header.js +30 -22
  48. package/dist/esm/lib/parsers/parse-zip/cd-file-header.js.map +1 -1
  49. package/dist/esm/lib/parsers/parse-zip/data-view-file-provider.js +32 -0
  50. package/dist/esm/lib/parsers/parse-zip/data-view-file-provider.js.map +1 -0
  51. package/dist/esm/lib/parsers/parse-zip/end-of-central-directory.js +33 -0
  52. package/dist/esm/lib/parsers/parse-zip/end-of-central-directory.js.map +1 -0
  53. package/dist/esm/lib/parsers/parse-zip/file-provider.js.map +1 -1
  54. package/dist/esm/lib/parsers/parse-zip/local-file-header.js +25 -10
  55. package/dist/esm/lib/parsers/parse-zip/local-file-header.js.map +1 -1
  56. package/dist/esm/lib/parsers/parse-zip/search-from-the-end.js +16 -0
  57. package/dist/esm/lib/parsers/parse-zip/search-from-the-end.js.map +1 -0
  58. package/dist/esm/types.js +0 -12
  59. package/dist/esm/types.js.map +1 -1
  60. package/dist/i3s-content-worker-node.js +47 -47
  61. package/dist/i3s-content-worker-node.js.map +2 -2
  62. package/dist/i3s-content-worker.js +22 -34
  63. package/dist/i3s-slpk-loader.d.ts +3 -0
  64. package/dist/i3s-slpk-loader.d.ts.map +1 -1
  65. package/dist/i3s-slpk-loader.js +11 -1
  66. package/dist/index.d.ts +3 -2
  67. package/dist/index.d.ts.map +1 -1
  68. package/dist/index.js +3 -1
  69. package/dist/lib/parsers/constants.d.ts.map +1 -1
  70. package/dist/lib/parsers/constants.js +14 -15
  71. package/dist/lib/parsers/parse-slpk/parse-slpk.d.ts +9 -3
  72. package/dist/lib/parsers/parse-slpk/parse-slpk.d.ts.map +1 -1
  73. package/dist/lib/parsers/parse-slpk/parse-slpk.js +65 -42
  74. package/dist/lib/parsers/parse-slpk/slpk-archieve.d.ts +22 -10
  75. package/dist/lib/parsers/parse-slpk/slpk-archieve.d.ts.map +1 -1
  76. package/dist/lib/parsers/parse-slpk/slpk-archieve.js +56 -28
  77. package/dist/lib/parsers/parse-zip/cd-file-header.d.ts +9 -5
  78. package/dist/lib/parsers/parse-zip/cd-file-header.d.ts.map +1 -1
  79. package/dist/lib/parsers/parse-zip/cd-file-header.js +32 -25
  80. package/dist/lib/parsers/parse-zip/{buffer-file-provider.d.ts → data-view-file-provider.d.ts} +15 -16
  81. package/dist/lib/parsers/parse-zip/data-view-file-provider.d.ts.map +1 -0
  82. package/dist/lib/parsers/parse-zip/{buffer-file-provider.js → data-view-file-provider.js} +28 -14
  83. package/dist/lib/parsers/parse-zip/end-of-central-directory.d.ts +18 -0
  84. package/dist/lib/parsers/parse-zip/end-of-central-directory.d.ts.map +1 -0
  85. package/dist/lib/parsers/parse-zip/end-of-central-directory.js +41 -0
  86. package/dist/lib/parsers/parse-zip/file-provider.d.ts +10 -5
  87. package/dist/lib/parsers/parse-zip/file-provider.d.ts.map +1 -1
  88. package/dist/lib/parsers/parse-zip/local-file-header.d.ts +5 -3
  89. package/dist/lib/parsers/parse-zip/local-file-header.d.ts.map +1 -1
  90. package/dist/lib/parsers/parse-zip/local-file-header.js +30 -11
  91. package/dist/lib/parsers/parse-zip/search-from-the-end.d.ts +11 -0
  92. package/dist/lib/parsers/parse-zip/search-from-the-end.d.ts.map +1 -0
  93. package/dist/lib/parsers/parse-zip/search-from-the-end.js +31 -0
  94. package/dist/types.d.ts +17 -24
  95. package/dist/types.d.ts.map +1 -1
  96. package/dist/types.js +1 -13
  97. package/package.json +9 -9
  98. package/src/i3s-slpk-loader.ts +19 -1
  99. package/src/index.ts +2 -2
  100. package/src/lib/parsers/constants.ts +14 -15
  101. package/src/lib/parsers/parse-slpk/parse-slpk.ts +83 -58
  102. package/src/lib/parsers/parse-slpk/slpk-archieve.ts +59 -44
  103. package/src/lib/parsers/parse-zip/cd-file-header.ts +52 -32
  104. package/src/lib/parsers/parse-zip/data-view-file-provider.ts +69 -0
  105. package/src/lib/parsers/parse-zip/end-of-central-directory.ts +78 -0
  106. package/src/lib/parsers/parse-zip/file-provider.ts +11 -5
  107. package/src/lib/parsers/parse-zip/local-file-header.ts +45 -19
  108. package/src/lib/parsers/parse-zip/search-from-the-end.ts +38 -0
  109. package/src/types.ts +25 -40
  110. package/dist/es5/lib/parsers/parse-zip/buffer-file-provider.js +0 -46
  111. package/dist/es5/lib/parsers/parse-zip/buffer-file-provider.js.map +0 -1
  112. package/dist/esm/lib/parsers/parse-zip/buffer-file-provider.js +0 -23
  113. package/dist/esm/lib/parsers/parse-zip/buffer-file-provider.js.map +0 -1
  114. package/dist/lib/parsers/parse-zip/buffer-file-provider.d.ts.map +0 -1
  115. package/src/lib/parsers/parse-zip/buffer-file-provider.ts +0 -55
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.parseEoCDRecord = void 0;
8
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
10
+ var _searchFromTheEnd = require("./search-from-the-end");
11
+ var eoCDSignature = [0x50, 0x4b, 0x05, 0x06];
12
+ var zip64EoCDLocatorSignature = Buffer.from([0x50, 0x4b, 0x06, 0x07]);
13
+ var zip64EoCDSignature = Buffer.from([0x50, 0x4b, 0x06, 0x06]);
14
+ var offsets = {
15
+ CD_RECORDS_NUMBER_OFFSET: 8n,
16
+ CD_START_OFFSET_OFFSET: 16n,
17
+ ZIP64_EOCD_START_OFFSET_OFFSET: 8n,
18
+ ZIP64_CD_RECORDS_NUMBER_OFFSET: 24n,
19
+ ZIP64_CD_START_OFFSET_OFFSET: 48n
20
+ };
21
+ var parseEoCDRecord = function () {
22
+ var _ref = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee(fileProvider) {
23
+ var zipEoCDOffset, cdRecordsNumber, cdStartOffset, zip64EoCDLocatorOffset, zip64EoCDOffset;
24
+ return _regenerator.default.wrap(function _callee$(_context) {
25
+ while (1) switch (_context.prev = _context.next) {
26
+ case 0:
27
+ _context.next = 2;
28
+ return (0, _searchFromTheEnd.searchFromTheEnd)(fileProvider, eoCDSignature);
29
+ case 2:
30
+ zipEoCDOffset = _context.sent;
31
+ _context.t0 = BigInt;
32
+ _context.next = 6;
33
+ return fileProvider.getUint16(zipEoCDOffset + offsets.CD_RECORDS_NUMBER_OFFSET);
34
+ case 6:
35
+ _context.t1 = _context.sent;
36
+ cdRecordsNumber = (0, _context.t0)(_context.t1);
37
+ _context.t2 = BigInt;
38
+ _context.next = 11;
39
+ return fileProvider.getUint32(zipEoCDOffset + offsets.CD_START_OFFSET_OFFSET);
40
+ case 11:
41
+ _context.t3 = _context.sent;
42
+ cdStartOffset = (0, _context.t2)(_context.t3);
43
+ if (!(cdStartOffset === BigInt(0xffffffff) || cdRecordsNumber === BigInt(0xffffffff))) {
44
+ _context.next = 38;
45
+ break;
46
+ }
47
+ zip64EoCDLocatorOffset = zipEoCDOffset - 20n;
48
+ _context.t4 = Buffer;
49
+ _context.next = 18;
50
+ return fileProvider.slice(zip64EoCDLocatorOffset, zip64EoCDLocatorOffset + 4n);
51
+ case 18:
52
+ _context.t5 = _context.sent;
53
+ _context.t6 = _context.t4.from.call(_context.t4, _context.t5).compare(zip64EoCDLocatorSignature);
54
+ if (!(_context.t6 !== 0)) {
55
+ _context.next = 22;
56
+ break;
57
+ }
58
+ throw new Error('zip64 EoCD locator not found');
59
+ case 22:
60
+ _context.next = 24;
61
+ return fileProvider.getBigUint64(zip64EoCDLocatorOffset + offsets.ZIP64_EOCD_START_OFFSET_OFFSET);
62
+ case 24:
63
+ zip64EoCDOffset = _context.sent;
64
+ _context.t7 = Buffer;
65
+ _context.next = 28;
66
+ return fileProvider.slice(zip64EoCDOffset, zip64EoCDOffset + 4n);
67
+ case 28:
68
+ _context.t8 = _context.sent;
69
+ _context.t9 = _context.t7.from.call(_context.t7, _context.t8).compare(zip64EoCDSignature);
70
+ if (!(_context.t9 !== 0)) {
71
+ _context.next = 32;
72
+ break;
73
+ }
74
+ throw new Error('zip64 EoCD not found');
75
+ case 32:
76
+ _context.next = 34;
77
+ return fileProvider.getBigUint64(zip64EoCDOffset + offsets.ZIP64_CD_RECORDS_NUMBER_OFFSET);
78
+ case 34:
79
+ cdRecordsNumber = _context.sent;
80
+ _context.next = 37;
81
+ return fileProvider.getBigUint64(zip64EoCDOffset + offsets.ZIP64_CD_START_OFFSET_OFFSET);
82
+ case 37:
83
+ cdStartOffset = _context.sent;
84
+ case 38:
85
+ return _context.abrupt("return", {
86
+ cdRecordsNumber: cdRecordsNumber,
87
+ cdStartOffset: cdStartOffset
88
+ });
89
+ case 39:
90
+ case "end":
91
+ return _context.stop();
92
+ }
93
+ }, _callee);
94
+ }));
95
+ return function parseEoCDRecord(_x) {
96
+ return _ref.apply(this, arguments);
97
+ };
98
+ }();
99
+ exports.parseEoCDRecord = parseEoCDRecord;
100
+ //# sourceMappingURL=end-of-central-directory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"end-of-central-directory.js","names":["_searchFromTheEnd","require","eoCDSignature","zip64EoCDLocatorSignature","Buffer","from","zip64EoCDSignature","offsets","CD_RECORDS_NUMBER_OFFSET","CD_START_OFFSET_OFFSET","ZIP64_EOCD_START_OFFSET_OFFSET","ZIP64_CD_RECORDS_NUMBER_OFFSET","ZIP64_CD_START_OFFSET_OFFSET","parseEoCDRecord","_ref","_asyncToGenerator2","default","_regenerator","mark","_callee","fileProvider","zipEoCDOffset","cdRecordsNumber","cdStartOffset","zip64EoCDLocatorOffset","zip64EoCDOffset","wrap","_callee$","_context","prev","next","searchFromTheEnd","sent","t0","BigInt","getUint16","t1","t2","getUint32","t3","t4","slice","t5","t6","call","compare","Error","getBigUint64","t7","t8","t9","abrupt","stop","_x","apply","arguments","exports"],"sources":["../../../../../src/lib/parsers/parse-zip/end-of-central-directory.ts"],"sourcesContent":["import {FileProvider} from './file-provider';\nimport {ZipSignature, searchFromTheEnd} from './search-from-the-end';\n\n/**\n * End of central directory info\n * according to https://en.wikipedia.org/wiki/ZIP_(file_format)\n */\nexport type ZipEoCDRecord = {\n /** Relative offset of local file header */\n cdStartOffset: bigint;\n /** Relative offset of local file header */\n cdRecordsNumber: bigint;\n};\n\nconst eoCDSignature: ZipSignature = [0x50, 0x4b, 0x05, 0x06];\nconst zip64EoCDLocatorSignature = Buffer.from([0x50, 0x4b, 0x06, 0x07]);\nconst zip64EoCDSignature = Buffer.from([0x50, 0x4b, 0x06, 0x06]);\n\nconst offsets = {\n CD_RECORDS_NUMBER_OFFSET: 8n,\n CD_START_OFFSET_OFFSET: 16n,\n\n ZIP64_EOCD_START_OFFSET_OFFSET: 8n,\n\n ZIP64_CD_RECORDS_NUMBER_OFFSET: 24n,\n ZIP64_CD_START_OFFSET_OFFSET: 48n\n};\n\n/**\n * Parses end of central directory record of zip file\n * @param fileProvider - FileProvider instance\n * @returns Info from the header\n */\nexport const parseEoCDRecord = async (fileProvider: FileProvider): Promise<ZipEoCDRecord> => {\n const zipEoCDOffset = await searchFromTheEnd(fileProvider, eoCDSignature);\n\n let cdRecordsNumber = BigInt(\n await fileProvider.getUint16(zipEoCDOffset + offsets.CD_RECORDS_NUMBER_OFFSET)\n );\n let cdStartOffset = BigInt(\n await fileProvider.getUint32(zipEoCDOffset + offsets.CD_START_OFFSET_OFFSET)\n );\n\n if (cdStartOffset === BigInt(0xffffffff) || cdRecordsNumber === BigInt(0xffffffff)) {\n const zip64EoCDLocatorOffset = zipEoCDOffset - 20n;\n\n if (\n Buffer.from(\n await fileProvider.slice(zip64EoCDLocatorOffset, zip64EoCDLocatorOffset + 4n)\n ).compare(zip64EoCDLocatorSignature) !== 0\n ) {\n throw new Error('zip64 EoCD locator not found');\n }\n const zip64EoCDOffset = await fileProvider.getBigUint64(\n zip64EoCDLocatorOffset + offsets.ZIP64_EOCD_START_OFFSET_OFFSET\n );\n\n if (\n Buffer.from(await fileProvider.slice(zip64EoCDOffset, zip64EoCDOffset + 4n)).compare(\n zip64EoCDSignature\n ) !== 0\n ) {\n throw new Error('zip64 EoCD not found');\n }\n\n cdRecordsNumber = await fileProvider.getBigUint64(\n zip64EoCDOffset + offsets.ZIP64_CD_RECORDS_NUMBER_OFFSET\n );\n cdStartOffset = await fileProvider.getBigUint64(\n zip64EoCDOffset + offsets.ZIP64_CD_START_OFFSET_OFFSET\n );\n }\n\n return {\n cdRecordsNumber,\n cdStartOffset\n };\n};\n"],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"file":"file-provider.js","names":[],"sources":["../../../../../src/lib/parsers/parse-zip/file-provider.ts"],"sourcesContent":["/**\n * Interface for providing file data\n */\nexport interface FileProvider {\n /**\n * Gets an unsigned 8-bit integer at the specified byte offset from the start of the file.\n * @param offset The offset, in bytes, from the start of the file where to read the data.\n */\n getUint8(offset: number): Promise<number>;\n\n /**\n * Gets an unsigned 16-bit integer at the specified byte offset from the start of the file.\n * @param offset The offset, in bytes, from the start of the file where to read the data.\n */\n getUint16(offset: number): Promise<number>;\n\n /**\n * Gets an unsigned 32-bit integer at the specified byte offset from the start of the file.\n * @param offset The offset, in bytes, from the file of the view where to read the data.\n */\n getUint32(offset: number): Promise<number>;\n\n /**\n * returns an ArrayBuffer whose contents are a copy of this file bytes from startOffset, inclusive, up to endOffset, exclusive.\n * @param startOffset The offset, in bytes, from the start of the file where to start reading the data.\n * @param endOffset The offset, in bytes, from the start of the file where to end reading the data.\n */\n slice(startOffset: number, endOffset: number): Promise<ArrayBuffer>;\n\n /**\n * the length (in bytes) of the data.\n */\n length: number;\n}\n"],"mappings":""}
1
+ {"version":3,"file":"file-provider.js","names":[],"sources":["../../../../../src/lib/parsers/parse-zip/file-provider.ts"],"sourcesContent":["/**\n * Interface for providing file data\n */\nexport interface FileProvider {\n /**\n * Gets an unsigned 8-bit integer at the specified byte offset from the start of the file.\n * @param offset The offset, in bytes, from the start of the file where to read the data.\n */\n getUint8(offset: bigint): Promise<number>;\n\n /**\n * Gets an unsigned 16-bit integer at the specified byte offset from the start of the file.\n * @param offset The offset, in bytes, from the start of the file where to read the data.\n */\n getUint16(offset: bigint): Promise<number>;\n\n /**\n * Gets an unsigned 32-bit integer at the specified byte offset from the start of the file.\n * @param offset The offset, in bytes, from the file of the view where to read the data.\n */\n getUint32(offset: bigint): Promise<number>;\n\n /**\n * Gets an unsigned 32-bit integer at the specified byte offset from the start of the file.\n * @param offset The offset, in byte, from the file of the view where to read the data.\n */\n getBigUint64(offset: bigint): Promise<bigint>;\n\n /**\n * returns an ArrayBuffer whose contents are a copy of this file bytes from startOffset, inclusive, up to endOffset, exclusive.\n * @param startOffset The offset, in bytes, from the start of the file where to start reading the data.\n * @param endOffset The offset, in bytes, from the start of the file where to end reading the data.\n */\n slice(startOffset: bigint, endOffset: bigint): Promise<ArrayBuffer>;\n\n /**\n * the length (in bytes) of the data.\n */\n length: bigint;\n}\n"],"mappings":""}
@@ -4,25 +4,27 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.parseZipLocalFileHeader = void 0;
7
+ exports.signature = exports.parseZipLocalFileHeader = void 0;
8
8
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
9
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
10
10
  var offsets = {
11
- COMPRESSED_SIZE_OFFSET: 18,
12
- FILE_NAME_LENGTH_OFFSET: 26,
13
- EXTRA_FIELD_LENGTH_OFFSET: 28,
14
- FILE_NAME_OFFSET: 30
11
+ COMPRESSED_SIZE_OFFSET: 18n,
12
+ UNCOMPRESSED_SIZE_OFFSET: 22n,
13
+ FILE_NAME_LENGTH_OFFSET: 26n,
14
+ EXTRA_FIELD_LENGTH_OFFSET: 28n,
15
+ FILE_NAME_OFFSET: 30n
15
16
  };
16
17
  var signature = Buffer.from([0x50, 0x4b, 0x03, 0x04]);
18
+ exports.signature = signature;
17
19
  var parseZipLocalFileHeader = function () {
18
20
  var _ref = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee(headerOffset, buffer) {
19
- var fileNameLength, fileName, extraFieldLength, fileDataOffset, compressedSize;
21
+ var fileNameLength, fileName, extraFieldLength, fileDataOffset, compressedSize, uncompressedSize, extraOffset, offsetInZip64Data;
20
22
  return _regenerator.default.wrap(function _callee$(_context) {
21
23
  while (1) switch (_context.prev = _context.next) {
22
24
  case 0:
23
25
  _context.t0 = Buffer;
24
26
  _context.next = 3;
25
- return buffer.slice(headerOffset, headerOffset + 4);
27
+ return buffer.slice(headerOffset, headerOffset + 4n);
26
28
  case 3:
27
29
  _context.t1 = _context.sent;
28
30
  _context.t2 = _context.t0.from.call(_context.t0, _context.t1).compare(signature);
@@ -30,7 +32,7 @@ var parseZipLocalFileHeader = function () {
30
32
  _context.next = 7;
31
33
  break;
32
34
  }
33
- return _context.abrupt("return", Promise.resolve(undefined));
35
+ return _context.abrupt("return", null);
34
36
  case 7:
35
37
  _context.next = 9;
36
38
  return buffer.getUint16(headerOffset + offsets.FILE_NAME_LENGTH_OFFSET);
@@ -38,19 +40,58 @@ var parseZipLocalFileHeader = function () {
38
40
  fileNameLength = _context.sent;
39
41
  _context.t3 = new TextDecoder();
40
42
  _context.next = 13;
41
- return buffer.slice(headerOffset + offsets.FILE_NAME_OFFSET, headerOffset + offsets.FILE_NAME_OFFSET + fileNameLength);
43
+ return buffer.slice(headerOffset + offsets.FILE_NAME_OFFSET, headerOffset + offsets.FILE_NAME_OFFSET + BigInt(fileNameLength));
42
44
  case 13:
43
45
  _context.t4 = _context.sent;
44
- fileName = _context.t3.decode.call(_context.t3, _context.t4);
46
+ fileName = _context.t3.decode.call(_context.t3, _context.t4).split('\\').join('/');
45
47
  _context.next = 17;
46
48
  return buffer.getUint16(headerOffset + offsets.EXTRA_FIELD_LENGTH_OFFSET);
47
49
  case 17:
48
50
  extraFieldLength = _context.sent;
49
- fileDataOffset = headerOffset + offsets.FILE_NAME_OFFSET + fileNameLength + extraFieldLength;
50
- _context.next = 21;
51
+ fileDataOffset = headerOffset + offsets.FILE_NAME_OFFSET + BigInt(fileNameLength + extraFieldLength);
52
+ _context.t5 = BigInt;
53
+ _context.next = 22;
51
54
  return buffer.getUint32(headerOffset + offsets.COMPRESSED_SIZE_OFFSET);
52
- case 21:
55
+ case 22:
56
+ _context.t6 = _context.sent;
57
+ compressedSize = (0, _context.t5)(_context.t6);
58
+ _context.t7 = BigInt;
59
+ _context.next = 27;
60
+ return buffer.getUint32(headerOffset + offsets.UNCOMPRESSED_SIZE_OFFSET);
61
+ case 27:
62
+ _context.t8 = _context.sent;
63
+ uncompressedSize = (0, _context.t7)(_context.t8);
64
+ extraOffset = headerOffset + offsets.FILE_NAME_OFFSET + BigInt(fileNameLength);
65
+ offsetInZip64Data = 4n;
66
+ if (!(uncompressedSize === BigInt(0xffffffff))) {
67
+ _context.next = 36;
68
+ break;
69
+ }
70
+ _context.next = 34;
71
+ return buffer.getBigUint64(extraOffset + offsetInZip64Data);
72
+ case 34:
73
+ uncompressedSize = _context.sent;
74
+ offsetInZip64Data += 8n;
75
+ case 36:
76
+ if (!(compressedSize === BigInt(0xffffffff))) {
77
+ _context.next = 41;
78
+ break;
79
+ }
80
+ _context.next = 39;
81
+ return buffer.getBigUint64(extraOffset + offsetInZip64Data);
82
+ case 39:
53
83
  compressedSize = _context.sent;
84
+ offsetInZip64Data += 8n;
85
+ case 41:
86
+ if (!(fileDataOffset === BigInt(0xffffffff))) {
87
+ _context.next = 45;
88
+ break;
89
+ }
90
+ _context.next = 44;
91
+ return buffer.getBigUint64(extraOffset + offsetInZip64Data);
92
+ case 44:
93
+ fileDataOffset = _context.sent;
94
+ case 45:
54
95
  return _context.abrupt("return", {
55
96
  fileNameLength: fileNameLength,
56
97
  fileName: fileName,
@@ -58,7 +99,7 @@ var parseZipLocalFileHeader = function () {
58
99
  fileDataOffset: fileDataOffset,
59
100
  compressedSize: compressedSize
60
101
  });
61
- case 23:
102
+ case 46:
62
103
  case "end":
63
104
  return _context.stop();
64
105
  }
@@ -1 +1 @@
1
- {"version":3,"file":"local-file-header.js","names":["offsets","COMPRESSED_SIZE_OFFSET","FILE_NAME_LENGTH_OFFSET","EXTRA_FIELD_LENGTH_OFFSET","FILE_NAME_OFFSET","signature","Buffer","from","parseZipLocalFileHeader","_ref","_asyncToGenerator2","default","_regenerator","mark","_callee","headerOffset","buffer","fileNameLength","fileName","extraFieldLength","fileDataOffset","compressedSize","wrap","_callee$","_context","prev","next","t0","slice","t1","sent","t2","call","compare","abrupt","Promise","resolve","undefined","getUint16","t3","TextDecoder","t4","decode","getUint32","stop","_x","_x2","apply","arguments","exports"],"sources":["../../../../../src/lib/parsers/parse-zip/local-file-header.ts"],"sourcesContent":["import {FileProvider} from './file-provider';\n\n/**\n * zip local file header info\n * according to https://en.wikipedia.org/wiki/ZIP_(file_format)\n */\nexport type ZipLocalFileHeader = {\n /** File name length */\n fileNameLength: number;\n /** File name */\n fileName: string;\n /** Extra field length */\n extraFieldLength: number;\n /** Offset of the file data */\n fileDataOffset: number;\n /** Compressed size */\n compressedSize: number;\n};\n\nconst offsets = {\n COMPRESSED_SIZE_OFFSET: 18,\n FILE_NAME_LENGTH_OFFSET: 26,\n EXTRA_FIELD_LENGTH_OFFSET: 28,\n FILE_NAME_OFFSET: 30\n};\n\nconst signature = Buffer.from([0x50, 0x4b, 0x03, 0x04]);\n\n/**\n * Parses local file header of zip file\n * @param headerOffset - offset in the archive where header starts\n * @param buffer - buffer containing whole array\n * @returns Info from the header\n */\nexport const parseZipLocalFileHeader = async (\n headerOffset: number,\n buffer: FileProvider\n): Promise<ZipLocalFileHeader | undefined> => {\n if (Buffer.from(await buffer.slice(headerOffset, headerOffset + 4)).compare(signature) !== 0) {\n return Promise.resolve(undefined);\n }\n\n const fileNameLength = await buffer.getUint16(headerOffset + offsets.FILE_NAME_LENGTH_OFFSET);\n\n const fileName = new TextDecoder().decode(\n await buffer.slice(\n headerOffset + offsets.FILE_NAME_OFFSET,\n headerOffset + offsets.FILE_NAME_OFFSET + fileNameLength\n )\n );\n const extraFieldLength = await buffer.getUint16(headerOffset + offsets.EXTRA_FIELD_LENGTH_OFFSET);\n\n const fileDataOffset =\n headerOffset + offsets.FILE_NAME_OFFSET + fileNameLength + extraFieldLength;\n\n const compressedSize = await buffer.getUint32(headerOffset + offsets.COMPRESSED_SIZE_OFFSET);\n\n return {\n fileNameLength,\n fileName,\n extraFieldLength,\n fileDataOffset,\n compressedSize\n };\n};\n"],"mappings":"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"}
1
+ {"version":3,"file":"local-file-header.js","names":["offsets","COMPRESSED_SIZE_OFFSET","UNCOMPRESSED_SIZE_OFFSET","FILE_NAME_LENGTH_OFFSET","EXTRA_FIELD_LENGTH_OFFSET","FILE_NAME_OFFSET","signature","Buffer","from","exports","parseZipLocalFileHeader","_ref","_asyncToGenerator2","default","_regenerator","mark","_callee","headerOffset","buffer","fileNameLength","fileName","extraFieldLength","fileDataOffset","compressedSize","uncompressedSize","extraOffset","offsetInZip64Data","wrap","_callee$","_context","prev","next","t0","slice","t1","sent","t2","call","compare","abrupt","getUint16","t3","TextDecoder","BigInt","t4","decode","split","join","t5","getUint32","t6","t7","t8","getBigUint64","stop","_x","_x2","apply","arguments"],"sources":["../../../../../src/lib/parsers/parse-zip/local-file-header.ts"],"sourcesContent":["import {FileProvider} from './file-provider';\n\n/**\n * zip local file header info\n * according to https://en.wikipedia.org/wiki/ZIP_(file_format)\n */\nexport type ZipLocalFileHeader = {\n /** File name length */\n fileNameLength: number;\n /** File name */\n fileName: string;\n /** Extra field length */\n extraFieldLength: number;\n /** Offset of the file data */\n fileDataOffset: bigint;\n /** Compressed size */\n compressedSize: bigint;\n};\n\nconst offsets = {\n COMPRESSED_SIZE_OFFSET: 18n,\n UNCOMPRESSED_SIZE_OFFSET: 22n,\n FILE_NAME_LENGTH_OFFSET: 26n,\n EXTRA_FIELD_LENGTH_OFFSET: 28n,\n FILE_NAME_OFFSET: 30n\n};\n\nexport const signature = Buffer.from([0x50, 0x4b, 0x03, 0x04]);\n\n/**\n * Parses local file header of zip file\n * @param headerOffset - offset in the archive where header starts\n * @param buffer - buffer containing whole array\n * @returns Info from the header\n */\nexport const parseZipLocalFileHeader = async (\n headerOffset: bigint,\n buffer: FileProvider\n): Promise<ZipLocalFileHeader | null> => {\n if (Buffer.from(await buffer.slice(headerOffset, headerOffset + 4n)).compare(signature) !== 0) {\n return null;\n }\n\n const fileNameLength = await buffer.getUint16(headerOffset + offsets.FILE_NAME_LENGTH_OFFSET);\n\n const fileName = new TextDecoder()\n .decode(\n await buffer.slice(\n headerOffset + offsets.FILE_NAME_OFFSET,\n headerOffset + offsets.FILE_NAME_OFFSET + BigInt(fileNameLength)\n )\n )\n .split('\\\\')\n .join('/');\n const extraFieldLength = await buffer.getUint16(headerOffset + offsets.EXTRA_FIELD_LENGTH_OFFSET);\n\n let fileDataOffset =\n headerOffset + offsets.FILE_NAME_OFFSET + BigInt(fileNameLength + extraFieldLength);\n\n let compressedSize = BigInt(\n await buffer.getUint32(headerOffset + offsets.COMPRESSED_SIZE_OFFSET)\n ); // add zip 64 logic\n\n let uncompressedSize = BigInt(\n await buffer.getUint32(headerOffset + offsets.UNCOMPRESSED_SIZE_OFFSET)\n ); // add zip 64 logic\n\n const extraOffset = headerOffset + offsets.FILE_NAME_OFFSET + BigInt(fileNameLength);\n\n let offsetInZip64Data = 4n;\n // looking for info that might be also be in zip64 extra field\n if (uncompressedSize === BigInt(0xffffffff)) {\n uncompressedSize = await buffer.getBigUint64(extraOffset + offsetInZip64Data);\n offsetInZip64Data += 8n;\n }\n if (compressedSize === BigInt(0xffffffff)) {\n compressedSize = await buffer.getBigUint64(extraOffset + offsetInZip64Data);\n offsetInZip64Data += 8n;\n }\n if (fileDataOffset === BigInt(0xffffffff)) {\n fileDataOffset = await buffer.getBigUint64(extraOffset + offsetInZip64Data); // setting it to the one from zip64\n }\n\n return {\n fileNameLength,\n fileName,\n extraFieldLength,\n fileDataOffset,\n compressedSize\n };\n};\n"],"mappings":"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"}
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.searchFromTheEnd = void 0;
8
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
10
+ var searchFromTheEnd = function () {
11
+ var _ref = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee(file, target) {
12
+ var searchWindow, targetOffset, i;
13
+ return _regenerator.default.wrap(function _callee$(_context) {
14
+ while (1) switch (_context.prev = _context.next) {
15
+ case 0:
16
+ _context.next = 2;
17
+ return file.getUint8(file.length - 1n);
18
+ case 2:
19
+ _context.t0 = _context.sent;
20
+ _context.next = 5;
21
+ return file.getUint8(file.length - 2n);
22
+ case 5:
23
+ _context.t1 = _context.sent;
24
+ _context.next = 8;
25
+ return file.getUint8(file.length - 3n);
26
+ case 8:
27
+ _context.t2 = _context.sent;
28
+ _context.t3 = undefined;
29
+ searchWindow = [_context.t0, _context.t1, _context.t2, _context.t3];
30
+ targetOffset = 0n;
31
+ i = file.length - 4n;
32
+ case 13:
33
+ if (!(i > -1)) {
34
+ _context.next = 26;
35
+ break;
36
+ }
37
+ searchWindow[3] = searchWindow[2];
38
+ searchWindow[2] = searchWindow[1];
39
+ searchWindow[1] = searchWindow[0];
40
+ _context.next = 19;
41
+ return file.getUint8(i);
42
+ case 19:
43
+ searchWindow[0] = _context.sent;
44
+ if (!searchWindow.every(function (val, index) {
45
+ return val === target[index];
46
+ })) {
47
+ _context.next = 23;
48
+ break;
49
+ }
50
+ targetOffset = i;
51
+ return _context.abrupt("break", 26);
52
+ case 23:
53
+ i--;
54
+ _context.next = 13;
55
+ break;
56
+ case 26:
57
+ return _context.abrupt("return", targetOffset);
58
+ case 27:
59
+ case "end":
60
+ return _context.stop();
61
+ }
62
+ }, _callee);
63
+ }));
64
+ return function searchFromTheEnd(_x, _x2) {
65
+ return _ref.apply(this, arguments);
66
+ };
67
+ }();
68
+ exports.searchFromTheEnd = searchFromTheEnd;
69
+ //# sourceMappingURL=search-from-the-end.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-from-the-end.js","names":["searchFromTheEnd","_ref","_asyncToGenerator2","default","_regenerator","mark","_callee","file","target","searchWindow","targetOffset","i","wrap","_callee$","_context","prev","next","getUint8","length","t0","sent","t1","t2","t3","undefined","every","val","index","abrupt","stop","_x","_x2","apply","arguments","exports"],"sources":["../../../../../src/lib/parsers/parse-zip/search-from-the-end.ts"],"sourcesContent":["import {FileProvider} from 'modules/i3s/src/lib/parsers/parse-zip/file-provider';\n\n/** Description of zip signature type */\nexport type ZipSignature = [number, number, number, number];\n\n/**\n * looking for the last occurrence of the provided\n * @param file\n * @param target\n * @returns\n */\nexport const searchFromTheEnd = async (\n file: FileProvider,\n target: ZipSignature\n): Promise<bigint> => {\n const searchWindow = [\n await file.getUint8(file.length - 1n),\n await file.getUint8(file.length - 2n),\n await file.getUint8(file.length - 3n),\n undefined\n ];\n\n let targetOffset = 0n;\n\n // looking for the last record in the central directory\n for (let i = file.length - 4n; i > -1; i--) {\n searchWindow[3] = searchWindow[2];\n searchWindow[2] = searchWindow[1];\n searchWindow[1] = searchWindow[0];\n searchWindow[0] = await file.getUint8(i);\n if (searchWindow.every((val, index) => val === target[index])) {\n targetOffset = i;\n break;\n }\n }\n\n return targetOffset;\n};\n"],"mappings":";;;;;;;;;AAWO,IAAMA,gBAAgB;EAAA,IAAAC,IAAA,OAAAC,kBAAA,CAAAC,OAAA,EAAAC,YAAA,CAAAD,OAAA,CAAAE,IAAA,CAAG,SAAAC,QAC9BC,IAAkB,EAClBC,MAAoB;IAAA,IAAAC,YAAA,EAAAC,YAAA,EAAAC,CAAA;IAAA,OAAAP,YAAA,CAAAD,OAAA,CAAAS,IAAA,UAAAC,SAAAC,QAAA;MAAA,kBAAAA,QAAA,CAAAC,IAAA,GAAAD,QAAA,CAAAE,IAAA;QAAA;UAAAF,QAAA,CAAAE,IAAA;UAAA,OAGZT,IAAI,CAACU,QAAQ,CAACV,IAAI,CAACW,MAAM,GAAG,EAAE,CAAC;QAAA;UAAAJ,QAAA,CAAAK,EAAA,GAAAL,QAAA,CAAAM,IAAA;UAAAN,QAAA,CAAAE,IAAA;UAAA,OAC/BT,IAAI,CAACU,QAAQ,CAACV,IAAI,CAACW,MAAM,GAAG,EAAE,CAAC;QAAA;UAAAJ,QAAA,CAAAO,EAAA,GAAAP,QAAA,CAAAM,IAAA;UAAAN,QAAA,CAAAE,IAAA;UAAA,OAC/BT,IAAI,CAACU,QAAQ,CAACV,IAAI,CAACW,MAAM,GAAG,EAAE,CAAC;QAAA;UAAAJ,QAAA,CAAAQ,EAAA,GAAAR,QAAA,CAAAM,IAAA;UAAAN,QAAA,CAAAS,EAAA,GACrCC,SAAS;UAJLf,YAAY,IAAAK,QAAA,CAAAK,EAAA,EAAAL,QAAA,CAAAO,EAAA,EAAAP,QAAA,CAAAQ,EAAA,EAAAR,QAAA,CAAAS,EAAA;UAOdb,YAAY,GAAG,EAAE;UAGZC,CAAC,GAAGJ,IAAI,CAACW,MAAM,GAAG,EAAE;QAAA;UAAA,MAAEP,CAAC,GAAG,CAAC,CAAC;YAAAG,QAAA,CAAAE,IAAA;YAAA;UAAA;UACnCP,YAAY,CAAC,CAAC,CAAC,GAAGA,YAAY,CAAC,CAAC,CAAC;UACjCA,YAAY,CAAC,CAAC,CAAC,GAAGA,YAAY,CAAC,CAAC,CAAC;UACjCA,YAAY,CAAC,CAAC,CAAC,GAAGA,YAAY,CAAC,CAAC,CAAC;UAACK,QAAA,CAAAE,IAAA;UAAA,OACVT,IAAI,CAACU,QAAQ,CAACN,CAAC,CAAC;QAAA;UAAxCF,YAAY,CAAC,CAAC,CAAC,GAAAK,QAAA,CAAAM,IAAA;UAAA,KACXX,YAAY,CAACgB,KAAK,CAAC,UAACC,GAAG,EAAEC,KAAK;YAAA,OAAKD,GAAG,KAAKlB,MAAM,CAACmB,KAAK,CAAC;UAAA,EAAC;YAAAb,QAAA,CAAAE,IAAA;YAAA;UAAA;UAC3DN,YAAY,GAAGC,CAAC;UAAC,OAAAG,QAAA,CAAAc,MAAA;QAAA;UANkBjB,CAAC,EAAE;UAAAG,QAAA,CAAAE,IAAA;UAAA;QAAA;UAAA,OAAAF,QAAA,CAAAc,MAAA,WAWnClB,YAAY;QAAA;QAAA;UAAA,OAAAI,QAAA,CAAAe,IAAA;MAAA;IAAA,GAAAvB,OAAA;EAAA,CACpB;EAAA,gBA1BYN,gBAAgBA,CAAA8B,EAAA,EAAAC,GAAA;IAAA,OAAA9B,IAAA,CAAA+B,KAAA,OAAAC,SAAA;EAAA;AAAA,GA0B5B;AAACC,OAAA,CAAAlC,gBAAA,GAAAA,gBAAA"}
package/dist/es5/types.js CHANGED
@@ -3,20 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.HeaderAttributeProperty = exports.DATA_TYPE = void 0;
7
- var DATA_TYPE = function (DATA_TYPE) {
8
- DATA_TYPE["UInt8"] = "UInt8";
9
- DATA_TYPE["UInt16"] = "UInt16";
10
- DATA_TYPE["UInt32"] = "UInt32";
11
- DATA_TYPE["UInt64"] = "UInt64";
12
- DATA_TYPE["Int16"] = "Int16";
13
- DATA_TYPE["Int32"] = "Int32";
14
- DATA_TYPE["Int64"] = "Int64";
15
- DATA_TYPE["Float32"] = "Float32";
16
- DATA_TYPE["Float64"] = "Float64";
17
- return DATA_TYPE;
18
- }({});
19
- exports.DATA_TYPE = DATA_TYPE;
6
+ exports.HeaderAttributeProperty = void 0;
20
7
  var HeaderAttributeProperty = function (HeaderAttributeProperty) {
21
8
  HeaderAttributeProperty["vertexCount"] = "vertexCount";
22
9
  HeaderAttributeProperty["featureCount"] = "featureCount";
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["DATA_TYPE","exports","HeaderAttributeProperty"],"sources":["../../src/types.ts"],"sourcesContent":["import type {Matrix4, Quaternion, Vector3} from '@math.gl/core';\nimport type {TypedArray, MeshAttribute, TextureLevel} from '@loaders.gl/schema';\nimport {Tile3D, Tileset3D} from '@loaders.gl/tiles';\n\nexport enum DATA_TYPE {\n UInt8 = 'UInt8',\n UInt16 = 'UInt16',\n UInt32 = 'UInt32',\n UInt64 = 'UInt64',\n Int16 = 'Int16',\n Int32 = 'Int32',\n Int64 = 'Int64',\n Float32 = 'Float32',\n Float64 = 'Float64'\n}\n\nexport type COLOR = [number, number, number, number];\n\n/**\n * spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/3DSceneLayer.cmn.md\n */\n// TODO Replace \"[key: string]: any\" with actual defenition\nexport interface I3STilesetHeader extends SceneLayer3D {\n /** Not in spec, but is necessary for woking */\n url?: string;\n [key: string]: any;\n}\n/** https://github.com/Esri/i3s-spec/blob/master/docs/1.8/nodePage.cmn.md */\nexport type NodePage = {\n /** Array of nodes. */\n nodes: NodeInPage[];\n};\n/**\n * Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/mesh.cmn.md\n */\ntype NodeMesh = {\n /**\n * The material definition.\n */\n material: MeshMaterial;\n /** The geometry definition. */\n geometry: MeshGeometry;\n /** The attribute set definition. */\n attribute: meshAttribute;\n};\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/meshMaterial.cmn.md */\nexport type MeshMaterial = {\n /** The index in layer.materialDefinitions array. */\n definition: number;\n /** Resource id for the material textures. i.e: layers/0/nodes/{material.resource}/textures/{tex_name}. Is required if material declares any textures. */\n resource?: number;\n /** Estimated number of texel for the highest resolution base color texture. */\n texelCountHint?: number;\n};\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/meshGeometry.cmn.md */\nexport type MeshGeometry = {\n /** The index in layer.geometryDefinitions array */\n definition: number;\n /** The resource locator to be used to query geometry resources: layers/0/nodes/{this.resource}/geometries/{layer.geometryDefinitions[this.definition].geometryBuffers[0 or 1]}. */\n resource: number;\n /** Number of vertices in the geometry buffer of this mesh for the umcompressed mesh buffer. Please note that Draco compressed meshes may have less vertices due to de-duplication (actual number of vertices is part of the Draco binary blob). Default=0 */\n vertexCount?: number;\n /** Number of features for this mesh. Default=0. (Must omit or set to 0 if mesh doesn't use features.) */\n featureCount?: number;\n};\n/** https://github.com/Esri/i3s-spec/blob/master/docs/1.8/meshAttribute.cmn.md */\ntype meshAttribute = {\n /** The resource identifier to be used to locate attribute resources of this mesh. i.e. layers/0/nodes/<resource id>/attributes/... */\n resource: number;\n};\n\nexport type I3STextureFormat = 'jpg' | 'png' | 'ktx-etc2' | 'dds' | 'ktx2';\n\n// TODO Replace \"[key: string]: any\" with actual defenition\nexport type I3STileHeader = {\n isDracoGeometry: boolean;\n textureUrl?: string;\n url?: string;\n textureFormat?: I3STextureFormat;\n textureLoaderOptions?: any;\n materialDefinition?: I3SMaterialDefinition;\n mbs: Mbs;\n obb?: Obb;\n lodSelection?: LodSelection[];\n [key: string]: any;\n};\n\nexport type I3SParseOptions = {\n /** ArcGIS access token */\n token?: string;\n /** Is 3DSceneLayer json expected in response */\n isTileset?: string;\n /** Is 3DNodeIndexDocument json expected in response */\n isTileHeader?: string;\n /** Tile3D instance. This property used only to load tile content */\n /** Tile-specific options */\n _tileOptions?: I3STileOptions;\n /** Tileset-specific options */\n _tilesetOptions?: I3STilesetOptions;\n /** Load Draco Compressed geometry if available */\n useDracoGeometry?: boolean;\n /** Load compressed textures if available */\n useCompressedTextures?: boolean;\n /** Set false if don't need to parse textures */\n decodeTextures?: boolean;\n /** deck.gl compatible coordinate system.\n * https://github.com/visgl/deck.gl/blob/master/docs/developer-guide/coordinate-systems.md\n * Supported coordinate systems: METER_OFFSETS, LNGLAT_OFFSETS\n */\n coordinateSystem?: number;\n colorsByAttribute?: {\n attributeName: string;\n minValue: number;\n maxValue: number;\n minColor: COLOR;\n maxColor: COLOR;\n mode: string;\n };\n\n /** @deprecated */\n tile?: Tile3D | I3STileOptions;\n /** Tileset3D instance. This property used only to load tile content */\n /** @deprecated */\n tileset?: Tileset3D | I3STilesetOptions;\n};\n\nexport type I3STileOptions = {\n isDracoGeometry: boolean;\n textureUrl?: string;\n textureFormat?: I3STextureFormat;\n textureLoaderOptions?: any;\n materialDefinition?: I3SMaterialDefinition;\n attributeUrls: string[];\n mbs: Mbs;\n};\n\nexport type I3STilesetOptions = {\n store: Store;\n attributeStorageInfo: AttributeStorageInfo[];\n fields: Field[];\n};\n\n// TODO Replace \"[key: string]: any\" with actual defenition\nexport type I3STileContent = {\n attributes: I3SMeshAttributes;\n indices: TypedArray | null;\n featureIds: number[] | TypedArray;\n vertexCount: number;\n modelMatrix: Matrix4;\n coordinateSystem: number;\n byteLength: number;\n texture: TileContentTexture;\n [key: string]: any;\n};\n\nexport type TileContentTexture =\n | ArrayBuffer\n | {\n compressed: boolean;\n mipmaps: boolean;\n width: number;\n height: number;\n data: TextureLevel[];\n }\n | null;\n\nexport type BoundingVolumes = {\n mbs: Mbs;\n obb: Obb;\n};\n\nexport type Obb = {\n center: number[] | Vector3;\n halfSize: number[] | Vector3;\n quaternion: number[] | Quaternion;\n};\n\nexport type Mbs = [number, number, number, number];\n\n/** SceneLayer3D based on I3S specification - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/3DSceneLayer.cmn.md */\nexport type SceneLayer3D = {\n /** Unique numeric ID of the layer. */\n id: number;\n /** The relative URL to the 3DSceneLayerResource. Only present as part of the SceneServiceInfo resource. */\n href?: string;\n /** The user-visible layer type */\n layerType: '3DObject' | 'IntegratedMesh';\n /** The spatialReference of the layer including the vertical coordinate reference system (CRS). Well Known Text (WKT) for CRS is included to support custom CRS. */\n spatialReference?: SpatialReference;\n /** Enables consuming clients to quickly determine whether this layer is compatible (with respect to its horizontal and vertical coordinate system) with existing content. */\n heightModelInfo?: HeightModelInfo;\n /** The ID of the last update session in which any resource belonging to this layer has been updated. */\n version: string;\n /** The name of this layer. */\n name?: string;\n /** The time of the last update. */\n serviceUpdateTimeStamp?: {lastUpdate: number};\n /** The display alias to be used for this layer. */\n alias?: string;\n /** Description string for this layer. */\n description?: string;\n /** Copyright and usage information for the data in this layer. */\n copyrightText?: string;\n /** Capabilities supported by this layer. */\n capabilities: string[];\n /** ZFactor to define conversion factor for elevation unit. */\n ZFactor?: number;\n /** Indicates if any styling information represented as drawingInfo is captured as part of the binary mesh representation. */\n cachedDrawingInfo?: CachedDrawingInfo;\n /** An object containing drawing information. */\n drawingInfo?: DrawingInfo;\n /** An object containing elevation drawing information. If absent, any content of the scene layer is drawn at its z coordinate. */\n elevationInfo?: ElevationInfo;\n /** PopupInfo of the scene layer. */\n popupInfo?: PopupInfo;\n /** Indicates if client application will show the popup information. Default is FALSE. */\n disablePopup: boolean;\n /**\n * The store object describes the exact physical storage of a layer and\n * enables the client to detect when multiple layers are served from\n * the same store.\n */\n store: Store;\n /** A collection of objects that describe each attribute field regarding its field name, datatype, and a user friendly name {name,type,alias}. */\n fields?: Field[];\n /** Provides the schema and layout used for storing attribute content in binary format in I3S. */\n attributeStorageInfo?: AttributeStorageInfo[];\n /** Contains the statistical information for a layer. */\n statisticsInfo?: StatisticsInfo[];\n /** The paged-access index description. */\n nodePages?: NodePageDefinition;\n /** List of materials classes used in this layer. */\n materialDefinitions?: I3SMaterialDefinition[];\n /** Defines the set of textures that can be referenced by meshes. */\n textureSetDefinitions?: TextureSetDefinition[];\n /** Define the layouts of mesh geometry and its attributes */\n geometryDefinitions?: GeometryDefinition[];\n /** 3D extent. */\n fullExtent?: FullExtent;\n};\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/cachedDrawingInfo.cmn.md */\nexport type CachedDrawingInfo = {\n /** If true, the drawingInfo is captured as part of the binary scene layer representation. */\n color: boolean;\n};\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/drawingInfo.cmn.md */\nexport type DrawingInfo = {\n /** An object defining the symbology for the layer. See more information about supported renderer types in ArcGIS clients. */\n renderer: any;\n /** Scale symbols for the layer. */\n scaleSymbols: boolean;\n};\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/elevationInfo.cmn.md */\nexport type ElevationInfo = {\n mode: 'relativeToGround' | 'absoluteHeight' | 'onTheGround' | 'relativeToScene';\n /** Offset is always added to the result of the above logic except for onTheGround where offset is ignored. */\n offset: number;\n /** A string value indicating the unit for the values in elevationInfo */\n unit: string;\n};\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/statisticsInfo.cmn.md */\nexport type StatisticsInfo = {\n /** Key indicating the resource of the statistics. */\n key: string;\n /** Name of the field of the statistical information. */\n name: string;\n /** The URL to the statistics information. */\n href: string;\n};\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/nodePageDefinition.cmn.md */\nexport type NodePageDefinition = {\n /** Number of nodes per page for this layer. Must be a power-of-two less than 4096 */\n nodesPerPage: number;\n /** Index of the root node. Default = 0. */\n rootIndex?: number;\n /** Defines the meaning of nodes[].lodThreshold for this layer. */\n lodSelectionMetricType: 'maxScreenThresholdSQ';\n};\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/materialDefinitions.cmn.md */\nexport type I3SMaterialDefinition = {\n /** A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology. When not specified, all the default values of pbrMetallicRoughness apply. */\n pbrMetallicRoughness: I3SPbrMetallicRoughness;\n /** The normal texture map. */\n normalTexture?: I3SMaterialTexture;\n /** The occlusion texture map. */\n occlusionTexture?: I3SMaterialTexture;\n /** The emissive texture map. */\n emissiveTexture?: I3SMaterialTexture;\n /** The emissive color of the material. */\n emissiveFactor?: [number, number, number];\n /** Defines the meaning of the alpha-channel/alpha-mask. */\n alphaMode: 'opaque' | 'mask' | 'blend';\n /** The alpha cutoff value of the material. */\n alphaCutoff?: number;\n /** Specifies whether the material is double sided. */\n doubleSided?: boolean;\n /** Winding order is counterclockwise. */\n cullFace?: 'none' | 'front' | 'back';\n};\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/pbrMetallicRoughness.cmn.md */\nexport type I3SPbrMetallicRoughness = {\n /** The material's base color factor. default=[1,1,1,1] */\n baseColorFactor?: [number, number, number, number];\n /** The base color texture. */\n baseColorTexture?: I3SMaterialTexture;\n /** the metalness of the material. default=1.0 */\n metallicFactor: number;\n /** the roughness of the material. default=1.0 */\n roughnessFactor: number;\n /** the metallic-roughness texture. */\n metallicRoughnessTexture?: I3SMaterialTexture;\n};\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/materialTexture.cmn.md */\nexport type I3SMaterialTexture = {\n /** The index in layer.textureSetDefinitions. */\n textureSetDefinitionId: number;\n /** The set index of texture's TEXCOORD attribute used for texture coordinate mapping. Default is 0. Deprecated. */\n texCoord?: number;\n /** The normal texture: scalar multiplier applied to each normal vector of the normal texture. For occlusion texture,scalar multiplier controlling the amount of occlusion applied. Default=1 */\n factor?: number;\n};\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/attributeStorageInfo.cmn.md */\nexport type AttributeStorageInfo = {\n key: string;\n name: string;\n header: {property: string; valueType: string}[];\n ordering?: string[];\n attributeValues?: AttributeValue;\n attributeByteCounts?: AttributeValue;\n objectIds?: AttributeValue;\n};\n\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/field.cmn.md */\nexport type Field = {\n name: string;\n type: ESRIField;\n alias?: string;\n domain?: Domain;\n};\n\nexport type ESRIField =\n | 'esriFieldTypeDate'\n | 'esriFieldTypeSingle'\n | 'esriFieldTypeDouble'\n | 'esriFieldTypeGUID'\n | 'esriFieldTypeGlobalID'\n | 'esriFieldTypeInteger'\n | 'esriFieldTypeOID'\n | 'esriFieldTypeSmallInteger'\n | 'esriFieldTypeString';\n\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/popupInfo.cmn.md */\nexport type PopupInfo = {\n title?: string;\n description?: string;\n expressionInfos?: any[];\n fieldInfos?: FieldInfo[];\n mediaInfos?: any[];\n popupElements?: {text?: string; type?: string; fieldInfos?: FieldInfo[]}[];\n};\n\n/**\n * Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.7/3DNodeIndexDocument.cmn.md\n */\nexport type Node3DIndexDocument = {\n id: string;\n version?: string;\n level?: number;\n mbs?: Mbs;\n obb?: Obb;\n lodSelection?: LodSelection[];\n children?: NodeReference[];\n neighbors?: NodeReference[];\n parentNode?: NodeReference;\n sharedResource?: Resource;\n featureData?: Resource[];\n geometryData?: Resource[];\n textureData?: Resource[];\n attributeData?: Resource[];\n created?: string;\n expires?: string;\n};\n\n/**\n * Minimal I3S node data is needed for loading\n */\nexport type I3SMinimalNodeData = {\n id: string;\n url?: string;\n transform?: number[];\n lodSelection?: LodSelection[];\n obb?: Obb;\n mbs?: Mbs;\n contentUrl?: string;\n textureUrl?: string;\n attributeUrls?: string[];\n materialDefinition?: I3SMaterialDefinition;\n textureFormat?: I3STextureFormat;\n textureLoaderOptions?: {[key: string]: any};\n children?: NodeReference[];\n isDracoGeometry: boolean;\n};\n\nexport type LodSelection = {\n metricType?: string;\n maxError: number;\n};\n\nexport type NodeReference = {\n id: string;\n version?: string;\n mbs?: Mbs;\n obb?: Obb;\n href?: string;\n};\n\nexport type Resource = {\n href: string;\n layerContent?: string[];\n featureRange?: number[];\n multiTextureBundle?: string;\n vertexElements?: number[];\n faceElements?: number[];\n nodePath?: string;\n};\n\nexport type MaxScreenThresholdSQ = {\n maxError: number;\n};\n\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/node.cmn.md */\nexport type NodeInPage = {\n /**\n * The index in the node array. May be different than material, geometry and attribute resource id. See mesh for more information.\n */\n index: number;\n /**\n * The index of the parent node in the node array.\n */\n parentIndex?: number;\n /**\n * When to switch LoD. See https://github.com/Esri/i3s-spec/blob/master/docs/1.8/nodePageDefinition.cmn.md for more information.\n */\n lodThreshold?: number;\n /**\n * Oriented bounding box for this node.\n */\n obb: Obb;\n /**\n * index of the children nodes indices.\n */\n children?: number[];\n /**\n * The mesh for this node. WARNING: only SINGLE mesh is supported at version 1.7 (i.e. length must be 0 or 1).\n */\n mesh?: NodeMesh;\n};\n\n/**\n * https://github.com/Esri/i3s-spec/blob/master/docs/1.8/materialDefinitionInfo.cmn.md\n */\nexport type MaterialDefinitionInfo = {\n /** A name for the material as assigned in the creating application. */\n name?: string;\n /** Indicates the material type, chosen from the supported values. */\n type?: 'standard' | 'water' | 'billboard' | 'leafcard' | 'reference';\n /** The href that resolves to the shared resource bundle in which the material definition is contained. */\n $ref?: string;\n /** Parameter defined for the material.\n * https://github.com/Esri/i3s-spec/blob/master/docs/1.8/materialParams.cmn.md\n */\n params: {\n /** Indicates transparency of this material; 0 = opaque, 1 = fully transparent. */\n transparency?: number;\n /** Indicates reflectivity of this material. */\n reflectivity?: number;\n /** Indicates shininess of this material. */\n shininess?: number;\n /** Ambient color of this material. Ambient color is the color of an object where it is in shadow.\n * This color is what the object reflects when illuminated by ambient light rather than direct light. */\n ambient?: number[];\n /** Diffuse color of this material. Diffuse color is the most instinctive meaning of the color of an object.\n * It is that essential color that the object reveals under pure white light. It is perceived as the color\n * of the object itself rather than a reflection of the light. */\n diffuse?: number[];\n /** Specular color of this material. Specular color is the color of the light of a specular reflection\n * (specular reflection is the type of reflection that is characteristic of light reflected from a shiny\n * surface). */\n specular?: number[];\n /** Rendering mode. */\n renderMode: 'textured' | 'solid' | 'untextured' | 'wireframe';\n /** TRUE if features with this material should cast shadows. */\n castShadows?: boolean;\n /** TRUE if features with this material should receive shadows */\n receiveShadows?: boolean;\n /** Indicates the material culling options {back, front, none}. */\n cullFace?: string;\n /** This flag indicates that the vertex color attribute of the geometry should be used to color the geometry\n * for rendering. If texture is present, the vertex colors are multiplied by this color.\n * e.g. pixel_color = [interpolated]vertex_color * texel_color. Default is false. */\n vertexColors?: boolean;\n /** This flag indicates that the geometry has uv region vertex attributes. These are used for adressing\n * subtextures in a texture atlas. The uv coordinates are relative to this subtexture in this case.\n * This is mostly useful for repeated textures in a texture atlas. Default is false. */\n vertexRegions?: boolean;\n /** Indicates whether Vertex Colors also contain a transparency channel. Default is false. */\n useVertexColorAlpha?: boolean;\n };\n};\n\n/** https://github.com/Esri/i3s-spec/blob/master/docs/1.8/sharedResource.cmn.md */\nexport type SharedResources = {\n /** Materials describe how a Feature or a set of Features is to be rendered. */\n materialDefinitions?: {[key: string]: MaterialDefinitionInfo};\n /** A Texture is a set of images, with some parameters specific to the texture/uv mapping to geometries. */\n textureDefinitions?: {[key: string]: TextureDefinitionInfo};\n};\n\n/** https://github.com/Esri/i3s-spec/blob/master/docs/1.8/image.cmn.md */\ntype TextureImage = {\n /** A unique ID for each image. Generated using the BuildID function. */\n id: string;\n /** width of this image, in pixels. */\n size?: number;\n /** The maximum size of a single pixel in world units.\n * This property is used by the client to pick the image to load and render. */\n pixelInWorldUnits?: number;\n /** The href to the image(s), one per encoding, in the same order as the encodings. */\n href?: string[];\n /** The byte offset of this image's encodings. There is one per encoding,\n * in the same order as the encodings, in the block in which this texture image resides. */\n byteOffset?: string[];\n /** The length in bytes of this image's encodings. There is one per encoding,\n * in the same order as the encodings. */\n length?: number[];\n};\n\nexport type Attribute = 'OBJECTID' | 'string' | 'double' | 'Int32' | string;\n\nexport type Extent = [number, number, number, number];\n\nexport type FeatureAttribute = {\n id: AttributeValue;\n faceRange: AttributeValue;\n};\n\nexport type BuildingSceneLayerTileset = {\n header: BuildingSceneLayer;\n sublayers: BuildingSceneSublayer[];\n};\n\nexport type BuildingSceneLayer = {\n id: number;\n name: string;\n version: string;\n alias?: string;\n layerType: 'Building';\n description?: string;\n copyrightText?: string;\n fullExtent: FullExtent;\n spatialReference: SpatialReference;\n heightModelInfo?: HeightModelInfo;\n sublayers: BuildingSceneSublayer[];\n filters?: Filter[];\n activeFilterID?: string;\n statisticsHRef?: string;\n};\n\nexport type BuildingSceneSublayer = {\n id: number;\n name: string;\n alias?: string;\n discipline?: 'Mechanical' | 'Architectural' | 'Piping' | 'Electrical' | 'Structural';\n modelName?: string;\n layerType: 'group' | '3DObject' | 'Point';\n visibility?: boolean;\n sublayers?: BuildingSceneSublayer[];\n isEmpty?: boolean;\n url?: string;\n};\n\ntype Filter = {\n id: string;\n name: string;\n description: string;\n isDefaultFilter?: boolean;\n isVisible?: boolean;\n filterBlocks: FilterBlock[];\n filterAuthoringInfo?: FilterAuthoringInfo;\n};\n\ntype FilterAuthoringInfo = {\n type: string;\n filterBlocks: FilterBlockAuthoringInfo[];\n};\n\ntype FilterBlockAuthoringInfo = {\n filterTypes: FilterType[];\n};\n\ntype FilterType = {\n filterType: string;\n filterValues: string[];\n};\n\ntype FilterBlock = {\n title: string;\n filterMode: FilterModeSolid | FilterModeWireFrame;\n filterExpression: string;\n};\n\ntype Edges = {\n type: string;\n color: number[];\n size: number;\n transparency: number;\n extensionLength: number;\n};\n\ntype FilterModeSolid = {\n type: 'solid';\n};\n\ntype FilterModeWireFrame = {\n type: 'wireFrame';\n edges: Edges;\n};\n\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/spatialReference.cmn.md */\nexport type SpatialReference = {\n /** The current WKID value of the vertical coordinate system. */\n latestVcsWkid: number;\n /** dentifies the current WKID value associated with the same spatial reference. */\n latestWkid: number;\n /** The WKID value of the vertical coordinate system. */\n vcsWkid: number;\n /** WKID, or Well-Known ID, of the CRS. Specify either WKID or WKT of the CRS. */\n wkid: number;\n /** WKT, or Well-Known Text, of the CRS. Specify either WKT or WKID of the CRS but not both. */\n wkt?: string;\n};\n\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/fullExtent.cmn.md */\nexport type FullExtent = {\n /** left longitude in decimal degrees */\n xmin: number;\n /** right longitude in decimal degrees */\n xmax: number;\n /** bottom latitude in decimal degrees*/\n ymin: number;\n /** top latitude in decimal degrees*/\n ymax: number;\n /** lowest elevation in meters */\n zmin: number;\n /** highest elevation in meters */\n zmax: number;\n spatialReference?: SpatialReference;\n};\n\n/**\n * https://github.com/Esri/i3s-spec/blob/master/docs/1.8/textureDefinitionInfo.cmn.md\n */\nexport type TextureDefinitionInfo = {\n /** MIMEtype - The encoding/content type that is used by all images in this map */\n encoding?: string[];\n /** UV wrapping modes, from {none, repeat, mirror}. */\n wrap?: string[];\n /** TRUE if the Map represents a texture atlas. */\n atlas?: boolean;\n /** The name of the UV set to be used as texture coordinates. */\n uvSet?: string;\n /** Indicates channels description. */\n channels?: 'rbg' | 'rgba' | string;\n /** An image is a binary resource, containing a single raster that can be used to texture a feature or symbol. */\n images: TextureImage[];\n};\n\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/domain.cmn.md */\ntype Domain = {\n type: string;\n name: string;\n description?: string;\n fieldType?: string;\n range?: [number, number];\n codedValues?: {name: string; code: string | number}[];\n mergePolicy?: string;\n splitPolicy?: string;\n};\n/**\n * spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/store.cmn.md\n */\ntype Store = {\n id: string | number;\n profile: string;\n version: number | string;\n resourcePattern: string[];\n rootNode: string;\n extent: number[];\n indexCRS: string;\n vertexCRS: string;\n normalReferenceFrame: string;\n attributeEncoding: string;\n textureEncoding: string[];\n lodType: string;\n lodModel: string;\n defaultGeometrySchema: DefaultGeometrySchema;\n};\n/**\n * Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/defaultGeometrySchema.cmn.md\n */\ntype DefaultGeometrySchema = {\n geometryType?: 'triangles';\n topology: 'PerAttributeArray' | 'Indexed';\n header: HeaderAttribute[];\n ordering: string[];\n vertexAttributes: VertexAttribute;\n faces?: VertexAttribute;\n featureAttributeOrder: string[];\n featureAttributes: FeatureAttribute;\n // TODO Do we realy need this Property?\n attributesOrder?: string[];\n};\n/**\n * spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/headerAttribute.cmn.md\n */\nexport type HeaderAttribute = {\n property: HeaderAttributeProperty.vertexCount | HeaderAttributeProperty.featureCount | string;\n type:\n | DATA_TYPE.UInt8\n | DATA_TYPE.UInt16\n | DATA_TYPE.UInt32\n | DATA_TYPE.UInt64\n | DATA_TYPE.Int16\n | DATA_TYPE.Int32\n | DATA_TYPE.Int64\n | DATA_TYPE.Float32\n | DATA_TYPE.Float64;\n};\nexport enum HeaderAttributeProperty {\n vertexCount = 'vertexCount',\n featureCount = 'featureCount'\n}\nexport type VertexAttribute = {\n position: GeometryAttribute;\n normal: GeometryAttribute;\n uv0: GeometryAttribute;\n color: GeometryAttribute;\n region?: GeometryAttribute;\n};\nexport type GeometryAttribute = {\n byteOffset?: number;\n valueType:\n | DATA_TYPE.UInt8\n | DATA_TYPE.UInt16\n | DATA_TYPE.Int16\n | DATA_TYPE.Int32\n | DATA_TYPE.Int64\n | DATA_TYPE.Float32\n | DATA_TYPE.Float64;\n valuesPerElement: number;\n};\nexport type I3SMeshAttributes = {\n [key: string]: I3SMeshAttribute;\n};\nexport interface I3SMeshAttribute extends MeshAttribute {\n type?: number;\n metadata?: any;\n}\n/** https://github.com/Esri/i3s-spec/blob/master/docs/1.8/heightModelInfo.cmn.md */\ntype HeightModelInfo = {\n heightModel: 'gravity_related_height' | 'ellipsoidal';\n vertCRS: string;\n heightUnit:\n | 'meter'\n | 'us-foot'\n | 'foot'\n | 'clarke-foot'\n | 'clarke-yard'\n | 'clarke-link'\n | 'sears-yard'\n | 'sears-foot'\n | 'sears-chain'\n | 'benoit-1895-b-chain'\n | 'indian-yard'\n | 'indian-1937-yard'\n | 'gold-coast-foot'\n | 'sears-1922-truncated-chain'\n | 'us-inch'\n | 'us-mile'\n | 'us-yard'\n | 'millimeter'\n | 'decimeter'\n | 'centimeter'\n | 'kilometer';\n};\n\nexport type TextureSetDefinitionFormats = {name: string; format: I3STextureFormat}[];\n\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/textureSetDefinition.cmn.md */\ntype TextureSetDefinition = {\n formats: TextureSetDefinitionFormats;\n atlas?: boolean;\n};\n\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/geometryDefinition.cmn.md */\ntype GeometryDefinition = {\n topology: 'triangle' | string;\n geometryBuffers: GeometryBuffer[];\n};\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/geometryBuffer.cmn.md */\ntype GeometryBuffer = {\n offset?: number;\n position?: GeometryBufferItem;\n normal?: GeometryBufferItem;\n uv0?: GeometryBufferItem;\n color?: GeometryBufferItem;\n uvRegion?: GeometryBufferItem;\n featureId?: GeometryBufferItem;\n faceRange?: GeometryBufferItem;\n compressedAttributes?: {encoding: string; attributes: string[]};\n};\n\ntype GeometryBufferItem = {type: string; component: number; encoding?: string; binding: string};\n\ntype AttributeValue = {valueType: string; encoding?: string; valuesPerElement?: number};\n\nexport type FieldInfo = {\n fieldName: string;\n visible: boolean;\n isEditable: boolean;\n label: string;\n};\n\nexport type ArcGisWebSceneData = {\n header: ArcGisWebScene;\n layers: OperationalLayer[];\n unsupportedLayers: OperationalLayer[];\n};\n\n/**\n * ArcGis WebScene spec - https://developers.arcgis.com/web-scene-specification/objects/webscene/\n */\nexport type ArcGisWebScene = {\n /**\n * @todo add type.\n * Spec - https://developers.arcgis.com/web-scene-specification/objects/applicationProperties/\n * Configuration of application and UI elements.\n */\n applicationProperties?: any;\n /**\n * Operational layers contain business data which are used to make thematic scenes.\n */\n operationalLayers: OperationalLayer[];\n /**\n * Basemaps give the web scene a geographic context.\n */\n baseMap: BaseMap;\n /**\n * Ground defines the main surface of the web scene, based on elevation layers.\n */\n ground: Ground;\n /**\n * An object that defines the characteristics of the vertical coordinate system used by the web scene.\n */\n heightModelInfo: HeightModelInfo;\n /**\n * Root element in the web scene specifying a string value indicating the web scene version.\n * Valid values: 1.8, 1.9, 1.10, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.19, 1.20, 1.21, 1.22, 1.23, 1.24, 1.25, 1.26, 1.27\n */\n version: string;\n /**\n * String value indicating the application which authored the webmap\n */\n authoringApp: string;\n /**\n * String value indicating the authoring App's version number.\n */\n authoringAppVersion: string;\n /**\n * A presentation consists of multiple slides, where each slide is a specific view into the web scene.\n * Spec - https://developers.arcgis.com/web-scene-specification/objects/presentation/\n * @todo Add presentation type.\n */\n presentation: ArcGisPresentation;\n /**\n * An object that provides information about the initial environment settings and viewpoint of the web scene.\n */\n initialState: InitialState;\n /**\n * An object used to specify the spatial reference of the given geometry.\n */\n spatialReference: SpatialReference;\n viewingMode: 'global' | 'local';\n /**\n * @todo add type.\n * Defines area to be clipped for display.\n */\n clippingArea?: any;\n /**\n * @todo add type.\n * Spec - https://developers.arcgis.com/web-scene-specification/objects/mapFloorInfo/\n * Contains floor-awareness information for the web scene.\n */\n mapFloorInfo?: any;\n /**\n * @todo add type.\n * Spec - https://developers.arcgis.com/web-scene-specification/objects/mapRangeInfo/\n * Map Range Information\n */\n mapRangeInfo?: any;\n /**\n * @todo add type.\n * Spec - https://developers.arcgis.com/web-scene-specification/objects/table/\n * An array of table objects.\n */\n tables?: any;\n /**\n * @todo add type.\n * Spec - https://developers.arcgis.com/web-scene-specification/objects/transportationNetwork/\n * Used to specify the transportation networks of the scene.\n */\n transportationNetworks?: any;\n /**\n * @todo add type.\n * Spec - https://developers.arcgis.com/web-scene-specification/objects/widgets/\n * The widgets object contains widgets that should be exposed to the user.\n */\n widgets?: any;\n};\n\n/**\n * Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Presentation.html\n */\ntype ArcGisPresentation = {\n slides: Slide[];\n};\n\n/**\n * A slide stores a snapshot of several pre-set properties of the WebScene and SceneView,\n * such as the basemap, viewpoint and visible layers.\n * Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Slide.html\n */\ntype Slide = {\n id: string;\n title: {\n text: string;\n };\n thumbnail: {\n url: string;\n };\n description: {\n text: string;\n };\n ground: {\n transparency: number;\n };\n baseMap: ArcGisBaseMap;\n visibleLayers: ArcGisVisibleLayer[];\n viewpoint: ArcGisViewPoint;\n};\n\n/**\n * The basemap of the scene. Only the base and reference layers of the basemap are stored in a slide.\n * Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html\n */\ntype ArcGisBaseMap = {\n id: string;\n title: string;\n baseMapLayers: ArcGisBaseMapLayer[];\n};\n\n/**\n * The visible layers of the scene.\n * Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Slide.html#visibleLayers\n */\ntype ArcGisVisibleLayer = {\n id: string;\n sublayerIds: number[];\n};\n/**\n * The basemap of the scene.\n * Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html\n */\ntype ArcGisBaseMapLayer = {\n id: string;\n title: string;\n url: string;\n layerType: string;\n visibility: boolean;\n};\n\n/**\n * The viewpoint of the slide. This acts like a bookmark, saving a predefined location or point of view from which to view the scene.\n * Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-Viewpoint.html\n */\ntype ArcGisViewPoint = {\n scale: number;\n rotation?: number;\n /**\n * Spec - https://developers.arcgis.com/web-scene-specification/objects/viewpoint/\n */\n targetGeometry: any;\n camera: ArcGisCamera;\n};\n\n/**\n * The camera defines the position, tilt, and heading of the point from which the SceneView's visible extent is observed.\n * It is not associated with device hardware. This class only applies to 3D SceneViews.\n * Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html\n */\nexport type ArcGisCamera = {\n position: {\n x: number;\n y: number;\n z: number;\n };\n spatialReference: {\n wkid: number;\n latestWkid: number;\n };\n heading: number;\n tilt: number;\n};\n\n/**\n * Operational layers contain your data. Usually, a basemap sits beneath your operational layers to give them geographic context.\n * Spec- https://developers.arcgis.com/web-scene-specification/objects/operationalLayers/\n */\nexport type OperationalLayer = {\n id: string;\n opacity: number;\n title: string;\n url: string;\n visibility: boolean;\n itemId: string;\n layerType: string;\n LayerDefinition: LayerDefinition;\n screenSizePerspective: boolean;\n showLabels?: boolean;\n disablePopup?: boolean;\n showLegend?: boolean;\n layers?: OperationalLayer[];\n};\n\ntype LayerDefinition = {\n elevationInfo: ElevationInfo;\n drawingInfo: DrawingInfo;\n};\n\ntype BaseMap = {\n id: string;\n title: string;\n baseMapLayers: BaseMapLayer[];\n elevationLayers: ElevationLayer[];\n};\n\ntype BaseMapLayer = {\n id: string;\n opacity: number;\n title: string;\n url: string;\n visibility: boolean;\n layerType: string;\n};\n\ntype ElevationLayer = {\n id: string;\n listMode: string;\n title: string;\n url: string;\n visibility: boolean;\n layerType: string;\n};\n\ntype Ground = {\n layers: ElevationLayer[];\n transparency: number;\n navigationConstraint: NavigationConstraint;\n};\n\ntype NavigationConstraint = {\n type: string;\n};\n\ntype InitialState = {\n environment: Enviroment;\n viewpoint: ViewPoint;\n};\n\ntype Enviroment = {\n lighting: Lighting;\n atmosphereEnabled?: string;\n starsEnabled?: string;\n};\n\ntype Lighting = {\n datetime?: number;\n displayUTCOffset?: number;\n};\n\ntype ViewPoint = {\n camera: Camera;\n};\n\ntype Camera = {\n position: CameraPosition;\n heading: number;\n tilt: number;\n};\n\ntype CameraPosition = {\n spatialReference: SpatialReference;\n x: number;\n y: number;\n z: number;\n};\n\n/**\n * Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/statsInfo.cmn.md\n */\nexport type StatsInfo = {\n /** Represents the count of the value. */\n totalValuesCount?: number;\n /** Minimum attribute value for the entire layer. */\n min?: number;\n /** Maximum attribute value for the entire layer. */\n max?: number;\n /** Count for the entire layer. */\n count?: number;\n /** Sum of the attribute values over the entire layer. */\n sum?: number;\n /** Representing average or mean value. For example, sum/count. */\n avg?: number;\n /** Representing the standard deviation. */\n stddev?: number;\n /**\tRepresenting variance. For example, stats.stddev *stats.stddev. */\n variance?: number;\n /** Represents the histogram. */\n histogram?: Histogram;\n /** An array of most frequently used values within the point cloud scene layer. */\n mostFrequentValues?: ValueCount[];\n};\n\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/histogram.cmn.md */\nexport type Histogram = {\n /** Minimum attribute value for the entire layer. */\n minimum: number;\n /** Maximum attribute value for the entire layer. Maximum array size for stats.histo.counts is 256. */\n maximum: number;\n /** Count for the entire layer. */\n counts: number[];\n};\n\nexport type ValueCount = {\n /** Type of the attribute values after decompression, if applicable. Please note that string is not supported for point cloud scene layer attributes. */\n value: number | string;\n /** Count of the number of values. May exceed 32 bits. */\n count: number;\n};\n"],"mappings":";;;;;;IAIYA,SAAS,aAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA;AAAAC,OAAA,CAAAD,SAAA,GAAAA,SAAA;AAAA,IA8tBTE,uBAAuB,aAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAA,OAAvBA,uBAAuB;AAAA;AAAAD,OAAA,CAAAC,uBAAA,GAAAA,uBAAA"}
1
+ {"version":3,"file":"types.js","names":["HeaderAttributeProperty","exports"],"sources":["../../src/types.ts"],"sourcesContent":["import type {Matrix4, Quaternion, Vector3} from '@math.gl/core';\nimport type {TypedArray, MeshAttribute, TextureLevel} from '@loaders.gl/schema';\nimport {Tile3D, Tileset3D} from '@loaders.gl/tiles';\n\nexport type COLOR = [number, number, number, number];\n\n/**\n * spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/3DSceneLayer.cmn.md\n */\n// TODO Replace \"[key: string]: any\" with actual defenition\nexport interface I3STilesetHeader extends SceneLayer3D {\n /** Not in spec, but is necessary for woking */\n url?: string;\n [key: string]: any;\n}\n/** https://github.com/Esri/i3s-spec/blob/master/docs/1.8/nodePage.cmn.md */\nexport type NodePage = {\n /** Array of nodes. */\n nodes: NodeInPage[];\n};\n/**\n * Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/mesh.cmn.md\n */\ntype NodeMesh = {\n /**\n * The material definition.\n */\n material: MeshMaterial;\n /** The geometry definition. */\n geometry: MeshGeometry;\n /** The attribute set definition. */\n attribute: meshAttribute;\n};\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/meshMaterial.cmn.md */\nexport type MeshMaterial = {\n /** The index in layer.materialDefinitions array. */\n definition: number;\n /** Resource id for the material textures. i.e: layers/0/nodes/{material.resource}/textures/{tex_name}. Is required if material declares any textures. */\n resource?: number;\n /** Estimated number of texel for the highest resolution base color texture. */\n texelCountHint?: number;\n};\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/meshGeometry.cmn.md */\nexport type MeshGeometry = {\n /** The index in layer.geometryDefinitions array */\n definition: number;\n /** The resource locator to be used to query geometry resources: layers/0/nodes/{this.resource}/geometries/{layer.geometryDefinitions[this.definition].geometryBuffers[0 or 1]}. */\n resource: number;\n /** Number of vertices in the geometry buffer of this mesh for the umcompressed mesh buffer. Please note that Draco compressed meshes may have less vertices due to de-duplication (actual number of vertices is part of the Draco binary blob). Default=0 */\n vertexCount?: number;\n /** Number of features for this mesh. Default=0. (Must omit or set to 0 if mesh doesn't use features.) */\n featureCount?: number;\n};\n/** https://github.com/Esri/i3s-spec/blob/master/docs/1.8/meshAttribute.cmn.md */\ntype meshAttribute = {\n /** The resource identifier to be used to locate attribute resources of this mesh. i.e. layers/0/nodes/<resource id>/attributes/... */\n resource: number;\n};\n\nexport type I3STextureFormat = 'jpg' | 'png' | 'ktx-etc2' | 'dds' | 'ktx2';\n\n// TODO Replace \"[key: string]: any\" with actual defenition\nexport type I3STileHeader = {\n isDracoGeometry: boolean;\n textureUrl?: string;\n url?: string;\n textureFormat?: I3STextureFormat;\n textureLoaderOptions?: any;\n materialDefinition?: I3SMaterialDefinition;\n mbs: Mbs;\n obb?: Obb;\n lodSelection?: LodSelection[];\n [key: string]: any;\n};\n\nexport type I3SParseOptions = {\n /** ArcGIS access token */\n token?: string;\n /** Is 3DSceneLayer json expected in response */\n isTileset?: string;\n /** Is 3DNodeIndexDocument json expected in response */\n isTileHeader?: string;\n /** Tile3D instance. This property used only to load tile content */\n /** Tile-specific options */\n _tileOptions?: I3STileOptions;\n /** Tileset-specific options */\n _tilesetOptions?: I3STilesetOptions;\n /** Load Draco Compressed geometry if available */\n useDracoGeometry?: boolean;\n /** Load compressed textures if available */\n useCompressedTextures?: boolean;\n /** Set false if don't need to parse textures */\n decodeTextures?: boolean;\n /** deck.gl compatible coordinate system.\n * https://github.com/visgl/deck.gl/blob/master/docs/developer-guide/coordinate-systems.md\n * Supported coordinate systems: METER_OFFSETS, LNGLAT_OFFSETS\n */\n coordinateSystem?: number;\n colorsByAttribute?: {\n attributeName: string;\n minValue: number;\n maxValue: number;\n minColor: COLOR;\n maxColor: COLOR;\n mode: string;\n };\n\n /** @deprecated */\n tile?: Tile3D | I3STileOptions;\n /** Tileset3D instance. This property used only to load tile content */\n /** @deprecated */\n tileset?: Tileset3D | I3STilesetOptions;\n};\n\nexport type I3STileOptions = {\n isDracoGeometry: boolean;\n textureUrl?: string;\n textureFormat?: I3STextureFormat;\n textureLoaderOptions?: any;\n materialDefinition?: I3SMaterialDefinition;\n attributeUrls: string[];\n mbs: Mbs;\n};\n\nexport type I3STilesetOptions = {\n store: Store;\n attributeStorageInfo: AttributeStorageInfo[];\n fields: Field[];\n};\n\n// TODO Replace \"[key: string]: any\" with actual defenition\nexport type I3STileContent = {\n attributes: I3SMeshAttributes;\n indices: TypedArray | null;\n featureIds: number[] | TypedArray;\n vertexCount: number;\n modelMatrix: Matrix4;\n coordinateSystem: number;\n byteLength: number;\n texture: TileContentTexture;\n [key: string]: any;\n};\n\nexport type TileContentTexture =\n | ArrayBuffer\n | {\n compressed: boolean;\n mipmaps: boolean;\n width: number;\n height: number;\n data: TextureLevel[];\n }\n | null;\n\nexport type BoundingVolumes = {\n mbs: Mbs;\n obb: Obb;\n};\n\nexport type Obb = {\n center: number[] | Vector3;\n halfSize: number[] | Vector3;\n quaternion: number[] | Quaternion;\n};\n\nexport type Mbs = [number, number, number, number];\n\n/** SceneLayer3D based on I3S specification - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/3DSceneLayer.cmn.md */\nexport type SceneLayer3D = {\n /** Unique numeric ID of the layer. */\n id: number;\n /** The relative URL to the 3DSceneLayerResource. Only present as part of the SceneServiceInfo resource. */\n href?: string;\n /** The user-visible layer type */\n layerType: '3DObject' | 'IntegratedMesh';\n /** The spatialReference of the layer including the vertical coordinate reference system (CRS). Well Known Text (WKT) for CRS is included to support custom CRS. */\n spatialReference?: SpatialReference;\n /** Enables consuming clients to quickly determine whether this layer is compatible (with respect to its horizontal and vertical coordinate system) with existing content. */\n heightModelInfo?: HeightModelInfo;\n /** The ID of the last update session in which any resource belonging to this layer has been updated. */\n version: string;\n /** The name of this layer. */\n name?: string;\n /** The time of the last update. */\n serviceUpdateTimeStamp?: {lastUpdate: number};\n /** The display alias to be used for this layer. */\n alias?: string;\n /** Description string for this layer. */\n description?: string;\n /** Copyright and usage information for the data in this layer. */\n copyrightText?: string;\n /** Capabilities supported by this layer. */\n capabilities: string[];\n /** ZFactor to define conversion factor for elevation unit. */\n ZFactor?: number;\n /** Indicates if any styling information represented as drawingInfo is captured as part of the binary mesh representation. */\n cachedDrawingInfo?: CachedDrawingInfo;\n /** An object containing drawing information. */\n drawingInfo?: DrawingInfo;\n /** An object containing elevation drawing information. If absent, any content of the scene layer is drawn at its z coordinate. */\n elevationInfo?: ElevationInfo;\n /** PopupInfo of the scene layer. */\n popupInfo?: PopupInfo;\n /** Indicates if client application will show the popup information. Default is FALSE. */\n disablePopup: boolean;\n /**\n * The store object describes the exact physical storage of a layer and\n * enables the client to detect when multiple layers are served from\n * the same store.\n */\n store: Store;\n /** A collection of objects that describe each attribute field regarding its field name, datatype, and a user friendly name {name,type,alias}. */\n fields?: Field[];\n /** Provides the schema and layout used for storing attribute content in binary format in I3S. */\n attributeStorageInfo?: AttributeStorageInfo[];\n /** Contains the statistical information for a layer. */\n statisticsInfo?: StatisticsInfo[];\n /** The paged-access index description. */\n nodePages?: NodePageDefinition;\n /** List of materials classes used in this layer. */\n materialDefinitions?: I3SMaterialDefinition[];\n /** Defines the set of textures that can be referenced by meshes. */\n textureSetDefinitions?: TextureSetDefinition[];\n /** Define the layouts of mesh geometry and its attributes */\n geometryDefinitions?: GeometryDefinition[];\n /** 3D extent. */\n fullExtent?: FullExtent;\n};\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/cachedDrawingInfo.cmn.md */\nexport type CachedDrawingInfo = {\n /** If true, the drawingInfo is captured as part of the binary scene layer representation. */\n color: boolean;\n};\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/drawingInfo.cmn.md */\nexport type DrawingInfo = {\n /** An object defining the symbology for the layer. See more information about supported renderer types in ArcGIS clients. */\n renderer: any;\n /** Scale symbols for the layer. */\n scaleSymbols: boolean;\n};\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/elevationInfo.cmn.md */\nexport type ElevationInfo = {\n mode: 'relativeToGround' | 'absoluteHeight' | 'onTheGround' | 'relativeToScene';\n /** Offset is always added to the result of the above logic except for onTheGround where offset is ignored. */\n offset: number;\n /** A string value indicating the unit for the values in elevationInfo */\n unit: string;\n};\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/statisticsInfo.cmn.md */\nexport type StatisticsInfo = {\n /** Key indicating the resource of the statistics. */\n key: string;\n /** Name of the field of the statistical information. */\n name: string;\n /** The URL to the statistics information. */\n href: string;\n};\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/nodePageDefinition.cmn.md */\nexport type NodePageDefinition = {\n /** Number of nodes per page for this layer. Must be a power-of-two less than 4096 */\n nodesPerPage: number;\n /** Index of the root node. Default = 0. */\n rootIndex?: number;\n /** Defines the meaning of nodes[].lodThreshold for this layer. */\n lodSelectionMetricType: 'maxScreenThresholdSQ';\n};\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/materialDefinitions.cmn.md */\nexport type I3SMaterialDefinition = {\n /** A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology. When not specified, all the default values of pbrMetallicRoughness apply. */\n pbrMetallicRoughness: I3SPbrMetallicRoughness;\n /** The normal texture map. */\n normalTexture?: I3SMaterialTexture;\n /** The occlusion texture map. */\n occlusionTexture?: I3SMaterialTexture;\n /** The emissive texture map. */\n emissiveTexture?: I3SMaterialTexture;\n /** The emissive color of the material. */\n emissiveFactor?: [number, number, number];\n /** Defines the meaning of the alpha-channel/alpha-mask. */\n alphaMode: 'opaque' | 'mask' | 'blend';\n /** The alpha cutoff value of the material. */\n alphaCutoff?: number;\n /** Specifies whether the material is double sided. */\n doubleSided?: boolean;\n /** Winding order is counterclockwise. */\n cullFace?: 'none' | 'front' | 'back';\n};\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/pbrMetallicRoughness.cmn.md */\nexport type I3SPbrMetallicRoughness = {\n /** The material's base color factor. default=[1,1,1,1] */\n baseColorFactor?: [number, number, number, number];\n /** The base color texture. */\n baseColorTexture?: I3SMaterialTexture;\n /** the metalness of the material. default=1.0 */\n metallicFactor: number;\n /** the roughness of the material. default=1.0 */\n roughnessFactor: number;\n /** the metallic-roughness texture. */\n metallicRoughnessTexture?: I3SMaterialTexture;\n};\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/materialTexture.cmn.md */\nexport type I3SMaterialTexture = {\n /** The index in layer.textureSetDefinitions. */\n textureSetDefinitionId: number;\n /** The set index of texture's TEXCOORD attribute used for texture coordinate mapping. Default is 0. Deprecated. */\n texCoord?: number;\n /** The normal texture: scalar multiplier applied to each normal vector of the normal texture. For occlusion texture,scalar multiplier controlling the amount of occlusion applied. Default=1 */\n factor?: number;\n};\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/attributeStorageInfo.cmn.md */\nexport type AttributeStorageInfo = {\n key: string;\n name: string;\n header: {property: string; valueType: string}[];\n ordering?: string[];\n attributeValues?: AttributeValue;\n attributeByteCounts?: AttributeValue;\n objectIds?: AttributeValue;\n};\n\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/field.cmn.md */\nexport type Field = {\n name: string;\n type: ESRIField;\n alias?: string;\n domain?: Domain;\n};\n\nexport type ESRIField =\n | 'esriFieldTypeDate'\n | 'esriFieldTypeSingle'\n | 'esriFieldTypeDouble'\n | 'esriFieldTypeGUID'\n | 'esriFieldTypeGlobalID'\n | 'esriFieldTypeInteger'\n | 'esriFieldTypeOID'\n | 'esriFieldTypeSmallInteger'\n | 'esriFieldTypeString';\n\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/popupInfo.cmn.md */\nexport type PopupInfo = {\n title?: string;\n description?: string;\n expressionInfos?: any[];\n fieldInfos?: FieldInfo[];\n mediaInfos?: any[];\n popupElements?: {text?: string; type?: string; fieldInfos?: FieldInfo[]}[];\n};\n\n/**\n * Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.7/3DNodeIndexDocument.cmn.md\n */\nexport type Node3DIndexDocument = {\n id: string;\n version?: string;\n level?: number;\n mbs?: Mbs;\n obb?: Obb;\n lodSelection?: LodSelection[];\n children?: NodeReference[];\n neighbors?: NodeReference[];\n parentNode?: NodeReference;\n sharedResource?: Resource;\n featureData?: Resource[];\n geometryData?: Resource[];\n textureData?: Resource[];\n attributeData?: Resource[];\n created?: string;\n expires?: string;\n};\n\n/**\n * Minimal I3S node data is needed for loading\n */\nexport type I3SMinimalNodeData = {\n id: string;\n url?: string;\n transform?: number[];\n lodSelection?: LodSelection[];\n obb?: Obb;\n mbs?: Mbs;\n contentUrl?: string;\n textureUrl?: string;\n attributeUrls?: string[];\n materialDefinition?: I3SMaterialDefinition;\n textureFormat?: I3STextureFormat;\n textureLoaderOptions?: {[key: string]: any};\n children?: NodeReference[];\n isDracoGeometry: boolean;\n};\n\nexport type LodSelection = {\n metricType?: string;\n maxError: number;\n};\n\nexport type NodeReference = {\n id: string;\n version?: string;\n mbs?: Mbs;\n obb?: Obb;\n href?: string;\n};\n\nexport type Resource = {\n href: string;\n layerContent?: string[];\n featureRange?: number[];\n multiTextureBundle?: string;\n vertexElements?: number[];\n faceElements?: number[];\n nodePath?: string;\n};\n\nexport type MaxScreenThresholdSQ = {\n maxError: number;\n};\n\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/node.cmn.md */\nexport type NodeInPage = {\n /**\n * The index in the node array. May be different than material, geometry and attribute resource id. See mesh for more information.\n */\n index: number;\n /**\n * The index of the parent node in the node array.\n */\n parentIndex?: number;\n /**\n * When to switch LoD. See https://github.com/Esri/i3s-spec/blob/master/docs/1.8/nodePageDefinition.cmn.md for more information.\n */\n lodThreshold?: number;\n /**\n * Oriented bounding box for this node.\n */\n obb: Obb;\n /**\n * index of the children nodes indices.\n */\n children?: number[];\n /**\n * The mesh for this node. WARNING: only SINGLE mesh is supported at version 1.7 (i.e. length must be 0 or 1).\n */\n mesh?: NodeMesh;\n};\n\n/**\n * https://github.com/Esri/i3s-spec/blob/master/docs/1.8/materialDefinitionInfo.cmn.md\n */\nexport type MaterialDefinitionInfo = {\n /** A name for the material as assigned in the creating application. */\n name?: string;\n /** Indicates the material type, chosen from the supported values. */\n type?: 'standard' | 'water' | 'billboard' | 'leafcard' | 'reference';\n /** The href that resolves to the shared resource bundle in which the material definition is contained. */\n $ref?: string;\n /** Parameter defined for the material.\n * https://github.com/Esri/i3s-spec/blob/master/docs/1.8/materialParams.cmn.md\n */\n params: {\n /** Indicates transparency of this material; 0 = opaque, 1 = fully transparent. */\n transparency?: number;\n /** Indicates reflectivity of this material. */\n reflectivity?: number;\n /** Indicates shininess of this material. */\n shininess?: number;\n /** Ambient color of this material. Ambient color is the color of an object where it is in shadow.\n * This color is what the object reflects when illuminated by ambient light rather than direct light. */\n ambient?: number[];\n /** Diffuse color of this material. Diffuse color is the most instinctive meaning of the color of an object.\n * It is that essential color that the object reveals under pure white light. It is perceived as the color\n * of the object itself rather than a reflection of the light. */\n diffuse?: number[];\n /** Specular color of this material. Specular color is the color of the light of a specular reflection\n * (specular reflection is the type of reflection that is characteristic of light reflected from a shiny\n * surface). */\n specular?: number[];\n /** Rendering mode. */\n renderMode: 'textured' | 'solid' | 'untextured' | 'wireframe';\n /** TRUE if features with this material should cast shadows. */\n castShadows?: boolean;\n /** TRUE if features with this material should receive shadows */\n receiveShadows?: boolean;\n /** Indicates the material culling options {back, front, none}. */\n cullFace?: string;\n /** This flag indicates that the vertex color attribute of the geometry should be used to color the geometry\n * for rendering. If texture is present, the vertex colors are multiplied by this color.\n * e.g. pixel_color = [interpolated]vertex_color * texel_color. Default is false. */\n vertexColors?: boolean;\n /** This flag indicates that the geometry has uv region vertex attributes. These are used for adressing\n * subtextures in a texture atlas. The uv coordinates are relative to this subtexture in this case.\n * This is mostly useful for repeated textures in a texture atlas. Default is false. */\n vertexRegions?: boolean;\n /** Indicates whether Vertex Colors also contain a transparency channel. Default is false. */\n useVertexColorAlpha?: boolean;\n };\n};\n\n/** https://github.com/Esri/i3s-spec/blob/master/docs/1.8/sharedResource.cmn.md */\nexport type SharedResources = {\n /** Materials describe how a Feature or a set of Features is to be rendered. */\n materialDefinitions?: {[key: string]: MaterialDefinitionInfo};\n /** A Texture is a set of images, with some parameters specific to the texture/uv mapping to geometries. */\n textureDefinitions?: {[key: string]: TextureDefinitionInfo};\n};\n\n/** https://github.com/Esri/i3s-spec/blob/master/docs/1.8/image.cmn.md */\ntype TextureImage = {\n /** A unique ID for each image. Generated using the BuildID function. */\n id: string;\n /** width of this image, in pixels. */\n size?: number;\n /** The maximum size of a single pixel in world units.\n * This property is used by the client to pick the image to load and render. */\n pixelInWorldUnits?: number;\n /** The href to the image(s), one per encoding, in the same order as the encodings. */\n href?: string[];\n /** The byte offset of this image's encodings. There is one per encoding,\n * in the same order as the encodings, in the block in which this texture image resides. */\n byteOffset?: string[];\n /** The length in bytes of this image's encodings. There is one per encoding,\n * in the same order as the encodings. */\n length?: number[];\n};\n\nexport type Attribute = 'OBJECTID' | 'string' | 'double' | 'Int32' | string;\n\nexport type Extent = [number, number, number, number];\n\nexport type FeatureAttribute = {\n id: AttributeValue;\n faceRange: AttributeValue;\n};\n\nexport type BuildingSceneLayerTileset = {\n header: BuildingSceneLayer;\n sublayers: BuildingSceneSublayer[];\n};\n\nexport type BuildingSceneLayer = {\n id: number;\n name: string;\n version: string;\n alias?: string;\n layerType: 'Building';\n description?: string;\n copyrightText?: string;\n fullExtent: FullExtent;\n spatialReference: SpatialReference;\n heightModelInfo?: HeightModelInfo;\n sublayers: BuildingSceneSublayer[];\n filters?: Filter[];\n activeFilterID?: string;\n statisticsHRef?: string;\n};\n\nexport type BuildingSceneSublayer = {\n id: number;\n name: string;\n alias?: string;\n discipline?: 'Mechanical' | 'Architectural' | 'Piping' | 'Electrical' | 'Structural';\n modelName?: string;\n layerType: 'group' | '3DObject' | 'Point';\n visibility?: boolean;\n sublayers?: BuildingSceneSublayer[];\n isEmpty?: boolean;\n url?: string;\n};\n\ntype Filter = {\n id: string;\n name: string;\n description: string;\n isDefaultFilter?: boolean;\n isVisible?: boolean;\n filterBlocks: FilterBlock[];\n filterAuthoringInfo?: FilterAuthoringInfo;\n};\n\ntype FilterAuthoringInfo = {\n type: string;\n filterBlocks: FilterBlockAuthoringInfo[];\n};\n\ntype FilterBlockAuthoringInfo = {\n filterTypes: FilterType[];\n};\n\ntype FilterType = {\n filterType: string;\n filterValues: string[];\n};\n\ntype FilterBlock = {\n title: string;\n filterMode: FilterModeSolid | FilterModeWireFrame;\n filterExpression: string;\n};\n\ntype Edges = {\n type: string;\n color: number[];\n size: number;\n transparency: number;\n extensionLength: number;\n};\n\ntype FilterModeSolid = {\n type: 'solid';\n};\n\ntype FilterModeWireFrame = {\n type: 'wireFrame';\n edges: Edges;\n};\n\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/spatialReference.cmn.md */\nexport type SpatialReference = {\n /** The current WKID value of the vertical coordinate system. */\n latestVcsWkid: number;\n /** dentifies the current WKID value associated with the same spatial reference. */\n latestWkid: number;\n /** The WKID value of the vertical coordinate system. */\n vcsWkid: number;\n /** WKID, or Well-Known ID, of the CRS. Specify either WKID or WKT of the CRS. */\n wkid: number;\n /** WKT, or Well-Known Text, of the CRS. Specify either WKT or WKID of the CRS but not both. */\n wkt?: string;\n};\n\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/fullExtent.cmn.md */\nexport type FullExtent = {\n /** left longitude in decimal degrees */\n xmin: number;\n /** right longitude in decimal degrees */\n xmax: number;\n /** bottom latitude in decimal degrees*/\n ymin: number;\n /** top latitude in decimal degrees*/\n ymax: number;\n /** lowest elevation in meters */\n zmin: number;\n /** highest elevation in meters */\n zmax: number;\n spatialReference?: SpatialReference;\n};\n\n/**\n * https://github.com/Esri/i3s-spec/blob/master/docs/1.8/textureDefinitionInfo.cmn.md\n */\nexport type TextureDefinitionInfo = {\n /** MIMEtype - The encoding/content type that is used by all images in this map */\n encoding?: string[];\n /** UV wrapping modes, from {none, repeat, mirror}. */\n wrap?: string[];\n /** TRUE if the Map represents a texture atlas. */\n atlas?: boolean;\n /** The name of the UV set to be used as texture coordinates. */\n uvSet?: string;\n /** Indicates channels description. */\n channels?: 'rbg' | 'rgba' | string;\n /** An image is a binary resource, containing a single raster that can be used to texture a feature or symbol. */\n images: TextureImage[];\n};\n\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/domain.cmn.md */\ntype Domain = {\n type: string;\n name: string;\n description?: string;\n fieldType?: string;\n range?: [number, number];\n codedValues?: {name: string; code: string | number}[];\n mergePolicy?: string;\n splitPolicy?: string;\n};\n/**\n * spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/store.cmn.md\n */\ntype Store = {\n id?: string | number;\n profile: string;\n version: number | string;\n resourcePattern?: string[];\n rootNode?: string;\n extent?: number[];\n indexCRS?: string;\n vertexCRS?: string;\n normalReferenceFrame?: string;\n lodType?: string;\n lodModel?: string;\n defaultGeometrySchema: DefaultGeometrySchema;\n nidEncoding?: string;\n textureEncoding?: string[];\n featureEncoding?: string;\n geometryEncoding?: string;\n attributeEncoding?: string;\n indexingScheme?: string;\n};\n/**\n * Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/defaultGeometrySchema.cmn.md\n */\ntype DefaultGeometrySchema = {\n geometryType?: 'triangles';\n topology: 'PerAttributeArray' | 'Indexed';\n header: HeaderAttribute[];\n ordering: string[];\n vertexAttributes: VertexAttribute;\n faces?: VertexAttribute;\n featureAttributeOrder: string[];\n featureAttributes: FeatureAttribute;\n // TODO Do we realy need this Property?\n attributesOrder?: string[];\n};\n/**\n * spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/headerAttribute.cmn.md\n */\nexport type HeaderAttribute = {\n property: HeaderAttributeProperty.vertexCount | HeaderAttributeProperty.featureCount | string;\n type:\n | 'UInt8'\n | 'UInt16'\n | 'UInt32'\n | 'UInt64'\n | 'Int16'\n | 'Int32'\n | 'Int64'\n | 'Float32'\n | 'Float64';\n};\nexport enum HeaderAttributeProperty {\n vertexCount = 'vertexCount',\n featureCount = 'featureCount'\n}\nexport type VertexAttribute = {\n position: GeometryAttribute;\n normal: GeometryAttribute;\n uv0: GeometryAttribute;\n color: GeometryAttribute;\n region?: GeometryAttribute;\n};\nexport type GeometryAttribute = {\n byteOffset?: number;\n valueType: 'UInt8' | 'UInt16' | 'Int16' | 'Int32' | 'Int64' | 'Float32' | 'Float64';\n valuesPerElement: number;\n};\nexport type I3SMeshAttributes = {\n [key: string]: I3SMeshAttribute;\n};\nexport interface I3SMeshAttribute extends MeshAttribute {\n type?: number;\n metadata?: any;\n}\n/** https://github.com/Esri/i3s-spec/blob/master/docs/1.8/heightModelInfo.cmn.md */\ntype HeightModelInfo = {\n heightModel: 'gravity_related_height' | 'ellipsoidal';\n vertCRS: string;\n heightUnit:\n | 'meter'\n | 'us-foot'\n | 'foot'\n | 'clarke-foot'\n | 'clarke-yard'\n | 'clarke-link'\n | 'sears-yard'\n | 'sears-foot'\n | 'sears-chain'\n | 'benoit-1895-b-chain'\n | 'indian-yard'\n | 'indian-1937-yard'\n | 'gold-coast-foot'\n | 'sears-1922-truncated-chain'\n | 'us-inch'\n | 'us-mile'\n | 'us-yard'\n | 'millimeter'\n | 'decimeter'\n | 'centimeter'\n | 'kilometer';\n};\n\nexport type TextureSetDefinitionFormats = {name: string; format: I3STextureFormat}[];\n\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/textureSetDefinition.cmn.md */\ntype TextureSetDefinition = {\n formats: TextureSetDefinitionFormats;\n atlas?: boolean;\n};\n\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/geometryDefinition.cmn.md */\ntype GeometryDefinition = {\n topology: 'triangle' | string;\n geometryBuffers: GeometryBuffer[];\n};\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/geometryBuffer.cmn.md */\ntype GeometryBuffer = {\n offset?: number;\n position?: GeometryBufferItem;\n normal?: GeometryBufferItem;\n uv0?: GeometryBufferItem;\n color?: GeometryBufferItem;\n uvRegion?: GeometryBufferItem;\n featureId?: GeometryBufferItem;\n faceRange?: GeometryBufferItem;\n compressedAttributes?: {encoding: string; attributes: string[]};\n};\n\ntype GeometryBufferItem = {type: string; component: number; encoding?: string; binding: string};\n\ntype AttributeValue = {valueType: string; encoding?: string; valuesPerElement?: number};\n\nexport type FieldInfo = {\n fieldName: string;\n visible: boolean;\n isEditable: boolean;\n label: string;\n};\n\nexport type ArcGisWebSceneData = {\n header: ArcGisWebScene;\n layers: OperationalLayer[];\n unsupportedLayers: OperationalLayer[];\n};\n\n/**\n * ArcGis WebScene spec - https://developers.arcgis.com/web-scene-specification/objects/webscene/\n */\nexport type ArcGisWebScene = {\n /**\n * @todo add type.\n * Spec - https://developers.arcgis.com/web-scene-specification/objects/applicationProperties/\n * Configuration of application and UI elements.\n */\n applicationProperties?: any;\n /**\n * Operational layers contain business data which are used to make thematic scenes.\n */\n operationalLayers: OperationalLayer[];\n /**\n * Basemaps give the web scene a geographic context.\n */\n baseMap: BaseMap;\n /**\n * Ground defines the main surface of the web scene, based on elevation layers.\n */\n ground: Ground;\n /**\n * An object that defines the characteristics of the vertical coordinate system used by the web scene.\n */\n heightModelInfo: HeightModelInfo;\n /**\n * Root element in the web scene specifying a string value indicating the web scene version.\n * Valid values: 1.8, 1.9, 1.10, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.19, 1.20, 1.21, 1.22, 1.23, 1.24, 1.25, 1.26, 1.27\n */\n version: string;\n /**\n * String value indicating the application which authored the webmap\n */\n authoringApp: string;\n /**\n * String value indicating the authoring App's version number.\n */\n authoringAppVersion: string;\n /**\n * A presentation consists of multiple slides, where each slide is a specific view into the web scene.\n * Spec - https://developers.arcgis.com/web-scene-specification/objects/presentation/\n * @todo Add presentation type.\n */\n presentation: ArcGisPresentation;\n /**\n * An object that provides information about the initial environment settings and viewpoint of the web scene.\n */\n initialState: InitialState;\n /**\n * An object used to specify the spatial reference of the given geometry.\n */\n spatialReference: SpatialReference;\n viewingMode: 'global' | 'local';\n /**\n * @todo add type.\n * Defines area to be clipped for display.\n */\n clippingArea?: any;\n /**\n * @todo add type.\n * Spec - https://developers.arcgis.com/web-scene-specification/objects/mapFloorInfo/\n * Contains floor-awareness information for the web scene.\n */\n mapFloorInfo?: any;\n /**\n * @todo add type.\n * Spec - https://developers.arcgis.com/web-scene-specification/objects/mapRangeInfo/\n * Map Range Information\n */\n mapRangeInfo?: any;\n /**\n * @todo add type.\n * Spec - https://developers.arcgis.com/web-scene-specification/objects/table/\n * An array of table objects.\n */\n tables?: any;\n /**\n * @todo add type.\n * Spec - https://developers.arcgis.com/web-scene-specification/objects/transportationNetwork/\n * Used to specify the transportation networks of the scene.\n */\n transportationNetworks?: any;\n /**\n * @todo add type.\n * Spec - https://developers.arcgis.com/web-scene-specification/objects/widgets/\n * The widgets object contains widgets that should be exposed to the user.\n */\n widgets?: any;\n};\n\n/**\n * Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Presentation.html\n */\ntype ArcGisPresentation = {\n slides: Slide[];\n};\n\n/**\n * A slide stores a snapshot of several pre-set properties of the WebScene and SceneView,\n * such as the basemap, viewpoint and visible layers.\n * Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Slide.html\n */\ntype Slide = {\n id: string;\n title: {\n text: string;\n };\n thumbnail: {\n url: string;\n };\n description: {\n text: string;\n };\n ground: {\n transparency: number;\n };\n baseMap: ArcGisBaseMap;\n visibleLayers: ArcGisVisibleLayer[];\n viewpoint: ArcGisViewPoint;\n};\n\n/**\n * The basemap of the scene. Only the base and reference layers of the basemap are stored in a slide.\n * Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html\n */\ntype ArcGisBaseMap = {\n id: string;\n title: string;\n baseMapLayers: ArcGisBaseMapLayer[];\n};\n\n/**\n * The visible layers of the scene.\n * Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-Slide.html#visibleLayers\n */\ntype ArcGisVisibleLayer = {\n id: string;\n sublayerIds: number[];\n};\n/**\n * The basemap of the scene.\n * Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html\n */\ntype ArcGisBaseMapLayer = {\n id: string;\n title: string;\n url: string;\n layerType: string;\n visibility: boolean;\n};\n\n/**\n * The viewpoint of the slide. This acts like a bookmark, saving a predefined location or point of view from which to view the scene.\n * Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-Viewpoint.html\n */\ntype ArcGisViewPoint = {\n scale: number;\n rotation?: number;\n /**\n * Spec - https://developers.arcgis.com/web-scene-specification/objects/viewpoint/\n */\n targetGeometry: any;\n camera: ArcGisCamera;\n};\n\n/**\n * The camera defines the position, tilt, and heading of the point from which the SceneView's visible extent is observed.\n * It is not associated with device hardware. This class only applies to 3D SceneViews.\n * Spec - https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html\n */\nexport type ArcGisCamera = {\n position: {\n x: number;\n y: number;\n z: number;\n };\n spatialReference: {\n wkid: number;\n latestWkid: number;\n };\n heading: number;\n tilt: number;\n};\n\n/**\n * Operational layers contain your data. Usually, a basemap sits beneath your operational layers to give them geographic context.\n * Spec- https://developers.arcgis.com/web-scene-specification/objects/operationalLayers/\n */\nexport type OperationalLayer = {\n id: string;\n opacity: number;\n title: string;\n url: string;\n visibility: boolean;\n itemId: string;\n layerType: string;\n LayerDefinition: LayerDefinition;\n screenSizePerspective: boolean;\n showLabels?: boolean;\n disablePopup?: boolean;\n showLegend?: boolean;\n layers?: OperationalLayer[];\n};\n\ntype LayerDefinition = {\n elevationInfo: ElevationInfo;\n drawingInfo: DrawingInfo;\n};\n\ntype BaseMap = {\n id: string;\n title: string;\n baseMapLayers: BaseMapLayer[];\n elevationLayers: ElevationLayer[];\n};\n\ntype BaseMapLayer = {\n id: string;\n opacity: number;\n title: string;\n url: string;\n visibility: boolean;\n layerType: string;\n};\n\ntype ElevationLayer = {\n id: string;\n listMode: string;\n title: string;\n url: string;\n visibility: boolean;\n layerType: string;\n};\n\ntype Ground = {\n layers: ElevationLayer[];\n transparency: number;\n navigationConstraint: NavigationConstraint;\n};\n\ntype NavigationConstraint = {\n type: string;\n};\n\ntype InitialState = {\n environment: Enviroment;\n viewpoint: ViewPoint;\n};\n\ntype Enviroment = {\n lighting: Lighting;\n atmosphereEnabled?: string;\n starsEnabled?: string;\n};\n\ntype Lighting = {\n datetime?: number;\n displayUTCOffset?: number;\n};\n\ntype ViewPoint = {\n camera: Camera;\n};\n\ntype Camera = {\n position: CameraPosition;\n heading: number;\n tilt: number;\n};\n\ntype CameraPosition = {\n spatialReference: SpatialReference;\n x: number;\n y: number;\n z: number;\n};\n\n/**\n * Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/statsInfo.cmn.md\n */\nexport type StatsInfo = {\n /** Represents the count of the value. */\n totalValuesCount?: number;\n /** Minimum attribute value for the entire layer. */\n min?: number;\n /** Maximum attribute value for the entire layer. */\n max?: number;\n /** Count for the entire layer. */\n count?: number;\n /** Sum of the attribute values over the entire layer. */\n sum?: number;\n /** Representing average or mean value. For example, sum/count. */\n avg?: number;\n /** Representing the standard deviation. */\n stddev?: number;\n /**\tRepresenting variance. For example, stats.stddev *stats.stddev. */\n variance?: number;\n /** Represents the histogram. */\n histogram?: Histogram;\n /** An array of most frequently used values within the point cloud scene layer. */\n mostFrequentValues?: ValueCount[];\n};\n\n/** Spec - https://github.com/Esri/i3s-spec/blob/master/docs/1.8/histogram.cmn.md */\nexport type Histogram = {\n /** Minimum attribute value for the entire layer. */\n minimum: number;\n /** Maximum attribute value for the entire layer. Maximum array size for stats.histo.counts is 256. */\n maximum: number;\n /** Count for the entire layer. */\n counts: number[];\n};\n\nexport type ValueCount = {\n /** Type of the attribute values after decompression, if applicable. Please note that string is not supported for point cloud scene layer attributes. */\n value: number | string;\n /** Count of the number of values. May exceed 32 bits. */\n count: number;\n};\n"],"mappings":";;;;;;IA0tBYA,uBAAuB,aAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAA,OAAvBA,uBAAuB;AAAA;AAAAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA"}
@@ -1,5 +1,5 @@
1
1
  import { parseWebscene } from './lib/parsers/parse-arcgis-webscene';
2
- const VERSION = typeof "4.0.0-alpha.14" !== 'undefined' ? "4.0.0-alpha.14" : 'beta';
2
+ const VERSION = typeof "4.0.0-alpha.16" !== 'undefined' ? "4.0.0-alpha.16" : 'beta';
3
3
  export const ArcGisWebSceneLoader = {
4
4
  name: 'ArcGIS Web Scene Loader',
5
5
  id: 'arcgis-web-scene',
@@ -1,7 +1,7 @@
1
1
  import { load } from '@loaders.gl/core';
2
2
  import { parseI3STileAttribute } from './lib/parsers/parse-i3s-attribute';
3
3
  import { getUrlWithToken } from './lib/utils/url-utils';
4
- const VERSION = typeof "4.0.0-alpha.14" !== 'undefined' ? "4.0.0-alpha.14" : 'latest';
4
+ const VERSION = typeof "4.0.0-alpha.16" !== 'undefined' ? "4.0.0-alpha.16" : 'latest';
5
5
  const EMPTY_VALUE = '';
6
6
  const REJECTED_STATUS = 'rejected';
7
7
  export const I3SAttributeLoader = {
@@ -1,5 +1,5 @@
1
1
  import { parseBuildingSceneLayer } from './lib/parsers/parse-i3s-building-scene-layer';
2
- const VERSION = typeof "4.0.0-alpha.14" !== 'undefined' ? "4.0.0-alpha.14" : 'beta';
2
+ const VERSION = typeof "4.0.0-alpha.16" !== 'undefined' ? "4.0.0-alpha.16" : 'beta';
3
3
  export const I3SBuildingSceneLayerLoader = {
4
4
  name: 'I3S Building Scene Layer',
5
5
  id: 'i3s-building-scene-layer',
@@ -1,5 +1,5 @@
1
1
  import { parseI3STileContent } from './lib/parsers/parse-i3s-tile-content';
2
- const VERSION = typeof "4.0.0-alpha.14" !== 'undefined' ? "4.0.0-alpha.14" : 'beta';
2
+ const VERSION = typeof "4.0.0-alpha.16" !== 'undefined' ? "4.0.0-alpha.16" : 'beta';
3
3
  export const I3SContentLoader = {
4
4
  name: 'I3S Content (Indexed Scene Layers)',
5
5
  id: 'i3s-content',