@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,285 +0,0 @@
1
- export const dumpJsonSchema = {
2
- type: 'object',
3
- properties: {
4
- options: {
5
- type: 'object',
6
- properties: {
7
- inputUrl: { type: 'string' },
8
- outputPath: { type: 'string' },
9
- tilesetName: { type: 'string' },
10
- maxDepth: { type: 'number' },
11
- slpk: { type: 'boolean' },
12
- egmFilePath: { type: 'string' },
13
- token: { type: 'string' },
14
- draco: { type: 'boolean' },
15
- mergeMaterials: { type: 'boolean' },
16
- generateTextures: { type: 'boolean' },
17
- generateBoundingVolumes: { type: 'boolean' },
18
- metadataClass: { type: 'string' },
19
- analyze: { type: 'boolean' }
20
- },
21
- required: ['inputUrl', 'outputPath', 'tilesetName']
22
- },
23
- tilesConverted: {
24
- type: 'object',
25
- patternProperties: {
26
- '.*': {
27
- type: 'object',
28
- properties: {
29
- nodes: {
30
- type: 'array',
31
- items: {
32
- type: 'object',
33
- properties: {
34
- nodeId: { type: ['number', 'string'] },
35
- done: { type: 'boolean' },
36
- progress: { type: 'object', patternProperties: { '.*': { type: 'boolean' } } },
37
- dumpMetadata: {
38
- type: 'object',
39
- properties: {
40
- boundingVolumes: {
41
- type: ['object', 'null'],
42
- properties: {
43
- mbs: {
44
- type: 'array',
45
- minItems: 4,
46
- maxItems: 4,
47
- items: { type: 'number' }
48
- },
49
- obb: {
50
- type: 'object',
51
- properties: {
52
- center: {
53
- type: 'array',
54
- minItems: 3,
55
- maxItems: 3,
56
- items: { type: 'number' }
57
- },
58
- halfSize: {
59
- type: 'array',
60
- minItems: 3,
61
- maxItems: 3,
62
- items: { type: 'number' }
63
- },
64
- quaternion: {
65
- type: 'array',
66
- minItems: 4,
67
- maxItems: 4,
68
- items: { type: 'number' }
69
- }
70
- },
71
- required: ['center', 'halfSize', 'quaternion']
72
- }
73
- },
74
- required: ['mbs', 'obb']
75
- },
76
- attributesCount: { type: 'number' },
77
- featureCount: { type: 'number' },
78
- geometry: { type: 'boolean' },
79
- hasUvRegions: { type: 'boolean' },
80
- materialId: { type: 'number' },
81
- texelCountHint: { type: 'number' },
82
- vertexCount: { type: 'number' }
83
- },
84
- required: [
85
- 'boundingVolumes',
86
- 'featureCount',
87
- 'geometry',
88
- 'hasUvRegions',
89
- 'materialId',
90
- 'vertexCount'
91
- ]
92
- }
93
- },
94
- required: ['nodeId', 'done']
95
- }
96
- }
97
- },
98
- required: ['nodes']
99
- }
100
- }
101
- },
102
- textureSetDefinitions: {
103
- type: 'array',
104
- items: {
105
- type: 'object',
106
- properties: {
107
- formats: {
108
- type: 'array',
109
- items: {
110
- type: 'object',
111
- properties: {
112
- name: { type: 'string' },
113
- format: { enum: ['jpg', 'png', 'ktx-etc2', 'dds', 'ktx2'] }
114
- },
115
- required: ['name', 'format']
116
- }
117
- },
118
- atlas: { type: 'boolean' }
119
- },
120
- required: ['formats']
121
- }
122
- },
123
- attributeMetadataInfo: {
124
- type: 'object',
125
- properties: {
126
- attributeStorageInfo: {
127
- type: 'array',
128
- items: {
129
- type: 'object',
130
- properties: {
131
- key: { type: 'string' },
132
- name: { type: 'string' },
133
- header: {
134
- type: 'array',
135
- items: {
136
- type: 'object',
137
- properties: { property: { type: 'string' }, valueType: { type: 'string' } },
138
- required: ['property', 'valueType']
139
- }
140
- },
141
- ordering: { type: 'array', items: { type: 'string' } },
142
- attributeValues: { $ref: '#/$defs/AttributeValue' },
143
- attributeByteCounts: { $ref: '#/$defs/AttributeValue' },
144
- objectIds: { $ref: '#/$defs/AttributeValue' }
145
- },
146
- required: ['key', 'name', 'header']
147
- }
148
- },
149
- fields: {
150
- type: 'array',
151
- items: {
152
- type: 'object',
153
- properties: {
154
- name: { type: 'string' },
155
- type: { $ref: '#/$defs/ESRIField' },
156
- alias: { type: 'string' },
157
- domain: { $ref: '#/$defs/Domain' }
158
- },
159
- required: ['name', 'type']
160
- }
161
- },
162
- popupInfo: {
163
- type: 'object',
164
- properties: {
165
- title: { type: 'string' },
166
- description: { type: 'string' },
167
- expressionInfos: { type: 'array', items: {} },
168
- fieldInfos: { type: 'array', items: { $ref: '#/$defs/FieldInfo' } },
169
- mediaInfos: { type: 'array', items: {} },
170
- popupElements: {
171
- type: 'array',
172
- items: {
173
- type: 'object',
174
- properties: {
175
- text: { type: 'string' },
176
- type: { type: 'string' },
177
- fieldInfos: { type: 'array', items: { $ref: '#/$defs/FieldInfo' } }
178
- }
179
- }
180
- }
181
- }
182
- }
183
- },
184
- required: ['attributeStorageInfo', 'fields']
185
- },
186
- materialDefinitions: {
187
- type: 'array',
188
- items: {
189
- type: 'object',
190
- properties: {
191
- pbrMetallicRoughness: {
192
- type: 'object',
193
- properties: {
194
- baseColorFactor: {
195
- type: 'array',
196
- minItems: 4,
197
- maxItems: 4,
198
- items: { type: 'number' }
199
- },
200
- baseColorTexture: { $ref: '#/$defs/I3SMaterialTexture' },
201
- metallicFactor: { type: 'number' },
202
- roughnessFactor: { type: 'number' },
203
- metallicRoughnessTexture: { $ref: '#/$defs/I3SMaterialTexture' }
204
- },
205
- required: ['metallicFactor', 'roughnessFactor']
206
- },
207
- normalTexture: { $ref: '#/$defs/I3SMaterialTexture' },
208
- occlusionTexture: { $ref: '#/$defs/I3SMaterialTexture' },
209
- emissiveTexture: { $ref: '#/$defs/I3SMaterialTexture' },
210
- emissiveFactor: { type: 'array', minItems: 3, maxItems: 3, items: { type: 'number' } },
211
- alphaMode: { enum: ['opaque', 'mask', 'blend'] },
212
- alphaCutoff: { type: 'number' },
213
- doubleSided: { type: 'boolean' },
214
- cullFace: { enum: ['none', 'front', 'back'] }
215
- },
216
- required: ['pbrMetallicRoughness', 'alphaMode']
217
- }
218
- }
219
- },
220
- required: ['options', 'tilesConverted'],
221
- $defs: {
222
- AttributeValue: {
223
- type: 'object',
224
- properties: {
225
- valueType: { type: 'string' },
226
- encoding: { type: 'string' },
227
- valuesPerElement: { type: 'number' }
228
- },
229
- required: ['valueType']
230
- },
231
- ESRIField: {
232
- enum: [
233
- 'esriFieldTypeDate',
234
- 'esriFieldTypeSingle',
235
- 'esriFieldTypeDouble',
236
- 'esriFieldTypeGUID',
237
- 'esriFieldTypeGlobalID',
238
- 'esriFieldTypeInteger',
239
- 'esriFieldTypeOID',
240
- 'esriFieldTypeSmallInteger',
241
- 'esriFieldTypeString'
242
- ]
243
- },
244
- Domain: {
245
- type: 'object',
246
- properties: {
247
- type: { type: 'string' },
248
- name: { type: 'string' },
249
- description: { type: 'string' },
250
- fieldType: { type: 'string' },
251
- range: { type: 'array', items: { type: 'number' } },
252
- codedValues: {
253
- type: 'array',
254
- items: {
255
- type: 'object',
256
- properties: { name: { type: 'string' }, code: { type: ['string', 'number'] } },
257
- required: ['name', 'code']
258
- }
259
- },
260
- mergePolicy: { type: 'string' },
261
- splitPolicy: { type: 'string' }
262
- },
263
- required: ['type', 'name']
264
- },
265
- FieldInfo: {
266
- type: 'object',
267
- properties: {
268
- fieldName: { type: 'string' },
269
- visible: { type: 'boolean' },
270
- isEditable: { type: 'boolean' },
271
- label: { type: 'string' }
272
- },
273
- required: ['fieldName', 'visible', 'isEditable', 'label']
274
- },
275
- I3SMaterialTexture: {
276
- type: 'object',
277
- properties: {
278
- textureSetDefinitionId: { type: 'number' },
279
- texCoord: { type: 'number' },
280
- factor: { type: 'number' }
281
- },
282
- required: ['textureSetDefinitionId']
283
- }
284
- }
285
- };
@@ -1,34 +0,0 @@
1
- /**
2
- * Get string option value from cli arguments
3
- * @param index - option's name index in the argument's array.
4
- * The value of the option should be next to name of the option.
5
- * @param args - cli arguments array
6
- * @returns - string value of the option
7
- */
8
- export declare function getStringValue(index: number, args: string[]): string;
9
- /**
10
- * Modyfy URL path to be compatible with fetch
11
- * @param index - option's name index in the argument's array.
12
- * The value of the option should be next to name of the option.
13
- * @param args - cli arguments array
14
- * @returns - string value of the option
15
- */
16
- export declare function getURLValue(index: number, args: string[]): string;
17
- export declare function validateOptionsWithEqual(args: string[]): string[];
18
- /**
19
- * Get integer option value from cli arguments
20
- * @param index - option's name index in the argument's array
21
- * The value of the option should be next to name of the option.
22
- * @param args - cli arguments array
23
- * @returns - number value of the option
24
- */
25
- export declare function getIntegerValue(index: number, args: string[]): number;
26
- /**
27
- * Get boolean option value from cli arguments
28
- * @param index - option's name index in the argument's array
29
- * The value of the option should be next to name of the option.
30
- * @param args - cli arguments array
31
- * @returns - boolean value of the option
32
- */
33
- export declare function getBooleanValue(index: number, args: string[]): boolean;
34
- //# sourceMappingURL=cli-utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli-utils.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/cli-utils.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CASpE;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAOjE;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAWjE;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAOrE;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAStE"}
@@ -1,76 +0,0 @@
1
- /**
2
- * Get string option value from cli arguments
3
- * @param index - option's name index in the argument's array.
4
- * The value of the option should be next to name of the option.
5
- * @param args - cli arguments array
6
- * @returns - string value of the option
7
- */
8
- export function getStringValue(index, args) {
9
- if (index + 1 >= args.length) {
10
- return '';
11
- }
12
- const value = args[index + 1];
13
- if (value.indexOf('--') === 0) {
14
- return '';
15
- }
16
- return value;
17
- }
18
- /**
19
- * Modyfy URL path to be compatible with fetch
20
- * @param index - option's name index in the argument's array.
21
- * The value of the option should be next to name of the option.
22
- * @param args - cli arguments array
23
- * @returns - string value of the option
24
- */
25
- export function getURLValue(index, args) {
26
- const value = getStringValue(index, args);
27
- // eslint-disable-next-line no-console
28
- console.log(`Input tileset value: ${value}`);
29
- // eslint-disable-next-line no-console
30
- console.log(`Modified tileset value: ${value.replace(/\\/g, '/')}`);
31
- return value.replace(/\\/g, '/');
32
- }
33
- export function validateOptionsWithEqual(args) {
34
- return args.reduce((acc, curr) => {
35
- const equalSignIndex = curr.indexOf('=');
36
- const beforeEqual = curr.slice(0, equalSignIndex);
37
- const afterEqual = curr.slice(equalSignIndex + 1, curr.length);
38
- const condition = curr.includes('=') && curr.startsWith('--') && afterEqual;
39
- if (condition) {
40
- return acc.concat(beforeEqual, afterEqual);
41
- }
42
- return acc.concat(curr);
43
- }, []);
44
- }
45
- /**
46
- * Get integer option value from cli arguments
47
- * @param index - option's name index in the argument's array
48
- * The value of the option should be next to name of the option.
49
- * @param args - cli arguments array
50
- * @returns - number value of the option
51
- */
52
- export function getIntegerValue(index, args) {
53
- const stringValue = getStringValue(index, args);
54
- const result = Number.parseInt(stringValue);
55
- if (isFinite(result)) {
56
- return result;
57
- }
58
- return NaN;
59
- }
60
- /**
61
- * Get boolean option value from cli arguments
62
- * @param index - option's name index in the argument's array
63
- * The value of the option should be next to name of the option.
64
- * @param args - cli arguments array
65
- * @returns - boolean value of the option
66
- */
67
- export function getBooleanValue(index, args) {
68
- const stringValue = getStringValue(index, args).toLowerCase().trim();
69
- if (['--no-draco', '--split-nodes'].includes(args[index]) && !stringValue) {
70
- return false;
71
- }
72
- if (!stringValue || stringValue === 'true') {
73
- return true;
74
- }
75
- return false;
76
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * Compress file to gzip file
3
- *
4
- * @param pathFile - the path to the file
5
- * @return the path to the gzip file
6
- */
7
- export declare function compressFileWithGzip(pathFile: string): Promise<string>;
8
- //# sourceMappingURL=compress-util.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compress-util.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/compress-util.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAiBtE"}
@@ -1,25 +0,0 @@
1
- import { createGzip } from 'zlib';
2
- import { createReadStream, createWriteStream } from 'fs';
3
- /**
4
- * Compress file to gzip file
5
- *
6
- * @param pathFile - the path to the file
7
- * @return the path to the gzip file
8
- */
9
- export function compressFileWithGzip(pathFile) {
10
- const compressedPathFile = `${pathFile}.gz`;
11
- const gzip = createGzip();
12
- const input = createReadStream(pathFile);
13
- const output = createWriteStream(compressedPathFile);
14
- return new Promise((resolve, reject) => {
15
- input.on('end', () => {
16
- console.log(`${compressedPathFile} compressed and saved.`); // eslint-disable-line no-undef,no-console
17
- resolve(compressedPathFile);
18
- });
19
- input.on('error', (error) => {
20
- console.log(`${compressedPathFile}: compression error!`); // eslint-disable-line no-undef,no-console
21
- reject(error);
22
- });
23
- input.pipe(gzip).pipe(output);
24
- });
25
- }
@@ -1,147 +0,0 @@
1
- import { BoundingVolumes, I3SMaterialDefinition, TextureSetDefinitionFormats } from '@loaders.gl/i3s';
2
- import { AttributeMetadataInfoObject } from "../../i3s-converter/helpers/attribute-metadata-info.js";
3
- export type ConversionDumpOptions = {
4
- inputUrl: string;
5
- outputPath: string;
6
- tilesetName: string;
7
- maxDepth: number;
8
- slpk: boolean;
9
- egmFilePath: string;
10
- token: string;
11
- draco: boolean;
12
- mergeMaterials: boolean;
13
- generateTextures: boolean;
14
- generateBoundingVolumes: boolean;
15
- metadataClass: string;
16
- analyze: boolean;
17
- outputVersion: string;
18
- };
19
- type NodeDoneStatus = {
20
- nodeId: number | string;
21
- done: boolean;
22
- progress?: Record<string, boolean>;
23
- dumpMetadata?: DumpMetadata;
24
- };
25
- type TilesConverted = {
26
- nodes: NodeDoneStatus[];
27
- };
28
- export type DumpMetadata = {
29
- boundingVolumes: BoundingVolumes | null;
30
- attributesCount?: number;
31
- featureCount: number | null;
32
- geometry: boolean;
33
- hasUvRegions: boolean;
34
- materialId: number | null;
35
- texelCountHint?: number;
36
- vertexCount: number | null;
37
- };
38
- export type TextureSetDefinition = {
39
- formats: TextureSetDefinitionFormats;
40
- atlas?: boolean;
41
- };
42
- export declare class ConversionDump {
43
- /** Restored/resumed dump indicator */
44
- restored: boolean;
45
- /** Conversion options */
46
- private options?;
47
- /** Tiles conversion progress status map */
48
- tilesConverted: Record<string, TilesConverted>;
49
- /** Textures formats definitions */
50
- textureSetDefinitions?: TextureSetDefinition[];
51
- /** Attributes Metadata */
52
- attributeMetadataInfo?: AttributeMetadataInfoObject;
53
- /** Array of materials definitions */
54
- materialDefinitions?: I3SMaterialDefinition[];
55
- constructor();
56
- /**
57
- * Create a dump with convertion options
58
- * @param currentOptions - converter options
59
- */
60
- createDump(currentOptions: ConversionDumpOptions): Promise<void>;
61
- /**
62
- * Reset a dump
63
- */
64
- reset(): void;
65
- /**
66
- * Update conversion status in the dump file
67
- */
68
- private updateDumpFile;
69
- /**
70
- * Delete a dump file
71
- */
72
- deleteDumpFile(): Promise<void>;
73
- /**
74
- * Get record from the tilesConverted Map
75
- * @param fileName - source filename
76
- * @returns existing object from the tilesConverted Map
77
- */
78
- private getRecord;
79
- /**
80
- * Set a record for the dump file
81
- * @param fileName - key - source filename
82
- * @param object - value
83
- */
84
- private setRecord;
85
- /**
86
- * Add a node into the dump file for the source file record
87
- * @param fileName - source filename
88
- * @param nodeId - nodeId of the node
89
- */
90
- addNode(filename: string, nodeId: number | string, dumpMetadata?: DumpMetadata): Promise<void>;
91
- /**
92
- * Clear dump record got the source filename
93
- * @param fileName - source filename
94
- */
95
- clearDumpRecord(filename: string): void;
96
- /**
97
- * Add textures definitions into the dump file
98
- * @param textureDefinitions - textures definitions array
99
- */
100
- addTexturesDefinitions(textureDefinitions: TextureSetDefinition[]): void;
101
- /**
102
- * Update done status object for the writing resources
103
- * @param fileName - key - source filename
104
- * @param nodeId - nodeId for the source filename
105
- * @param resourceType - resource type to update status
106
- * @param value - value
107
- */
108
- updateDoneStatus(filename: string, nodeId: number | string, resourceType: string, value: boolean): void;
109
- /**
110
- * Update dump file according to writing results
111
- * @param changedRecords - array of parameters ids for the written resources
112
- * @param writeResults - array of writing resource files results
113
- */
114
- updateConvertedTilesDump(changedRecords: {
115
- outputId?: number | string;
116
- sourceId?: string;
117
- resourceType?: string;
118
- }[], writeResults: PromiseSettledResult<string | null>[]): Promise<void>;
119
- /**
120
- * Update done status for a node
121
- * @param sourceId - source resource Id
122
- * @param outputId - output node/tile Id
123
- * @param resourceType - type of resource
124
- * @returns void
125
- */
126
- private updateNodes;
127
- /**
128
- * Update 3d-tiles-converter dump file
129
- * @param filename - source filename
130
- * @param nodeId - nodeId
131
- * @param done - conversion status
132
- */
133
- updateConvertedNodesDumpFile(filename: string, nodeId: number | string, done: boolean): Promise<void>;
134
- /**
135
- * Check is source file conversion complete
136
- * @param filename - source filename
137
- * @returns true if source file conversion complete
138
- */
139
- isFileConversionComplete(filename: string): boolean;
140
- /**
141
- * Set materialDefinitions into a dump
142
- * @param materialDefinitions - Array materialDefinitions
143
- */
144
- setMaterialsDefinitions(materialDefinitions: I3SMaterialDefinition[]): void;
145
- }
146
- export {};
147
- //# sourceMappingURL=conversion-dump.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conversion-dump.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/conversion-dump.ts"],"names":[],"mappings":"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"}