@loaders.gl/tile-converter 4.4.0-alpha.1 → 4.4.0-alpha.9

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 (166) hide show
  1. package/dist/converter.min.cjs +89 -98
  2. package/dist/i3s-server/bin/i3s-server.min.cjs +78 -78
  3. package/package.json +17 -17
  4. package/src/3d-tiles-converter/3d-tiles-converter.ts +11 -7
  5. package/src/3d-tiles-converter/helpers/load-i3s.ts +5 -5
  6. package/src/converter-cli.ts +2 -2
  7. package/src/i3s-converter/helpers/geometry-converter.ts +17 -1
  8. package/src/i3s-converter/helpers/load-3d-tiles.ts +24 -9
  9. package/src/i3s-converter/i3s-converter.ts +25 -9
  10. package/src/i3s-server/controllers/slpk-controller.ts +2 -2
  11. package/src/lib/utils/compress-util.ts +1 -0
  12. package/dist/3d-tiles-converter/3d-tiles-converter.d.ts +0 -115
  13. package/dist/3d-tiles-converter/3d-tiles-converter.d.ts.map +0 -1
  14. package/dist/3d-tiles-converter/3d-tiles-converter.js +0 -388
  15. package/dist/3d-tiles-converter/helpers/3d-tiles-content-converter.d.ts +0 -88
  16. package/dist/3d-tiles-converter/helpers/3d-tiles-content-converter.d.ts.map +0 -1
  17. package/dist/3d-tiles-converter/helpers/3d-tiles-content-converter.js +0 -380
  18. package/dist/3d-tiles-converter/helpers/i3s-obb-to-3d-tiles-obb.d.ts +0 -13
  19. package/dist/3d-tiles-converter/helpers/i3s-obb-to-3d-tiles-obb.d.ts.map +0 -1
  20. package/dist/3d-tiles-converter/helpers/i3s-obb-to-3d-tiles-obb.js +0 -19
  21. package/dist/3d-tiles-converter/helpers/load-i3s.d.ts +0 -37
  22. package/dist/3d-tiles-converter/helpers/load-i3s.d.ts.map +0 -1
  23. package/dist/3d-tiles-converter/helpers/load-i3s.js +0 -98
  24. package/dist/3d-tiles-converter/helpers/texture-atlas.d.ts +0 -10
  25. package/dist/3d-tiles-converter/helpers/texture-atlas.d.ts.map +0 -1
  26. package/dist/3d-tiles-converter/helpers/texture-atlas.js +0 -50
  27. package/dist/3d-tiles-converter/json-templates/tileset.d.ts +0 -15
  28. package/dist/3d-tiles-converter/json-templates/tileset.d.ts.map +0 -1
  29. package/dist/3d-tiles-converter/json-templates/tileset.js +0 -39
  30. package/dist/constants.d.ts +0 -3
  31. package/dist/constants.d.ts.map +0 -1
  32. package/dist/constants.js +0 -2
  33. package/dist/converter-cli.d.ts +0 -2
  34. package/dist/converter-cli.d.ts.map +0 -1
  35. package/dist/converter-cli.js +0 -290
  36. package/dist/deps-installer/deps-installer.d.ts +0 -19
  37. package/dist/deps-installer/deps-installer.d.ts.map +0 -1
  38. package/dist/deps-installer/deps-installer.js +0 -95
  39. package/dist/i3s-converter/helpers/attribute-metadata-info.d.ts +0 -84
  40. package/dist/i3s-converter/helpers/attribute-metadata-info.d.ts.map +0 -1
  41. package/dist/i3s-converter/helpers/attribute-metadata-info.js +0 -219
  42. package/dist/i3s-converter/helpers/batch-ids-extensions.d.ts +0 -26
  43. package/dist/i3s-converter/helpers/batch-ids-extensions.d.ts.map +0 -1
  44. package/dist/i3s-converter/helpers/batch-ids-extensions.js +0 -165
  45. package/dist/i3s-converter/helpers/coordinate-converter.d.ts +0 -39
  46. package/dist/i3s-converter/helpers/coordinate-converter.d.ts.map +0 -1
  47. package/dist/i3s-converter/helpers/coordinate-converter.js +0 -118
  48. package/dist/i3s-converter/helpers/create-scene-server-path.d.ts +0 -9
  49. package/dist/i3s-converter/helpers/create-scene-server-path.d.ts.map +0 -1
  50. package/dist/i3s-converter/helpers/create-scene-server-path.js +0 -21
  51. package/dist/i3s-converter/helpers/feature-attributes.d.ts +0 -54
  52. package/dist/i3s-converter/helpers/feature-attributes.d.ts.map +0 -1
  53. package/dist/i3s-converter/helpers/feature-attributes.js +0 -193
  54. package/dist/i3s-converter/helpers/geometry-attributes.d.ts +0 -8
  55. package/dist/i3s-converter/helpers/geometry-attributes.d.ts.map +0 -1
  56. package/dist/i3s-converter/helpers/geometry-attributes.js +0 -226
  57. package/dist/i3s-converter/helpers/geometry-converter.d.ts +0 -60
  58. package/dist/i3s-converter/helpers/geometry-converter.d.ts.map +0 -1
  59. package/dist/i3s-converter/helpers/geometry-converter.js +0 -1309
  60. package/dist/i3s-converter/helpers/gltf-attributes.d.ts +0 -28
  61. package/dist/i3s-converter/helpers/gltf-attributes.d.ts.map +0 -1
  62. package/dist/i3s-converter/helpers/gltf-attributes.js +0 -122
  63. package/dist/i3s-converter/helpers/load-3d-tiles.d.ts +0 -33
  64. package/dist/i3s-converter/helpers/load-3d-tiles.d.ts.map +0 -1
  65. package/dist/i3s-converter/helpers/load-3d-tiles.js +0 -121
  66. package/dist/i3s-converter/helpers/node-debug.d.ts +0 -8
  67. package/dist/i3s-converter/helpers/node-debug.d.ts.map +0 -1
  68. package/dist/i3s-converter/helpers/node-debug.js +0 -116
  69. package/dist/i3s-converter/helpers/node-index-document.d.ts +0 -111
  70. package/dist/i3s-converter/helpers/node-index-document.d.ts.map +0 -1
  71. package/dist/i3s-converter/helpers/node-index-document.js +0 -269
  72. package/dist/i3s-converter/helpers/node-pages.d.ts +0 -156
  73. package/dist/i3s-converter/helpers/node-pages.d.ts.map +0 -1
  74. package/dist/i3s-converter/helpers/node-pages.js +0 -285
  75. package/dist/i3s-converter/helpers/preprocess-3d-tiles.d.ts +0 -22
  76. package/dist/i3s-converter/helpers/preprocess-3d-tiles.d.ts.map +0 -1
  77. package/dist/i3s-converter/helpers/preprocess-3d-tiles.js +0 -104
  78. package/dist/i3s-converter/helpers/progress.d.ts +0 -90
  79. package/dist/i3s-converter/helpers/progress.d.ts.map +0 -1
  80. package/dist/i3s-converter/helpers/progress.js +0 -148
  81. package/dist/i3s-converter/helpers/tileset-traversal.d.ts +0 -32
  82. package/dist/i3s-converter/helpers/tileset-traversal.d.ts.map +0 -1
  83. package/dist/i3s-converter/helpers/tileset-traversal.js +0 -34
  84. package/dist/i3s-converter/i3s-converter.d.ts +0 -312
  85. package/dist/i3s-converter/i3s-converter.d.ts.map +0 -1
  86. package/dist/i3s-converter/i3s-converter.js +0 -1191
  87. package/dist/i3s-converter/json-templates/geometry-definitions.d.ts +0 -7
  88. package/dist/i3s-converter/json-templates/geometry-definitions.d.ts.map +0 -1
  89. package/dist/i3s-converter/json-templates/geometry-definitions.js +0 -80
  90. package/dist/i3s-converter/json-templates/layers.d.ts +0 -70
  91. package/dist/i3s-converter/json-templates/layers.d.ts.map +0 -1
  92. package/dist/i3s-converter/json-templates/layers.js +0 -132
  93. package/dist/i3s-converter/json-templates/metadata.d.ts +0 -22
  94. package/dist/i3s-converter/json-templates/metadata.d.ts.map +0 -1
  95. package/dist/i3s-converter/json-templates/metadata.js +0 -21
  96. package/dist/i3s-converter/json-templates/node.d.ts +0 -61
  97. package/dist/i3s-converter/json-templates/node.d.ts.map +0 -1
  98. package/dist/i3s-converter/json-templates/node.js +0 -82
  99. package/dist/i3s-converter/json-templates/scene-server.d.ts +0 -28
  100. package/dist/i3s-converter/json-templates/scene-server.d.ts.map +0 -1
  101. package/dist/i3s-converter/json-templates/scene-server.js +0 -27
  102. package/dist/i3s-converter/json-templates/shared-resources.d.ts +0 -14
  103. package/dist/i3s-converter/json-templates/shared-resources.d.ts.map +0 -1
  104. package/dist/i3s-converter/json-templates/shared-resources.js +0 -122
  105. package/dist/i3s-converter/json-templates/store.d.ts +0 -95
  106. package/dist/i3s-converter/json-templates/store.d.ts.map +0 -1
  107. package/dist/i3s-converter/json-templates/store.js +0 -100
  108. package/dist/i3s-converter/types.d.ts +0 -226
  109. package/dist/i3s-converter/types.d.ts.map +0 -1
  110. package/dist/i3s-converter/types.js +0 -37
  111. package/dist/i3s-server/app.d.ts +0 -3
  112. package/dist/i3s-server/app.d.ts.map +0 -1
  113. package/dist/i3s-server/app.js +0 -31
  114. package/dist/i3s-server/bin/www.d.ts +0 -3
  115. package/dist/i3s-server/bin/www.d.ts.map +0 -1
  116. package/dist/i3s-server/bin/www.js +0 -46
  117. package/dist/i3s-server/controllers/slpk-controller.d.ts +0 -13
  118. package/dist/i3s-server/controllers/slpk-controller.d.ts.map +0 -1
  119. package/dist/i3s-server/controllers/slpk-controller.js +0 -32
  120. package/dist/i3s-server/routes/slpk-router.d.ts +0 -3
  121. package/dist/i3s-server/routes/slpk-router.d.ts.map +0 -1
  122. package/dist/i3s-server/routes/slpk-router.js +0 -40
  123. package/dist/i3s-server/utils/create-scene-server.d.ts +0 -17
  124. package/dist/i3s-server/utils/create-scene-server.d.ts.map +0 -1
  125. package/dist/i3s-server/utils/create-scene-server.js +0 -18
  126. package/dist/i3s-server/utils/server-utils.d.ts +0 -21
  127. package/dist/i3s-server/utils/server-utils.d.ts.map +0 -1
  128. package/dist/i3s-server/utils/server-utils.js +0 -60
  129. package/dist/index.cjs +0 -6228
  130. package/dist/index.cjs.map +0 -7
  131. package/dist/index.d.ts +0 -3
  132. package/dist/index.d.ts.map +0 -1
  133. package/dist/index.js +0 -2
  134. package/dist/lib/json-schemas/conversion-dump-json-schema.d.ts +0 -463
  135. package/dist/lib/json-schemas/conversion-dump-json-schema.d.ts.map +0 -1
  136. package/dist/lib/json-schemas/conversion-dump-json-schema.js +0 -285
  137. package/dist/lib/utils/cli-utils.d.ts +0 -34
  138. package/dist/lib/utils/cli-utils.d.ts.map +0 -1
  139. package/dist/lib/utils/cli-utils.js +0 -76
  140. package/dist/lib/utils/compress-util.d.ts +0 -8
  141. package/dist/lib/utils/compress-util.d.ts.map +0 -1
  142. package/dist/lib/utils/compress-util.js +0 -25
  143. package/dist/lib/utils/conversion-dump.d.ts +0 -147
  144. package/dist/lib/utils/conversion-dump.d.ts.map +0 -1
  145. package/dist/lib/utils/conversion-dump.js +0 -257
  146. package/dist/lib/utils/file-utils.d.ts +0 -57
  147. package/dist/lib/utils/file-utils.d.ts.map +0 -1
  148. package/dist/lib/utils/file-utils.js +0 -140
  149. package/dist/lib/utils/geometry-utils.d.ts +0 -9
  150. package/dist/lib/utils/geometry-utils.d.ts.map +0 -1
  151. package/dist/lib/utils/geometry-utils.js +0 -14
  152. package/dist/lib/utils/lod-conversion-utils.d.ts +0 -42
  153. package/dist/lib/utils/lod-conversion-utils.d.ts.map +0 -1
  154. package/dist/lib/utils/lod-conversion-utils.js +0 -71
  155. package/dist/lib/utils/queue.d.ts +0 -7
  156. package/dist/lib/utils/queue.d.ts.map +0 -1
  157. package/dist/lib/utils/queue.js +0 -14
  158. package/dist/lib/utils/statistic-utils.d.ts +0 -20
  159. package/dist/lib/utils/statistic-utils.d.ts.map +0 -1
  160. package/dist/lib/utils/statistic-utils.js +0 -88
  161. package/dist/lib/utils/write-queue.d.ts +0 -44
  162. package/dist/lib/utils/write-queue.d.ts.map +0 -1
  163. package/dist/lib/utils/write-queue.js +0 -82
  164. package/dist/pgm-loader.d.ts +0 -28
  165. package/dist/pgm-loader.d.ts.map +0 -1
  166. package/dist/pgm-loader.js +0 -24
