@loaders.gl/tile-converter 4.0.0-alpha.11 → 4.0.0-alpha.12
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/dist/3d-tiles-attributes-worker.js +1 -1
- package/dist/converter.min.js +36 -36
- package/dist/dist.min.js +19 -16
- package/dist/es5/3d-tiles-attributes-worker.js +1 -1
- package/dist/es5/deps-installer/deps-installer.js +1 -1
- package/dist/es5/i3s-attributes-worker.js +1 -1
- package/dist/es5/i3s-converter/i3s-converter.js +58 -37
- package/dist/es5/i3s-converter/i3s-converter.js.map +1 -1
- package/dist/es5/pgm-loader.js +1 -1
- package/dist/esm/3d-tiles-attributes-worker.js +1 -1
- package/dist/esm/deps-installer/deps-installer.js +1 -1
- package/dist/esm/i3s-attributes-worker.js +1 -1
- package/dist/esm/i3s-converter/i3s-converter.js +21 -8
- package/dist/esm/i3s-converter/i3s-converter.js.map +1 -1
- package/dist/esm/pgm-loader.js +1 -1
- package/dist/i3s-converter/i3s-converter.d.ts.map +1 -1
- package/dist/i3s-converter/i3s-converter.js +20 -5
- package/package.json +14 -14
- package/src/i3s-converter/i3s-converter.ts +23 -6
|
@@ -313,10 +313,18 @@ export default class I3SConverter {
|
|
|
313
313
|
if (sourceTile.id) {
|
|
314
314
|
console.log(`[analyze]: ${sourceTile.id}`); // eslint-disable-line
|
|
315
315
|
}
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
316
|
+
|
|
317
|
+
let tileContent: Tiles3DTileContent | null = null;
|
|
318
|
+
try {
|
|
319
|
+
tileContent = await loadTile3DContent(this.sourceTileset, sourceTile, {
|
|
320
|
+
...this.loadOptions,
|
|
321
|
+
'3d-tiles': {...this.loadOptions['3d-tiles'], loadGLTF: false}
|
|
322
|
+
});
|
|
323
|
+
} catch (error) {
|
|
324
|
+
console.log(
|
|
325
|
+
`[warning]: Failed to load ${sourceTile.contentUrl}. An I3S tile with empty content will be added to the output tileset`
|
|
326
|
+
);
|
|
327
|
+
}
|
|
320
328
|
const tilePreprocessData = await analyzeTileContent(tileContent);
|
|
321
329
|
mergePreprocessData(this.preprocessData, tilePreprocessData);
|
|
322
330
|
|
|
@@ -576,7 +584,12 @@ export default class I3SConverter {
|
|
|
576
584
|
|
|
577
585
|
await this._updateTilesetOptions();
|
|
578
586
|
|
|
579
|
-
|
|
587
|
+
let tileContent: Tiles3DTileContent | null = null;
|
|
588
|
+
try {
|
|
589
|
+
tileContent = await loadTile3DContent(this.sourceTileset, sourceTile, this.loadOptions);
|
|
590
|
+
} catch (error) {
|
|
591
|
+
console.log(`[warning]: Failed to load ${sourceTile.contentUrl}`);
|
|
592
|
+
}
|
|
580
593
|
const sourceBoundingVolume = createBoundingVolume(
|
|
581
594
|
sourceTile.boundingVolume,
|
|
582
595
|
transformationMatrix,
|
|
@@ -753,13 +766,17 @@ export default class I3SConverter {
|
|
|
753
766
|
}
|
|
754
767
|
|
|
755
768
|
let nodeId = resources.nodeId;
|
|
756
|
-
let node;
|
|
769
|
+
let node: NodeInPage;
|
|
757
770
|
if (!nodeId) {
|
|
758
771
|
node = await this.nodePages.push(nodeInPage, parentId);
|
|
759
772
|
} else {
|
|
760
773
|
node = await this.nodePages.getNodeById(nodeId);
|
|
761
774
|
}
|
|
762
775
|
|
|
776
|
+
if (!nodeInPage.mesh) {
|
|
777
|
+
console.log(`[warning]: node ${node.index} is created with empty content`);
|
|
778
|
+
}
|
|
779
|
+
|
|
763
780
|
NodePages.updateAll(node, nodeInPage);
|
|
764
781
|
if (meshMaterial) {
|
|
765
782
|
NodePages.updateMaterialByNodeId(node, this._findOrCreateMaterial(meshMaterial));
|