@loaders.gl/tile-converter 3.1.0-alpha.4 → 3.1.0-beta.5
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.
- package/bin/converter.js +1 -1
- package/dist/bundle.js +86025 -0
- package/dist/converter.min.js +292 -0
- package/dist/es5/3d-tiles-converter/3d-tiles-converter.js +189 -421
- package/dist/es5/3d-tiles-converter/3d-tiles-converter.js.map +1 -1
- package/dist/es5/3d-tiles-converter/helpers/b3dm-converter.js +214 -296
- package/dist/es5/3d-tiles-converter/helpers/b3dm-converter.js.map +1 -1
- package/dist/es5/3d-tiles-converter/helpers/i3s-obb-to-3d-tiles-obb.js +4 -8
- package/dist/es5/3d-tiles-converter/helpers/i3s-obb-to-3d-tiles-obb.js.map +1 -1
- package/dist/es5/3d-tiles-converter/helpers/texture-atlas.js +40 -0
- package/dist/es5/3d-tiles-converter/helpers/texture-atlas.js.map +1 -0
- package/dist/es5/3d-tiles-converter/json-templates/tileset.js +7 -17
- package/dist/es5/3d-tiles-converter/json-templates/tileset.js.map +1 -1
- package/dist/es5/bundle.js +1 -1
- package/dist/es5/bundle.js.map +1 -1
- package/dist/es5/deps-installer/deps-installer.js +17 -65
- package/dist/es5/deps-installer/deps-installer.js.map +1 -1
- package/dist/es5/i3s-converter/helpers/coordinate-converter.js +16 -16
- package/dist/es5/i3s-converter/helpers/coordinate-converter.js.map +1 -1
- package/dist/es5/i3s-converter/helpers/create-scene-server-path.js +9 -33
- package/dist/es5/i3s-converter/helpers/create-scene-server-path.js.map +1 -1
- package/dist/es5/i3s-converter/helpers/geometry-attributes.js +93 -103
- package/dist/es5/i3s-converter/helpers/geometry-attributes.js.map +1 -1
- package/dist/es5/i3s-converter/helpers/geometry-converter.js +348 -511
- package/dist/es5/i3s-converter/helpers/geometry-converter.js.map +1 -1
- package/dist/es5/i3s-converter/helpers/node-debug.js +30 -26
- package/dist/es5/i3s-converter/helpers/node-debug.js.map +1 -1
- package/dist/es5/i3s-converter/helpers/node-pages.js +102 -203
- package/dist/es5/i3s-converter/helpers/node-pages.js.map +1 -1
- package/dist/es5/i3s-converter/i3s-converter.js +701 -1501
- package/dist/es5/i3s-converter/i3s-converter.js.map +1 -1
- package/dist/es5/i3s-converter/json-templates/layers.js +15 -25
- package/dist/es5/i3s-converter/json-templates/layers.js.map +1 -1
- package/dist/es5/i3s-converter/json-templates/metadata.js +2 -2
- package/dist/es5/i3s-converter/json-templates/metadata.js.map +1 -1
- package/dist/es5/i3s-converter/json-templates/node.js +12 -21
- package/dist/es5/i3s-converter/json-templates/node.js.map +1 -1
- package/dist/es5/i3s-converter/json-templates/scene-server.js +3 -5
- package/dist/es5/i3s-converter/json-templates/scene-server.js.map +1 -1
- package/dist/es5/i3s-converter/json-templates/shared-resources.js +15 -55
- package/dist/es5/i3s-converter/json-templates/shared-resources.js.map +1 -1
- package/dist/es5/i3s-converter/json-templates/store.js +4 -6
- package/dist/es5/i3s-converter/json-templates/store.js.map +1 -1
- package/dist/es5/i3s-server/app.js +6 -6
- package/dist/es5/i3s-server/app.js.map +1 -1
- package/dist/es5/i3s-server/controllers/index-controller.js +20 -60
- package/dist/es5/i3s-server/controllers/index-controller.js.map +1 -1
- package/dist/es5/i3s-server/routes/index.js +14 -41
- package/dist/es5/i3s-server/routes/index.js.map +1 -1
- package/dist/es5/index.js +4 -4
- package/dist/es5/lib/geoid-height-model.js +100 -114
- package/dist/es5/lib/geoid-height-model.js.map +1 -1
- package/dist/es5/lib/pgm-parser.js +68 -122
- package/dist/es5/lib/pgm-parser.js.map +1 -1
- package/dist/es5/lib/utils/compress-util.js +123 -345
- package/dist/es5/lib/utils/compress-util.js.map +1 -1
- package/dist/es5/lib/utils/file-utils.js +20 -98
- package/dist/es5/lib/utils/file-utils.js.map +1 -1
- package/dist/es5/lib/utils/lod-conversion-utils.js +9 -9
- package/dist/es5/lib/utils/lod-conversion-utils.js.map +1 -1
- package/dist/es5/lib/utils/statistic-utills.js +41 -152
- package/dist/es5/lib/utils/statistic-utills.js.map +1 -1
- package/dist/es5/pgm-loader.js +3 -5
- package/dist/es5/pgm-loader.js.map +1 -1
- package/dist/esm/3d-tiles-converter/3d-tiles-converter.js +19 -13
- package/dist/esm/3d-tiles-converter/3d-tiles-converter.js.map +1 -1
- package/dist/esm/3d-tiles-converter/helpers/b3dm-converter.js +19 -8
- package/dist/esm/3d-tiles-converter/helpers/b3dm-converter.js.map +1 -1
- package/dist/esm/3d-tiles-converter/helpers/texture-atlas.js +33 -0
- package/dist/esm/3d-tiles-converter/helpers/texture-atlas.js.map +1 -0
- package/dist/esm/i3s-converter/helpers/geometry-converter.js +29 -31
- package/dist/esm/i3s-converter/helpers/geometry-converter.js.map +1 -1
- package/dist/esm/i3s-converter/helpers/node-debug.js +2 -2
- package/dist/esm/i3s-converter/helpers/node-debug.js.map +1 -1
- package/dist/esm/i3s-converter/helpers/node-pages.js +2 -2
- package/dist/esm/i3s-converter/helpers/node-pages.js.map +1 -1
- package/dist/esm/i3s-converter/i3s-converter.js +50 -31
- package/dist/esm/i3s-converter/i3s-converter.js.map +1 -1
- package/dist/esm/i3s-converter/json-templates/metadata.js +1 -1
- package/dist/esm/i3s-converter/json-templates/metadata.js.map +1 -1
- package/dist/esm/i3s-converter/json-templates/scene-server.js +1 -1
- package/dist/esm/i3s-converter/json-templates/scene-server.js.map +1 -1
- package/dist/esm/i3s-converter/json-templates/shared-resources.js +2 -2
- package/dist/esm/i3s-converter/json-templates/shared-resources.js.map +1 -1
- package/dist/esm/i3s-converter/json-templates/store.js +2 -2
- package/dist/esm/i3s-converter/json-templates/store.js.map +1 -1
- package/dist/esm/i3s-server/controllers/index-controller.js +2 -2
- package/dist/esm/i3s-server/controllers/index-controller.js.map +1 -1
- package/dist/esm/lib/utils/compress-util.js +13 -13
- package/dist/esm/lib/utils/compress-util.js.map +1 -1
- package/dist/esm/lib/utils/file-utils.js +1 -1
- package/dist/esm/lib/utils/file-utils.js.map +1 -1
- package/dist/esm/lib/utils/statistic-utills.js +5 -5
- package/dist/esm/lib/utils/statistic-utills.js.map +1 -1
- package/dist/esm/pgm-loader.js +1 -1
- package/dist/esm/pgm-loader.js.map +1 -1
- package/package.json +22 -19
- package/src/3d-tiles-converter/3d-tiles-converter.ts +4 -2
- package/src/3d-tiles-converter/helpers/b3dm-converter.js +35 -7
- package/src/3d-tiles-converter/helpers/texture-atlas.ts +55 -0
- package/src/i3s-converter/helpers/geometry-converter.js +21 -22
- package/src/i3s-converter/i3s-converter.ts +32 -7
- package/src/i3s-converter/json-templates/metadata.js +1 -1
- package/src/i3s-converter/json-templates/scene-server.js +1 -1
- package/src/i3s-converter/json-templates/store.js +2 -2
- package/src/i3s-server/controllers/index-controller.js +1 -1
- package/dist/dist.min.js +0 -94
- package/dist/dist.min.js.map +0 -1
- package/dist/scripts/converter.js +0 -274
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
import { load } from '@loaders.gl/core';
|
|
2
|
+
import { load, encode } from '@loaders.gl/core';
|
|
3
3
|
import { Tileset3D } from '@loaders.gl/tiles';
|
|
4
|
-
import { CesiumIonLoader } from '@loaders.gl/3d-tiles';
|
|
4
|
+
import { CesiumIonLoader, Tiles3DLoader } from '@loaders.gl/3d-tiles';
|
|
5
5
|
import { join } from 'path';
|
|
6
6
|
import { v4 as uuidv4 } from 'uuid';
|
|
7
7
|
import process from 'process';
|
|
@@ -20,6 +20,7 @@ import { LAYERS as layersTemplate } from './json-templates/layers';
|
|
|
20
20
|
import { NODE as nodeTemplate } from './json-templates/node';
|
|
21
21
|
import { SHARED_RESOURCES_TEMPLATE } from './json-templates/shared-resources';
|
|
22
22
|
import { validateNodeBoundingVolumes } from './helpers/node-debug';
|
|
23
|
+
import { KTX2BasisUniversalTextureWriter } from '@loaders.gl/textures';
|
|
23
24
|
const ION_DEFAULT_TOKEN = process.env.IonToken || 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJlYWMxMzcyYy0zZjJkLTQwODctODNlNi01MDRkZmMzMjIxOWIiLCJpZCI6OTYyMCwic2NvcGVzIjpbImFzbCIsImFzciIsImdjIl0sImlhdCI6MTU2Mjg2NjI3M30.1FNiClUyk00YH_nWfSGpiQAjR5V2OvREDq1PJ5QMjWQ';
|
|
24
25
|
const HARDCODED_NODES_PER_PAGE = 64;
|
|
25
26
|
const _3D_TILES = '3DTILES';
|
|
@@ -29,6 +30,7 @@ const SHORT_INT_TYPE = 'Int32';
|
|
|
29
30
|
const DOUBLE_TYPE = 'double';
|
|
30
31
|
const OBJECT_ID_TYPE = 'OBJECTID';
|
|
31
32
|
const REFRESH_TOKEN_TIMEOUT = 1800;
|
|
33
|
+
const CESIUM_DATASET_PREFIX = 'https://';
|
|
32
34
|
export default class I3SConverter {
|
|
33
35
|
constructor() {
|
|
34
36
|
_defineProperty(this, "nodePages", void 0);
|
|
@@ -63,6 +65,8 @@ export default class I3SConverter {
|
|
|
63
65
|
|
|
64
66
|
_defineProperty(this, "geoidHeightModel", void 0);
|
|
65
67
|
|
|
68
|
+
_defineProperty(this, "Loader", Tiles3DLoader);
|
|
69
|
+
|
|
66
70
|
this.nodePages = new NodePages(writeFile, HARDCODED_NODES_PER_PAGE);
|
|
67
71
|
this.fileMap = {};
|
|
68
72
|
this.options = {};
|
|
@@ -104,6 +108,7 @@ export default class I3SConverter {
|
|
|
104
108
|
inputUrl
|
|
105
109
|
};
|
|
106
110
|
this.validate = validate;
|
|
111
|
+
this.Loader = inputUrl.indexOf(CESIUM_DATASET_PREFIX) !== -1 ? CesiumIonLoader : Tiles3DLoader;
|
|
107
112
|
console.log('Loading egm file...');
|
|
108
113
|
this.geoidHeightModel = await load(egmFilePath, PGMLoader);
|
|
109
114
|
console.log('Loading egm file completed!');
|
|
@@ -124,7 +129,7 @@ export default class I3SConverter {
|
|
|
124
129
|
}
|
|
125
130
|
|
|
126
131
|
Object.assign(tilesetOptions, preloadOptions);
|
|
127
|
-
const sourceTilesetJson = await load(inputUrl,
|
|
132
|
+
const sourceTilesetJson = await load(inputUrl, this.Loader, tilesetOptions.loadOptions);
|
|
128
133
|
this.sourceTileset = new Tileset3D(sourceTilesetJson, tilesetOptions);
|
|
129
134
|
await this._createAndSaveTileset(outputPath, tilesetName);
|
|
130
135
|
await this._finishConversion({
|
|
@@ -136,7 +141,7 @@ export default class I3SConverter {
|
|
|
136
141
|
}
|
|
137
142
|
|
|
138
143
|
async _createAndSaveTileset(outputPath, tilesetName) {
|
|
139
|
-
const tilesetPath = join(
|
|
144
|
+
const tilesetPath = join("".concat(outputPath), "".concat(tilesetName));
|
|
140
145
|
|
|
141
146
|
try {
|
|
142
147
|
await removeDir(tilesetPath);
|
|
@@ -171,12 +176,12 @@ export default class I3SConverter {
|
|
|
171
176
|
_formLayers0(tilesetName) {
|
|
172
177
|
const extent = convertCommonToI3SExtentCoordinate(this.sourceTileset);
|
|
173
178
|
const layers0data = {
|
|
174
|
-
version:
|
|
179
|
+
version: "{".concat(uuidv4().toUpperCase(), "}"),
|
|
175
180
|
id: 0,
|
|
176
181
|
name: tilesetName,
|
|
177
182
|
href: './layers/0',
|
|
178
183
|
store: {
|
|
179
|
-
id:
|
|
184
|
+
id: "{".concat(uuidv4().toUpperCase(), "}"),
|
|
180
185
|
extent
|
|
181
186
|
},
|
|
182
187
|
nodePages: {
|
|
@@ -189,7 +194,7 @@ export default class I3SConverter {
|
|
|
189
194
|
|
|
190
195
|
_formRootNodeIndexDocument(boundingVolumes) {
|
|
191
196
|
const root0data = {
|
|
192
|
-
version:
|
|
197
|
+
version: "{".concat(uuidv4().toUpperCase(), "}"),
|
|
193
198
|
id: 'root',
|
|
194
199
|
level: 0,
|
|
195
200
|
lodSelection: [{
|
|
@@ -244,7 +249,7 @@ export default class I3SConverter {
|
|
|
244
249
|
|
|
245
250
|
async _writeNodeIndexDocument(root0, nodePath, rootPath) {
|
|
246
251
|
if (this.options.slpk) {
|
|
247
|
-
this.fileMap[
|
|
252
|
+
this.fileMap["nodes/".concat(nodePath, "/3dNodeIndexDocument.json.gz")] = await writeFileForSlpk(rootPath, JSON.stringify(root0), '3dNodeIndexDocument.json');
|
|
248
253
|
} else {
|
|
249
254
|
await writeFile(rootPath, JSON.stringify(root0));
|
|
250
255
|
}
|
|
@@ -253,7 +258,7 @@ export default class I3SConverter {
|
|
|
253
258
|
async _createSlpk(tilesetPath) {
|
|
254
259
|
if (this.options.slpk) {
|
|
255
260
|
const slpkTilesetPath = join(tilesetPath, 'SceneServer', 'layers', '0');
|
|
256
|
-
const slpkFileName =
|
|
261
|
+
const slpkFileName = "".concat(tilesetPath, ".slpk");
|
|
257
262
|
await compressWithChildProcess(slpkTilesetPath, slpkFileName, 0, '.', this.options.sevenZipExe);
|
|
258
263
|
|
|
259
264
|
try {
|
|
@@ -301,7 +306,7 @@ export default class I3SConverter {
|
|
|
301
306
|
for (const child of children) {
|
|
302
307
|
parentNode.children.push({
|
|
303
308
|
id: child.id,
|
|
304
|
-
href:
|
|
309
|
+
href: "../".concat(child.path),
|
|
305
310
|
...boundingVolumes
|
|
306
311
|
});
|
|
307
312
|
childNodes.push(child);
|
|
@@ -330,7 +335,7 @@ export default class I3SConverter {
|
|
|
330
335
|
});
|
|
331
336
|
}
|
|
332
337
|
} else {
|
|
333
|
-
console.warn(
|
|
338
|
+
console.warn("Node ".concat(node.id, ": neighbors attribute is omited because of large number of neigbors"));
|
|
334
339
|
delete node.neighbors;
|
|
335
340
|
}
|
|
336
341
|
|
|
@@ -425,7 +430,8 @@ export default class I3SConverter {
|
|
|
425
430
|
meshMaterial,
|
|
426
431
|
texture,
|
|
427
432
|
vertexCount,
|
|
428
|
-
featureCount
|
|
433
|
+
featureCount,
|
|
434
|
+
geometry
|
|
429
435
|
} = resources;
|
|
430
436
|
const nodeInPage = {
|
|
431
437
|
lodThreshold: maxScreenThresholdSQ.maxError,
|
|
@@ -434,7 +440,7 @@ export default class I3SConverter {
|
|
|
434
440
|
mesh: null
|
|
435
441
|
};
|
|
436
442
|
|
|
437
|
-
if (sourceTile.content && sourceTile.content.type === 'b3dm') {
|
|
443
|
+
if (geometry && sourceTile.content && sourceTile.content.type === 'b3dm') {
|
|
438
444
|
nodeInPage.mesh = {
|
|
439
445
|
geometry: {
|
|
440
446
|
definition: texture ? 0 : 1
|
|
@@ -483,7 +489,7 @@ export default class I3SConverter {
|
|
|
483
489
|
lodSelection,
|
|
484
490
|
parentNode: {
|
|
485
491
|
id: parentNode.id,
|
|
486
|
-
href:
|
|
492
|
+
href: "../".concat(parentNode.id),
|
|
487
493
|
mbs: parentNode.mbs,
|
|
488
494
|
obb: parentNode.obb
|
|
489
495
|
},
|
|
@@ -503,6 +509,8 @@ export default class I3SConverter {
|
|
|
503
509
|
if (texture) {
|
|
504
510
|
node.textureData = [{
|
|
505
511
|
href: './textures/0'
|
|
512
|
+
}, {
|
|
513
|
+
href: './textures/1'
|
|
506
514
|
}];
|
|
507
515
|
}
|
|
508
516
|
|
|
@@ -512,7 +520,7 @@ export default class I3SConverter {
|
|
|
512
520
|
for (let index = 0; index < attributes.length; index++) {
|
|
513
521
|
const folderName = this.layers0.attributeStorageInfo[index].key;
|
|
514
522
|
node.attributeData.push({
|
|
515
|
-
href:
|
|
523
|
+
href: "./attributes/".concat(folderName, "/0")
|
|
516
524
|
});
|
|
517
525
|
}
|
|
518
526
|
}
|
|
@@ -540,7 +548,7 @@ export default class I3SConverter {
|
|
|
540
548
|
async _writeGeometries(geometryBuffer, compressedGeometry, childPath, slpkChildPath) {
|
|
541
549
|
if (this.options.slpk) {
|
|
542
550
|
const slpkGeometryPath = join(childPath, 'geometries');
|
|
543
|
-
this.fileMap[
|
|
551
|
+
this.fileMap["".concat(slpkChildPath, "/geometries/0.bin.gz")] = await writeFileForSlpk(slpkGeometryPath, geometryBuffer, '0.bin');
|
|
544
552
|
} else {
|
|
545
553
|
const geometryPath = join(childPath, 'geometries/0/');
|
|
546
554
|
await writeFile(geometryPath, geometryBuffer, 'index.bin');
|
|
@@ -549,7 +557,7 @@ export default class I3SConverter {
|
|
|
549
557
|
if (this.options.draco) {
|
|
550
558
|
if (this.options.slpk) {
|
|
551
559
|
const slpkCompressedGeometryPath = join(childPath, 'geometries');
|
|
552
|
-
this.fileMap[
|
|
560
|
+
this.fileMap["".concat(slpkChildPath, "/geometries/1.bin.gz")] = await writeFileForSlpk(slpkCompressedGeometryPath, compressedGeometry, '1.bin');
|
|
553
561
|
} else {
|
|
554
562
|
const compressedGeometryPath = join(childPath, 'geometries/1/');
|
|
555
563
|
await writeFile(compressedGeometryPath, compressedGeometry, 'index.bin');
|
|
@@ -564,7 +572,7 @@ export default class I3SConverter {
|
|
|
564
572
|
|
|
565
573
|
if (this.options.slpk) {
|
|
566
574
|
const slpkSharedPath = join(childPath, 'shared');
|
|
567
|
-
this.fileMap[
|
|
575
|
+
this.fileMap["".concat(slpkChildPath, "/shared/sharedResource.json.gz")] = await writeFileForSlpk(slpkSharedPath, sharedDataStr, 'sharedResource.json');
|
|
568
576
|
} else {
|
|
569
577
|
const sharedPath = join(childPath, 'shared/');
|
|
570
578
|
await writeFile(sharedPath, sharedDataStr);
|
|
@@ -580,19 +588,26 @@ export default class I3SConverter {
|
|
|
580
588
|
formats: [{
|
|
581
589
|
name: '0',
|
|
582
590
|
format
|
|
591
|
+
}, {
|
|
592
|
+
name: '1',
|
|
593
|
+
format: 'ktx2'
|
|
583
594
|
}]
|
|
584
595
|
});
|
|
585
596
|
}
|
|
586
597
|
|
|
587
598
|
const textureData = texture.bufferView.data;
|
|
599
|
+
const ktx2TextureData = await encode(texture.image, KTX2BasisUniversalTextureWriter);
|
|
588
600
|
|
|
589
601
|
if (this.options.slpk) {
|
|
590
602
|
const slpkTexturePath = join(childPath, 'textures');
|
|
591
603
|
const compress = false;
|
|
592
|
-
this.fileMap[
|
|
604
|
+
this.fileMap["".concat(slpkChildPath, "/textures/0.").concat(format)] = await writeFileForSlpk(slpkTexturePath, textureData, "0.".concat(format), compress);
|
|
605
|
+
this.fileMap["".concat(slpkChildPath, "/textures/1.ktx2")] = await writeFileForSlpk(slpkTexturePath, ktx2TextureData, "1.ktx2", compress);
|
|
593
606
|
} else {
|
|
594
607
|
const texturePath = join(childPath, 'textures/0/');
|
|
595
|
-
await writeFile(texturePath, textureData,
|
|
608
|
+
await writeFile(texturePath, textureData, "index.".concat(format));
|
|
609
|
+
const ktx2TexturePath = join(childPath, 'textures/1/');
|
|
610
|
+
await writeFile(ktx2TexturePath, ktx2TextureData, "index.ktx2");
|
|
596
611
|
}
|
|
597
612
|
}
|
|
598
613
|
}
|
|
@@ -605,9 +620,9 @@ export default class I3SConverter {
|
|
|
605
620
|
|
|
606
621
|
if (this.options.slpk) {
|
|
607
622
|
const slpkAttributesPath = join(childPath, 'attributes', folderName);
|
|
608
|
-
this.fileMap[
|
|
623
|
+
this.fileMap["".concat(slpkChildPath, "/attributes/").concat(folderName, ".bin.gz")] = await writeFileForSlpk(slpkAttributesPath, fileBuffer, '0.bin');
|
|
609
624
|
} else {
|
|
610
|
-
const attributesPath = join(childPath,
|
|
625
|
+
const attributesPath = join(childPath, "attributes/".concat(folderName, "/0"));
|
|
611
626
|
await writeFile(attributesPath, fileBuffer, 'index.bin');
|
|
612
627
|
}
|
|
613
628
|
}
|
|
@@ -641,7 +656,7 @@ export default class I3SConverter {
|
|
|
641
656
|
|
|
642
657
|
_createdStorageAttribute(attributeIndex, key, attributeType) {
|
|
643
658
|
const storageAttribute = {
|
|
644
|
-
key:
|
|
659
|
+
key: "f_".concat(attributeIndex),
|
|
645
660
|
name: key,
|
|
646
661
|
ordering: ['attributeValues'],
|
|
647
662
|
header: [{
|
|
@@ -818,22 +833,26 @@ export default class I3SConverter {
|
|
|
818
833
|
const filesSize = await calculateFilesSize(params);
|
|
819
834
|
const diff = process.hrtime(this.conversionStartTime);
|
|
820
835
|
const conversionTime = timeConverter(diff);
|
|
821
|
-
console.log(
|
|
822
|
-
console.log(
|
|
823
|
-
console.log(
|
|
824
|
-
console.log(
|
|
825
|
-
console.log(
|
|
826
|
-
console.log(
|
|
827
|
-
console.log(
|
|
836
|
+
console.log("------------------------------------------------");
|
|
837
|
+
console.log("Finishing conversion of ".concat(_3D_TILES));
|
|
838
|
+
console.log("Total conversion time: ".concat(conversionTime));
|
|
839
|
+
console.log("Vertex count: ", this.vertexCounter);
|
|
840
|
+
console.log("File(s) size: ", filesSize, ' bytes');
|
|
841
|
+
console.log("Percentage of tiles with \"ADD\" refinement type:", addRefinementPercentage, '%');
|
|
842
|
+
console.log("------------------------------------------------");
|
|
828
843
|
}
|
|
829
844
|
|
|
830
845
|
async _fetchPreloadOptions() {
|
|
846
|
+
if (!this.Loader.preload) {
|
|
847
|
+
return {};
|
|
848
|
+
}
|
|
849
|
+
|
|
831
850
|
const options = {
|
|
832
851
|
'cesium-ion': {
|
|
833
852
|
accessToken: this.options.token || ION_DEFAULT_TOKEN
|
|
834
853
|
}
|
|
835
854
|
};
|
|
836
|
-
const preloadOptions = await
|
|
855
|
+
const preloadOptions = await this.Loader.preload(this.options.inputUrl, options);
|
|
837
856
|
this.refreshTokenTime = process.hrtime();
|
|
838
857
|
return { ...options,
|
|
839
858
|
...preloadOptions
|