From f3edf86aaa0b3172dc269e63dea323e5e29f2aff Mon Sep 17 00:00:00 2001 From: Marco Hutter Date: Sat, 14 Sep 2024 16:48:32 +0200 Subject: [PATCH 1/5] Add mergeJson in README.md --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 2918fbf..ad116d9 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,17 @@ Example: npx 3d-tiles-tools merge -i ./specs/data/mergeTilesets/TilesetA -i ./specs/data/mergeTilesets/sub/TilesetA -o ./specs/data/mergeTilesets/output ``` +#### mergeJson + +Merge multiple tilesets into a single tileset JSON file that refers to the input tilesets as external tilesets. + +This differs from the `merge` command insofar that it does not copy the input tilesets to the output directory, but only creates the JSON file for the merged tileset, which uses relative paths to refer to the input tilesets. A common use case for this is to create a tileset JSON file in a certain directory, with the input tilesets being located in subdirectories. + +Example: +``` +npx 3d-tiles-tools mergeJson -i ./example/TilesetA/tileset.json -i ./example/TilesetB/tileset.json -o ./example/mergedTileset.json +``` + #### upgrade Upgrade a tileset to the latest 3D Tiles version. From e07f5035da58c93ae1a57f4a3c70286fda5dcad6 Mon Sep 17 00:00:00 2001 From: Marco Hutter Date: Sat, 14 Sep 2024 16:49:00 +0200 Subject: [PATCH 2/5] Update auto-generated API definition --- etc/3d-tiles-tools.api.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/etc/3d-tiles-tools.api.md b/etc/3d-tiles-tools.api.md index 09fa6cb..495bb35 100644 --- a/etc/3d-tiles-tools.api.md +++ b/etc/3d-tiles-tools.api.md @@ -580,6 +580,7 @@ export class ContentOps { static i3dmToGlbBuffer(inputBuffer: Buffer): Buffer; static optimizeB3dmBuffer(inputBuffer: Buffer, options: any): Promise; static optimizeI3dmBuffer(inputBuffer: Buffer, options: any): Promise; + static updateAlignment(inputBuffer: Buffer): Buffer; } // @internal @@ -2791,6 +2792,7 @@ export class TilesetJsonCreator { export class TilesetMerger { constructor(); merge(tilesetSourceNames: string[], tilesetTargetName: string, overwrite: boolean): Promise; + mergeJson(tilesetSourceNames: string[], tilesetTargetName: string, overwrite: boolean): Promise; } // @internal @@ -2803,6 +2805,7 @@ export class TilesetObjectUpgrader { export class TilesetOperations { static combine(tilesetSourceName: string, tilesetTargetName: string, overwrite: boolean): Promise; static merge(tilesetSourceNames: string[], tilesetTargetName: string, overwrite: boolean): Promise; + static mergeJson(tilesetSourceNames: string[], tilesetTargetName: string, overwrite: boolean): Promise; static upgrade(tilesetSourceName: string, tilesetTargetName: string, overwrite: boolean, targetVersion: string, gltfUpgradeOptions: any): Promise; static upgradeTileset(tileset: Tileset, targetVersion: string): Promise; } @@ -2855,6 +2858,7 @@ export class TilesetProcessorContexts { // @internal export class Tilesets { static areEqualPackages(tilesetPackageName0: string, tilesetPackageName1: string): boolean; + static determineTilesetDirectoryName(tilesetName: string): string; static determineTilesetJsonFileName(tilesetDataName: string): string; } @@ -3056,7 +3060,7 @@ export class TileTableDataPnts { // @internal export class TileTableDataToMeshFeatures { - static convertBatchIdToMeshFeatures(document: Document, primitive: Primitive, batchIdToFeatureIdAccessor: Map): MeshFeaturesFeatureId; + static convertBatchIdToMeshFeatures(document: Document, primitive: Primitive, batchIdToFeatureIdAccessor: Map): MeshFeaturesFeatureId | undefined; } // @internal From c8f653c29973e4183d14f03e14426fed714f0269 Mon Sep 17 00:00:00 2001 From: Marco Hutter Date: Sat, 14 Sep 2024 16:49:15 +0200 Subject: [PATCH 3/5] Update ThirdParty.json --- ThirdParty.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ThirdParty.json b/ThirdParty.json index 6b0c52b..7fe634b 100644 --- a/ThirdParty.json +++ b/ThirdParty.json @@ -44,7 +44,7 @@ "license": [ "Apache-2.0" ], - "version": "1.117.0", + "version": "1.121.1", "url": "https://www.npmjs.com/package/cesium" }, { From c9a6b964c9002086d6905cf651c2ff0b62caad86 Mon Sep 17 00:00:00 2001 From: Marco Hutter Date: Sat, 14 Sep 2024 16:51:23 +0200 Subject: [PATCH 4/5] Update version number in package JSON to 0.4.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b59e800..b3a49a3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "3d-tiles-tools", - "version": "0.4.2", + "version": "0.4.3", "license": "Apache-2.0", "description": "3D Tiles tools", "author": { From 3f53dd352e3fb19feaee7a20ef645a8e8a6584ef Mon Sep 17 00:00:00 2001 From: Marco Hutter Date: Sat, 14 Sep 2024 16:51:34 +0200 Subject: [PATCH 5/5] Update CHANGES.md --- CHANGES.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 8283532..9fea244 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,14 @@ Change Log ========== +### 0.4.3 - 2024-09-14 + +- Fixed the handling of legacy B3DM files that contain glTF 1.0 data with texture coordinates that are stored as "quantized" 3D coordinates, via [#148](https://github.com/CesiumGS/3d-tiles-tools/pull/148) +- Fixed the `upgrade` command for `targetVersion 1.1` for the case that the input data contains very old B3DM files that do not define a `BATCHID` attribute, via [#147](https://github.com/CesiumGS/3d-tiles-tools/pull/147). +- Added a `mergeJson` command to create a tileset JSON that refers to other tilesets as external tilesets, without copying the input tilesets to the output directory, via [#140](https://github.com/CesiumGS/3d-tiles-tools/pull/140) and [#143](https://github.com/CesiumGS/3d-tiles-tools/pull/143). +- Fixed a bug where the `combine` command did not properly update the content URIs when an external tileset in a subdirectory referred to another external tileset in the same subdirectory, via [#139](https://github.com/CesiumGS/3d-tiles-tools/pull/139) +- Added an `updateAlignment` command that can process a B3DM, I3DM, PNGS, or CMPT file, to ensure that the alignment requirements for the batch- and feature table and the tile data as a whole are met, via [#136](https://github.com/CesiumGS/3d-tiles-tools/pull/136) + ### 0.4.2 - 2024-05-15 - When upgrading a tileset to version 1.1, then the `upgrade` command did not yet convert CMPT files into GLB. This functionality was now added via [#117](https://github.com/CesiumGS/3d-tiles-tools/pull/117), including an attempt to merge multiple GLB files that contain the Cesium glTF metadata extensions. Details of the merge process are not yet specified, but should cover the most common cases that appear during the conversion of CMPT files.