@loaders.gl/tile-converter 3.2.0-alpha.2 → 3.2.0
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/3d-tiles-converter/3d-tiles-converter.d.ts +1 -1
- package/dist/3d-tiles-converter/3d-tiles-converter.d.ts.map +1 -1
- package/dist/3d-tiles-converter/3d-tiles-converter.js +5 -0
- package/dist/constants.d.ts +2 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +4 -0
- package/dist/converter-cli.d.ts +2 -0
- package/dist/converter-cli.d.ts.map +1 -0
- package/dist/converter-cli.js +232 -0
- package/dist/converter.min.js +68 -68
- package/dist/deps-installer/deps-installer.d.ts +11 -1
- package/dist/deps-installer/deps-installer.d.ts.map +1 -1
- package/dist/deps-installer/deps-installer.js +10 -0
- package/dist/dist.min.js +147 -171
- package/dist/es5/3d-tiles-attributes-worker.js +1 -1
- package/dist/es5/3d-tiles-attributes-worker.js.map +1 -1
- package/dist/es5/3d-tiles-converter/3d-tiles-converter.js +33 -22
- package/dist/es5/3d-tiles-converter/3d-tiles-converter.js.map +1 -1
- package/dist/es5/constants.js +9 -0
- package/dist/es5/constants.js.map +1 -0
- package/dist/es5/converter-cli.js +306 -0
- package/dist/es5/converter-cli.js.map +1 -0
- 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/i3s-converter/helpers/geometry-converter.js +4 -4
- package/dist/es5/i3s-converter/helpers/geometry-converter.js.map +1 -1
- package/dist/es5/i3s-converter/i3s-converter.js +84 -49
- package/dist/es5/i3s-converter/i3s-converter.js.map +1 -1
- package/dist/es5/i3s-converter/json-templates/layers.js +29 -0
- package/dist/es5/i3s-converter/json-templates/layers.js.map +1 -1
- package/dist/es5/index.js +0 -24
- package/dist/es5/index.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/3d-tiles-converter/3d-tiles-converter.js +7 -1
- package/dist/esm/3d-tiles-converter/3d-tiles-converter.js.map +1 -1
- package/dist/esm/constants.js +2 -0
- package/dist/esm/constants.js.map +1 -0
- package/dist/esm/converter-cli.js +230 -0
- package/dist/esm/converter-cli.js.map +1 -0
- 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/i3s-converter/helpers/geometry-converter.js +4 -4
- package/dist/esm/i3s-converter/helpers/geometry-converter.js.map +1 -1
- package/dist/esm/i3s-converter/i3s-converter.js +57 -29
- package/dist/esm/i3s-converter/i3s-converter.js.map +1 -1
- package/dist/esm/i3s-converter/json-templates/layers.js +25 -0
- package/dist/esm/i3s-converter/json-templates/layers.js.map +1 -1
- package/dist/esm/index.js +0 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/pgm-loader.js +1 -1
- package/dist/esm/pgm-loader.js.map +1 -1
- package/dist/i3s-attributes-worker.js +1 -1
- package/dist/i3s-attributes-worker.js.map +2 -2
- package/dist/i3s-converter/helpers/geometry-converter.js +3 -3
- package/dist/i3s-converter/i3s-converter.d.ts +0 -2
- package/dist/i3s-converter/i3s-converter.d.ts.map +1 -1
- package/dist/i3s-converter/i3s-converter.js +42 -18
- package/dist/i3s-converter/json-templates/layers.d.ts +4 -0
- package/dist/i3s-converter/json-templates/layers.d.ts.map +1 -1
- package/dist/i3s-converter/json-templates/layers.js +24 -0
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -7
- package/package.json +20 -18
- package/src/3d-tiles-converter/3d-tiles-converter.ts +7 -2
- package/src/constants.ts +2 -0
- package/src/converter-cli.ts +310 -0
- package/src/deps-installer/{deps-installer.js → deps-installer.ts} +11 -1
- package/src/i3s-converter/helpers/geometry-converter.ts +4 -4
- package/src/i3s-converter/i3s-converter.ts +46 -29
- package/src/i3s-converter/json-templates/layers.ts +25 -0
- package/src/index.ts +0 -5
- package/dist/es5/deps-installer/deps-installer.d.ts +0 -10
- package/dist/esm/deps-installer/deps-installer.d.ts +0 -10
- package/src/deps-installer/deps-installer.d.ts +0 -10
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Install external dependencies for converter:
|
|
3
|
+
* * PGM file (implemented);
|
|
4
|
+
* * Draco library (not implemented);
|
|
5
|
+
* * 7z archiver (not implemented);
|
|
6
|
+
*/
|
|
7
|
+
export declare class DepsInstaller {
|
|
8
|
+
/**
|
|
9
|
+
* Run instalation
|
|
10
|
+
* @param path destination folder
|
|
11
|
+
*/
|
|
2
12
|
install(path?: string): Promise<void>;
|
|
3
13
|
}
|
|
4
14
|
//# sourceMappingURL=deps-installer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deps-installer.d.ts","sourceRoot":"","sources":["../../src/deps-installer/deps-installer.
|
|
1
|
+
{"version":3,"file":"deps-installer.d.ts","sourceRoot":"","sources":["../../src/deps-installer/deps-installer.ts"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH,qBAAa,aAAa;IACxB;;;OAGG;IACG,OAAO,CAAC,IAAI,GAAE,MAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAahD"}
|
|
@@ -6,7 +6,17 @@ const zip_1 = require("@loaders.gl/zip");
|
|
|
6
6
|
const file_utils_1 = require("../lib/utils/file-utils");
|
|
7
7
|
const path_1 = require("path");
|
|
8
8
|
const PGM_LINK = 'https://raw.githubusercontent.com/visgl/deck.gl-data/master/egm/egm2008-5.zip';
|
|
9
|
+
/**
|
|
10
|
+
* Install external dependencies for converter:
|
|
11
|
+
* * PGM file (implemented);
|
|
12
|
+
* * Draco library (not implemented);
|
|
13
|
+
* * 7z archiver (not implemented);
|
|
14
|
+
*/
|
|
9
15
|
class DepsInstaller {
|
|
16
|
+
/**
|
|
17
|
+
* Run instalation
|
|
18
|
+
* @param path destination folder
|
|
19
|
+
*/
|
|
10
20
|
async install(path = '') {
|
|
11
21
|
console.log('Installing "EGM2008-5" model...'); // eslint-disable-line no-console
|
|
12
22
|
const fileMap = await (0, core_1.load)(PGM_LINK, zip_1.ZipLoader, {});
|
package/dist/dist.min.js
CHANGED
|
@@ -556,8 +556,8 @@ var require_globals2 = __commonJS({
|
|
|
556
556
|
exports.isBrowser = exports.VERSION = void 0;
|
|
557
557
|
var _isBrowser = _interopRequireDefault(require_is_browser());
|
|
558
558
|
var _globals = require_globals();
|
|
559
|
-
var
|
|
560
|
-
exports.VERSION =
|
|
559
|
+
var VERSION17 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "untranspiled source";
|
|
560
|
+
exports.VERSION = VERSION17;
|
|
561
561
|
var isBrowser3 = (0, _isBrowser.default)();
|
|
562
562
|
exports.isBrowser = isBrowser3;
|
|
563
563
|
}
|
|
@@ -2097,8 +2097,8 @@ var require_globals4 = __commonJS({
|
|
|
2097
2097
|
});
|
|
2098
2098
|
var _isBrowser = _interopRequireDefault(require_is_browser2());
|
|
2099
2099
|
var _globals = require_globals3();
|
|
2100
|
-
var
|
|
2101
|
-
exports.VERSION =
|
|
2100
|
+
var VERSION17 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "untranspiled source";
|
|
2101
|
+
exports.VERSION = VERSION17;
|
|
2102
2102
|
var isBrowser3 = (0, _isBrowser.default)();
|
|
2103
2103
|
exports.isBrowser = isBrowser3;
|
|
2104
2104
|
}
|
|
@@ -17998,7 +17998,7 @@ var require_BufferList = __commonJS({
|
|
|
17998
17998
|
this.head = this.tail = null;
|
|
17999
17999
|
this.length = 0;
|
|
18000
18000
|
};
|
|
18001
|
-
BufferList.prototype.join = function
|
|
18001
|
+
BufferList.prototype.join = function join9(s) {
|
|
18002
18002
|
if (this.length === 0)
|
|
18003
18003
|
return "";
|
|
18004
18004
|
var p = this.head;
|
|
@@ -22945,7 +22945,7 @@ var require_buffer_list = __commonJS({
|
|
|
22945
22945
|
}
|
|
22946
22946
|
}, {
|
|
22947
22947
|
key: "join",
|
|
22948
|
-
value: function
|
|
22948
|
+
value: function join9(s) {
|
|
22949
22949
|
if (this.length === 0)
|
|
22950
22950
|
return "";
|
|
22951
22951
|
var p = this.head;
|
|
@@ -26657,7 +26657,7 @@ var require_buffer_list2 = __commonJS({
|
|
|
26657
26657
|
}
|
|
26658
26658
|
}, {
|
|
26659
26659
|
key: "join",
|
|
26660
|
-
value: function
|
|
26660
|
+
value: function join9(s) {
|
|
26661
26661
|
if (this.length === 0)
|
|
26662
26662
|
return "";
|
|
26663
26663
|
var p = this.head;
|
|
@@ -29799,7 +29799,7 @@ var require_buffer_list3 = __commonJS({
|
|
|
29799
29799
|
}
|
|
29800
29800
|
}, {
|
|
29801
29801
|
key: "join",
|
|
29802
|
-
value: function
|
|
29802
|
+
value: function join9(s) {
|
|
29803
29803
|
if (this.length === 0)
|
|
29804
29804
|
return "";
|
|
29805
29805
|
var p = this.head;
|
|
@@ -33171,7 +33171,7 @@ var require_buffer_list4 = __commonJS({
|
|
|
33171
33171
|
}
|
|
33172
33172
|
}, {
|
|
33173
33173
|
key: "join",
|
|
33174
|
-
value: function
|
|
33174
|
+
value: function join9(s) {
|
|
33175
33175
|
if (this.length === 0)
|
|
33176
33176
|
return "";
|
|
33177
33177
|
var p = this.head;
|
|
@@ -36545,7 +36545,7 @@ var require_buffer_list5 = __commonJS({
|
|
|
36545
36545
|
}
|
|
36546
36546
|
}, {
|
|
36547
36547
|
key: "join",
|
|
36548
|
-
value: function
|
|
36548
|
+
value: function join9(s) {
|
|
36549
36549
|
if (this.length === 0)
|
|
36550
36550
|
return "";
|
|
36551
36551
|
var p = this.head;
|
|
@@ -46941,9 +46941,9 @@ var require_load = __commonJS({
|
|
|
46941
46941
|
var require_lib4 = __commonJS({
|
|
46942
46942
|
"../../node_modules/jszip/lib/index.js"(exports, module2) {
|
|
46943
46943
|
"use strict";
|
|
46944
|
-
function
|
|
46945
|
-
if (!(this instanceof
|
|
46946
|
-
return new
|
|
46944
|
+
function JSZip2() {
|
|
46945
|
+
if (!(this instanceof JSZip2)) {
|
|
46946
|
+
return new JSZip2();
|
|
46947
46947
|
}
|
|
46948
46948
|
if (arguments.length) {
|
|
46949
46949
|
throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
@@ -46952,7 +46952,7 @@ var require_lib4 = __commonJS({
|
|
|
46952
46952
|
this.comment = null;
|
|
46953
46953
|
this.root = "";
|
|
46954
46954
|
this.clone = function() {
|
|
46955
|
-
var newObj = new
|
|
46955
|
+
var newObj = new JSZip2();
|
|
46956
46956
|
for (var i in this) {
|
|
46957
46957
|
if (typeof this[i] !== "function") {
|
|
46958
46958
|
newObj[i] = this[i];
|
|
@@ -46961,16 +46961,16 @@ var require_lib4 = __commonJS({
|
|
|
46961
46961
|
return newObj;
|
|
46962
46962
|
};
|
|
46963
46963
|
}
|
|
46964
|
-
|
|
46965
|
-
|
|
46966
|
-
|
|
46967
|
-
|
|
46968
|
-
|
|
46969
|
-
|
|
46970
|
-
return new
|
|
46964
|
+
JSZip2.prototype = require_object();
|
|
46965
|
+
JSZip2.prototype.loadAsync = require_load();
|
|
46966
|
+
JSZip2.support = require_support();
|
|
46967
|
+
JSZip2.defaults = require_defaults();
|
|
46968
|
+
JSZip2.version = "3.7.0";
|
|
46969
|
+
JSZip2.loadAsync = function(content, options) {
|
|
46970
|
+
return new JSZip2().loadAsync(content, options);
|
|
46971
46971
|
};
|
|
46972
|
-
|
|
46973
|
-
module2.exports =
|
|
46972
|
+
JSZip2.external = require_external();
|
|
46973
|
+
module2.exports = JSZip2;
|
|
46974
46974
|
}
|
|
46975
46975
|
});
|
|
46976
46976
|
|
|
@@ -49832,7 +49832,7 @@ var require_init3 = __commonJS({
|
|
|
49832
49832
|
var _gltools = require_es510();
|
|
49833
49833
|
var _probe = require_es53();
|
|
49834
49834
|
var _env = require_env2();
|
|
49835
|
-
var
|
|
49835
|
+
var VERSION17 = true ? "8.5.4" : "untranspiled source";
|
|
49836
49836
|
var STARTUP_MESSAGE = "set luma.log.level=1 (or higher) to trace rendering";
|
|
49837
49837
|
var StatsManager = function() {
|
|
49838
49838
|
function StatsManager2() {
|
|
@@ -49854,16 +49854,16 @@ var require_init3 = __commonJS({
|
|
|
49854
49854
|
}();
|
|
49855
49855
|
var lumaStats = new StatsManager();
|
|
49856
49856
|
exports.lumaStats = lumaStats;
|
|
49857
|
-
if (_env.global.luma && _env.global.luma.VERSION !==
|
|
49858
|
-
throw new Error("luma.gl - multiple VERSIONs detected: ".concat(_env.global.luma.VERSION, " vs ").concat(
|
|
49857
|
+
if (_env.global.luma && _env.global.luma.VERSION !== VERSION17) {
|
|
49858
|
+
throw new Error("luma.gl - multiple VERSIONs detected: ".concat(_env.global.luma.VERSION, " vs ").concat(VERSION17));
|
|
49859
49859
|
}
|
|
49860
49860
|
if (!_env.global.luma) {
|
|
49861
49861
|
if ((0, _env.isBrowser)()) {
|
|
49862
|
-
_gltools.log.log(1, "luma.gl ".concat(
|
|
49862
|
+
_gltools.log.log(1, "luma.gl ".concat(VERSION17, " - ").concat(STARTUP_MESSAGE))();
|
|
49863
49863
|
}
|
|
49864
49864
|
_env.global.luma = _env.global.luma || {
|
|
49865
|
-
VERSION:
|
|
49866
|
-
version:
|
|
49865
|
+
VERSION: VERSION17,
|
|
49866
|
+
version: VERSION17,
|
|
49867
49867
|
log: _gltools.log,
|
|
49868
49868
|
stats: lumaStats,
|
|
49869
49869
|
globals: {
|
|
@@ -73404,11 +73404,8 @@ var require_es516 = __commonJS({
|
|
|
73404
73404
|
|
|
73405
73405
|
// src/index.ts
|
|
73406
73406
|
__export(exports, {
|
|
73407
|
-
DepsInstaller: () => DepsInstaller,
|
|
73408
73407
|
I3SConverter: () => I3SConverter,
|
|
73409
|
-
|
|
73410
|
-
Tiles3DConverter: () => Tiles3DConverter,
|
|
73411
|
-
prepareDataForAttributesConversion: () => prepareDataForAttributesConversion
|
|
73408
|
+
Tiles3DConverter: () => Tiles3DConverter
|
|
73412
73409
|
});
|
|
73413
73410
|
|
|
73414
73411
|
// ../loader-utils/src/lib/env-utils/assert.ts
|
|
@@ -74170,10 +74167,12 @@ async function parseWithWorker(loader, data, options, context, parseOnMainThread
|
|
|
74170
74167
|
const workerFarm = WorkerFarm.getWorkerFarm(options);
|
|
74171
74168
|
const workerPool = workerFarm.getWorkerPool({ name: name8, url });
|
|
74172
74169
|
options = JSON.parse(JSON.stringify(options));
|
|
74170
|
+
context = JSON.parse(JSON.stringify(context || {}));
|
|
74173
74171
|
const job = await workerPool.startJob("process-on-worker", onMessage2.bind(null, parseOnMainThread));
|
|
74174
74172
|
job.postMessage("process", {
|
|
74175
74173
|
input: data,
|
|
74176
|
-
options
|
|
74174
|
+
options,
|
|
74175
|
+
context
|
|
74177
74176
|
});
|
|
74178
74177
|
const result = await job.result;
|
|
74179
74178
|
return await result.result;
|
|
@@ -75418,6 +75417,12 @@ async function parse(data, loaders, options, context) {
|
|
|
75418
75417
|
}
|
|
75419
75418
|
async function parseWithLoader(loader, data, options, context) {
|
|
75420
75419
|
validateWorkerVersion(loader);
|
|
75420
|
+
if (isResponse(data)) {
|
|
75421
|
+
const response = data;
|
|
75422
|
+
const { ok, redirected, status, statusText, type, url } = response;
|
|
75423
|
+
const headers = Object.fromEntries(response.headers.entries());
|
|
75424
|
+
context.response = { headers, ok, redirected, status, statusText, type, url };
|
|
75425
|
+
}
|
|
75421
75426
|
data = await getArrayBufferOrStringFromData(data, loader, options);
|
|
75422
75427
|
if (loader.parseTextSync && typeof data === "string") {
|
|
75423
75428
|
options.dataType = "text";
|
|
@@ -76895,7 +76900,7 @@ var TILES_LOADED = "Tiles Loaded";
|
|
|
76895
76900
|
var TILES_LOADING = "Tiles Loading";
|
|
76896
76901
|
var TILES_UNLOADED = "Tiles Unloaded";
|
|
76897
76902
|
var TILES_LOAD_FAILED = "Failed Tile Loads";
|
|
76898
|
-
var POINTS_COUNT = "Points";
|
|
76903
|
+
var POINTS_COUNT = "Points/Vertices";
|
|
76899
76904
|
var TILES_GPU_MEMORY = "Tile Memory Use";
|
|
76900
76905
|
var Tileset3D = class {
|
|
76901
76906
|
constructor(json, options) {
|
|
@@ -76953,7 +76958,7 @@ var Tileset3D = class {
|
|
|
76953
76958
|
this._destroy();
|
|
76954
76959
|
}
|
|
76955
76960
|
isLoaded() {
|
|
76956
|
-
return this._pendingCount === 0 && this._frameNumber !== 0;
|
|
76961
|
+
return this._pendingCount === 0 && this._frameNumber !== 0 && this._requestedTiles.length === 0;
|
|
76957
76962
|
}
|
|
76958
76963
|
get tiles() {
|
|
76959
76964
|
return Object.values(this._tiles);
|
|
@@ -77119,6 +77124,8 @@ var Tileset3D = class {
|
|
|
77119
77124
|
tilesRenderable++;
|
|
77120
77125
|
if (tile.content.pointCount) {
|
|
77121
77126
|
pointsRenderable += tile.content.pointCount;
|
|
77127
|
+
} else {
|
|
77128
|
+
pointsRenderable += tile.content.vertexCount;
|
|
77122
77129
|
}
|
|
77123
77130
|
}
|
|
77124
77131
|
}
|
|
@@ -77255,6 +77262,11 @@ var Tileset3D = class {
|
|
|
77255
77262
|
if (!loaded) {
|
|
77256
77263
|
return;
|
|
77257
77264
|
}
|
|
77265
|
+
if (this.type === TILESET_TYPE.I3S) {
|
|
77266
|
+
const nodesInNodePages = this.tileset?.nodePagesTile?.nodesInNodePages || 0;
|
|
77267
|
+
this.stats.get(TILES_TOTAL).reset();
|
|
77268
|
+
this.stats.get(TILES_TOTAL).addCount(nodesInNodePages);
|
|
77269
|
+
}
|
|
77258
77270
|
if (tile && tile.content) {
|
|
77259
77271
|
calculateTransformProps(tile, tile.content);
|
|
77260
77272
|
}
|
|
@@ -80358,49 +80370,6 @@ var CompressedTextureLoader = {
|
|
|
80358
80370
|
}
|
|
80359
80371
|
};
|
|
80360
80372
|
|
|
80361
|
-
// ../textures/src/lib/encoders/encode-ktx2-basis-texture.ts
|
|
80362
|
-
async function encodeKTX2BasisTexture(image, options = {}) {
|
|
80363
|
-
const { useSRGB = false, qualityLevel = 10, encodeUASTC = false, mipmaps = false } = options;
|
|
80364
|
-
const { BasisEncoder } = await loadBasisEncoderModule(options);
|
|
80365
|
-
const basisEncoder = new BasisEncoder();
|
|
80366
|
-
try {
|
|
80367
|
-
const basisFileData = new Uint8Array(image.width * image.height * 4);
|
|
80368
|
-
basisEncoder.setCreateKTX2File(true);
|
|
80369
|
-
basisEncoder.setKTX2UASTCSupercompression(true);
|
|
80370
|
-
basisEncoder.setKTX2SRGBTransferFunc(true);
|
|
80371
|
-
basisEncoder.setSliceSourceImage(0, image.data, image.width, image.height, false);
|
|
80372
|
-
basisEncoder.setPerceptual(useSRGB);
|
|
80373
|
-
basisEncoder.setMipSRGB(useSRGB);
|
|
80374
|
-
basisEncoder.setQualityLevel(qualityLevel);
|
|
80375
|
-
basisEncoder.setUASTC(encodeUASTC);
|
|
80376
|
-
basisEncoder.setMipGen(mipmaps);
|
|
80377
|
-
const numOutputBytes = basisEncoder.encode(basisFileData);
|
|
80378
|
-
const actualKTX2FileData = basisFileData.subarray(0, numOutputBytes).buffer;
|
|
80379
|
-
return actualKTX2FileData;
|
|
80380
|
-
} catch (error) {
|
|
80381
|
-
console.error("Basis Universal Supercompressed GPU Texture encoder Error: ", error);
|
|
80382
|
-
throw error;
|
|
80383
|
-
} finally {
|
|
80384
|
-
basisEncoder.delete();
|
|
80385
|
-
}
|
|
80386
|
-
}
|
|
80387
|
-
|
|
80388
|
-
// ../textures/src/ktx2-basis-writer.ts
|
|
80389
|
-
var KTX2BasisWriter = {
|
|
80390
|
-
name: "Basis Universal Supercompressed GPU Texture",
|
|
80391
|
-
id: "ktx2-basis-writer",
|
|
80392
|
-
module: "textures",
|
|
80393
|
-
version: VERSION7,
|
|
80394
|
-
extensions: ["ktx2"],
|
|
80395
|
-
options: {
|
|
80396
|
-
useSRGB: false,
|
|
80397
|
-
qualityLevel: 10,
|
|
80398
|
-
encodeUASTC: false,
|
|
80399
|
-
mipmaps: false
|
|
80400
|
-
},
|
|
80401
|
-
encode: encodeKTX2BasisTexture
|
|
80402
|
-
};
|
|
80403
|
-
|
|
80404
80373
|
// ../images/src/lib/utils/version.ts
|
|
80405
80374
|
var VERSION9 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
80406
80375
|
|
|
@@ -80853,6 +80822,22 @@ function checkWebPSupport() {
|
|
|
80853
80822
|
}
|
|
80854
80823
|
}
|
|
80855
80824
|
|
|
80825
|
+
// ../textures/src/index.ts
|
|
80826
|
+
var KTX2BasisWriterWorker = {
|
|
80827
|
+
name: "Basis Universal Supercompressed GPU Texture",
|
|
80828
|
+
id: isBrowser ? "ktx2-basis-writer" : "ktx2-basis-writer-nodejs",
|
|
80829
|
+
module: "textures",
|
|
80830
|
+
version: VERSION7,
|
|
80831
|
+
extensions: ["ktx2"],
|
|
80832
|
+
worker: true,
|
|
80833
|
+
options: {
|
|
80834
|
+
useSRGB: false,
|
|
80835
|
+
qualityLevel: 10,
|
|
80836
|
+
encodeUASTC: false,
|
|
80837
|
+
mipmaps: false
|
|
80838
|
+
}
|
|
80839
|
+
};
|
|
80840
|
+
|
|
80856
80841
|
// ../gltf/src/lib/utils/assert.ts
|
|
80857
80842
|
function assert6(condition, message) {
|
|
80858
80843
|
if (!condition) {
|
|
@@ -82133,7 +82118,7 @@ var GLTFV1Normalizer = class {
|
|
|
82133
82118
|
metallicFactor: 1,
|
|
82134
82119
|
roughnessFactor: 1
|
|
82135
82120
|
};
|
|
82136
|
-
const textureId = material.values
|
|
82121
|
+
const textureId = material.values?.tex || material.values?.texture2d_0;
|
|
82137
82122
|
const textureIndex = json.textures.findIndex((texture) => texture.id === textureId);
|
|
82138
82123
|
if (textureIndex !== -1) {
|
|
82139
82124
|
material.pbrMetallicRoughness.baseColorTexture = { index: textureIndex };
|
|
@@ -84487,15 +84472,15 @@ function getCompositeTransformationMatrix(node2, matrix) {
|
|
|
84487
84472
|
if (nodeMatrix) {
|
|
84488
84473
|
transformationMatrix = matrix.multiplyRight(nodeMatrix);
|
|
84489
84474
|
}
|
|
84475
|
+
if (translation) {
|
|
84476
|
+
transformationMatrix = transformationMatrix.translate(translation);
|
|
84477
|
+
}
|
|
84490
84478
|
if (rotation) {
|
|
84491
84479
|
transformationMatrix = transformationMatrix.rotateXYZ(rotation);
|
|
84492
84480
|
}
|
|
84493
84481
|
if (scale) {
|
|
84494
84482
|
transformationMatrix = transformationMatrix.scale(scale);
|
|
84495
84483
|
}
|
|
84496
|
-
if (translation) {
|
|
84497
|
-
transformationMatrix = transformationMatrix.translate(translation);
|
|
84498
|
-
}
|
|
84499
84484
|
return transformationMatrix;
|
|
84500
84485
|
}
|
|
84501
84486
|
function convertNode(node2, cartographicOrigin, cartesianModelMatrix, attributesMap, useCartesianPositions, matrix = new import_core21.Matrix4([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1])) {
|
|
@@ -85232,6 +85217,26 @@ var NODE_PAGES = () => ({
|
|
|
85232
85217
|
default: "maxScreenThresholdSQ"
|
|
85233
85218
|
}
|
|
85234
85219
|
});
|
|
85220
|
+
var FULL_EXTENT = () => ({
|
|
85221
|
+
xmin: {
|
|
85222
|
+
path: "xmin"
|
|
85223
|
+
},
|
|
85224
|
+
ymin: {
|
|
85225
|
+
path: "ymin"
|
|
85226
|
+
},
|
|
85227
|
+
xmax: {
|
|
85228
|
+
path: "xmax"
|
|
85229
|
+
},
|
|
85230
|
+
ymax: {
|
|
85231
|
+
path: "ymax"
|
|
85232
|
+
},
|
|
85233
|
+
zmin: {
|
|
85234
|
+
path: "zmin"
|
|
85235
|
+
},
|
|
85236
|
+
zmax: {
|
|
85237
|
+
path: "zmax"
|
|
85238
|
+
}
|
|
85239
|
+
});
|
|
85235
85240
|
var LAYERS = () => ({
|
|
85236
85241
|
version: {
|
|
85237
85242
|
path: "version",
|
|
@@ -85264,6 +85269,10 @@ var LAYERS = () => ({
|
|
|
85264
85269
|
path: "store",
|
|
85265
85270
|
transform: (val) => (0, import_json_map_transform3.default)(val, STORE)
|
|
85266
85271
|
},
|
|
85272
|
+
fullExtent: {
|
|
85273
|
+
path: "fullExtent",
|
|
85274
|
+
transform: (val) => (0, import_json_map_transform3.default)(val, FULL_EXTENT())
|
|
85275
|
+
},
|
|
85267
85276
|
heightModelInfo: {
|
|
85268
85277
|
path: "heightModelInfo",
|
|
85269
85278
|
transform: (val) => (0, import_json_map_transform3.default)(val, HEIGHT_MODEL_INFO())
|
|
@@ -85676,8 +85685,11 @@ var I3SAttributesWorker = {
|
|
|
85676
85685
|
}
|
|
85677
85686
|
};
|
|
85678
85687
|
|
|
85688
|
+
// src/constants.ts
|
|
85689
|
+
var BROWSER_ERROR_MESSAGE = "Tile converter does not work in browser, only in node js environment";
|
|
85690
|
+
|
|
85679
85691
|
// src/i3s-converter/i3s-converter.ts
|
|
85680
|
-
var ION_DEFAULT_TOKEN = import_process.default.env
|
|
85692
|
+
var ION_DEFAULT_TOKEN = import_process.default.env?.IonToken || "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJlYWMxMzcyYy0zZjJkLTQwODctODNlNi01MDRkZmMzMjIxOWIiLCJpZCI6OTYyMCwic2NvcGVzIjpbImFzbCIsImFzciIsImdjIl0sImlhdCI6MTU2Mjg2NjI3M30.1FNiClUyk00YH_nWfSGpiQAjR5V2OvREDq1PJ5QMjWQ";
|
|
85681
85693
|
var HARDCODED_NODES_PER_PAGE = 64;
|
|
85682
85694
|
var _3D_TILES = "3DTILES";
|
|
85683
85695
|
var _3D_OBJECT_LAYER_TYPE = "3DObject";
|
|
@@ -85715,6 +85727,10 @@ var I3SConverter = class {
|
|
|
85715
85727
|
this.layersHasTexture = false;
|
|
85716
85728
|
}
|
|
85717
85729
|
async convert(options) {
|
|
85730
|
+
if (isBrowser) {
|
|
85731
|
+
console.log(BROWSER_ERROR_MESSAGE);
|
|
85732
|
+
return BROWSER_ERROR_MESSAGE;
|
|
85733
|
+
}
|
|
85718
85734
|
this.conversionStartTime = import_process.default.hrtime();
|
|
85719
85735
|
const {
|
|
85720
85736
|
tilesetName,
|
|
@@ -85744,19 +85760,24 @@ var I3SConverter = class {
|
|
|
85744
85760
|
this.nodePages.useWriteFunction(writeFileForSlpk);
|
|
85745
85761
|
}
|
|
85746
85762
|
await this.loadWorkers();
|
|
85747
|
-
|
|
85748
|
-
|
|
85749
|
-
|
|
85750
|
-
|
|
85763
|
+
try {
|
|
85764
|
+
const preloadOptions = await this._fetchPreloadOptions();
|
|
85765
|
+
const tilesetOptions = { loadOptions: { basis: { format: "rgba32" } } };
|
|
85766
|
+
if (preloadOptions.headers) {
|
|
85767
|
+
tilesetOptions.loadOptions.fetch = { headers: preloadOptions.headers };
|
|
85768
|
+
}
|
|
85769
|
+
Object.assign(tilesetOptions, preloadOptions);
|
|
85770
|
+
const sourceTilesetJson = await load(inputUrl, this.Loader, tilesetOptions.loadOptions);
|
|
85771
|
+
this.sourceTileset = new Tileset3D(sourceTilesetJson, tilesetOptions);
|
|
85772
|
+
await this._createAndSaveTileset(outputPath, tilesetName);
|
|
85773
|
+
await this._finishConversion({ slpk: Boolean(slpk), outputPath, tilesetName });
|
|
85774
|
+
return sourceTilesetJson;
|
|
85775
|
+
} catch (error) {
|
|
85776
|
+
throw error;
|
|
85777
|
+
} finally {
|
|
85778
|
+
const workerFarm = WorkerFarm.getWorkerFarm({});
|
|
85779
|
+
workerFarm.destroy();
|
|
85751
85780
|
}
|
|
85752
|
-
Object.assign(tilesetOptions, preloadOptions);
|
|
85753
|
-
const sourceTilesetJson = await load(inputUrl, this.Loader, tilesetOptions.loadOptions);
|
|
85754
|
-
this.sourceTileset = new Tileset3D(sourceTilesetJson, tilesetOptions);
|
|
85755
|
-
await this._createAndSaveTileset(outputPath, tilesetName);
|
|
85756
|
-
await this._finishConversion({ slpk: Boolean(slpk), outputPath, tilesetName });
|
|
85757
|
-
const workerFarm = WorkerFarm.getWorkerFarm({});
|
|
85758
|
-
workerFarm.destroy();
|
|
85759
|
-
return sourceTilesetJson;
|
|
85760
85781
|
}
|
|
85761
85782
|
async _createAndSaveTileset(outputPath, tilesetName) {
|
|
85762
85783
|
const tilesetPath = (0, import_path7.join)(`${outputPath}`, `${tilesetName}`);
|
|
@@ -85805,7 +85826,8 @@ var I3SConverter = class {
|
|
|
85805
85826
|
nodePages: {
|
|
85806
85827
|
nodesPerPage: HARDCODED_NODES_PER_PAGE
|
|
85807
85828
|
},
|
|
85808
|
-
compressGeometry: this.options.draco
|
|
85829
|
+
compressGeometry: this.options.draco,
|
|
85830
|
+
fullExtent
|
|
85809
85831
|
};
|
|
85810
85832
|
this.layers0 = (0, import_json_map_transform6.default)(layers0data, LAYERS());
|
|
85811
85833
|
}
|
|
@@ -86169,7 +86191,12 @@ var I3SConverter = class {
|
|
|
86169
86191
|
await this.writeTextureFile(textureData, "0", format, childPath, slpkChildPath);
|
|
86170
86192
|
if (this.generateTextures) {
|
|
86171
86193
|
formats2.push({ name: "1", format: "ktx2" });
|
|
86172
|
-
const ktx2TextureData =
|
|
86194
|
+
const ktx2TextureData = encode(texture.image, KTX2BasisWriterWorker, {
|
|
86195
|
+
...KTX2BasisWriterWorker.options,
|
|
86196
|
+
source: this.workerSource.ktx2,
|
|
86197
|
+
reuseWorkers: true,
|
|
86198
|
+
_nodeWorkers: true
|
|
86199
|
+
});
|
|
86173
86200
|
await this.writeTextureFile(ktx2TextureData, "1", "ktx2", childPath, slpkChildPath);
|
|
86174
86201
|
}
|
|
86175
86202
|
break;
|
|
@@ -86179,7 +86206,7 @@ var I3SConverter = class {
|
|
|
86179
86206
|
await this.writeTextureFile(textureData, "1", format, childPath, slpkChildPath);
|
|
86180
86207
|
if (this.generateTextures) {
|
|
86181
86208
|
formats2.push({ name: "0", format: "jpg" });
|
|
86182
|
-
const decodedFromKTX2TextureData =
|
|
86209
|
+
const decodedFromKTX2TextureData = encode(texture.image.data[0], ImageWriter);
|
|
86183
86210
|
await this.writeTextureFile(decodedFromKTX2TextureData, "0", "jpg", childPath, slpkChildPath);
|
|
86184
86211
|
}
|
|
86185
86212
|
}
|
|
@@ -86433,6 +86460,12 @@ var I3SConverter = class {
|
|
|
86433
86460
|
const source2 = await sourceResponse2.text();
|
|
86434
86461
|
this.workerSource.draco = source2;
|
|
86435
86462
|
}
|
|
86463
|
+
if (this.generateTextures) {
|
|
86464
|
+
const url = getWorkerURL(KTX2BasisWriterWorker, { ...getGlobalLoaderOptions() });
|
|
86465
|
+
const sourceResponse2 = await fetchFile(url);
|
|
86466
|
+
const source2 = await sourceResponse2.text();
|
|
86467
|
+
this.workerSource.ktx2 = source2;
|
|
86468
|
+
}
|
|
86436
86469
|
const i3sAttributesWorkerUrl = getWorkerURL(I3SAttributesWorker, { ...getGlobalLoaderOptions() });
|
|
86437
86470
|
const sourceResponse = await fetchFile(i3sAttributesWorkerUrl);
|
|
86438
86471
|
const source = await sourceResponse.text();
|
|
@@ -86493,7 +86526,7 @@ function generateTilesetAttributeUrls(tileset, resource) {
|
|
|
86493
86526
|
}
|
|
86494
86527
|
|
|
86495
86528
|
// ../i3s/src/lib/parsers/constants.ts
|
|
86496
|
-
var
|
|
86529
|
+
var import_constants15 = __toModule(require_es516());
|
|
86497
86530
|
function getConstructorForDataFormat(dataType) {
|
|
86498
86531
|
switch (dataType) {
|
|
86499
86532
|
case DATA_TYPE.UInt8:
|
|
@@ -86511,11 +86544,11 @@ function getConstructorForDataFormat(dataType) {
|
|
|
86511
86544
|
}
|
|
86512
86545
|
}
|
|
86513
86546
|
var GL_TYPE_MAP = {
|
|
86514
|
-
UInt8:
|
|
86515
|
-
UInt16:
|
|
86516
|
-
Float32:
|
|
86517
|
-
UInt32:
|
|
86518
|
-
UInt64:
|
|
86547
|
+
UInt8: import_constants15.default.UNSIGNED_BYTE,
|
|
86548
|
+
UInt16: import_constants15.default.UNSIGNED_INT,
|
|
86549
|
+
Float32: import_constants15.default.FLOAT,
|
|
86550
|
+
UInt32: import_constants15.default.UNSIGNED_INT,
|
|
86551
|
+
UInt64: import_constants15.default.DOUBLE
|
|
86519
86552
|
};
|
|
86520
86553
|
function sizeOf(dataType) {
|
|
86521
86554
|
switch (dataType) {
|
|
@@ -86610,6 +86643,7 @@ async function parseI3SNodeGeometry(arrayBuffer, tile, tileset, options) {
|
|
|
86610
86643
|
return tile;
|
|
86611
86644
|
}
|
|
86612
86645
|
const content = tile.content;
|
|
86646
|
+
const contentByteLength = arrayBuffer.byteLength;
|
|
86613
86647
|
let attributes;
|
|
86614
86648
|
let vertexCount;
|
|
86615
86649
|
let byteOffset = 0;
|
|
@@ -86685,7 +86719,7 @@ async function parseI3SNodeGeometry(arrayBuffer, tile, tileset, options) {
|
|
|
86685
86719
|
}
|
|
86686
86720
|
}
|
|
86687
86721
|
content.vertexCount = vertexCount;
|
|
86688
|
-
content.byteLength =
|
|
86722
|
+
content.byteLength = contentByteLength;
|
|
86689
86723
|
return tile;
|
|
86690
86724
|
}
|
|
86691
86725
|
function updateAttributesMetadata(attributes, decompressedGeometry) {
|
|
@@ -86975,6 +87009,7 @@ var I3SNodePagesTiles = class {
|
|
|
86975
87009
|
this.nodesPerPage = tileset.nodePages?.nodesPerPage || 64;
|
|
86976
87010
|
this.lodSelectionMetricType = tileset.nodePages?.lodSelectionMetricType;
|
|
86977
87011
|
this.options = options;
|
|
87012
|
+
this.nodesInNodePages = 0;
|
|
86978
87013
|
this.initSelectedFormatsForTextureDefinitions(tileset);
|
|
86979
87014
|
}
|
|
86980
87015
|
async getNodeById(id) {
|
|
@@ -86986,6 +87021,7 @@ var I3SNodePagesTiles = class {
|
|
|
86986
87021
|
promise: load(nodePageUrl, I3SNodePageLoader, this.options)
|
|
86987
87022
|
};
|
|
86988
87023
|
this.nodePages[pageIndex] = await this.pendingNodePages[pageIndex].promise;
|
|
87024
|
+
this.nodesInNodePages += this.nodePages[pageIndex].nodes.length;
|
|
86989
87025
|
this.pendingNodePages[pageIndex].status = "Done";
|
|
86990
87026
|
}
|
|
86991
87027
|
if (this.pendingNodePages[pageIndex].status === "Pending") {
|
|
@@ -87665,6 +87701,10 @@ var Tiles3DConverter = class {
|
|
|
87665
87701
|
this.workerSource = {};
|
|
87666
87702
|
}
|
|
87667
87703
|
async convert(options) {
|
|
87704
|
+
if (isBrowser) {
|
|
87705
|
+
console.log(BROWSER_ERROR_MESSAGE);
|
|
87706
|
+
return BROWSER_ERROR_MESSAGE;
|
|
87707
|
+
}
|
|
87668
87708
|
const { inputUrl, outputPath, tilesetName, maxDepth, egmFilePath } = options;
|
|
87669
87709
|
this.conversionStartTime = import_process2.default.hrtime();
|
|
87670
87710
|
this.options = { maxDepth };
|
|
@@ -87834,74 +87874,10 @@ var Tiles3DConverter = class {
|
|
|
87834
87874
|
console.log(`Loading workers source completed!`);
|
|
87835
87875
|
}
|
|
87836
87876
|
};
|
|
87837
|
-
|
|
87838
|
-
// ../zip/src/zip-loader.ts
|
|
87839
|
-
var import_jszip2 = __toModule(require_lib4());
|
|
87840
|
-
var VERSION17 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
87841
|
-
var ZipLoader = {
|
|
87842
|
-
id: "zip",
|
|
87843
|
-
module: "zip",
|
|
87844
|
-
name: "Zip Archive",
|
|
87845
|
-
version: VERSION17,
|
|
87846
|
-
extensions: ["zip"],
|
|
87847
|
-
mimeTypes: ["application/zip"],
|
|
87848
|
-
category: "archive",
|
|
87849
|
-
tests: ["PK"],
|
|
87850
|
-
options: {},
|
|
87851
|
-
parse: parseZipAsync
|
|
87852
|
-
};
|
|
87853
|
-
async function parseZipAsync(data, options = {}) {
|
|
87854
|
-
const promises = [];
|
|
87855
|
-
const fileMap = {};
|
|
87856
|
-
try {
|
|
87857
|
-
const jsZip = new import_jszip2.default();
|
|
87858
|
-
const zip = await jsZip.loadAsync(data, options);
|
|
87859
|
-
zip.forEach((relativePath, zipEntry) => {
|
|
87860
|
-
const subFilename = zipEntry.name;
|
|
87861
|
-
const promise = loadZipEntry(jsZip, subFilename, options).then((arrayBufferOrError) => {
|
|
87862
|
-
fileMap[relativePath] = arrayBufferOrError;
|
|
87863
|
-
});
|
|
87864
|
-
promises.push(promise);
|
|
87865
|
-
});
|
|
87866
|
-
await Promise.all(promises);
|
|
87867
|
-
return fileMap;
|
|
87868
|
-
} catch (error) {
|
|
87869
|
-
options.log.error(`Unable to read zip archive: ${error}`);
|
|
87870
|
-
throw error;
|
|
87871
|
-
}
|
|
87872
|
-
}
|
|
87873
|
-
async function loadZipEntry(jsZip, subFilename, options = {}) {
|
|
87874
|
-
try {
|
|
87875
|
-
const arrayBuffer = await jsZip.file(subFilename).async(options.dataType || "arraybuffer");
|
|
87876
|
-
return arrayBuffer;
|
|
87877
|
-
} catch (error) {
|
|
87878
|
-
options.log.error(`Unable to read ${subFilename} from zip archive: ${error}`);
|
|
87879
|
-
return error;
|
|
87880
|
-
}
|
|
87881
|
-
}
|
|
87882
|
-
|
|
87883
|
-
// src/deps-installer/deps-installer.js
|
|
87884
|
-
var import_path9 = __toModule(require("path"));
|
|
87885
|
-
var PGM_LINK = "https://raw.githubusercontent.com/visgl/deck.gl-data/master/egm/egm2008-5.zip";
|
|
87886
|
-
var DepsInstaller = class {
|
|
87887
|
-
async install(path2 = "") {
|
|
87888
|
-
console.log('Installing "EGM2008-5" model...');
|
|
87889
|
-
const fileMap = await load(PGM_LINK, ZipLoader, {});
|
|
87890
|
-
let depsPath = process.cwd();
|
|
87891
|
-
if (path2) {
|
|
87892
|
-
depsPath = (0, import_path9.join)(depsPath, path2);
|
|
87893
|
-
}
|
|
87894
|
-
await writeFile3(depsPath, new Uint8Array(fileMap["geoids/egm2008-5.pgm"]), "egm2008-5.pgm");
|
|
87895
|
-
console.log("All dependencies were installed succesfully.");
|
|
87896
|
-
}
|
|
87897
|
-
};
|
|
87898
87877
|
// Annotate the CommonJS export names for ESM import in node:
|
|
87899
87878
|
0 && (module.exports = {
|
|
87900
|
-
DepsInstaller,
|
|
87901
87879
|
I3SConverter,
|
|
87902
|
-
|
|
87903
|
-
Tiles3DConverter,
|
|
87904
|
-
prepareDataForAttributesConversion
|
|
87880
|
+
Tiles3DConverter
|
|
87905
87881
|
});
|
|
87906
87882
|
/*!
|
|
87907
87883
|
* Determine if an object is a Buffer
|
|
@@ -8,7 +8,7 @@ exports._typecheckI3SAttributesWorker = exports.Tile3dAttributesWorker = void 0;
|
|
|
8
8
|
|
|
9
9
|
var _workerUtils = require("@loaders.gl/worker-utils");
|
|
10
10
|
|
|
11
|
-
var VERSION = typeof "3.2.0
|
|
11
|
+
var VERSION = typeof "3.2.0" !== 'undefined' ? "3.2.0" : 'latest';
|
|
12
12
|
var Tile3dAttributesWorker = {
|
|
13
13
|
id: '3d-tiles-attributes',
|
|
14
14
|
name: '3DTiles Attributes Worker',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/3d-tiles-attributes-worker.ts"],"names":["VERSION","Tile3dAttributesWorker","id","name","module","version","options","attributes","transform3DTilesAttributesOnWorker","i3sAttributesData","_typecheckI3SAttributesWorker"],"mappings":";;;;;;;;AAGA;;AAIA,IAAMA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"sources":["../../src/3d-tiles-attributes-worker.ts"],"names":["VERSION","Tile3dAttributesWorker","id","name","module","version","options","attributes","transform3DTilesAttributesOnWorker","i3sAttributesData","_typecheckI3SAttributesWorker"],"mappings":";;;;;;;;AAGA;;AAIA,IAAMA,OAAO,GAAG,mBAAuB,WAAvB,aAAmD,QAAnE;AAeO,IAAMC,sBAAsB,GAAG;AACpCC,EAAAA,EAAE,EAAE,qBADgC;AAEpCC,EAAAA,IAAI,EAAE,2BAF8B;AAGpCC,EAAAA,MAAM,EAAE,gBAH4B;AAIpCC,EAAAA,OAAO,EAAEL,OAJ2B;AAKpCM,EAAAA,OAAO,EAAE;AACPC,IAAAA,UAAU,EAAE;AADL;AAL2B,CAA/B;;;AAaA,SAASC,kCAAT,CACLC,iBADK,EAELH,OAFK,EAGiB;AACtB,SAAO,kCAAgBL,sBAAhB,EAAwCQ,iBAAxC,EAA2DH,OAA3D,CAAP;AACD;;AAEM,IAAMI,6BAA2C,GAAGT,sBAApD","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 attributes: 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"],"file":"3d-tiles-attributes-worker.js"}
|