@loaders.gl/tile-converter 4.2.0-alpha.4 → 4.2.0-alpha.6

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 (192) hide show
  1. package/dist/3d-tiles-converter/3d-tiles-converter.d.ts +4 -4
  2. package/dist/3d-tiles-converter/3d-tiles-converter.d.ts.map +1 -1
  3. package/dist/3d-tiles-converter/3d-tiles-converter.js +349 -293
  4. package/dist/3d-tiles-converter/helpers/b3dm-converter.d.ts.map +1 -1
  5. package/dist/3d-tiles-converter/helpers/b3dm-converter.js +261 -200
  6. package/dist/3d-tiles-converter/helpers/i3s-obb-to-3d-tiles-obb.js +14 -5
  7. package/dist/3d-tiles-converter/helpers/load-i3s.d.ts.map +1 -1
  8. package/dist/3d-tiles-converter/helpers/load-i3s.js +83 -77
  9. package/dist/3d-tiles-converter/helpers/texture-atlas.js +44 -21
  10. package/dist/3d-tiles-converter/json-templates/tileset.js +32 -33
  11. package/dist/constants.js +0 -1
  12. package/dist/converter-cli.js +257 -234
  13. package/dist/converter.min.cjs +95 -105
  14. package/dist/deps-installer/deps-installer.d.ts.map +1 -1
  15. package/dist/deps-installer/deps-installer.js +78 -59
  16. package/dist/i3s-converter/helpers/attribute-metadata-info.js +210 -153
  17. package/dist/i3s-converter/helpers/batch-ids-extensions.d.ts +1 -1
  18. package/dist/i3s-converter/helpers/batch-ids-extensions.d.ts.map +1 -1
  19. package/dist/i3s-converter/helpers/batch-ids-extensions.js +146 -103
  20. package/dist/i3s-converter/helpers/coordinate-converter.js +100 -65
  21. package/dist/i3s-converter/helpers/create-scene-server-path.js +14 -9
  22. package/dist/i3s-converter/helpers/feature-attributes.d.ts.map +1 -1
  23. package/dist/i3s-converter/helpers/feature-attributes.js +170 -105
  24. package/dist/i3s-converter/helpers/geometry-attributes.d.ts +1 -1
  25. package/dist/i3s-converter/helpers/geometry-attributes.d.ts.map +1 -1
  26. package/dist/i3s-converter/helpers/geometry-attributes.js +205 -212
  27. package/dist/i3s-converter/helpers/geometry-converter.d.ts +17 -3
  28. package/dist/i3s-converter/helpers/geometry-converter.d.ts.map +1 -1
  29. package/dist/i3s-converter/helpers/geometry-converter.js +1189 -830
  30. package/dist/i3s-converter/helpers/gltf-attributes.d.ts +1 -1
  31. package/dist/i3s-converter/helpers/gltf-attributes.d.ts.map +1 -1
  32. package/dist/i3s-converter/helpers/gltf-attributes.js +109 -97
  33. package/dist/i3s-converter/helpers/load-3d-tiles.js +103 -66
  34. package/dist/i3s-converter/helpers/node-debug.js +98 -54
  35. package/dist/i3s-converter/helpers/node-index-document.d.ts +11 -4
  36. package/dist/i3s-converter/helpers/node-index-document.d.ts.map +1 -1
  37. package/dist/i3s-converter/helpers/node-index-document.js +255 -177
  38. package/dist/i3s-converter/helpers/node-pages.d.ts +1 -1
  39. package/dist/i3s-converter/helpers/node-pages.d.ts.map +1 -1
  40. package/dist/i3s-converter/helpers/node-pages.js +299 -193
  41. package/dist/i3s-converter/helpers/preprocess-3d-tiles.d.ts +1 -1
  42. package/dist/i3s-converter/helpers/preprocess-3d-tiles.d.ts.map +1 -1
  43. package/dist/i3s-converter/helpers/preprocess-3d-tiles.js +92 -60
  44. package/dist/i3s-converter/helpers/progress.d.ts.map +1 -1
  45. package/dist/i3s-converter/helpers/progress.js +139 -83
  46. package/dist/i3s-converter/helpers/tileset-traversal.d.ts +9 -2
  47. package/dist/i3s-converter/helpers/tileset-traversal.d.ts.map +1 -1
  48. package/dist/i3s-converter/helpers/tileset-traversal.js +33 -13
  49. package/dist/i3s-converter/i3s-converter.d.ts +7 -7
  50. package/dist/i3s-converter/i3s-converter.d.ts.map +1 -1
  51. package/dist/i3s-converter/i3s-converter.js +1165 -895
  52. package/dist/i3s-converter/json-templates/geometry-definitions.js +70 -79
  53. package/dist/i3s-converter/json-templates/layers.js +120 -121
  54. package/dist/i3s-converter/json-templates/metadata.js +19 -20
  55. package/dist/i3s-converter/json-templates/node.js +73 -71
  56. package/dist/i3s-converter/json-templates/scene-server.js +25 -26
  57. package/dist/i3s-converter/json-templates/shared-resources.js +107 -108
  58. package/dist/i3s-converter/json-templates/store.js +96 -94
  59. package/dist/i3s-converter/types.js +35 -23
  60. package/dist/i3s-server/app.js +15 -12
  61. package/dist/i3s-server/bin/i3s-server.min.cjs +69 -69
  62. package/dist/i3s-server/bin/www.js +16 -7
  63. package/dist/i3s-server/controllers/index-controller.js +18 -15
  64. package/dist/i3s-server/controllers/slpk-controller.d.ts.map +1 -1
  65. package/dist/i3s-server/controllers/slpk-controller.js +24 -11
  66. package/dist/i3s-server/routes/index.js +13 -9
  67. package/dist/i3s-server/routes/slpk-router.d.ts.map +1 -1
  68. package/dist/i3s-server/routes/slpk-router.js +26 -19
  69. package/dist/i3s-server/utils/create-scene-server.js +15 -10
  70. package/dist/i3s-server/utils/server-utils.d.ts.map +1 -1
  71. package/dist/i3s-server/utils/server-utils.js +52 -32
  72. package/dist/index.cjs +616 -967
  73. package/dist/index.cjs.map +7 -0
  74. package/dist/index.d.ts +2 -2
  75. package/dist/index.d.ts.map +1 -1
  76. package/dist/index.js +0 -1
  77. package/dist/lib/json-schemas/conversion-dump-json-schema.js +243 -421
  78. package/dist/lib/utils/cli-utils.d.ts.map +1 -1
  79. package/dist/lib/utils/cli-utils.js +65 -36
  80. package/dist/lib/utils/compress-util.js +20 -15
  81. package/dist/lib/utils/conversion-dump.d.ts +10 -2
  82. package/dist/lib/utils/conversion-dump.d.ts.map +1 -1
  83. package/dist/lib/utils/conversion-dump.js +242 -197
  84. package/dist/lib/utils/file-utils.d.ts +1 -1
  85. package/dist/lib/utils/file-utils.d.ts.map +1 -1
  86. package/dist/lib/utils/file-utils.js +120 -74
  87. package/dist/lib/utils/geometry-utils.js +13 -7
  88. package/dist/lib/utils/lod-conversion-utils.js +65 -33
  89. package/dist/lib/utils/queue.js +12 -13
  90. package/dist/lib/utils/statistic-utills.d.ts +6 -23
  91. package/dist/lib/utils/statistic-utills.d.ts.map +1 -1
  92. package/dist/lib/utils/statistic-utills.js +58 -55
  93. package/dist/lib/utils/write-queue.d.ts +2 -2
  94. package/dist/lib/utils/write-queue.d.ts.map +1 -1
  95. package/dist/lib/utils/write-queue.js +72 -86
  96. package/dist/pgm-loader.js +17 -13
  97. package/dist/slpk-extractor/slpk-extractor.d.ts.map +1 -1
  98. package/dist/slpk-extractor/slpk-extractor.js +60 -50
  99. package/dist/slpk-extractor-cli.d.ts.map +1 -1
  100. package/dist/slpk-extractor-cli.js +90 -59
  101. package/dist/slpk-extractor.min.cjs +1 -1
  102. package/package.json +27 -26
  103. package/src/3d-tiles-converter/3d-tiles-converter.ts +21 -10
  104. package/src/3d-tiles-converter/helpers/b3dm-converter.ts +1 -0
  105. package/src/3d-tiles-converter/helpers/load-i3s.ts +3 -27
  106. package/src/converter-cli.ts +4 -2
  107. package/src/deps-installer/deps-installer.ts +7 -0
  108. package/src/i3s-converter/helpers/attribute-metadata-info.ts +1 -1
  109. package/src/i3s-converter/helpers/batch-ids-extensions.ts +3 -1
  110. package/src/i3s-converter/helpers/coordinate-converter.ts +2 -2
  111. package/src/i3s-converter/helpers/feature-attributes.ts +5 -2
  112. package/src/i3s-converter/helpers/geometry-attributes.ts +6 -5
  113. package/src/i3s-converter/helpers/geometry-converter.ts +118 -72
  114. package/src/i3s-converter/helpers/gltf-attributes.ts +12 -13
  115. package/src/i3s-converter/helpers/node-index-document.ts +18 -10
  116. package/src/i3s-converter/helpers/node-pages.ts +27 -29
  117. package/src/i3s-converter/helpers/preprocess-3d-tiles.ts +1 -0
  118. package/src/i3s-converter/helpers/progress.ts +1 -0
  119. package/src/i3s-converter/helpers/tileset-traversal.ts +22 -13
  120. package/src/i3s-converter/i3s-converter.ts +173 -114
  121. package/src/i3s-converter/json-templates/node.ts +1 -1
  122. package/src/i3s-server/bin/www.ts +6 -4
  123. package/src/i3s-server/controllers/slpk-controller.ts +4 -2
  124. package/src/i3s-server/routes/index.ts +10 -7
  125. package/src/i3s-server/routes/slpk-router.ts +22 -16
  126. package/src/i3s-server/utils/server-utils.ts +6 -4
  127. package/src/lib/utils/cli-utils.ts +2 -0
  128. package/src/lib/utils/conversion-dump.ts +35 -20
  129. package/src/lib/utils/file-utils.ts +11 -11
  130. package/src/lib/utils/statistic-utills.ts +5 -6
  131. package/src/lib/utils/write-queue.ts +2 -2
  132. package/src/slpk-extractor/slpk-extractor.ts +2 -1
  133. package/src/slpk-extractor-cli.ts +16 -8
  134. package/dist/3d-tiles-converter/3d-tiles-converter.js.map +0 -1
  135. package/dist/3d-tiles-converter/helpers/b3dm-converter.js.map +0 -1
  136. package/dist/3d-tiles-converter/helpers/i3s-obb-to-3d-tiles-obb.js.map +0 -1
  137. package/dist/3d-tiles-converter/helpers/load-i3s.js.map +0 -1
  138. package/dist/3d-tiles-converter/helpers/texture-atlas.js.map +0 -1
  139. package/dist/3d-tiles-converter/json-templates/tileset.js.map +0 -1
  140. package/dist/constants.js.map +0 -1
  141. package/dist/converter-cli.js.map +0 -1
  142. package/dist/deps-installer/deps-installer.js.map +0 -1
  143. package/dist/i3s-converter/helpers/attribute-metadata-info.js.map +0 -1
  144. package/dist/i3s-converter/helpers/batch-ids-extensions.js.map +0 -1
  145. package/dist/i3s-converter/helpers/coordinate-converter.js.map +0 -1
  146. package/dist/i3s-converter/helpers/create-scene-server-path.js.map +0 -1
  147. package/dist/i3s-converter/helpers/feature-attributes.js.map +0 -1
  148. package/dist/i3s-converter/helpers/geometry-attributes.js.map +0 -1
  149. package/dist/i3s-converter/helpers/geometry-converter.js.map +0 -1
  150. package/dist/i3s-converter/helpers/gltf-attributes.js.map +0 -1
  151. package/dist/i3s-converter/helpers/load-3d-tiles.js.map +0 -1
  152. package/dist/i3s-converter/helpers/node-debug.js.map +0 -1
  153. package/dist/i3s-converter/helpers/node-index-document.js.map +0 -1
  154. package/dist/i3s-converter/helpers/node-pages.js.map +0 -1
  155. package/dist/i3s-converter/helpers/preprocess-3d-tiles.js.map +0 -1
  156. package/dist/i3s-converter/helpers/progress.js.map +0 -1
  157. package/dist/i3s-converter/helpers/tileset-traversal.js.map +0 -1
  158. package/dist/i3s-converter/i3s-converter.js.map +0 -1
  159. package/dist/i3s-converter/json-templates/geometry-definitions.js.map +0 -1
  160. package/dist/i3s-converter/json-templates/layers.js.map +0 -1
  161. package/dist/i3s-converter/json-templates/metadata.js.map +0 -1
  162. package/dist/i3s-converter/json-templates/node.js.map +0 -1
  163. package/dist/i3s-converter/json-templates/scene-server.js.map +0 -1
  164. package/dist/i3s-converter/json-templates/shared-resources.js.map +0 -1
  165. package/dist/i3s-converter/json-templates/store.js.map +0 -1
  166. package/dist/i3s-converter/types.js.map +0 -1
  167. package/dist/i3s-server/README.md +0 -63
  168. package/dist/i3s-server/app.js.map +0 -1
  169. package/dist/i3s-server/bin/www.js.map +0 -1
  170. package/dist/i3s-server/certs/cert.pem +0 -19
  171. package/dist/i3s-server/certs/key.pem +0 -27
  172. package/dist/i3s-server/controllers/index-controller.js.map +0 -1
  173. package/dist/i3s-server/controllers/slpk-controller.js.map +0 -1
  174. package/dist/i3s-server/routes/index.js.map +0 -1
  175. package/dist/i3s-server/routes/slpk-router.js.map +0 -1
  176. package/dist/i3s-server/utils/create-scene-server.js.map +0 -1
  177. package/dist/i3s-server/utils/server-utils.js.map +0 -1
  178. package/dist/index.js.map +0 -1
  179. package/dist/lib/json-schemas/conversion-dump-json-schema.js.map +0 -1
  180. package/dist/lib/utils/cli-utils.js.map +0 -1
  181. package/dist/lib/utils/compress-util.js.map +0 -1
  182. package/dist/lib/utils/conversion-dump.js.map +0 -1
  183. package/dist/lib/utils/file-utils.js.map +0 -1
  184. package/dist/lib/utils/geometry-utils.js.map +0 -1
  185. package/dist/lib/utils/lod-conversion-utils.js.map +0 -1
  186. package/dist/lib/utils/queue.js.map +0 -1
  187. package/dist/lib/utils/statistic-utills.js.map +0 -1
  188. package/dist/lib/utils/write-queue.js.map +0 -1
  189. package/dist/pgm-loader.js.map +0 -1
  190. package/dist/slpk-extractor/slpk-extractor.js.map +0 -1
  191. package/dist/slpk-extractor-cli.js.map +0 -1
  192. package/src/lib/utils/statistic-utills.d.ts +0 -25
