@loaders.gl/tile-converter 3.4.9 → 3.4.10
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 +68 -67
- 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 +15 -15
|
@@ -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.10" !== 'undefined' ? "3.4.10" : '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,eAAkB,KAAK,WAAW,cAAiB,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.10" !== 'undefined' ? "3.4.10" : '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","platform","wait","ignoreStderr","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: process.platform === 'win32' ? 'npm.cmd' : '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 ignoreStderr: true\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,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAGA,IAAMK,OAAO,GAAG,
|
|
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","platform","wait","ignoreStderr","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: process.platform === 'win32' ? 'npm.cmd' : '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 ignoreStderr: true\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,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAGA,IAAMK,OAAO,GAAG,eAAkB,KAAK,WAAW,cAAiB,QAAQ;AAE3E,IAAMC,QAAQ,GAAG,+EAA+E;AAAC,IAQpFC,aAAa;EAAA,SAAAA,cAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA,QAAAF,aAAA;EAAA;EAAA,IAAAG,aAAA,CAAAD,OAAA,EAAAF,aAAA;IAAAI,GAAA;IAAAC,KAAA;MAAA,IAAAC,QAAA,OAAAC,kBAAA,CAAAL,OAAA,EAAAM,YAAA,CAAAN,OAAA,C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MAAA,CACDR,MAAM,OAAAQ,MAAA,CAAIzD,OAAO,YAAAyD,MAAA,CAASP,IAAI,CACjE,CAAC;YAAA;cAFKE,YAAY,GAAAG,SAAA,CAAAxB,IAAA;cAAAwB,SAAA,CAAA/B,IAAA;cAAA,OAGK4B,YAAY,CAACM,WAAW,CAAC,CAAC;YAAA;cAA3CL,QAAQ,GAAAE,SAAA,CAAAxB,IAAA;cAAA,IACTsB,QAAQ;gBAAAE,SAAA,CAAA/B,IAAA;gBAAA;cAAA;cAAA,OAAA+B,SAAA,CAAAI,MAAA;YAAA;cAGP9C,IAAI,GAAG,IAAAqB,UAAI,EAACF,OAAO,CAACC,GAAG,CAAC,CAAC,EAAEkB,SAAS,EAAE,SAAS,EAAEF,MAAM,EAAE,MAAM,CAAC;cAAAM,SAAA,CAAA/B,IAAA;cAAA,OAChE,IAAAW,oBAAS,EAACtB,IAAI,EAAEwC,QAAQ,EAAEH,IAAI,CAAC;YAAA;YAAA;cAAA,OAAAK,SAAA,CAAAX,IAAA;UAAA;QAAA,GAAAI,QAAA;MAAA,CACtC;MAAA,SAAAX,cAAAuB,EAAA,EAAAC,GAAA,EAAAC,GAAA;QAAA,OAAAf,cAAA,CAAAD,KAAA,OAAA3B,SAAA;MAAA;MAAA,OAAAkB,aAAA;IAAA;EAAA;EAAA,OAAAnC,aAAA;AAAA;AAAA6D,OAAA,CAAA7D,aAAA,GAAAA,aAAA"}
|
|
@@ -6,7 +6,7 @@ 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.10" !== 'undefined' ? "3.4.10" : '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,eAAkB,KAAK,WAAW,cAAiB,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.10" !== 'undefined' ? "3.4.10" : '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,eAAkB,KAAK,WAAW,cAAiB,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.10" !== 'undefined' ? "3.4.10" : '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,eAAkB,KAAK,WAAW,cAAiB,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.10" !== 'undefined' ? "3.4.10" : '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","platform","wait","ignoreStderr","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: process.platform === 'win32' ? 'npm.cmd' : '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 ignoreStderr: true\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,
|
|
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","platform","wait","ignoreStderr","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: process.platform === 'win32' ? 'npm.cmd' : '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 ignoreStderr: true\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,eAAkB,KAAK,WAAW,cAAiB,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,GAAG,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AAC;EACvC;AACF"}
|
|
@@ -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.10" !== 'undefined' ? "3.4.10" : '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,eAAkB,KAAK,WAAW,cAAiB,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.10" !== 'undefined' ? "3.4.10" : '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,eAAkB,KAAK,WAAW,cAAiB,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.10",
|
|
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.10",
|
|
48
|
+
"@loaders.gl/crypto": "3.4.10",
|
|
49
|
+
"@loaders.gl/draco": "3.4.10",
|
|
50
|
+
"@loaders.gl/gltf": "3.4.10",
|
|
51
|
+
"@loaders.gl/i3s": "3.4.10",
|
|
52
|
+
"@loaders.gl/images": "3.4.10",
|
|
53
|
+
"@loaders.gl/loader-utils": "3.4.10",
|
|
54
|
+
"@loaders.gl/polyfills": "3.4.10",
|
|
55
|
+
"@loaders.gl/schema": "3.4.10",
|
|
56
|
+
"@loaders.gl/textures": "3.4.10",
|
|
57
|
+
"@loaders.gl/tiles": "3.4.10",
|
|
58
|
+
"@loaders.gl/worker-utils": "3.4.10",
|
|
59
|
+
"@loaders.gl/zip": "3.4.10",
|
|
60
60
|
"@math.gl/core": "^3.5.1",
|
|
61
61
|
"@math.gl/culling": "^3.5.1",
|
|
62
62
|
"@math.gl/geoid": "^3.5.1",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"join-images": "^1.1.3",
|
|
80
80
|
"sharp": "^0.31.3"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "4568459c96eaf0480a50ab77cace355307f61f04"
|
|
83
83
|
}
|