@loaders.gl/tile-converter 4.3.2 → 4.4.0-alpha.2

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.
@@ -1,7 +1,7 @@
1
1
  import { Geoid, parsePGM } from '@math.gl/geoid';
2
2
  // __VERSION__ is injected by babel-plugin-version-inline
3
3
  // @ts-ignore TS2304: Cannot find name '__VERSION__'.
4
- const VERSION = typeof "4.3.1" !== 'undefined' ? "4.3.1" : 'latest';
4
+ const VERSION = typeof "4.4.0-alpha.1" !== 'undefined' ? "4.4.0-alpha.1" : 'latest';
5
5
  export { Geoid };
6
6
  /**
7
7
  * Loader for PGM - Netpbm grayscale image format
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loaders.gl/tile-converter",
3
- "version": "4.3.2",
3
+ "version": "4.4.0-alpha.2",
4
4
  "description": "Converter",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -51,20 +51,20 @@
51
51
  "copy-certificates": "cp -R src/i3s-server/certs dist/i3s-server"
52
52
  },
53
53
  "dependencies": {
54
- "@loaders.gl/3d-tiles": "4.3.2",
55
- "@loaders.gl/compression": "4.3.2",
56
- "@loaders.gl/crypto": "4.3.2",
57
- "@loaders.gl/draco": "4.3.2",
58
- "@loaders.gl/gltf": "4.3.2",
59
- "@loaders.gl/i3s": "4.3.2",
60
- "@loaders.gl/images": "4.3.2",
61
- "@loaders.gl/loader-utils": "4.3.2",
62
- "@loaders.gl/math": "4.3.2",
63
- "@loaders.gl/polyfills": "4.3.2",
64
- "@loaders.gl/textures": "4.3.2",
65
- "@loaders.gl/tiles": "4.3.2",
66
- "@loaders.gl/worker-utils": "4.3.2",
67
- "@loaders.gl/zip": "4.3.2",
54
+ "@loaders.gl/3d-tiles": "4.4.0-alpha.2",
55
+ "@loaders.gl/compression": "4.4.0-alpha.2",
56
+ "@loaders.gl/crypto": "4.4.0-alpha.2",
57
+ "@loaders.gl/draco": "4.4.0-alpha.2",
58
+ "@loaders.gl/gltf": "4.4.0-alpha.2",
59
+ "@loaders.gl/i3s": "4.4.0-alpha.2",
60
+ "@loaders.gl/images": "4.4.0-alpha.2",
61
+ "@loaders.gl/loader-utils": "4.4.0-alpha.2",
62
+ "@loaders.gl/math": "4.4.0-alpha.2",
63
+ "@loaders.gl/polyfills": "4.4.0-alpha.2",
64
+ "@loaders.gl/textures": "4.4.0-alpha.2",
65
+ "@loaders.gl/tiles": "4.4.0-alpha.2",
66
+ "@loaders.gl/worker-utils": "4.4.0-alpha.2",
67
+ "@loaders.gl/zip": "4.4.0-alpha.2",
68
68
  "@math.gl/core": "^4.1.0",
69
69
  "@math.gl/culling": "^4.1.0",
70
70
  "@math.gl/geoid": "^4.1.0",
@@ -91,7 +91,7 @@
91
91
  "@types/inquirer": "^9.0.7"
92
92
  },
93
93
  "peerDependencies": {
94
- "@loaders.gl/core": "^4.3.0"
94
+ "@loaders.gl/core": "4.4.0-alpha.1"
95
95
  },
96
- "gitHead": "b4203b8703f64a38d6f79a3113bc7bb51d45c93a"
96
+ "gitHead": "3d9fed050eabdc0812ddf2f4d5fb9914a34ee0c2"
97
97
  }
@@ -26,10 +26,10 @@ type TileConversionOptions = {
26
26
  /** Output folder. This folder will be created by converter if doesn't exist. It is relative to the converter path.
27
27
  * Default: "data" folder */
28
28
  output: string;
29
- /** 3DTile version.
29
+ /** 3DTiles version.
30
30
  * Default: version "1.1" */
31
31
  outputVersion?: string;
32
- /** Keep created 3DNodeIndexDocument files on disk instead of memory. This option reduce memory usage but decelerates conversion speed */
32
+ /** Keep created 3DNodeIndexDocument files on disk instead of memory. This option reduces memory usage but decelerates conversion speed */
33
33
  instantNodeWriting: boolean;
34
34
  /** Try to merge similar materials to be able to merge meshes into one node (I3S to 3DTiles conversion only) */
35
35
  mergeMaterials: boolean;
