@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.
@@ -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
- const tileContent = await loadTile3DContent(this.sourceTileset, sourceTile, {
317
- ...this.loadOptions,
318
- '3d-tiles': {...this.loadOptions['3d-tiles'], loadGLTF: false}
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
- const tileContent = await loadTile3DContent(this.sourceTileset, sourceTile, this.loadOptions);
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));