@@ -1 +0,0 @@
1
- {"version":3,"file":"tileset-traversal.d.ts","sourceRoot":"","sources":["../../../src/i3s-converter/helpers/tileset-traversal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,4BAA4B,EAAC,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAC,iBAAiB,EAAC,iCAA8B;AACxD,OAAO,EAAC,OAAO,EAAC,MAAM,eAAe,CAAC;AAEtC,+CAA+C;AAC/C,MAAM,MAAM,wBAAwB,GAAG;IACrC,kDAAkD;IAClD,SAAS,EAAE,OAAO,CAAC;IACnB,0GAA0G;IAC1G,WAAW,EAAE,iBAAiB,EAAE,CAAC;CAClC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,mBAAmB,GAAU,MAAM,2EAO7C;IACD,IAAI,EAAE,4BAA4B,CAAC;IACnC,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,CAAC,IAAI,EAAE,4BAA4B,EAAE,cAAc,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7F,eAAe,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,EAAE,EAAE,qBAAqB,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,KAAG,OAAO,CAAC,IAAI,CAoBf,CAAC"}
@@ -1,34 +0,0 @@
1
- /**
2
- * Travesal of 3DTile tiles tree with making specific actions with each tile
3
- * @param tile - 3DTiles tile JSON metadata
4
- * @param traversalProps - traversal props used to pass data through recursive calls
5
- * @param processTile - callback to make some actions with the current tile
6
- * @param postprocessTile - callback to make some action after processing of the current tile and all the subtree
7
- * @param maxDepth - max recursive calls number the travesal function will do. If not set, the traversal function will
8
- * go through all the tree.
9
- * This value is used to limit the convertion with only partial number of levels of the tileset
10
- * @param level - counter to keep recursive calls number of the tiles tree. This value used to be able to break
11
- * traversal at the some level of the tree
12
- * @returns void
13
- */
14
- export const traverseDatasetWith = async ({ tile, traversalProps, processTile, postprocessTile, maxDepth, level = 0 }) => {
15
- if (maxDepth && level > maxDepth) {
16
- return;
17
- }
18
- const processResults = [];
19
- const newTraversalProps = await processTile(tile, traversalProps);
20
- processResults.push(newTraversalProps);
21
- for (const childTile of tile.children) {
22
- await traverseDatasetWith({
23
- tile: childTile,
24
- traversalProps: newTraversalProps,
25
- processTile,
26
- postprocessTile,
27
- maxDepth,
28
- level: level + 1
29
- });
30
- }
31
- if (postprocessTile) {
32
- await postprocessTile(processResults, traversalProps);
33
- }
34
- };
@@ -1,312 +0,0 @@
1
- import { AttributeMetadataInfo } from "./helpers/attribute-metadata-info.js";
2
- import type { Tiles3DLoaderOptions, Tiles3DTilesetJSONPostprocessed } from '@loaders.gl/3d-tiles';
3
- import type { WriteQueueItem } from "../lib/utils/write-queue.js";
4
- import type { SceneLayer3D } from '@loaders.gl/i3s';
5
- import { Geoid } from '@math.gl/geoid';
6
- import NodePages from "./helpers/node-pages.js";
7
- import { LoaderWithParser } from '@loaders.gl/loader-utils';
8
- import { I3SMaterialDefinition } from '@loaders.gl/i3s';
9
- import { PreprocessData } from "./types.js";
10
- import WriteQueue from "../lib/utils/write-queue.js";
11
- import { Progress } from "./helpers/progress.js";
12
- import { ConversionDump } from "../lib/utils/conversion-dump.js";
13
- import { PromptModule } from 'inquirer';
14
- type ConverterProps = {
15
- inputUrl: string;
16
- outputPath: string;
17
- tilesetName: string;
18
- egmFilePath: string;
19
- maxDepth?: number;
20
- token?: string;
21
- draco?: boolean;
22
- mergeMaterials?: boolean;
23
- validate?: boolean;
24
- generateTextures?: boolean;
25
- generateBoundingVolumes?: boolean;
26
- instantNodeWriting?: boolean;
27
- inquirer?: {
28
- prompt: PromptModule;
29
- };
30
- metadataClass?: string;
31
- analyze?: boolean;
32
- };
33
- /**
34
- * Converter from 3d-tiles tileset to i3s layer
35
- */
36
- export default class I3SConverter {
37
- attributeMetadataInfo: AttributeMetadataInfo;
38
- nodePages: NodePages;
39
- options: Partial<ConverterProps>;
40
- layers0Path: string;
41
- materialMap: Map<string, number>;
42
- materialDefinitions: I3SMaterialDefinition[];
43
- geometryMap: Map<string, number>;
44
- geometryConfigs: {
45
- hasTexture: boolean;
46
- hasUvRegions: boolean;
47
- }[];
48
- vertexCounter: number;
49
- layers0: SceneLayer3D | null;
50
- featuresHashArray: string[];
51
- refinementCounter: {
52
- tilesCount: number;
53
- tilesWithAddRefineCount: number;
54
- };
55
- validate: boolean;
56
- boundingVolumeWarnings?: string[];
57
- conversionStartTime: [number, number];
58
- refreshTokenTime: [number, number];
59
- sourceTileset: Tiles3DTilesetJSONPostprocessed | null;
60
- loadOptions: Tiles3DLoaderOptions;
61
- geoidHeightModel: Geoid | null;
62
- Loader: LoaderWithParser;
63
- generateTextures: boolean;
64
- generateBoundingVolumes: boolean;
65
- layersHasTexture: boolean;
66
- workerSource: {
67
- [key: string]: string;
68
- };
69
- writeQueue: WriteQueue<WriteQueueItem>;
70
- compressList: string[] | null;
71
- preprocessData: PreprocessData;
72
- progresses: Record<string, Progress>;
73
- conversionDump: ConversionDump;
74
- constructor();
75
- /**
76
- * Convert a 3d tileset
77
- * @param options
78
- * @param options.inputUrl the url to read the tileset from
79
- * @param options.outputPath the output filename
80
- * @param options.tilesetName the output name of the tileset
81
- * @param options.maxDepth The max tree depth of conversion
82
- * @param options.egmFilePath location of *.pgm file to convert heights from ellipsoidal to gravity-related format
83
- * @param options.token Token for Cesium ION tilesets authentication
84
- * @param options.draco Generate I3S 1.7 draco compressed geometries
85
- * @param options.validate -enable validation
86
- * @param options.generateTextures - generate alternative type of textures (to have non-compressed jpeg/png and compressed ktx2)
87
- * @param options.generateBoundingVolumes - generate bounding volumes from vertices coordinates instead of source tiles bounding volumes
88
- * @param options.instantNodeWriting - Keep created 3DNodeIndexDocument files on disk instead of memory. This option reduce memory usage but decelerates conversion speed
89
- */
90
- convert(options: ConverterProps): Promise<string>;
91
- /**
92
- * Preprocess stage of the tile converter. Traverse all the tiles tree and
93
- * check a tile content to be sure that the data is supported
94
- * @returns true - the conversion is possible, false - the tileset's content is not supported
95
- */
96
- private preprocessConversion;
97
- /**
98
- * Analyze a tile content. The callback for preprocess stage.
99
- * @param sourceTile - 3DTiles tile JSON metadata
100
- * @param traversalProps - mandatory argument but it is not used for the preprocess stage
101
- * @returns - nothing
102
- */
103
- private analyzeTile;
104
- /**
105
- * Select metadata class associated with the set of feature attributes
106
- * @returns true if the metadata class has been successfully selected
107
- */
108
- private selectMetadataClass;
109
- /**
110
- * Convert and save the layer and embedded tiles
111
- * @param outputPath - path to save output data
112
- * @param tilesetName - new tileset path
113
- */
114
- private _createAndSaveTileset;
115
- /**
116
- * Form object of 3DSceneLayer https://github.com/Esri/i3s-spec/blob/master/docs/1.7/3DSceneLayer.cmn.md
117
- * @param tilesetName - Name of layer
118
- * @param sourceBoundingVolume - initialized bounding volume of the source root tile
119
- * @param boundingVolumeRegion - region bounding volume of the source root tile
120
- */
121
- private _formLayers0;
122
- /**
123
- * Write 3DSceneLayer https://github.com/Esri/i3s-spec/blob/master/docs/1.7/3DSceneLayer.cmn.md in file
124
- */
125
- private _writeLayers0;
126
- /**
127
- * Pack files into *.slpk archive
128
- * @param tilesetPath - Path to save file
129
- */
130
- private _createSlpk;
131
- /**
132
- * Convert the specific 3DTiles tile to I3S nodes.
133
- * This is callback function for the traversal generic function
134
- * @param sourceTile - current 3DTiles tile JSON metadata
135
- * @param traversalProps - traversal properties calculated recursively
136
- * @returns - traversal properties for the child tiles
137
- */
138
- private convertTile;
139
- /**
140
- * Do final action with nodes after the current node and all child nodes been converted.
141
- * @param conversionResults - array of conversion results of the current node
142
- * @param currentTraversalProps - traversal properties of the current node
143
- */
144
- private finalizeTile;
145
- /**
146
- * Generate NodeIndexDocument
147
- * @param boundingVolumes - Bounding volumes
148
- * @param resources - converted or dumped node resources data
149
- * @param parentNode - 3DNodeIndexDocument of parent node
150
- * @param sourceTile - source 3DTile data
151
- * @param isDumped - indicator if the node is dumped
152
- * @return NodeIndexDocument, nodeInPage and node data
153
- */
154
- private _generateNodeIndexDocument;
155
- /**
156
- * Restore 3DNodeIndexDocument from a comversion dump file
157
- * @param parentNode - 3DNodeIndexDocument of parent node
158
- * @param sourceTile - source 3DTile data
159
- * @param transformationMatrix - transformation matrix of the current tile, calculated recursively multiplying
160
- * transform of all parent tiles and transform of the current tile
161
- */
162
- private _restoreNode;
163
- /**
164
- * Convert tile to one or more I3S nodes
165
- * @param parentNode - 3DNodeIndexDocument of parent node
166
- * @param sourceTile - source 3DTile data
167
- * @param transformationMatrix - transformation matrix of the current tile, calculated recursively multiplying
168
- * transform of all parent tiles and transform of the current tile
169
- * @param level - tree level
170
- */
171
- private _createNode;
172
- /**
173
- * Convert tile to one or more I3S nodes
174
- * @param sourceTile - source tile (3DTile)
175
- * @param transformationMatrix - transformation matrix of the current tile, calculated recursively multiplying
176
- * transform of all parent tiles and transform of the current tile
177
- * @param boundingVolume - initialized bounding volume of the source tile
178
- * @param tileContent - content of the source tile
179
- * @param parentId - id of parent node in node pages
180
- * @param propertyTable - batch table from b3dm / feature properties from EXT_FEATURE_METADATA, EXT_MESH_FEATURES or EXT_STRUCTURAL_METADATA
181
- * @returns - converted node resources
182
- */
183
- private _convertResources;
184
- /**
185
- * Update node object (https://github.com/Esri/i3s-spec/blob/master/docs/1.7/node.cmn.md)
186
- * in node pages (https://github.com/Esri/i3s-spec/blob/master/docs/1.7/nodePage.cmn.md)
187
- * @param maxScreenThresholdSQ - Level of Details (LOD) metric
188
- * @param boundingVolumes - Bounding volumes
189
- * @param sourceTile - source tile (3DTile)
190
- * @param parentId - id of parent node in node pages
191
- * @param resources - the node resources data
192
- * @param resources.meshMaterial - PBR-like material object
193
- * @param resources.texture - texture image
194
- * @param resources.vertexCount - number of vertices in geometry
195
- * @param resources.featureCount - number of features
196
- * @param resources.geometry - Uint8Array with geometry attributes
197
- * @return the node object in node pages
198
- */
199
- private _updateNodeInNodePages;
200
- /**
201
- * Write node resources in files
202
- * @param resources - source tile (3DTile)
203
- * @param resources.geometry - Uint8Array with geometry attributes
204
- * @param resources.compressedGeometry - Uint8Array with compressed (draco) geometry
205
- * @param resources.texture - texture image
206
- * @param resources.sharedResources - shared resource data object
207
- * @param resources.attributes - feature attributes
208
- * @param nodePath - node path
209
- * @param sourceTile - source tile (3DTile)
210
- * @return {Promise<void>}
211
- */
212
- private _writeResources;
213
- /**
214
- * Write non-compressed and compressed geometries in files
215
- * @param geometryBuffer - Uint8Array with geometry attributes
216
- * @param compressedGeometry - Uint8Array with compressed (draco) geometry
217
- * @param childPath - a child path to write resources
218
- * @param slpkChildPath - resource path inside *slpk file
219
- * @param sourceId - source filename
220
- * @param nodeId - nodeId of a converted node for the writing
221
- */
222
- private _writeGeometries;
223
- /**
224
- * Write shared resources in a file
225
- * @param sharedResources - shared resource data object
226
- * @param childPath - a child path to write resources
227
- * @param slpkChildPath - resource path inside *slpk file
228
- * @param nodePath - a node path
229
- * @param sourceId - source filename
230
- * @param nodeId - nodeId of a converted node for the writing
231
- */
232
- private _writeShared;
233
- /**
234
- * Generates textures based on texture mime type and fill in textureSetDefinitions data.
235
- * @param texture - the texture image
236
- * @param childPath - a child path to write resources
237
- * @param slpkChildPath - the resource path inside *slpk file
238
- * @param sourceId - source filename
239
- * @param nodeId - nodeId of a converted node for the writing
240
- */
241
- private _writeTexture;
242
- /**
243
- * Write the texture image in a file
244
- * @param textureData
245
- * @param name
246
- * @param format
247
- * @param childPath
248
- * @param slpkChildPath
249
- * @param sourceId
250
- * @param nodeId
251
- */
252
- private writeTextureFile;
253
- /**
254
- * Write feature attributes in files
255
- * @param attributes - feature attributes
256
- * @param childPath - a child path to write resources
257
- * @param slpkChildPath - the resource path inside *slpk file
258
- * @param sourceId - source filename
259
- * @param nodeId - nodeId of a converted node for the writing
260
- */
261
- private _writeAttributes;
262
- /**
263
- * Return file format by its MIME type
264
- * @param mimeType - feature attributes
265
- */
266
- private _getFormatByMimeType;
267
- /**
268
- * Find or create material in materialDefinitions array
269
- * @param material - end-to-end index of the node
270
- * @return material id
271
- */
272
- private _findOrCreateMaterial;
273
- /**
274
- * Get unique geometry configuration index
275
- * In the end of conversion configurations will be transformed to geometryDefinitions array
276
- * @param hasTexture
277
- * @param hasUvRegions
278
- * @returns
279
- */
280
- private findOrCreateGeometryDefinition;
281
- /**
282
- * Creates attribute storage info based on either extension schema or property table.
283
- * @param tileContent - content of the source tile
284
- * @param propertyTable - feature properties from EXT_FEATURE_METADATA, EXT_STRUCTURAL_METADATA
285
- */
286
- private createAttributeStorageInfo;
287
- /**
288
- * Print statistics in the end of conversion
289
- * @param params - output files data
290
- */
291
- private _finishConversion;
292
- /**
293
- * Fetch preload options for ION tileset
294
- */
295
- private _fetchPreloadOptions;
296
- /**
297
- * Update options of source tileset
298
- */
299
- private _updateTilesetOptions;
300
- /** Do calculations of all tiles and tiles with "ADD" type of refinement.
301
- * @param tile
302
- */
303
- private _checkAddRefinementTypeForTile;
304
- /**
305
- * Check if the tile's content format is supported by the converter
306
- * @param sourceTile
307
- * @returns
308
- */
309
- private isContentSupported;
310
- }
311
- export {};
312
- //# sourceMappingURL=i3s-converter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"i3s-converter.d.ts","sourceRoot":"","sources":["../../src/i3s-converter/i3s-converter.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,qBAAqB,EAAC,6CAA0C;AAExE,OAAO,KAAK,EAEV,oBAAoB,EAGpB,+BAA+B,EAChC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAC,cAAc,EAAC,oCAAiC;AAC7D,OAAO,KAAK,EACV,YAAY,EAMb,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAOrC,OAAO,SAAS,gCAA6B;AAkB7C,OAAO,EAAC,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAC,qBAAqB,EAA8B,MAAM,iBAAiB,CAAC;AAGnF,OAAO,EAGL,cAAc,EAGf,mBAAgB;AAEjB,OAAO,UAAU,oCAAiC;AAkBlD,OAAO,EAAC,QAAQ,EAAC,8BAA2B;AAE5C,OAAO,EAAC,cAAc,EAAsC,wCAAqC;AACjG,OAAO,EAAC,YAAY,EAAC,MAAM,UAAU,CAAC;AAYtC,KAAK,cAAc,GAAG;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,EAAE;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