@@ -1,7 +1,7 @@
1
1
  import type { Tiles3DTileContent } from '@loaders.gl/3d-tiles';
2
2
  import { Matrix4, Vector3 } from '@math.gl/core';
3
3
  import { BoundingSphere, OrientedBoundingBox } from '@math.gl/culling';
4
- import { GLTFAttributesData } from '../types';
4
+ import { GLTFAttributesData } from "../types.js";
5
5
  /**
6
6
  * Prepare attributes for conversion to avoid binary data breaking in worker thread.
7
7
  * @param tileContent - 3DTiles tile content
@@ -1 +1 @@
1
- {"version":3,"file":"gltf-attributes.d.ts","sourceRoot":"","sources":["../../../src/i3s-converter/helpers/gltf-attributes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAC,OAAO,EAAc,OAAO,EAAC,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAC,cAAc,EAAE,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AAErE,OAAO,EAAC,kBAAkB,EAAC,MAAM,UAAU,CAAC;AAE5C;;;;;;;GAOG;AACH,wBAAgB,kCAAkC,CAChD,WAAW,EAAE,kBAAkB,EAC/B,aAAa,EAAE,OAAO,EACtB,cAAc,EAAE,mBAAmB,GAAG,cAAc,GACnD,kBAAkB,CAyCpB;AAqBD;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,kBAAkB,EAC/B,aAAa,EAAE,OAAO,EACtB,cAAc,EAAE,mBAAmB,GAAG,cAAc,GACnD;IAAC,WAAW,EAAE,OAAO,CAAC;IAAC,kBAAkB,EAAE,OAAO,CAAA;CAAC,CAkCrD"}
1
+ {"version":3,"file":"gltf-attributes.d.ts","sourceRoot":"","sources":["../../../src/i3s-converter/helpers/gltf-attributes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAC,OAAO,EAAc,OAAO,EAAC,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAC,cAAc,EAAE,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AAErE,OAAO,EAAC,kBAAkB,EAAC,oBAAiB;AAE5C;;;;;;;GAOG;AACH,wBAAgB,kCAAkC,CAChD,WAAW,EAAE,kBAAkB,EAC/B,aAAa,EAAE,OAAO,EACtB,cAAc,EAAE,mBAAmB,GAAG,cAAc,GACnD,kBAAkB,CAwCpB;AAqBD;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,kBAAkB,EAC/B,aAAa,EAAE,OAAO,EACtB,cAAc,EAAE,mBAAmB,GAAG,cAAc,GACnD;IAAC,WAAW,EAAE,OAAO,CAAC;IAAC,kBAAkB,EAAE,OAAO,CAAA;CAAC,CAkCrD"}
@@ -1,110 +1,122 @@
1
1
  import { Matrix4, Vector3 } from '@math.gl/core';
2
2
  import { Ellipsoid } from '@math.gl/geospatial';
3
+ /**
4
+ * Prepare attributes for conversion to avoid binary data breaking in worker thread.
5
+ * @param tileContent - 3DTiles tile content
6
+ * @param tileTransform - transformation matrix of the tile, calculated recursively multiplying
7
+ * transform of all parent tiles and transform of the current tile
8
+ * @param boundingVolume - initialized bounding volume of the source tile
9
+ * @returns 3DTiles content data, prepared for conversion
10
+ */
3
11
  export function prepareDataForAttributesConversion(tileContent, tileTransform, boundingVolume) {
4
- var _tileContent$gltf, _tileContent$gltf$sce, _tileContent$gltf2, _tileContent$gltf2$sc, _tileContent$gltf2$sc2, _tileContent$gltf3, _tileContent$gltf4, _tileContent$gltf4$im;
5
- let nodes = ((_tileContent$gltf = tileContent.gltf) === null || _tileContent$gltf === void 0 ? void 0 : (_tileContent$gltf$sce = _tileContent$gltf.scene) === null || _tileContent$gltf$sce === void 0 ? void 0 : _tileContent$gltf$sce.nodes) || ((_tileContent$gltf2 = tileContent.gltf) === null || _tileContent$gltf2 === void 0 ? void 0 : (_tileContent$gltf2$sc = _tileContent$gltf2.scenes) === null || _tileContent$gltf2$sc === void 0 ? void 0 : (_tileContent$gltf2$sc2 = _tileContent$gltf2$sc[0]) === null || _tileContent$gltf2$sc2 === void 0 ? void 0 : _tileContent$gltf2$sc2.nodes) || ((_tileContent$gltf3 = tileContent.gltf) === null || _tileContent$gltf3 === void 0 ? void 0 : _tileContent$gltf3.nodes) || [];
6
- const images = ((_tileContent$gltf4 = tileContent.gltf) === null || _tileContent$gltf4 === void 0 ? void 0 : (_tileContent$gltf4$im = _tileContent$gltf4.images) === null || _tileContent$gltf4$im === void 0 ? void 0 : _tileContent$gltf4$im.map(imageObject => {
7
- var _imageObject$image;
8
- if (imageObject !== null && imageObject !== void 0 && (_imageObject$image = imageObject.image) !== null && _imageObject$image !== void 0 && _imageObject$image.compressed) {
9
- return null;
10
- } else {
11
- var _imageObject$image2;
12
- const data = imageObject === null || imageObject === void 0 ? void 0 : (_imageObject$image2 = imageObject.image) === null || _imageObject$image2 === void 0 ? void 0 : _imageObject$image2.data;
13
- const dataCopy = new Uint8Array(data.length);
14
- dataCopy.set(data);
15
- return {
16
- data: dataCopy,
17
- compressed: false,
18
- height: imageObject.image.height,
19
- width: imageObject.image.width,
20
- components: imageObject.image.components,
21
- mimeType: imageObject.mimeType
22
- };
23
- }
24
- })) || [];
25
- prepareNodes(nodes);
26
- const {
27
- cartographicOrigin,
28
- modelMatrix: cartesianModelMatrix
29
- } = calculateTransformProps(tileContent, tileTransform, boundingVolume);
30
- return {
31
- nodes,
32
- images,
33
- cartographicOrigin,
34
- cartesianModelMatrix
35
- };
12
+ const nodes = tileContent.gltf?.scene?.nodes ||
13
+ tileContent.gltf?.scenes?.[0]?.nodes ||
14
+ tileContent.gltf?.nodes ||
15
+ [];
16
+ const images = tileContent.gltf?.images?.map((imageObject) => {
17
+ // Need data only for uncompressed images because we can't get batchIds from compressed textures.
18
+ if (imageObject?.image?.compressed) {
19
+ return null;
20
+ }
21
+ const data = imageObject?.image?.data;
22
+ const dataCopy = new Uint8Array(data.length);
23
+ dataCopy.set(data);
24
+ return {
25
+ data: dataCopy,
26
+ compressed: false,
27
+ height: imageObject.image.height,
28
+ width: imageObject.image.width,
29
+ components: imageObject.image.components,
30
+ mimeType: imageObject.mimeType
31
+ };
32
+ }) || [];
33
+ prepareNodes(nodes);
34
+ const { cartographicOrigin, modelMatrix: cartesianModelMatrix } = calculateTransformProps(tileContent, tileTransform, boundingVolume);
35
+ return {
36
+ nodes,
37
+ images,
38
+ cartographicOrigin,
39
+ cartesianModelMatrix
40
+ };
36
41
  }