@@ -54,9 +54,9 @@ type TileConversionOptions = {
54
54
  validate: boolean;
55
55
  /** Maximal depth of the hierarchical tiles tree traversal, default: infinite */
56
56
  maxDepth?: number;
57
- /** adds hash file to the slpk if there's no one */
57
+ /** Adds a hash file to an .slpk without hash */
58
58
  addHash: boolean;
59
- /** Feature metadata class from EXT_FEATURE_METADATA or EXT_STRUCTURAL_METADATA extensions */
59
+ /** Set feature metadata class from EXT_FEATURE_METADATA or EXT_STRUCTURAL_METADATA extensions */
60
60
  metadataClass?: string;
61
61
  /** With this options the tileset content will be analyzed without conversion */
62
62
  analyze?: boolean;
@@ -171,17 +171,20 @@ function printHelp(): void {
171
171
  console.log('--name [Tileset name]');
172
172
  console.log('--output [Output folder, default: "data" folder]');
173
173
  console.log(
174
- '--instant-node-writing [Keep created 3DNodeIndexDocument files on disk instead of memory. This option reduce memory usage but decelerates conversion speed]'
174
+ '--instant-node-writing [Keep created 3DNodeIndexDocument files on disk instead of memory. This option reduces memory usage but decelerates conversion speed]'
175
175
  );
176
176
  console.log(
177
- '--split-nodes [Prevent to merge similar materials that could lead to incorrect visualization (I3S to 3DTiles conversion only)]'
177
+ '--split-nodes [Prevent merging similar materials that could lead to incorrect visualization (I3S to 3DTiles conversion only)]'
178
+ );
179
+ console.log(
180
+ '--slpk [(Deprecated since version 4.3.0) Whether the converter generates *.slpk (Scene Layer Package) I3S output files. Note: For versions 4.3.0 and up *.slpk is the default output without this option specified.]'
178
181
  );
179
182
  console.log(
180
183
  '--tileset [tileset.json file (3DTiles) / http://..../SceneServer/layers/0 resource (I3S)]'
181
184
  );
182
185
  console.log('--input-type [tileset input type: I3S or 3DTILES]');
183
186
  console.log(
184
- '--output-version [3dtile version: 1.0 or 1.1, default: 1.1]. This option supports only 1.0/1.1 values for 3DTiles output. I3S output version setting is not supported yet.'
187
+ '--output-version [3DTiles version: 1.0 or 1.1, default: 1.1]. This option supports only 1.0/1.1 values for 3DTiles output. I3S output version setting is not supported yet.'
185
188
  );
186
189
  console.log(
187
190
  '--egm [location of Earth Gravity Model *.pgm file to convert heights from ellipsoidal to gravity-related format or "None" to not use it. A model file can be loaded from GeographicLib https://geographiclib.sourceforge.io/html/geoid.html], default: "./deps/egm2008-5.zip"'
@@ -10,10 +10,9 @@ import type {
10
10
  } from '@loaders.gl/gltf';
11
11
  import {EXT_MESH_FEATURES, EXT_FEATURE_METADATA} from '@loaders.gl/gltf';
12
12
  import {Tiles3DTileContent} from '@loaders.gl/3d-tiles';
13
-
13
+ import {emod} from '@loaders.gl/math';
14
14
  import {TypedArray} from '@math.gl/core';
15
15
  import {TextureImageProperties} from '../types';
16
- import {emod} from '@loaders.gl/math';
17
16
 
18
17
  /**
19
18
  * Get featureTexture by a metadata class.
@@ -524,7 +524,7 @@ function convertNode({
524
524
  const mesh = node.mesh;
525
525
 
526
526
  if (mesh) {
527
- convertMesh({
527
+ convertMeshToTable({
528
528
  mesh,
529
529
  images,
530
530
  cartographicOrigin,
@@ -563,7 +563,7 @@ function convertNode({
563
563
  * @param matrix - transformation matrix - cumulative transformation matrix formed from all parent node matrices
564
564
  * @param featureTexture - feature texture key
565
565
  */
566
- function convertMesh({
566
+ function convertMeshToTable({
567
567
  mesh,
568
568
  images,
569
569
  cartographicOrigin,
@@ -4,7 +4,7 @@ import {createSceneServer} from '../utils/create-scene-server';
4
4
 
5
5
  const textDecoder = new TextDecoder();
6
6
 
7
- export const sceneServerRouter = express.Router();
7
+ export const sceneServerRouter: any = express.Router();
8
8
  sceneServerRouter.get('*', (req, res, next) => {
9
9
  async function routerCallback(req, res, next) {
10
10
  const file = await getFileByUrl('/');
@@ -20,7 +20,7 @@ sceneServerRouter.get('*', (req, res, next) => {
20
20
  routerCallback(req, res, next);
21
21
  });
22
22
 
23
- export const router = express.Router();
23
+ export const router: any = express.Router();
24
24
  router.get('*', (req, res, next) => {
25
25
  async function routerCallback(req, res, next) {
26
26
  const file = await getFileByUrl(req.path.replace(/\/+$/, ''));