@loaders.gl/tile-converter 3.4.0-alpha.5 → 3.4.1
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/3d-tiles-attributes-worker.js.map +1 -1
- package/dist/converter.min.js +3 -3
- package/dist/deps-installer/deps-installer.js +1 -1
- package/dist/dist.min.js +10 -6
- package/dist/es5/3d-tiles-attributes-worker.js +1 -1
- package/dist/es5/3d-tiles-attributes-worker.js.map +1 -1
- package/dist/es5/deps-installer/deps-installer.js +1 -1
- package/dist/es5/deps-installer/deps-installer.js.map +1 -1
- package/dist/es5/i3s-attributes-worker.js +1 -1
- package/dist/es5/i3s-attributes-worker.js.map +1 -1
- package/dist/es5/pgm-loader.js +1 -1
- package/dist/es5/pgm-loader.js.map +1 -1
- package/dist/esm/3d-tiles-attributes-worker.js +1 -1
- package/dist/esm/3d-tiles-attributes-worker.js.map +1 -1
- package/dist/esm/deps-installer/deps-installer.js +1 -1
- package/dist/esm/deps-installer/deps-installer.js.map +1 -1
- package/dist/esm/i3s-attributes-worker.js +1 -1
- package/dist/esm/i3s-attributes-worker.js.map +1 -1
- package/dist/esm/pgm-loader.js +1 -1
- package/dist/esm/pgm-loader.js.map +1 -1
- package/package.json +16 -16
- package/src/deps-installer/deps-installer.ts +1 -1
|
@@ -7,7 +7,7 @@ const file_utils_1 = require("../lib/utils/file-utils");
|
|
|
7
7
|
const path_1 = require("path");
|
|
8
8
|
const worker_utils_1 = require("@loaders.gl/worker-utils");
|
|
9
9
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
10
|
-
const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : '
|
|
10
|
+
const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
|
|
11
11
|
const PGM_LINK = 'https://raw.githubusercontent.com/visgl/deck.gl-data/master/egm/egm2008-5.zip';
|
|
12
12
|
/**
|
|
13
13
|
* Install external dependencies for converter:
|
package/dist/dist.min.js
CHANGED
|
@@ -46550,7 +46550,7 @@ var matches = typeof process !== "undefined" && process.version && /v([0-9]*)/.e
|
|
|
46550
46550
|
var nodeVersion = matches && parseFloat(matches[1]) || 0;
|
|
46551
46551
|
|
|
46552
46552
|
// ../worker-utils/src/lib/env-utils/version.ts
|
|
46553
|
-
var DEFAULT_VERSION = "
|
|
46553
|
+
var DEFAULT_VERSION = "latest";
|
|
46554
46554
|
var VERSION = typeof __VERSION__ !== "undefined" ? __VERSION__ : DEFAULT_VERSION;
|
|
46555
46555
|
if (typeof __VERSION__ === "undefined") {
|
|
46556
46556
|
console.error("loaders.gl: The __VERSION__ variable is not injected using babel plugin. Latest unstable workers would be fetched from the CDN.");
|
|
@@ -46961,7 +46961,7 @@ var WorkerFarm = class {
|
|
|
46961
46961
|
};
|
|
46962
46962
|
|
|
46963
46963
|
// ../worker-utils/src/lib/worker-api/get-worker-url.ts
|
|
46964
|
-
var NPM_TAG = "
|
|
46964
|
+
var NPM_TAG = "latest";
|
|
46965
46965
|
var VERSION2 = typeof VERSION !== "undefined" ? VERSION : NPM_TAG;
|
|
46966
46966
|
function getWorkerName(worker) {
|
|
46967
46967
|
const warning = worker.version !== VERSION2 ? ` (worker-utils@${VERSION2})` : "";
|
|
@@ -47083,7 +47083,7 @@ function requireFromString(code, filename2 = "", options) {
|
|
|
47083
47083
|
}
|
|
47084
47084
|
|
|
47085
47085
|
// ../worker-utils/src/lib/library-utils/library-utils.ts
|
|
47086
|
-
var LATEST = "
|
|
47086
|
+
var LATEST = "latest";
|
|
47087
47087
|
var VERSION3 = typeof VERSION !== "undefined" ? VERSION : LATEST;
|
|
47088
47088
|
var loadLibraryPromises = {};
|
|
47089
47089
|
async function loadLibrary(libraryUrl, moduleName = null, options = {}) {
|
|
@@ -50238,6 +50238,9 @@ var TilesetTraverser = class {
|
|
|
50238
50238
|
this.executeTraversal(root, frameState);
|
|
50239
50239
|
}
|
|
50240
50240
|
reset() {
|
|
50241
|
+
this.requestedTiles = {};
|
|
50242
|
+
this.selectedTiles = {};
|
|
50243
|
+
this.emptyTiles = {};
|
|
50241
50244
|
this._traversalStack.reset();
|
|
50242
50245
|
this._emptyTraversalStack.reset();
|
|
50243
50246
|
}
|
|
@@ -50463,6 +50466,7 @@ var Tile3D = class {
|
|
|
50463
50466
|
this._stackLength = 0;
|
|
50464
50467
|
this._visitedFrame = 0;
|
|
50465
50468
|
this._inRequestVolume = false;
|
|
50469
|
+
this._lodJudge = null;
|
|
50466
50470
|
this.header = header;
|
|
50467
50471
|
this.tileset = tileset;
|
|
50468
50472
|
this.id = extendedId || header.id;
|
|
@@ -53664,10 +53668,10 @@ async function loadDraco(tile, dracoData, options, context) {
|
|
|
53664
53668
|
var VERSION8 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
53665
53669
|
|
|
53666
53670
|
// ../textures/src/lib/utils/version.ts
|
|
53667
|
-
var VERSION9 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "
|
|
53671
|
+
var VERSION9 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
53668
53672
|
|
|
53669
53673
|
// ../textures/src/lib/parsers/basis-module-loader.ts
|
|
53670
|
-
var VERSION10 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "
|
|
53674
|
+
var VERSION10 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
53671
53675
|
var BASIS_CDN_ENCODER_WASM = `https://unpkg.com/@loaders.gl/textures@${VERSION10}/dist/libs/basis_encoder.wasm`;
|
|
53672
53676
|
var BASIS_CDN_ENCODER_JS = `https://unpkg.com/@loaders.gl/textures@${VERSION10}/dist/libs/basis_encoder.js`;
|
|
53673
53677
|
var loadBasisTranscoderPromise;
|
|
@@ -63240,7 +63244,7 @@ function getFeatureIdsFromFeatureIndexMetadata(featureIndex) {
|
|
|
63240
63244
|
}
|
|
63241
63245
|
|
|
63242
63246
|
// ../i3s/src/i3s-content-loader.ts
|
|
63243
|
-
var VERSION15 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "
|
|
63247
|
+
var VERSION15 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
63244
63248
|
var I3SContentLoader = {
|
|
63245
63249
|
name: "I3S Content (Indexed Scene Layers)",
|
|
63246
63250
|
id: isBrowser2 ? "i3s-content" : "i3s-content-nodejs",
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports._typecheckI3SAttributesWorker = exports.Tile3dAttributesWorker = void 0;
|
|
7
7
|
exports.transform3DTilesAttributesOnWorker = transform3DTilesAttributesOnWorker;
|
|
8
8
|
var _workerUtils = require("@loaders.gl/worker-utils");
|
|
9
|
-
var VERSION = typeof "3.4.
|
|
9
|
+
var VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
|
|
10
10
|
var Tile3dAttributesWorker = {
|
|
11
11
|
id: '3d-tiles-attributes',
|
|
12
12
|
name: '3DTiles Attributes Worker',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"3d-tiles-attributes-worker.js","names":["_workerUtils","require","VERSION","Tile3dAttributesWorker","id","name","module","version","options","featureAttributes","exports","transform3DTilesAttributesOnWorker","i3sAttributesData","processOnWorker","_typecheckI3SAttributesWorker"],"sources":["../../src/3d-tiles-attributes-worker.ts"],"sourcesContent":["import type {WorkerObject} from '@loaders.gl/worker-utils';\nimport type {FeatureAttribute} from '@loaders.gl/i3s';\n\nimport {processOnWorker} from '@loaders.gl/worker-utils';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport type Tile3DAttributesWorkerOptions = {\n featureAttributes: FeatureAttribute | null;\n source: string;\n};\n\nexport type I3SAttributesData = {\n tileContent: any;\n textureFormat: string;\n};\n\n/**\n * I3S Attributes Worker to handle B3DM object\n */\nexport const Tile3dAttributesWorker = {\n id: '3d-tiles-attributes',\n name: '3DTiles Attributes Worker',\n module: 'tile-converter',\n version: VERSION,\n options: {\n featureAttributes: null\n }\n};\n\n/**\n * Performs I3S attributes transformation\n */\nexport function transform3DTilesAttributesOnWorker(\n i3sAttributesData: I3SAttributesData,\n options: Tile3DAttributesWorkerOptions\n): Promise<ArrayBuffer> {\n return processOnWorker(Tile3dAttributesWorker, i3sAttributesData, options);\n}\n\nexport const _typecheckI3SAttributesWorker: WorkerObject = Tile3dAttributesWorker;\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAIA,IAAMC,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"3d-tiles-attributes-worker.js","names":["_workerUtils","require","VERSION","Tile3dAttributesWorker","id","name","module","version","options","featureAttributes","exports","transform3DTilesAttributesOnWorker","i3sAttributesData","processOnWorker","_typecheckI3SAttributesWorker"],"sources":["../../src/3d-tiles-attributes-worker.ts"],"sourcesContent":["import type {WorkerObject} from '@loaders.gl/worker-utils';\nimport type {FeatureAttribute} from '@loaders.gl/i3s';\n\nimport {processOnWorker} from '@loaders.gl/worker-utils';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport type Tile3DAttributesWorkerOptions = {\n featureAttributes: FeatureAttribute | null;\n source: string;\n};\n\nexport type I3SAttributesData = {\n tileContent: any;\n textureFormat: string;\n};\n\n/**\n * I3S Attributes Worker to handle B3DM object\n */\nexport const Tile3dAttributesWorker = {\n id: '3d-tiles-attributes',\n name: '3DTiles Attributes Worker',\n module: 'tile-converter',\n version: VERSION,\n options: {\n featureAttributes: null\n }\n};\n\n/**\n * Performs I3S attributes transformation\n */\nexport function transform3DTilesAttributesOnWorker(\n i3sAttributesData: I3SAttributesData,\n options: Tile3DAttributesWorkerOptions\n): Promise<ArrayBuffer> {\n return processOnWorker(Tile3dAttributesWorker, i3sAttributesData, options);\n}\n\nexport const _typecheckI3SAttributesWorker: WorkerObject = Tile3dAttributesWorker;\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAIA,IAAMC,OAAO,GAAG,cAAkB,KAAK,WAAW,aAAiB,QAAQ;AAepE,IAAMC,sBAAsB,GAAG;EACpCC,EAAE,EAAE,qBAAqB;EACzBC,IAAI,EAAE,2BAA2B;EACjCC,MAAM,EAAE,gBAAgB;EACxBC,OAAO,EAAEL,OAAO;EAChBM,OAAO,EAAE;IACPC,iBAAiB,EAAE;EACrB;AACF,CAAC;AAACC,OAAA,CAAAP,sBAAA,GAAAA,sBAAA;AAKK,SAASQ,kCAAkCA,CAChDC,iBAAoC,EACpCJ,OAAsC,EAChB;EACtB,OAAO,IAAAK,4BAAe,EAACV,sBAAsB,EAAES,iBAAiB,EAAEJ,OAAO,CAAC;AAC5E;AAEO,IAAMM,6BAA2C,GAAGX,sBAAsB;AAACO,OAAA,CAAAI,6BAAA,GAAAA,6BAAA"}
|
|
@@ -14,7 +14,7 @@ var _zip = require("@loaders.gl/zip");
|
|
|
14
14
|
var _fileUtils = require("../lib/utils/file-utils");
|
|
15
15
|
var _path = require("path");
|
|
16
16
|
var _workerUtils = require("@loaders.gl/worker-utils");
|
|
17
|
-
var VERSION = typeof "3.4.
|
|
17
|
+
var VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
|
|
18
18
|
var PGM_LINK = 'https://raw.githubusercontent.com/visgl/deck.gl-data/master/egm/egm2008-5.zip';
|
|
19
19
|
var DepsInstaller = function () {
|
|
20
20
|
function DepsInstaller() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deps-installer.js","names":["_core","require","_zip","_fileUtils","_path","_workerUtils","VERSION","PGM_LINK","DepsInstaller","_classCallCheck2","default","_createClass2","key","value","_install","_asyncToGenerator2","_regenerator","mark","_callee","path","workersPath","fileMap","depsPath","childProcess","_args","arguments","wrap","_callee$","_context","prev","next","length","undefined","console","log","load","ZipLoader","sent","process","cwd","join","writeFile","Uint8Array","installWorker","ChildProcessProxy","start","command","wait","stop","install","apply","_installWorker","_callee2","module","name","extraPath","fileResponse","fileData","_callee2$","_context2","fetchFile","concat","arrayBuffer","abrupt","_x","_x2","_x3","exports"],"sources":["../../../src/deps-installer/deps-installer.ts"],"sourcesContent":["import {load, fetchFile} from '@loaders.gl/core';\nimport {ZipLoader} from '@loaders.gl/zip';\nimport {writeFile} from '../lib/utils/file-utils';\nimport {join} from 'path';\nimport {ChildProcessProxy} from '@loaders.gl/worker-utils';\n\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : '
|
|
1
|
+
{"version":3,"file":"deps-installer.js","names":["_core","require","_zip","_fileUtils","_path","_workerUtils","VERSION","PGM_LINK","DepsInstaller","_classCallCheck2","default","_createClass2","key","value","_install","_asyncToGenerator2","_regenerator","mark","_callee","path","workersPath","fileMap","depsPath","childProcess","_args","arguments","wrap","_callee$","_context","prev","next","length","undefined","console","log","load","ZipLoader","sent","process","cwd","join","writeFile","Uint8Array","installWorker","ChildProcessProxy","start","command","wait","stop","install","apply","_installWorker","_callee2","module","name","extraPath","fileResponse","fileData","_callee2$","_context2","fetchFile","concat","arrayBuffer","abrupt","_x","_x2","_x3","exports"],"sources":["../../../src/deps-installer/deps-installer.ts"],"sourcesContent":["import {load, fetchFile} from '@loaders.gl/core';\nimport {ZipLoader} from '@loaders.gl/zip';\nimport {writeFile} from '../lib/utils/file-utils';\nimport {join} from 'path';\nimport {ChildProcessProxy} from '@loaders.gl/worker-utils';\n\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nconst PGM_LINK = 'https://raw.githubusercontent.com/visgl/deck.gl-data/master/egm/egm2008-5.zip';\n\n/**\n * Install external dependencies for converter:\n * * PGM file (implemented);\n * * Draco library (not implemented);\n * * 7z archiver (not implemented);\n */\nexport class DepsInstaller {\n /**\n * Run instalation\n * @param path destination folder\n * @param workersPath destination folder for workers.\n * This path is '' by default and is not used by tile-converter.\n * It is used in tests to prevent rewriting actual workers during tests running\n */\n async install(path: string = '', workersPath: string = ''): Promise<void> {\n console.log('Installing \"EGM2008-5\" model...'); // eslint-disable-line no-console\n const fileMap = await load(PGM_LINK, ZipLoader, {});\n\n let depsPath = process.cwd();\n if (path) {\n depsPath = join(depsPath, path);\n }\n\n await writeFile(depsPath, new Uint8Array(fileMap['geoids/egm2008-5.pgm']), 'egm2008-5.pgm');\n\n console.log('Installing \"I3S Content Loader worker\"'); // eslint-disable-line no-console\n await this.installWorker('i3s', 'i3s-content-nodejs-worker.js', workersPath);\n\n console.log('Installing \"Draco Loader worker\"'); // eslint-disable-line no-console\n await this.installWorker('draco', 'draco-nodejs-worker.js', workersPath);\n\n console.log('Installing \"Basis Loader worker\"'); // eslint-disable-line no-console\n await this.installWorker('textures', 'basis-nodejs-worker.js', workersPath);\n\n console.log('Installing \"join-images\" npm package');\n const childProcess = new ChildProcessProxy();\n await childProcess.start({\n command: 'npm',\n // `npm install sharp join-images` works unstable. It fails because installed `sharp` version\n // may be different from the version required by `join-images`. Pointing to specific versions\n // resolve this issue\n arguments: ['install', 'sharp@^0.30.4', 'join-images@^1.1.3'],\n wait: 0\n });\n\n console.log('All dependencies were installed succesfully.'); // eslint-disable-line no-console\n }\n\n private async installWorker(module: string, name: string, extraPath: string) {\n const fileResponse = await fetchFile(\n `https://unpkg.com/@loaders.gl/${module}@${VERSION}/dist/${name}`\n );\n const fileData = await fileResponse.arrayBuffer();\n if (!fileData) {\n return;\n }\n const path = join(process.cwd(), extraPath, 'modules', module, 'dist');\n await writeFile(path, fileData, name);\n }\n}\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAA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object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports._typecheckI3SAttributesWorker = exports.I3SAttributesWorker = void 0;
|
|
7
7
|
exports.transformI3SAttributesOnWorker = transformI3SAttributesOnWorker;
|
|
8
8
|
var _workerUtils = require("@loaders.gl/worker-utils");
|
|
9
|
-
var VERSION = typeof "3.4.
|
|
9
|
+
var VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
|
|
10
10
|
var I3SAttributesWorker = {
|
|
11
11
|
id: 'i3s-attributes',
|
|
12
12
|
name: 'I3S Attributes Worker',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i3s-attributes-worker.js","names":["_workerUtils","require","VERSION","I3SAttributesWorker","id","name","module","version","options","useCartesianPositions","exports","transformI3SAttributesOnWorker","attributesData","processOnWorker","_typecheckI3SAttributesWorker"],"sources":["../../src/i3s-attributes-worker.ts"],"sourcesContent":["import type {WorkerObject} from '@loaders.gl/worker-utils';\nimport type {ConvertedAttributes} from './i3s-converter/types';\nimport type {Matrix4, Vector3} from '@math.gl/core';\nimport type {GLTFImagePostprocessed, GLTFNodePostprocessed} from '@loaders.gl/gltf';\n\nimport {processOnWorker} from '@loaders.gl/worker-utils';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport type I3SAttributesWorkerOptions = {\n _nodeWorkers: boolean;\n reuseWorkers: boolean;\n useCartesianPositions: boolean;\n source: string;\n};\n\nexport type B3DMAttributesData = {\n gltfMaterials?: {id: string}[];\n nodes: GLTFNodePostprocessed[];\n images: GLTFImagePostprocessed[];\n cartographicOrigin: Vector3;\n cartesianModelMatrix: Matrix4;\n};\n\n/**\n * I3S Attributes Worker to handle B3DM object\n */\nexport const I3SAttributesWorker = {\n id: 'i3s-attributes',\n name: 'I3S Attributes Worker',\n module: 'tile-converter',\n version: VERSION,\n options: {\n useCartesianPositions: false\n }\n};\n\n/**\n * Performs I3S attributes transformation\n */\nexport function transformI3SAttributesOnWorker(\n attributesData: B3DMAttributesData,\n options: I3SAttributesWorkerOptions\n): Promise<Map<string, ConvertedAttributes>> {\n return processOnWorker(I3SAttributesWorker, attributesData, options);\n}\n\nexport const _typecheckI3SAttributesWorker: WorkerObject = I3SAttributesWorker;\n"],"mappings":";;;;;;;AAKA,IAAAA,YAAA,GAAAC,OAAA;AAIA,IAAMC,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"i3s-attributes-worker.js","names":["_workerUtils","require","VERSION","I3SAttributesWorker","id","name","module","version","options","useCartesianPositions","exports","transformI3SAttributesOnWorker","attributesData","processOnWorker","_typecheckI3SAttributesWorker"],"sources":["../../src/i3s-attributes-worker.ts"],"sourcesContent":["import type {WorkerObject} from '@loaders.gl/worker-utils';\nimport type {ConvertedAttributes} from './i3s-converter/types';\nimport type {Matrix4, Vector3} from '@math.gl/core';\nimport type {GLTFImagePostprocessed, GLTFNodePostprocessed} from '@loaders.gl/gltf';\n\nimport {processOnWorker} from '@loaders.gl/worker-utils';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport type I3SAttributesWorkerOptions = {\n _nodeWorkers: boolean;\n reuseWorkers: boolean;\n useCartesianPositions: boolean;\n source: string;\n};\n\nexport type B3DMAttributesData = {\n gltfMaterials?: {id: string}[];\n nodes: GLTFNodePostprocessed[];\n images: GLTFImagePostprocessed[];\n cartographicOrigin: Vector3;\n cartesianModelMatrix: Matrix4;\n};\n\n/**\n * I3S Attributes Worker to handle B3DM object\n */\nexport const I3SAttributesWorker = {\n id: 'i3s-attributes',\n name: 'I3S Attributes Worker',\n module: 'tile-converter',\n version: VERSION,\n options: {\n useCartesianPositions: false\n }\n};\n\n/**\n * Performs I3S attributes transformation\n */\nexport function transformI3SAttributesOnWorker(\n attributesData: B3DMAttributesData,\n options: I3SAttributesWorkerOptions\n): Promise<Map<string, ConvertedAttributes>> {\n return processOnWorker(I3SAttributesWorker, attributesData, options);\n}\n\nexport const _typecheckI3SAttributesWorker: WorkerObject = I3SAttributesWorker;\n"],"mappings":";;;;;;;AAKA,IAAAA,YAAA,GAAAC,OAAA;AAIA,IAAMC,OAAO,GAAG,cAAkB,KAAK,WAAW,aAAiB,QAAQ;AAoBpE,IAAMC,mBAAmB,GAAG;EACjCC,EAAE,EAAE,gBAAgB;EACpBC,IAAI,EAAE,uBAAuB;EAC7BC,MAAM,EAAE,gBAAgB;EACxBC,OAAO,EAAEL,OAAO;EAChBM,OAAO,EAAE;IACPC,qBAAqB,EAAE;EACzB;AACF,CAAC;AAACC,OAAA,CAAAP,mBAAA,GAAAA,mBAAA;AAKK,SAASQ,8BAA8BA,CAC5CC,cAAkC,EAClCJ,OAAmC,EACQ;EAC3C,OAAO,IAAAK,4BAAe,EAACV,mBAAmB,EAAES,cAAc,EAAEJ,OAAO,CAAC;AACtE;AAEO,IAAMM,6BAA2C,GAAGX,mBAAmB;AAACO,OAAA,CAAAI,6BAAA,GAAAA,6BAAA"}
|
package/dist/es5/pgm-loader.js
CHANGED
|
@@ -8,7 +8,7 @@ exports.PGMLoader = void 0;
|
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
10
|
var _geoid = require("@math.gl/geoid");
|
|
11
|
-
var VERSION = typeof "3.4.
|
|
11
|
+
var VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
|
|
12
12
|
var PGMLoader = {
|
|
13
13
|
name: 'PGM - Netpbm grayscale image format',
|
|
14
14
|
id: 'pgm',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pgm-loader.js","names":["_geoid","require","VERSION","PGMLoader","name","id","module","version","mimeTypes","parse","_parse","_asyncToGenerator2","default","_regenerator","mark","_callee","arrayBuffer","options","wrap","_callee$","_context","prev","next","abrupt","parsePGM","Uint8Array","stop","_x","_x2","apply","arguments","extensions","cubic","exports"],"sources":["../../src/pgm-loader.ts"],"sourcesContent":["import type {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport {parsePGM} from '@math.gl/geoid';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\n/**\n * Loader for PGM - Netpbm grayscale image format\n */\nexport const PGMLoader: LoaderWithParser = {\n name: 'PGM - Netpbm grayscale image format',\n id: 'pgm',\n module: 'tile-converter',\n version: VERSION,\n mimeTypes: ['image/x-portable-graymap'],\n // @ts-expect-error LoaderOptions does not have cubic parameter\n parse: async (arrayBuffer, options) => parsePGM(new Uint8Array(arrayBuffer), options),\n extensions: ['pgm'],\n options: {\n // TODO - use pgm namespace\n cubic: false\n }\n};\n"],"mappings":";;;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAMC,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"pgm-loader.js","names":["_geoid","require","VERSION","PGMLoader","name","id","module","version","mimeTypes","parse","_parse","_asyncToGenerator2","default","_regenerator","mark","_callee","arrayBuffer","options","wrap","_callee$","_context","prev","next","abrupt","parsePGM","Uint8Array","stop","_x","_x2","apply","arguments","extensions","cubic","exports"],"sources":["../../src/pgm-loader.ts"],"sourcesContent":["import type {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport {parsePGM} from '@math.gl/geoid';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\n/**\n * Loader for PGM - Netpbm grayscale image format\n */\nexport const PGMLoader: LoaderWithParser = {\n name: 'PGM - Netpbm grayscale image format',\n id: 'pgm',\n module: 'tile-converter',\n version: VERSION,\n mimeTypes: ['image/x-portable-graymap'],\n // @ts-expect-error LoaderOptions does not have cubic parameter\n parse: async (arrayBuffer, options) => parsePGM(new Uint8Array(arrayBuffer), options),\n extensions: ['pgm'],\n options: {\n // TODO - use pgm namespace\n cubic: false\n }\n};\n"],"mappings":";;;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAMC,OAAO,GAAG,cAAkB,KAAK,WAAW,aAAiB,QAAQ;AAKpE,IAAMC,SAA2B,GAAG;EACzCC,IAAI,EAAE,qCAAqC;EAC3CC,EAAE,EAAE,KAAK;EACTC,MAAM,EAAE,gBAAgB;EACxBC,OAAO,EAAEL,OAAO;EAChBM,SAAS,EAAE,CAAC,0BAA0B,CAAC;EAEvCC,KAAK;IAAA,IAAAC,MAAA,OAAAC,kBAAA,CAAAC,OAAA,EAAAC,YAAA,CAAAD,OAAA,CAAAE,IAAA,CAAE,SAAAC,QAAOC,WAAW,EAAEC,OAAO;MAAA,OAAAJ,YAAA,CAAAD,OAAA,CAAAM,IAAA,UAAAC,SAAAC,QAAA;QAAA,kBAAAA,QAAA,CAAAC,IAAA,GAAAD,QAAA,CAAAE,IAAA;UAAA;YAAA,OAAAF,QAAA,CAAAG,MAAA,WAAK,IAAAC,eAAQ,EAAC,IAAIC,UAAU,CAACT,WAAW,CAAC,EAAEC,OAAO,CAAC;UAAA;UAAA;YAAA,OAAAG,QAAA,CAAAM,IAAA;QAAA;MAAA,GAAAX,OAAA;IAAA;IAAA,SAAAN,MAAAkB,EAAA,EAAAC,GAAA;MAAA,OAAAlB,MAAA,CAAAmB,KAAA,OAAAC,SAAA;IAAA;IAAA,OAAArB,KAAA;EAAA;EACrFsB,UAAU,EAAE,CAAC,KAAK,CAAC;EACnBd,OAAO,EAAE;IAEPe,KAAK,EAAE;EACT;AACF,CAAC;AAACC,OAAA,CAAA9B,SAAA,GAAAA,SAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { processOnWorker } from '@loaders.gl/worker-utils';
|
|
2
|
-
const VERSION = typeof "3.4.
|
|
2
|
+
const VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
|
|
3
3
|
export const Tile3dAttributesWorker = {
|
|
4
4
|
id: '3d-tiles-attributes',
|
|
5
5
|
name: '3DTiles Attributes Worker',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"3d-tiles-attributes-worker.js","names":["processOnWorker","VERSION","Tile3dAttributesWorker","id","name","module","version","options","featureAttributes","transform3DTilesAttributesOnWorker","i3sAttributesData","_typecheckI3SAttributesWorker"],"sources":["../../src/3d-tiles-attributes-worker.ts"],"sourcesContent":["import type {WorkerObject} from '@loaders.gl/worker-utils';\nimport type {FeatureAttribute} from '@loaders.gl/i3s';\n\nimport {processOnWorker} from '@loaders.gl/worker-utils';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport type Tile3DAttributesWorkerOptions = {\n featureAttributes: FeatureAttribute | null;\n source: string;\n};\n\nexport type I3SAttributesData = {\n tileContent: any;\n textureFormat: string;\n};\n\n/**\n * I3S Attributes Worker to handle B3DM object\n */\nexport const Tile3dAttributesWorker = {\n id: '3d-tiles-attributes',\n name: '3DTiles Attributes Worker',\n module: 'tile-converter',\n version: VERSION,\n options: {\n featureAttributes: null\n }\n};\n\n/**\n * Performs I3S attributes transformation\n */\nexport function transform3DTilesAttributesOnWorker(\n i3sAttributesData: I3SAttributesData,\n options: Tile3DAttributesWorkerOptions\n): Promise<ArrayBuffer> {\n return processOnWorker(Tile3dAttributesWorker, i3sAttributesData, options);\n}\n\nexport const _typecheckI3SAttributesWorker: WorkerObject = Tile3dAttributesWorker;\n"],"mappings":"AAGA,SAAQA,eAAe,QAAO,0BAA0B;AAIxD,MAAMC,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"3d-tiles-attributes-worker.js","names":["processOnWorker","VERSION","Tile3dAttributesWorker","id","name","module","version","options","featureAttributes","transform3DTilesAttributesOnWorker","i3sAttributesData","_typecheckI3SAttributesWorker"],"sources":["../../src/3d-tiles-attributes-worker.ts"],"sourcesContent":["import type {WorkerObject} from '@loaders.gl/worker-utils';\nimport type {FeatureAttribute} from '@loaders.gl/i3s';\n\nimport {processOnWorker} from '@loaders.gl/worker-utils';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport type Tile3DAttributesWorkerOptions = {\n featureAttributes: FeatureAttribute | null;\n source: string;\n};\n\nexport type I3SAttributesData = {\n tileContent: any;\n textureFormat: string;\n};\n\n/**\n * I3S Attributes Worker to handle B3DM object\n */\nexport const Tile3dAttributesWorker = {\n id: '3d-tiles-attributes',\n name: '3DTiles Attributes Worker',\n module: 'tile-converter',\n version: VERSION,\n options: {\n featureAttributes: null\n }\n};\n\n/**\n * Performs I3S attributes transformation\n */\nexport function transform3DTilesAttributesOnWorker(\n i3sAttributesData: I3SAttributesData,\n options: Tile3DAttributesWorkerOptions\n): Promise<ArrayBuffer> {\n return processOnWorker(Tile3dAttributesWorker, i3sAttributesData, options);\n}\n\nexport const _typecheckI3SAttributesWorker: WorkerObject = Tile3dAttributesWorker;\n"],"mappings":"AAGA,SAAQA,eAAe,QAAO,0BAA0B;AAIxD,MAAMC,OAAO,GAAG,cAAkB,KAAK,WAAW,aAAiB,QAAQ;AAe3E,OAAO,MAAMC,sBAAsB,GAAG;EACpCC,EAAE,EAAE,qBAAqB;EACzBC,IAAI,EAAE,2BAA2B;EACjCC,MAAM,EAAE,gBAAgB;EACxBC,OAAO,EAAEL,OAAO;EAChBM,OAAO,EAAE;IACPC,iBAAiB,EAAE;EACrB;AACF,CAAC;AAKD,OAAO,SAASC,kCAAkCA,CAChDC,iBAAoC,EACpCH,OAAsC,EAChB;EACtB,OAAOP,eAAe,CAACE,sBAAsB,EAAEQ,iBAAiB,EAAEH,OAAO,CAAC;AAC5E;AAEA,OAAO,MAAMI,6BAA2C,GAAGT,sBAAsB"}
|
|
@@ -3,7 +3,7 @@ import { ZipLoader } from '@loaders.gl/zip';
|
|
|
3
3
|
import { writeFile } from '../lib/utils/file-utils';
|
|
4
4
|
import { join } from 'path';
|
|
5
5
|
import { ChildProcessProxy } from '@loaders.gl/worker-utils';
|
|
6
|
-
const VERSION = typeof "3.4.
|
|
6
|
+
const VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
|
|
7
7
|
const PGM_LINK = 'https://raw.githubusercontent.com/visgl/deck.gl-data/master/egm/egm2008-5.zip';
|
|
8
8
|
export class DepsInstaller {
|
|
9
9
|
async install() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deps-installer.js","names":["load","fetchFile","ZipLoader","writeFile","join","ChildProcessProxy","VERSION","PGM_LINK","DepsInstaller","install","path","arguments","length","undefined","workersPath","console","log","fileMap","depsPath","process","cwd","Uint8Array","installWorker","childProcess","start","command","wait","module","name","extraPath","fileResponse","concat","fileData","arrayBuffer"],"sources":["../../../src/deps-installer/deps-installer.ts"],"sourcesContent":["import {load, fetchFile} from '@loaders.gl/core';\nimport {ZipLoader} from '@loaders.gl/zip';\nimport {writeFile} from '../lib/utils/file-utils';\nimport {join} from 'path';\nimport {ChildProcessProxy} from '@loaders.gl/worker-utils';\n\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : '
|
|
1
|
+
{"version":3,"file":"deps-installer.js","names":["load","fetchFile","ZipLoader","writeFile","join","ChildProcessProxy","VERSION","PGM_LINK","DepsInstaller","install","path","arguments","length","undefined","workersPath","console","log","fileMap","depsPath","process","cwd","Uint8Array","installWorker","childProcess","start","command","wait","module","name","extraPath","fileResponse","concat","fileData","arrayBuffer"],"sources":["../../../src/deps-installer/deps-installer.ts"],"sourcesContent":["import {load, fetchFile} from '@loaders.gl/core';\nimport {ZipLoader} from '@loaders.gl/zip';\nimport {writeFile} from '../lib/utils/file-utils';\nimport {join} from 'path';\nimport {ChildProcessProxy} from '@loaders.gl/worker-utils';\n\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nconst PGM_LINK = 'https://raw.githubusercontent.com/visgl/deck.gl-data/master/egm/egm2008-5.zip';\n\n/**\n * Install external dependencies for converter:\n * * PGM file (implemented);\n * * Draco library (not implemented);\n * * 7z archiver (not implemented);\n */\nexport class DepsInstaller {\n /**\n * Run instalation\n * @param path destination folder\n * @param workersPath destination folder for workers.\n * This path is '' by default and is not used by tile-converter.\n * It is used in tests to prevent rewriting actual workers during tests running\n */\n async install(path: string = '', workersPath: string = ''): Promise<void> {\n console.log('Installing \"EGM2008-5\" model...'); // eslint-disable-line no-console\n const fileMap = await load(PGM_LINK, ZipLoader, {});\n\n let depsPath = process.cwd();\n if (path) {\n depsPath = join(depsPath, path);\n }\n\n await writeFile(depsPath, new Uint8Array(fileMap['geoids/egm2008-5.pgm']), 'egm2008-5.pgm');\n\n console.log('Installing \"I3S Content Loader worker\"'); // eslint-disable-line no-console\n await this.installWorker('i3s', 'i3s-content-nodejs-worker.js', workersPath);\n\n console.log('Installing \"Draco Loader worker\"'); // eslint-disable-line no-console\n await this.installWorker('draco', 'draco-nodejs-worker.js', workersPath);\n\n console.log('Installing \"Basis Loader worker\"'); // eslint-disable-line no-console\n await this.installWorker('textures', 'basis-nodejs-worker.js', workersPath);\n\n console.log('Installing \"join-images\" npm package');\n const childProcess = new ChildProcessProxy();\n await childProcess.start({\n command: 'npm',\n // `npm install sharp join-images` works unstable. It fails because installed `sharp` version\n // may be different from the version required by `join-images`. Pointing to specific versions\n // resolve this issue\n arguments: ['install', 'sharp@^0.30.4', 'join-images@^1.1.3'],\n wait: 0\n });\n\n console.log('All dependencies were installed succesfully.'); // eslint-disable-line no-console\n }\n\n private async installWorker(module: string, name: string, extraPath: string) {\n const fileResponse = await fetchFile(\n `https://unpkg.com/@loaders.gl/${module}@${VERSION}/dist/${name}`\n );\n const fileData = await fileResponse.arrayBuffer();\n if (!fileData) {\n return;\n }\n const path = join(process.cwd(), extraPath, 'modules', module, 'dist');\n await writeFile(path, fileData, name);\n }\n}\n"],"mappings":"AAAA,SAAQA,IAAI,EAAEC,SAAS,QAAO,kBAAkB;AAChD,SAAQC,SAAS,QAAO,iBAAiB;AACzC,SAAQC,SAAS,QAAO,yBAAyB;AACjD,SAAQC,IAAI,QAAO,MAAM;AACzB,SAAQC,iBAAiB,QAAO,0BAA0B;AAG1D,MAAMC,OAAO,GAAG,cAAkB,KAAK,WAAW,aAAiB,QAAQ;AAE3E,MAAMC,QAAQ,GAAG,+EAA+E;AAQhG,OAAO,MAAMC,aAAa,CAAC;EAQzB,MAAMC,OAAOA,CAAA,EAA6D;IAAA,IAA5DC,IAAY,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;IAAA,IAAEG,WAAmB,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;IACvDI,OAAO,CAACC,GAAG,CAAC,iCAAiC,CAAC;IAC9C,MAAMC,OAAO,GAAG,MAAMjB,IAAI,CAACO,QAAQ,EAAEL,SAAS,EAAE,CAAC,CAAC,CAAC;IAEnD,IAAIgB,QAAQ,GAAGC,OAAO,CAACC,GAAG,CAAC,CAAC;IAC5B,IAAIV,IAAI,EAAE;MACRQ,QAAQ,GAAGd,IAAI,CAACc,QAAQ,EAAER,IAAI,CAAC;IACjC;IAEA,MAAMP,SAAS,CAACe,QAAQ,EAAE,IAAIG,UAAU,CAACJ,OAAO,CAAC,sBAAsB,CAAC,CAAC,EAAE,eAAe,CAAC;IAE3FF,OAAO,CAACC,G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gl/worker-utils';
|
|
2
|
-
const VERSION = typeof "3.4.
|
|
2
|
+
const VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
|
|
3
3
|
export const I3SAttributesWorker = {
|
|
4
4
|
id: 'i3s-attributes',
|
|
5
5
|
name: 'I3S Attributes Worker',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i3s-attributes-worker.js","names":["processOnWorker","VERSION","I3SAttributesWorker","id","name","module","version","options","useCartesianPositions","transformI3SAttributesOnWorker","attributesData","_typecheckI3SAttributesWorker"],"sources":["../../src/i3s-attributes-worker.ts"],"sourcesContent":["import type {WorkerObject} from '@loaders.gl/worker-utils';\nimport type {ConvertedAttributes} from './i3s-converter/types';\nimport type {Matrix4, Vector3} from '@math.gl/core';\nimport type {GLTFImagePostprocessed, GLTFNodePostprocessed} from '@loaders.gl/gltf';\n\nimport {processOnWorker} from '@loaders.gl/worker-utils';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport type I3SAttributesWorkerOptions = {\n _nodeWorkers: boolean;\n reuseWorkers: boolean;\n useCartesianPositions: boolean;\n source: string;\n};\n\nexport type B3DMAttributesData = {\n gltfMaterials?: {id: string}[];\n nodes: GLTFNodePostprocessed[];\n images: GLTFImagePostprocessed[];\n cartographicOrigin: Vector3;\n cartesianModelMatrix: Matrix4;\n};\n\n/**\n * I3S Attributes Worker to handle B3DM object\n */\nexport const I3SAttributesWorker = {\n id: 'i3s-attributes',\n name: 'I3S Attributes Worker',\n module: 'tile-converter',\n version: VERSION,\n options: {\n useCartesianPositions: false\n }\n};\n\n/**\n * Performs I3S attributes transformation\n */\nexport function transformI3SAttributesOnWorker(\n attributesData: B3DMAttributesData,\n options: I3SAttributesWorkerOptions\n): Promise<Map<string, ConvertedAttributes>> {\n return processOnWorker(I3SAttributesWorker, attributesData, options);\n}\n\nexport const _typecheckI3SAttributesWorker: WorkerObject = I3SAttributesWorker;\n"],"mappings":"AAKA,SAAQA,eAAe,QAAO,0BAA0B;AAIxD,MAAMC,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"i3s-attributes-worker.js","names":["processOnWorker","VERSION","I3SAttributesWorker","id","name","module","version","options","useCartesianPositions","transformI3SAttributesOnWorker","attributesData","_typecheckI3SAttributesWorker"],"sources":["../../src/i3s-attributes-worker.ts"],"sourcesContent":["import type {WorkerObject} from '@loaders.gl/worker-utils';\nimport type {ConvertedAttributes} from './i3s-converter/types';\nimport type {Matrix4, Vector3} from '@math.gl/core';\nimport type {GLTFImagePostprocessed, GLTFNodePostprocessed} from '@loaders.gl/gltf';\n\nimport {processOnWorker} from '@loaders.gl/worker-utils';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport type I3SAttributesWorkerOptions = {\n _nodeWorkers: boolean;\n reuseWorkers: boolean;\n useCartesianPositions: boolean;\n source: string;\n};\n\nexport type B3DMAttributesData = {\n gltfMaterials?: {id: string}[];\n nodes: GLTFNodePostprocessed[];\n images: GLTFImagePostprocessed[];\n cartographicOrigin: Vector3;\n cartesianModelMatrix: Matrix4;\n};\n\n/**\n * I3S Attributes Worker to handle B3DM object\n */\nexport const I3SAttributesWorker = {\n id: 'i3s-attributes',\n name: 'I3S Attributes Worker',\n module: 'tile-converter',\n version: VERSION,\n options: {\n useCartesianPositions: false\n }\n};\n\n/**\n * Performs I3S attributes transformation\n */\nexport function transformI3SAttributesOnWorker(\n attributesData: B3DMAttributesData,\n options: I3SAttributesWorkerOptions\n): Promise<Map<string, ConvertedAttributes>> {\n return processOnWorker(I3SAttributesWorker, attributesData, options);\n}\n\nexport const _typecheckI3SAttributesWorker: WorkerObject = I3SAttributesWorker;\n"],"mappings":"AAKA,SAAQA,eAAe,QAAO,0BAA0B;AAIxD,MAAMC,OAAO,GAAG,cAAkB,KAAK,WAAW,aAAiB,QAAQ;AAoB3E,OAAO,MAAMC,mBAAmB,GAAG;EACjCC,EAAE,EAAE,gBAAgB;EACpBC,IAAI,EAAE,uBAAuB;EAC7BC,MAAM,EAAE,gBAAgB;EACxBC,OAAO,EAAEL,OAAO;EAChBM,OAAO,EAAE;IACPC,qBAAqB,EAAE;EACzB;AACF,CAAC;AAKD,OAAO,SAASC,8BAA8BA,CAC5CC,cAAkC,EAClCH,OAAmC,EACQ;EAC3C,OAAOP,eAAe,CAACE,mBAAmB,EAAEQ,cAAc,EAAEH,OAAO,CAAC;AACtE;AAEA,OAAO,MAAMI,6BAA2C,GAAGT,mBAAmB"}
|
package/dist/esm/pgm-loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parsePGM } from '@math.gl/geoid';
|
|
2
|
-
const VERSION = typeof "3.4.
|
|
2
|
+
const VERSION = typeof "3.4.1" !== 'undefined' ? "3.4.1" : 'latest';
|
|
3
3
|
export const PGMLoader = {
|
|
4
4
|
name: 'PGM - Netpbm grayscale image format',
|
|
5
5
|
id: 'pgm',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pgm-loader.js","names":["parsePGM","VERSION","PGMLoader","name","id","module","version","mimeTypes","parse","arrayBuffer","options","Uint8Array","extensions","cubic"],"sources":["../../src/pgm-loader.ts"],"sourcesContent":["import type {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport {parsePGM} from '@math.gl/geoid';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\n/**\n * Loader for PGM - Netpbm grayscale image format\n */\nexport const PGMLoader: LoaderWithParser = {\n name: 'PGM - Netpbm grayscale image format',\n id: 'pgm',\n module: 'tile-converter',\n version: VERSION,\n mimeTypes: ['image/x-portable-graymap'],\n // @ts-expect-error LoaderOptions does not have cubic parameter\n parse: async (arrayBuffer, options) => parsePGM(new Uint8Array(arrayBuffer), options),\n extensions: ['pgm'],\n options: {\n // TODO - use pgm namespace\n cubic: false\n }\n};\n"],"mappings":"AACA,SAAQA,QAAQ,QAAO,gBAAgB;AAIvC,MAAMC,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"pgm-loader.js","names":["parsePGM","VERSION","PGMLoader","name","id","module","version","mimeTypes","parse","arrayBuffer","options","Uint8Array","extensions","cubic"],"sources":["../../src/pgm-loader.ts"],"sourcesContent":["import type {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport {parsePGM} from '@math.gl/geoid';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\n/**\n * Loader for PGM - Netpbm grayscale image format\n */\nexport const PGMLoader: LoaderWithParser = {\n name: 'PGM - Netpbm grayscale image format',\n id: 'pgm',\n module: 'tile-converter',\n version: VERSION,\n mimeTypes: ['image/x-portable-graymap'],\n // @ts-expect-error LoaderOptions does not have cubic parameter\n parse: async (arrayBuffer, options) => parsePGM(new Uint8Array(arrayBuffer), options),\n extensions: ['pgm'],\n options: {\n // TODO - use pgm namespace\n cubic: false\n }\n};\n"],"mappings":"AACA,SAAQA,QAAQ,QAAO,gBAAgB;AAIvC,MAAMC,OAAO,GAAG,cAAkB,KAAK,WAAW,aAAiB,QAAQ;AAK3E,OAAO,MAAMC,SAA2B,GAAG;EACzCC,IAAI,EAAE,qCAAqC;EAC3CC,EAAE,EAAE,KAAK;EACTC,MAAM,EAAE,gBAAgB;EACxBC,OAAO,EAAEL,OAAO;EAChBM,SAAS,EAAE,CAAC,0BAA0B,CAAC;EAEvCC,KAAK,EAAE,MAAAA,CAAOC,WAAW,EAAEC,OAAO,KAAKV,QAAQ,CAAC,IAAIW,UAAU,CAACF,WAAW,CAAC,EAAEC,OAAO,CAAC;EACrFE,UAAU,EAAE,CAAC,KAAK,CAAC;EACnBF,OAAO,EAAE;IAEPG,KAAK,EAAE;EACT;AACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/tile-converter",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.1",
|
|
4
4
|
"description": "Converter",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -44,19 +44,19 @@
|
|
|
44
44
|
"build-3d-tiles-attributes-worker": "esbuild src/workers/3d-tiles-attributes-worker.ts --outfile=dist/3d-tiles-attributes-worker.js --platform=node --target=esnext,node14 --external:join-images --minify --bundle --sourcemap --define:__VERSION__=\\\"$npm_package_version\\\""
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@loaders.gl/3d-tiles": "3.4.
|
|
48
|
-
"@loaders.gl/crypto": "3.4.
|
|
49
|
-
"@loaders.gl/draco": "3.4.
|
|
50
|
-
"@loaders.gl/gltf": "3.4.
|
|
51
|
-
"@loaders.gl/i3s": "3.4.
|
|
52
|
-
"@loaders.gl/images": "3.4.
|
|
53
|
-
"@loaders.gl/loader-utils": "3.4.
|
|
54
|
-
"@loaders.gl/polyfills": "3.4.
|
|
55
|
-
"@loaders.gl/schema": "3.4.
|
|
56
|
-
"@loaders.gl/textures": "3.4.
|
|
57
|
-
"@loaders.gl/tiles": "3.4.
|
|
58
|
-
"@loaders.gl/worker-utils": "3.4.
|
|
59
|
-
"@loaders.gl/zip": "3.4.
|
|
47
|
+
"@loaders.gl/3d-tiles": "3.4.1",
|
|
48
|
+
"@loaders.gl/crypto": "3.4.1",
|
|
49
|
+
"@loaders.gl/draco": "3.4.1",
|
|
50
|
+
"@loaders.gl/gltf": "3.4.1",
|
|
51
|
+
"@loaders.gl/i3s": "3.4.1",
|
|
52
|
+
"@loaders.gl/images": "3.4.1",
|
|
53
|
+
"@loaders.gl/loader-utils": "3.4.1",
|
|
54
|
+
"@loaders.gl/polyfills": "3.4.1",
|
|
55
|
+
"@loaders.gl/schema": "3.4.1",
|
|
56
|
+
"@loaders.gl/textures": "3.4.1",
|
|
57
|
+
"@loaders.gl/tiles": "3.4.1",
|
|
58
|
+
"@loaders.gl/worker-utils": "3.4.1",
|
|
59
|
+
"@loaders.gl/zip": "3.4.1",
|
|
60
60
|
"@math.gl/core": "^3.5.1",
|
|
61
61
|
"@math.gl/culling": "^3.5.1",
|
|
62
62
|
"@math.gl/geoid": "^3.5.1",
|
|
@@ -73,11 +73,11 @@
|
|
|
73
73
|
"uuid": "^8.1.0"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"@loaders.gl/core": "^3.
|
|
76
|
+
"@loaders.gl/core": "^3.4.0"
|
|
77
77
|
},
|
|
78
78
|
"quarantinedDependencies": {
|
|
79
79
|
"join-images": "^1.1.3",
|
|
80
80
|
"sharp": "^0.31.3"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "2c39d1032c1a8b3678a6f09507b89ffe92ca9e1b"
|
|
83
83
|
}
|
|
@@ -5,7 +5,7 @@ import {join} from 'path';
|
|
|
5
5
|
import {ChildProcessProxy} from '@loaders.gl/worker-utils';
|
|
6
6
|
|
|
7
7
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
8
|
-
const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : '
|
|
8
|
+
const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
|
|
9
9
|
|
|
10
10
|
const PGM_LINK = 'https://raw.githubusercontent.com/visgl/deck.gl-data/master/egm/egm2008-5.zip';
|
|
11
11
|
|