42
+ /**
43
+ * Keep only values for glTF attributes to pass data to worker thread.
44
+ * @param attributes - geometry attributes
45
+ * @returns attributes with only `value` item
46
+ */
37
47
  function getB3DMAttributesWithoutBufferView(attributes) {
38
- const attributesWithoutBufferView = {};
39
- for (const attributeName in attributes) {
40
- attributesWithoutBufferView[attributeName] = {
41
- value: attributes[attributeName].value
42
- };
43
- }
44
- return attributesWithoutBufferView;
48
+ const attributesWithoutBufferView = {};
49
+ for (const attributeName in attributes) {
50
+ attributesWithoutBufferView[attributeName] = {
51
+ value: attributes[attributeName].value
52
+ };
53
+ }
54
+ return attributesWithoutBufferView;
45
55
  }
56
+ /**
57
+ * Calculate transformation properties to transform vertex attributes (POSITION, NORMAL, etc.)
58
+ * from METER_OFFSET coorditantes to LNGLAT_OFFSET coordinates
59
+ * @param tileContent - 3DTiles tile content
60
+ * @param tileTransform - transformation matrix of the tile, calculated recursively multiplying
61
+ * transform of all parent tiles and transform of the current tile
62
+ * @param boundingVolume - initialized bounding volume of the source tile
63
+ * @returns modelMatrix - transformation matrix to transform coordinates to cartographic coordinates
64
+ * cartographicOrigin - tile origin coordinates to calculate offsets
65
+ */
46
66
  export function calculateTransformProps(tileContent, tileTransform, boundingVolume) {
47
- const {
48
- rtcCenter,
49
- gltfUpAxis
50
- } = tileContent;
51
- const {
52
- center
53
- } = boundingVolume;
54
- let modelMatrix = new Matrix4(tileTransform);
55
- if (rtcCenter) {
56
- modelMatrix.translate(rtcCenter);
57
- }
58
- switch (gltfUpAxis) {
59
- case 'Z':
60
- break;
61
- case 'Y':
62
- const rotationY = new Matrix4().rotateX(Math.PI / 2);
63
- modelMatrix = modelMatrix.multiplyRight(rotationY);
64
- break;
65
- case 'X':
66
- const rotationX = new Matrix4().rotateY(-Math.PI / 2);
67
- modelMatrix = modelMatrix.multiplyRight(rotationX);
68
- break;
69
- default:
70
- break;
71
- }
72
- const cartesianOrigin = new Vector3(center);
73
- const cartographicOrigin = Ellipsoid.WGS84.cartesianToCartographic(cartesianOrigin, new Vector3());
74
- return {
75
- modelMatrix,
76
- cartographicOrigin
77
- };
67
+ const { rtcCenter, gltfUpAxis } = tileContent;
68
+ const { center } = boundingVolume;
69
+ let modelMatrix = new Matrix4(tileTransform);
70
+ // Translate if appropriate
71
+ if (rtcCenter) {
72
+ modelMatrix.translate(rtcCenter);
73
+ }
74
+ // glTF models need to be rotated from Y to Z up
75
+ // https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/specification#y-up-to-z-up
76
+ switch (gltfUpAxis) {
77
+ case 'Z':
78
+ break;
79
+ case 'Y':
80
+ const rotationY = new Matrix4().rotateX(Math.PI / 2);
81
+ modelMatrix = modelMatrix.multiplyRight(rotationY);
82
+ break;
83
+ case 'X':
84
+ const rotationX = new Matrix4().rotateY(-Math.PI / 2);
85
+ modelMatrix = modelMatrix.multiplyRight(rotationX);
86
+ break;
87
+ default:
88
+ break;
89
+ }
90
+ const cartesianOrigin = new Vector3(center);
91
+ const cartographicOrigin = Ellipsoid.WGS84.cartesianToCartographic(cartesianOrigin, new Vector3());
92
+ return { modelMatrix, cartographicOrigin };
78
93
  }
94
+ /**
95
+ * Traverse all nodes to replace all sensible data with copy to avoid data corruption in worker.
96
+ * @param nodes
97
+ */
79
98
  function prepareNodes(nodes) {
80
- for (let index = 0; index < nodes.length; index++) {
81
- const node = nodes[index];
82
- if (node.mesh) {
83
- var _node$mesh;
84
- nodes[index] = {
85
- ...node,
86
- mesh: {
87
- ...node.mesh,
88
- primitives: (_node$mesh = node.mesh) === null || _node$mesh === void 0 ? void 0 : _node$mesh.primitives.map(primitive => {
89
- var _primitive$indices, _primitive$material, _primitive$material2;
90
- return {
91
- ...primitive,
92
- indices: {
93
- value: primitive === null || primitive === void 0 ? void 0 : (_primitive$indices = primitive.indices) === null || _primitive$indices === void 0 ? void 0 : _primitive$indices.value
94
- },
95
- attributes: getB3DMAttributesWithoutBufferView(primitive.attributes),
96
- material: {
97
- id: primitive === null || primitive === void 0 ? void 0 : (_primitive$material = primitive.material) === null || _primitive$material === void 0 ? void 0 : _primitive$material.id,
98
- uniqueId: primitive === null || primitive === void 0 ? void 0 : (_primitive$material2 = primitive.material) === null || _primitive$material2 === void 0 ? void 0 : _primitive$material2.uniqueId
99
- }
99
+ for (let index = 0; index < nodes.length; index++) {
100
+ const node = nodes[index];
101
+ if (node.mesh) {
102
+ nodes[index] = {
103
+ ...node,
104
+ mesh: {
105
+ ...node.mesh,
106
+ primitives: node.mesh?.primitives.map((primitive) => ({
107
+ ...primitive,
108
+ indices: { value: primitive?.indices?.value },
109
+ attributes: getB3DMAttributesWithoutBufferView(primitive.attributes),
110
+ material: {
111
+ id: primitive?.material?.id,
112
+ uniqueId: primitive?.material?.uniqueId
113
+ }
114
+ }))
115
+ }
100
116
  };
101
- })
102
117
  }
103
- };
104
- }
105
- if (node.children) {
106
- prepareNodes(node.children);
118
+ if (node.children) {
119
+ prepareNodes(node.children);
120
+ }
107
121
  }
108
- }
109
122
  }
110
- //# sourceMappingURL=gltf-attributes.js.map
@@ -2,83 +2,120 @@ import { Tiles3DArchive } from '@loaders.gl/3d-tiles';
2
2
  import { load } from '@loaders.gl/core';
3
3
  import { FileHandleFile } from '@loaders.gl/loader-utils';
4
4
  import { CD_HEADER_SIGNATURE, ZipFileSystem, parseHashTable, parseZipCDFileHeader, parseZipLocalFileHeader, searchFromTheEnd } from '@loaders.gl/zip';
5
+ /**
6
+ * Load nested 3DTiles tileset. If the sourceTile is not nested tileset - do nothing
7
+ * @param sourceTileset - source root tileset JSON
8
+ * @param sourceTile - source tile JSON that is supposed to has link to nested tileset
9
+ * @param tilesetLoadOptions - load options for Tiles3DLoader
10
+ * @returns nothing
11
+ */
5
12
  export const loadNestedTileset = async (sourceTileset, sourceTile, tilesetLoadOptions) => {
6
- const isTileset = isNestedTileset(sourceTile);
7
- if (!sourceTileset || !sourceTile.contentUrl || !isTileset) {
8
- return;
9
- }
10
- const loadOptions = {
11
- ...tilesetLoadOptions,
12
- [sourceTileset.loader.id]: {
13
- isTileset,
14
- assetGltfUpAxis: sourceTileset.asset && sourceTileset.asset.gltfUpAxis || 'Y'
13
+ const isTileset = isNestedTileset(sourceTile);
14
+ if (!sourceTileset || !sourceTile.contentUrl || !isTileset) {
15
+ return;
16
+ }
17
+ const loadOptions = {
18
+ ...tilesetLoadOptions,
19
+ [sourceTileset.loader.id]: {
20
+ isTileset,
21
+ assetGltfUpAxis: (sourceTileset.asset && sourceTileset.asset.gltfUpAxis) || 'Y'
22
+ }
23
+ };
24
+ const tileContent = await loadFromArchive(sourceTile.contentUrl, sourceTileset.loader, loadOptions);
25
+ if (tileContent.root) {
26
+ sourceTile.children = [tileContent.root];
15
27
  }
16
- };
17
- const tileContent = await loadFromArchive(sourceTile.contentUrl, sourceTileset.loader, loadOptions);
18
- if (tileContent.root) {
19
- sourceTile.children = [tileContent.root];
20
- }
21
28
  };
29
+ /**
30
+ * Load 3DTiles tile content, that includes glTF object
31
+ * @param sourceTileset - source root tileset JSON
32
+ * @param sourceTile - source tile JSON that has link to content data
33
+ * @param tilesetLoadOptions - load options for Tiles3DLoader
34
+ * @returns - 3DTiles tile content or null
35
+ */
22
36
  export const loadTile3DContent = async (sourceTileset, sourceTile, tilesetLoadOptions) => {
23
- const isTileset = isNestedTileset(sourceTile);
24
- if (!sourceTileset || !sourceTile.contentUrl || isTileset) {
25
- return null;
26
- }
27
- const loadOptions = {
28
- ...tilesetLoadOptions,
29
- [sourceTileset.loader.id]: {
30
- ...(tilesetLoadOptions[sourceTileset.loader.id] || {}),
31
- isTileset,
32
- assetGltfUpAxis: sourceTileset.asset && sourceTileset.asset.gltfUpAxis || 'Y'
37
+ const isTileset = isNestedTileset(sourceTile);
38
+ if (!sourceTileset || !sourceTile.contentUrl || isTileset) {
39
+ return null;
33
40
  }
34
- };
35
- const tileContent = await loadFromArchive(sourceTile.contentUrl, sourceTileset.loader, loadOptions);
36
- return tileContent;
41
+ const loadOptions = {
42
+ ...tilesetLoadOptions,
43
+ [sourceTileset.loader.id]: {
44
+ // @ts-ignore
45
+ ...(tilesetLoadOptions[sourceTileset.loader.id] || {}),
46
+ isTileset,
47
+ assetGltfUpAxis: (sourceTileset.asset && sourceTileset.asset.gltfUpAxis) || 'Y'
48
+ }
49
+ };
50
+ const tileContent = await loadFromArchive(sourceTile.contentUrl, sourceTileset.loader, loadOptions);
51
+ return tileContent;
37
52
  };
53
+ /**
54
+ * Load a resource with load options and .3tz format support
55
+ * @param url - resource URL
56
+ * @param loader - loader to parse data (Tiles3DLoader / CesiumIonLoader)
57
+ * @param loadOptions - 3d-tiles loader options
58
+ * @returns 3d-tiles resource
59
+ */
38
60
  export async function loadFromArchive(url, loader, loadOptions) {
39
- const tz3UrlParts = url.split('.3tz');
40
- let filename;
41
- if (tz3UrlParts.length === 1) {
42
- filename = null;
43
- } else if (tz3UrlParts.length === 2) {
44
- filename = tz3UrlParts[1].slice(1);
45
- if (filename === '') {
46
- filename = 'tileset.json';
61
+ const tz3UrlParts = url.split('.3tz');
62
+ let filename;
63
+ // No '.3tz'. The file will be loaded with global fetch function
64
+ if (tz3UrlParts.length === 1) {
65
+ filename = null;
66
+ }
67
+ else if (tz3UrlParts.length === 2) {
68
+ filename = tz3UrlParts[1].slice(1);
69
+ if (filename === '') {
70
+ filename = 'tileset.json';
71
+ }
72
+ }
73
+ else {
74
+ throw new Error('Unexpected URL format');
75
+ }
76
+ if (filename) {
77
+ const tz3Path = `${tz3UrlParts[0]}.3tz`;
78
+ const fileProvider = new FileHandleFile(tz3Path);
79
+ const hashTable = await loadHashTable(fileProvider);
80
+ const archive = new Tiles3DArchive(fileProvider, hashTable, tz3Path);
81
+ const fileSystem = new ZipFileSystem(archive);
82
+ const content = await load(filename, loader, {
83
+ ...loadOptions,
84
+ fetch: fileSystem.fetch.bind(fileSystem)
85
+ });
86
+ await fileSystem.destroy();
87
+ return content;
47
88
  }
48
- } else {
49
- throw new Error('Unexpected URL format');
50
- }
51
- if (filename) {
52
- const tz3Path = `${tz3UrlParts[0]}.3tz`;
53
- const fileProvider = new FileHandleFile(tz3Path);
54
- const hashTable = await loadHashTable(fileProvider);
55
- const archive = new Tiles3DArchive(fileProvider, hashTable, tz3Path);
56
- const fileSystem = new ZipFileSystem(archive);
57
- const content = await load(filename, loader, {
58
- ...loadOptions,
59
- fetch: fileSystem.fetch.bind(fileSystem)
60
- });
61
- await fileSystem.destroy();
62
- return content;
63
- }
64
- return await load(url, loader, loadOptions);
89
+ return await load(url, loader, loadOptions);
65
90
  }
91
+ /**
92
+ * Check if tile is nested tileset
93
+ * @param tile - 3DTiles header data
94
+ * @returns true if tile is nested tileset
95
+ */
66
96
  export function isNestedTileset(tile) {
67
- return (tile === null || tile === void 0 ? void 0 : tile.type) === 'json' || (tile === null || tile === void 0 ? void 0 : tile.type) === '3tz';
97
+ return tile?.type === 'json' || tile?.type === '3tz';
68
98
  }
99
+ /**
100
+ * Load hash file from 3TZ
101
+ * @param fileProvider - binary reader of 3TZ
102
+ * @returns hash table of the 3TZ file content or undefined if the hash file is not presented inside
103
+ */
69
104
  async function loadHashTable(fileProvider) {
70
- let hashTable;
71
- const hashCDOffset = await searchFromTheEnd(fileProvider, CD_HEADER_SIGNATURE);
72
- const cdFileHeader = await parseZipCDFileHeader(hashCDOffset, fileProvider);
73
- if ((cdFileHeader === null || cdFileHeader === void 0 ? void 0 : cdFileHeader.fileName) === '@3dtilesIndex1@') {
74
- const localFileHeader = await parseZipLocalFileHeader(cdFileHeader.localHeaderOffset, fileProvider);
75
- if (!localFileHeader) {
76
- throw new Error('corrupted 3tz');
105
+ let hashTable;
106
+ const hashCDOffset = await searchFromTheEnd(fileProvider, CD_HEADER_SIGNATURE);
107
+ const cdFileHeader = await parseZipCDFileHeader(hashCDOffset, fileProvider);
108
+ // '@3dtilesIndex1@' is index file that must be the last in the archive. It allows
109
+ // to improve load and read performance when the archive contains a very large number
110
+ // of files.
111
+ if (cdFileHeader?.fileName === '@3dtilesIndex1@') {
112
+ const localFileHeader = await parseZipLocalFileHeader(cdFileHeader.localHeaderOffset, fileProvider);
113
+ if (!localFileHeader) {
114
+ throw new Error('corrupted 3tz');
115
+ }
116
+ const fileDataOffset = localFileHeader.fileDataOffset;
117
+ const hashFile = await fileProvider.slice(fileDataOffset, fileDataOffset + localFileHeader.compressedSize);
118
+ hashTable = parseHashTable(hashFile);
77
119
  }
78
- const fileDataOffset = localFileHeader.fileDataOffset;
79
- const hashFile = await fileProvider.slice(fileDataOffset, fileDataOffset + localFileHeader.compressedSize);
80
- hashTable = parseHashTable(hashFile);
81
- }
82
- return hashTable;
120
+ return hashTable;
83
121
  }
84
- //# sourceMappingURL=load-3d-tiles.js.map
@@ -1,72 +1,116 @@
1
1
  import { OrientedBoundingBox, BoundingSphere } from '@math.gl/culling';
2
2
  import { Vector3 } from '@math.gl/core';
3
3
  import { Ellipsoid } from '@math.gl/geospatial';
4
- const CUBE_POSITIONS = new Float32Array([-1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1]);
4
+ // prettier-ignore
5
+ const CUBE_POSITIONS = new Float32Array([
6
+ -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1,
7
+ -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1,
8
+ -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1,
9
+ -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1,
10
+ 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1,
11
+ -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1
12
+ ]);
13
+ // TODO Unite Tile validation logic in i3s-17-and-debug with this code.
14
+ /**
15
+ * Do validation of bounding volumes for particular node.
16
+ * Generates special warnings if there are some issues.
17
+ * @param node
18
+ */
5
19
  export function validateNodeBoundingVolumes(node) {
6
- var _node$parentNode, _node$parentNode2;
7
- if (!(node !== null && node !== void 0 && (_node$parentNode = node.parentNode) !== null && _node$parentNode !== void 0 && _node$parentNode.obb) || !(node !== null && node !== void 0 && (_node$parentNode2 = node.parentNode) !== null && _node$parentNode2 !== void 0 && _node$parentNode2.mbs)) {
8
- return [];
9
- }
10
- const tileWarnings = [];
11
- validateObb(tileWarnings, node);
12
- validateMbs(tileWarnings, node);
13
- return tileWarnings;
20
+ if (!node?.parentNode?.obb || !node?.parentNode?.mbs) {
21
+ return [];
22
+ }
23
+ const tileWarnings = [];
24
+ validateObb(tileWarnings, node);
25
+ validateMbs(tileWarnings, node);
26
+ return tileWarnings;
14
27
  }
28
+ /**
29
+ * Check if child Obb fit into parent Obb.
30
+ * @param tileWarnings
31
+ * @param node
32
+ */
15
33
  function validateObb(tileWarnings, node) {
16
- var _node$parentNode3;
17
- const parentObb = createBoundingBoxFromTileObb(node.parentNode.obb);
18
- const tileVertices = getTileObbVertices(node);
19
- const isTileObbInsideParentObb = isAllVerticesInsideBoundingVolume(parentObb, tileVertices);
20
- if (isTileObbInsideParentObb) {
21
- return;
22
- }
23
- const title = `OBB of Tile (${node.id}) doesn't fit into Parent (${(_node$parentNode3 = node.parentNode) === null || _node$parentNode3 === void 0 ? void 0 : _node$parentNode3.id}) tile OBB`;
24
- tileWarnings.push(title);
34
+ // @ts-expect-error
35
+ const parentObb = createBoundingBoxFromTileObb(node.parentNode.obb);
36
+ const tileVertices = getTileObbVertices(node);
37
+ const isTileObbInsideParentObb = isAllVerticesInsideBoundingVolume(parentObb, tileVertices);
38
+ if (isTileObbInsideParentObb) {
39
+ return;
40
+ }
41
+ const title = `OBB of Tile (${node.id}) doesn't fit into Parent (${node.parentNode?.id}) tile OBB`;
42
+ tileWarnings.push(title);
25
43
  }
44
+ /**
45
+ * Check if child Mbs fit into parent Mbs.
46
+ * @param tileWarnings
47
+ * @param node
48
+ */
26
49
  function validateMbs(tileWarnings, node) {
27
- const tileMbs = createBoundingSphereFromTileMbs(node.mbs);
28
- const parentMbs = createBoundingSphereFromTileMbs(node.parentNode.mbs);
29
- const distanceBetweenCenters = tileMbs.center.distanceTo(parentMbs.center);
30
- if (distanceBetweenCenters + tileMbs.radius > parentMbs.radius) {
31
- var _node$parentNode4;
32
- const title = `MBS of Tile (${node.id}) doesn't fit into Parent (${(_node$parentNode4 = node.parentNode) === null || _node$parentNode4 === void 0 ? void 0 : _node$parentNode4.id}) tile MBS`;
33
- tileWarnings.push(title);
34
- }
50
+ // @ts-expect-error
51
+ const tileMbs = createBoundingSphereFromTileMbs(node.mbs);
52
+ // @ts-expect-error
53
+ const parentMbs = createBoundingSphereFromTileMbs(node.parentNode.mbs);
54
+ const distanceBetweenCenters = tileMbs.center.distanceTo(parentMbs.center);
55
+ if (distanceBetweenCenters + tileMbs.radius > parentMbs.radius) {
56
+ const title = `MBS of Tile (${node.id}) doesn't fit into Parent (${node.parentNode?.id}) tile MBS`;
57
+ tileWarnings.push(title);
58
+ }
35
59
  }
60
+ /**
61
+ * Generates bounding sphere from mbs
62
+ * @param mbs
63
+ */
36
64
  function createBoundingSphereFromTileMbs(mbs) {
37
- return new BoundingSphere([mbs[0], mbs[1], mbs[2]], mbs[3]);
65
+ return new BoundingSphere([mbs[0], mbs[1], mbs[2]], mbs[3]);
38
66
  }
67
+ /**
68
+ * Generates oriented bounding box from tile obb
69
+ * @param obb
70
+ * @returns
71
+ */
39
72
  function createBoundingBoxFromTileObb(obb) {
40
- const {
41
- center,
42
- halfSize,
43
- quaternion
44
- } = obb;
45
- return new OrientedBoundingBox().fromCenterHalfSizeQuaternion(center, halfSize, quaternion);
73
+ const { center, halfSize, quaternion } = obb;
74
+ return new OrientedBoundingBox().fromCenterHalfSizeQuaternion(center, halfSize, quaternion);
46
75
  }
76
+ /**
77
+ * Get vertices fromnode obb
78
+ * TODO check if Obb generates properly
79
+ * @param node
80
+ */
47
81
  function getTileObbVertices(node) {
48
- const halfSize = node.obb.halfSize;
49
- const positions = CUBE_POSITIONS;
50
- const obbCenterCartesian = Ellipsoid.WGS84.cartographicToCartesian(node.obb.center);
51
- let vertices = [];
52
- for (let i = 0; i < positions.length; i += 3) {
53
- const positionsVector = new Vector3(positions[i] *= halfSize[0], positions[i + 1] *= halfSize[1], positions[i + 2] *= halfSize[2]);
54
- const rotatedPositions = positionsVector.transformByQuaternion(node.obb.quaternion).add(obbCenterCartesian);
55
- vertices = vertices.concat(rotatedPositions);
56
- }
57
- return vertices;
82
+ // @ts-expect-error
83
+ const halfSize = node.obb.halfSize;
84
+ const positions = CUBE_POSITIONS;
85
+ // @ts-expect-error
86
+ const obbCenterCartesian = Ellipsoid.WGS84.cartographicToCartesian(node.obb.center);
87
+ let vertices = [];
88
+ for (let i = 0; i < positions.length; i += 3) {
89
+ const positionsVector = new Vector3((positions[i] *= halfSize[0]), (positions[i + 1] *= halfSize[1]), (positions[i + 2] *= halfSize[2]));
90
+ const rotatedPositions = positionsVector
91
+ // @ts-expect-error
92
+ .transformByQuaternion(node.obb.quaternion)
93
+ .add(obbCenterCartesian);
94
+ // @ts-expect-error
95
+ vertices = vertices.concat(rotatedPositions);
96
+ }
97
+ return vertices;
58
98
  }
99
+ /**
100
+ * Check if all vertices inside bounding volume
101
+ * @param boundingVolume
102
+ * @param positions
103
+ */
59
104
  function isAllVerticesInsideBoundingVolume(boundingVolume, positions) {
60
- let isVerticesInsideObb = true;
61
- for (let index = 0; index < positions.length / 3; index += 3) {
62
- const point = [positions[index], positions[index + 1], positions[index + 2]];
63
- const cartographicPoint = Ellipsoid.WGS84.cartesianToCartographic(point);
64
- const distance = boundingVolume.distanceTo(cartographicPoint);
65
- if (distance > 0) {
66
- isVerticesInsideObb = false;
67
- break;
105
+ let isVerticesInsideObb = true;
106
+ for (let index = 0; index < positions.length / 3; index += 3) {
107
+ const point = [positions[index], positions[index + 1], positions[index + 2]];
108
+ const cartographicPoint = Ellipsoid.WGS84.cartesianToCartographic(point);
109
+ const distance = boundingVolume.distanceTo(cartographicPoint);
110
+ if (distance > 0) {
111
+ isVerticesInsideObb = false;
112
+ break;
113
+ }
68
114
  }
69
- }
70
- return isVerticesInsideObb;
115
+ return isVerticesInsideObb;
71
116
  }
72
- //# sourceMappingURL=node-debug.js.map
@@ -1,7 +1,7 @@
1
1
  import { BoundingVolumes, LodSelection, Node3DIndexDocument, NodeInPage } from '@loaders.gl/i3s';
2
- import I3SConverter from '../i3s-converter';
3
- import { I3SConvertedResources } from '../types';
4
- import { DumpMetadata } from '../../lib/utils/conversion-dump';
2
+ import I3SConverter from "../i3s-converter.js";
3
+ import { I3SConvertedResources } from "../types.js";
4
+ import { DumpMetadata } from "../../lib/utils/conversion-dump.js";
5
5
  /**
6
6
  * Wrapper for https://github.com/Esri/i3s-spec/blob/master/docs/1.7/3DNodeIndexDocument.cmn.md data
7
7
  * The class allows working with 3DNodeIndexDocument in 2 modes:
@@ -81,7 +81,14 @@ export declare class NodeIndexDocument {
81
81
  * @param converter - I3SConverter instance
82
82
  * @returns NodeIndexDocument instance
83
83
  */
84
- static createNode(parentNode: NodeIndexDocument, boundingVolumes: BoundingVolumes, lodSelection: LodSelection[], nodeInPage: NodeInPage, resources: I3SConvertedResources, converter: I3SConverter): Promise<NodeIndexDocument>;
84
+ static createNode({ parentNode, boundingVolumes, lodSelection, nodeInPage, resources, converter }: {
85
+ parentNode: NodeIndexDocument;
86
+ boundingVolumes: BoundingVolumes;
87
+ lodSelection: LodSelection[];
88
+ nodeInPage: NodeInPage;
89
+ resources: I3SConvertedResources;
90
+ converter: I3SConverter;
91
+ }): Promise<NodeIndexDocument>;
85
92
  /**
86
93
  * Form 3DNodeIndexDocument data for the root node
87
94
  * @param boundingVolumes - mbs and obb data about node's bounding volume
@@ -1 +1 @@
1
- {"version":3,"file":"node-index-document.d.ts","sourceRoot":"","sources":["../../../src/i3s-converter/helpers/node-index-document.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,UAAU,EAEX,MAAM,iBAAiB,CAAC;AAIzB,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAC,qBAAqB,EAAC,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAC,YAAY,EAAC,MAAM,iCAAiC,CAAC;AAE7D;;;;;GAKG;AACH,qBAAa,iBAAiB;IAC5B,cAAc;IACP,EAAE,EAAE,MAAM,CAAC;IAClB,uBAAuB;IAChB,QAAQ,EAAE,MAAM,CAAC;IACxB,+BAA+B;IACxB,IAAI,EAAE,mBAAmB,GAAG,IAAI,CAAQ;IAC/C,eAAe;IACR,QAAQ,EAAE,iBAAiB,EAAE,CAAM;IAC1C,yBAAyB;IACzB,OAAO,CAAC,SAAS,CAAe;IAEhC;;;OAGG;IACH,OAAO,CAAC,UAAU,CAAkB;IACpC,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED;;;;OAIG;gBACS,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY;IAM/C;;;;OAIG;IACU,OAAO,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAS3E;;;OAGG;IACU,WAAW,CAAC,UAAU,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IA0BxE;;OAEG;IACU,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAmC1C,+CAA+C;IAClC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAMlC,wBAAwB;IACxB,OAAO,CAAC,QAAQ;IAOhB;;;OAGG;YACW,KAAK;IAyBnB;;;OAGG;YACW,IAAI;IAalB;;OAEG;IACH,OAAO,CAAC,KAAK;IAIb;;;;;OAKG;WACU,cAAc,CACzB,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,YAAY,GACtB,OAAO,CAAC,iBAAiB,CAAC;IAM7B;;;;;;;;;OASG;WACU,UAAU,CACrB,UAAU,EAAE,iBAAiB,EAC7B,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,YAAY,EAAE,EAC5B,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,qBAAqB,EAChC,SAAS,EAAE,YAAY,GACtB,OAAO,CAAC,iBAAiB,CAAC;IAY7B;;;;OAIG;IACH,MAAM,CAAC,2BAA2B,CAAC,eAAe,EAAE,eAAe,GAAG,mBAAmB;IAqBzF;;;;;;;;;;OAUG;WACU,uBAAuB,CAClC,UAAU,EAAE,iBAAiB,EAC7B,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,YAAY,EAAE,EAC5B,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,qBAAqB,GAAG,YAAY,GAC9C,OAAO,CAAC,mBAAmB,CAAC;CAyDhC"}
1
+ {"version":3,"file":"node-index-document.d.ts","sourceRoot":"","sources":["../../../src/i3s-converter/helpers/node-index-document.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,UAAU,EAEX,MAAM,iBAAiB,CAAC;AAIzB,OAAO,YAAY,4BAAyB;AAE5C,OAAO,EAAC,qBAAqB,EAAC,oBAAiB;AAC/C,OAAO,EAAC,YAAY,EAAC,2CAAwC;AAE7D;;;;;GAKG;AACH,qBAAa,iBAAiB;IAC5B,cAAc;IACP,EAAE,EAAE,MAAM,CAAC;IAClB,uBAAuB;IAChB,QAAQ,EAAE,MAAM,CAAC;IACxB,+BAA+B;IACxB,IAAI,EAAE,mBAAmB,GAAG,IAAI,CAAQ;IAC/C,eAAe;IACR,QAAQ,EAAE,iBAAiB,EAAE,CAAM;IAC1C,yBAAyB;IACzB,OAAO,CAAC,SAAS,CAAe;IAEhC;;;OAGG;IACH,OAAO,CAAC,UAAU,CAAkB;IACpC,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED;;;;OAIG;gBACS,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY;IAM/C;;;;OAIG;IACU,OAAO,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAS3E;;;OAGG;IACU,WAAW,CAAC,UAAU,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IA0BxE;;OAEG;IACU,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAmC1C,+CAA+C;IAClC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAMlC,wBAAwB;IACxB,OAAO,CAAC,QAAQ;IAOhB;;;OAGG;YACW,KAAK;IAyBnB;;;OAGG;YACW,IAAI;IAalB;;OAEG;IACH,OAAO,CAAC,KAAK;IAIb;;;;;OAKG;WACU,cAAc,CACzB,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,YAAY,GACtB,OAAO,CAAC,iBAAiB,CAAC;IAM7B;;;;;;;;;OASG;WACU,UAAU,CAAC,EACtB,UAAU,EACV,eAAe,EACf,YAAY,EACZ,UAAU,EACV,SAAS,EACT,SAAS,EACV,EAAE;QACD,UAAU,EAAE,iBAAiB,CAAC;QAC9B,eAAe,EAAE,eAAe,CAAC;QACjC,YAAY,EAAE,YAAY,EAAE,CAAC;QAC7B,UAAU,EAAE,UAAU,CAAC;QACvB,SAAS,EAAE,qBAAqB,CAAC;QACjC,SAAS,EAAE,YAAY,CAAC;KACzB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAY9B;;;;OAIG;IACH,MAAM,CAAC,2BAA2B,CAAC,eAAe,EAAE,eAAe,GAAG,mBAAmB;IAqBzF;;;;;;;;;;OAUG;WAEU,uBAAuB,CAClC,UAAU,EAAE,iBAAiB,EAC7B,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,YAAY,EAAE,EAC5B,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,qBAAqB,GAAG,YAAY,GAC9C,OAAO,CAAC,mBAAmB,CAAC;CAyDhC"}