@loaders.gl/tile-converter 4.0.0-alpha.24 → 4.0.0-alpha.25
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-converter/helpers/b3dm-converter.d.ts +4 -4
- package/dist/converter.min.js +106 -106
- package/dist/dist.min.js +507 -489
- package/dist/es5/3d-tiles-converter/helpers/b3dm-converter.js +18 -18
- package/dist/es5/3d-tiles-converter/helpers/b3dm-converter.js.map +1 -1
- package/dist/es5/deps-installer/deps-installer.js +1 -1
- package/dist/es5/i3s-converter/helpers/batch-ids-extensions.js +16 -14
- package/dist/es5/i3s-converter/helpers/batch-ids-extensions.js.map +1 -1
- package/dist/es5/i3s-converter/helpers/geometry-converter.js +4 -76
- package/dist/es5/i3s-converter/helpers/geometry-converter.js.map +1 -1
- package/dist/es5/i3s-converter/helpers/preprocess-3d-tiles.js +15 -8
- package/dist/es5/i3s-converter/helpers/preprocess-3d-tiles.js.map +1 -1
- package/dist/es5/i3s-converter/i3s-converter.js.map +1 -1
- package/dist/es5/i3s-converter/types.js.map +1 -1
- package/dist/es5/pgm-loader.js +1 -1
- package/dist/esm/3d-tiles-converter/helpers/b3dm-converter.js +8 -8
- package/dist/esm/3d-tiles-converter/helpers/b3dm-converter.js.map +1 -1
- package/dist/esm/deps-installer/deps-installer.js +1 -1
- package/dist/esm/i3s-converter/helpers/batch-ids-extensions.js +5 -15
- package/dist/esm/i3s-converter/helpers/batch-ids-extensions.js.map +1 -1
- package/dist/esm/i3s-converter/helpers/geometry-converter.js +3 -75
- package/dist/esm/i3s-converter/helpers/geometry-converter.js.map +1 -1
- package/dist/esm/i3s-converter/helpers/preprocess-3d-tiles.js +15 -9
- package/dist/esm/i3s-converter/helpers/preprocess-3d-tiles.js.map +1 -1
- package/dist/esm/i3s-converter/i3s-converter.js.map +1 -1
- package/dist/esm/i3s-converter/types.js.map +1 -1
- package/dist/esm/i3s-server/bin/i3s-server.min.js +75 -75
- package/dist/esm/pgm-loader.js +1 -1
- package/dist/i3s-converter/helpers/batch-ids-extensions.d.ts +4 -1
- package/dist/i3s-converter/helpers/batch-ids-extensions.d.ts.map +1 -1
- package/dist/i3s-converter/helpers/geometry-converter.d.ts +1 -1
- package/dist/i3s-converter/helpers/geometry-converter.d.ts.map +1 -1
- package/dist/i3s-converter/helpers/preprocess-3d-tiles.d.ts.map +1 -1
- package/dist/i3s-converter/i3s-converter.d.ts.map +1 -1
- package/dist/i3s-converter/types.d.ts +6 -1
- package/dist/i3s-converter/types.d.ts.map +1 -1
- package/dist/slpk-extractor.min.js +42 -42
- package/package.json +14 -14
- package/src/3d-tiles-converter/helpers/b3dm-converter.ts +8 -8
- package/src/i3s-converter/helpers/batch-ids-extensions.ts +14 -35
- package/src/i3s-converter/helpers/geometry-converter.ts +23 -168
- package/src/i3s-converter/helpers/preprocess-3d-tiles.ts +30 -9
- package/src/i3s-converter/i3s-converter.ts +0 -2
- package/src/i3s-converter/types.ts +6 -1
package/dist/dist.min.js
CHANGED
|
@@ -21238,13 +21238,13 @@ var require_minimatch = __commonJS({
|
|
|
21238
21238
|
var require_readdir_glob = __commonJS({
|
|
21239
21239
|
"../../node_modules/readdir-glob/index.js"(exports, module2) {
|
|
21240
21240
|
module2.exports = readdirGlob;
|
|
21241
|
-
var
|
|
21241
|
+
var fs7 = require("fs");
|
|
21242
21242
|
var { EventEmitter } = require("events");
|
|
21243
21243
|
var { Minimatch } = require_minimatch();
|
|
21244
21244
|
var { resolve: resolve2 } = require("path");
|
|
21245
21245
|
function readdir2(dir, strict) {
|
|
21246
21246
|
return new Promise((resolve3, reject) => {
|
|
21247
|
-
|
|
21247
|
+
fs7.readdir(dir, { withFileTypes: true }, (err, files) => {
|
|
21248
21248
|
if (err) {
|
|
21249
21249
|
switch (err.code) {
|
|
21250
21250
|
case "ENOTDIR":
|
|
@@ -21273,7 +21273,7 @@ var require_readdir_glob = __commonJS({
|
|
|
21273
21273
|
}
|
|
21274
21274
|
function stat3(file, followSymlinks) {
|
|
21275
21275
|
return new Promise((resolve3, reject) => {
|
|
21276
|
-
const statFunc = followSymlinks ?
|
|
21276
|
+
const statFunc = followSymlinks ? fs7.stat : fs7.lstat;
|
|
21277
21277
|
statFunc(file, (err, stats) => {
|
|
21278
21278
|
if (err) {
|
|
21279
21279
|
switch (err.code) {
|
|
@@ -23395,56 +23395,56 @@ var require_polyfills = __commonJS({
|
|
|
23395
23395
|
}
|
|
23396
23396
|
var chdir;
|
|
23397
23397
|
module2.exports = patch;
|
|
23398
|
-
function patch(
|
|
23398
|
+
function patch(fs7) {
|
|
23399
23399
|
if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
|
|
23400
|
-
patchLchmod(
|
|
23401
|
-
}
|
|
23402
|
-
if (!
|
|
23403
|
-
patchLutimes(
|
|
23404
|
-
}
|
|
23405
|
-
|
|
23406
|
-
|
|
23407
|
-
|
|
23408
|
-
|
|
23409
|
-
|
|
23410
|
-
|
|
23411
|
-
|
|
23412
|
-
|
|
23413
|
-
|
|
23414
|
-
|
|
23415
|
-
|
|
23416
|
-
|
|
23417
|
-
|
|
23418
|
-
|
|
23419
|
-
|
|
23420
|
-
|
|
23421
|
-
|
|
23422
|
-
|
|
23423
|
-
if (
|
|
23424
|
-
|
|
23400
|
+
patchLchmod(fs7);
|
|
23401
|
+
}
|
|
23402
|
+
if (!fs7.lutimes) {
|
|
23403
|
+
patchLutimes(fs7);
|
|
23404
|
+
}
|
|
23405
|
+
fs7.chown = chownFix(fs7.chown);
|
|
23406
|
+
fs7.fchown = chownFix(fs7.fchown);
|
|
23407
|
+
fs7.lchown = chownFix(fs7.lchown);
|
|
23408
|
+
fs7.chmod = chmodFix(fs7.chmod);
|
|
23409
|
+
fs7.fchmod = chmodFix(fs7.fchmod);
|
|
23410
|
+
fs7.lchmod = chmodFix(fs7.lchmod);
|
|
23411
|
+
fs7.chownSync = chownFixSync(fs7.chownSync);
|
|
23412
|
+
fs7.fchownSync = chownFixSync(fs7.fchownSync);
|
|
23413
|
+
fs7.lchownSync = chownFixSync(fs7.lchownSync);
|
|
23414
|
+
fs7.chmodSync = chmodFixSync(fs7.chmodSync);
|
|
23415
|
+
fs7.fchmodSync = chmodFixSync(fs7.fchmodSync);
|
|
23416
|
+
fs7.lchmodSync = chmodFixSync(fs7.lchmodSync);
|
|
23417
|
+
fs7.stat = statFix(fs7.stat);
|
|
23418
|
+
fs7.fstat = statFix(fs7.fstat);
|
|
23419
|
+
fs7.lstat = statFix(fs7.lstat);
|
|
23420
|
+
fs7.statSync = statFixSync(fs7.statSync);
|
|
23421
|
+
fs7.fstatSync = statFixSync(fs7.fstatSync);
|
|
23422
|
+
fs7.lstatSync = statFixSync(fs7.lstatSync);
|
|
23423
|
+
if (fs7.chmod && !fs7.lchmod) {
|
|
23424
|
+
fs7.lchmod = function(path2, mode, cb) {
|
|
23425
23425
|
if (cb)
|
|
23426
23426
|
process.nextTick(cb);
|
|
23427
23427
|
};
|
|
23428
|
-
|
|
23428
|
+
fs7.lchmodSync = function() {
|
|
23429
23429
|
};
|
|
23430
23430
|
}
|
|
23431
|
-
if (
|
|
23432
|
-
|
|
23431
|
+
if (fs7.chown && !fs7.lchown) {
|
|
23432
|
+
fs7.lchown = function(path2, uid, gid, cb) {
|
|
23433
23433
|
if (cb)
|
|
23434
23434
|
process.nextTick(cb);
|
|
23435
23435
|
};
|
|
23436
|
-
|
|
23436
|
+
fs7.lchownSync = function() {
|
|
23437
23437
|
};
|
|
23438
23438
|
}
|
|
23439
23439
|
if (platform === "win32") {
|
|
23440
|
-
|
|
23440
|
+
fs7.rename = typeof fs7.rename !== "function" ? fs7.rename : function(fs$rename) {
|
|
23441
23441
|
function rename(from, to, cb) {
|
|
23442
23442
|
var start = Date.now();
|
|
23443
23443
|
var backoff = 0;
|
|
23444
23444
|
fs$rename(from, to, function CB(er) {
|
|
23445
23445
|
if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
|
|
23446
23446
|
setTimeout(function() {
|
|
23447
|
-
|
|
23447
|
+
fs7.stat(to, function(stater, st) {
|
|
23448
23448
|
if (stater && stater.code === "ENOENT")
|
|
23449
23449
|
fs$rename(from, to, CB);
|
|
23450
23450
|
else
|
|
@@ -23462,33 +23462,33 @@ var require_polyfills = __commonJS({
|
|
|
23462
23462
|
if (Object.setPrototypeOf)
|
|
23463
23463
|
Object.setPrototypeOf(rename, fs$rename);
|
|
23464
23464
|
return rename;
|
|
23465
|
-
}(
|
|
23465
|
+
}(fs7.rename);
|
|
23466
23466
|
}
|
|
23467
|
-
|
|
23468
|
-
function
|
|
23467
|
+
fs7.read = typeof fs7.read !== "function" ? fs7.read : function(fs$read) {
|
|
23468
|
+
function read3(fd, buffer, offset, length, position, callback_) {
|
|
23469
23469
|
var callback;
|
|
23470
23470
|
if (callback_ && typeof callback_ === "function") {
|
|
23471
23471
|
var eagCounter = 0;
|
|
23472
23472
|
callback = function(er, _2, __) {
|
|
23473
23473
|
if (er && er.code === "EAGAIN" && eagCounter < 10) {
|
|
23474
23474
|
eagCounter++;
|
|
23475
|
-
return fs$read.call(
|
|
23475
|
+
return fs$read.call(fs7, fd, buffer, offset, length, position, callback);
|
|
23476
23476
|
}
|
|
23477
23477
|
callback_.apply(this, arguments);
|
|
23478
23478
|
};
|
|
23479
23479
|
}
|
|
23480
|
-
return fs$read.call(
|
|
23480
|
+
return fs$read.call(fs7, fd, buffer, offset, length, position, callback);
|
|
23481
23481
|
}
|
|
23482
23482
|
if (Object.setPrototypeOf)
|
|
23483
|
-
Object.setPrototypeOf(
|
|
23484
|
-
return
|
|
23485
|
-
}(
|
|
23486
|
-
|
|
23483
|
+
Object.setPrototypeOf(read3, fs$read);
|
|
23484
|
+
return read3;
|
|
23485
|
+
}(fs7.read);
|
|
23486
|
+
fs7.readSync = typeof fs7.readSync !== "function" ? fs7.readSync : function(fs$readSync) {
|
|
23487
23487
|
return function(fd, buffer, offset, length, position) {
|
|
23488
23488
|
var eagCounter = 0;
|
|
23489
23489
|
while (true) {
|
|
23490
23490
|
try {
|
|
23491
|
-
return fs$readSync.call(
|
|
23491
|
+
return fs$readSync.call(fs7, fd, buffer, offset, length, position);
|
|
23492
23492
|
} catch (er) {
|
|
23493
23493
|
if (er.code === "EAGAIN" && eagCounter < 10) {
|
|
23494
23494
|
eagCounter++;
|
|
@@ -23498,85 +23498,85 @@ var require_polyfills = __commonJS({
|
|
|
23498
23498
|
}
|
|
23499
23499
|
}
|
|
23500
23500
|
};
|
|
23501
|
-
}(
|
|
23502
|
-
function patchLchmod(
|
|
23503
|
-
|
|
23504
|
-
|
|
23501
|
+
}(fs7.readSync);
|
|
23502
|
+
function patchLchmod(fs8) {
|
|
23503
|
+
fs8.lchmod = function(path2, mode, callback) {
|
|
23504
|
+
fs8.open(path2, constants.O_WRONLY | constants.O_SYMLINK, mode, function(err, fd) {
|
|
23505
23505
|
if (err) {
|
|
23506
23506
|
if (callback)
|
|
23507
23507
|
callback(err);
|
|
23508
23508
|
return;
|
|
23509
23509
|
}
|
|
23510
|
-
|
|
23511
|
-
|
|
23510
|
+
fs8.fchmod(fd, mode, function(err2) {
|
|
23511
|
+
fs8.close(fd, function(err22) {
|
|
23512
23512
|
if (callback)
|
|
23513
23513
|
callback(err2 || err22);
|
|
23514
23514
|
});
|
|
23515
23515
|
});
|
|
23516
23516
|
});
|
|
23517
23517
|
};
|
|
23518
|
-
|
|
23519
|
-
var fd =
|
|
23518
|
+
fs8.lchmodSync = function(path2, mode) {
|
|
23519
|
+
var fd = fs8.openSync(path2, constants.O_WRONLY | constants.O_SYMLINK, mode);
|
|
23520
23520
|
var threw = true;
|
|
23521
23521
|
var ret;
|
|
23522
23522
|
try {
|
|
23523
|
-
ret =
|
|
23523
|
+
ret = fs8.fchmodSync(fd, mode);
|
|
23524
23524
|
threw = false;
|
|
23525
23525
|
} finally {
|
|
23526
23526
|
if (threw) {
|
|
23527
23527
|
try {
|
|
23528
|
-
|
|
23528
|
+
fs8.closeSync(fd);
|
|
23529
23529
|
} catch (er) {
|
|
23530
23530
|
}
|
|
23531
23531
|
} else {
|
|
23532
|
-
|
|
23532
|
+
fs8.closeSync(fd);
|
|
23533
23533
|
}
|
|
23534
23534
|
}
|
|
23535
23535
|
return ret;
|
|
23536
23536
|
};
|
|
23537
23537
|
}
|
|
23538
|
-
function patchLutimes(
|
|
23539
|
-
if (constants.hasOwnProperty("O_SYMLINK") &&
|
|
23540
|
-
|
|
23541
|
-
|
|
23538
|
+
function patchLutimes(fs8) {
|
|
23539
|
+
if (constants.hasOwnProperty("O_SYMLINK") && fs8.futimes) {
|
|
23540
|
+
fs8.lutimes = function(path2, at, mt, cb) {
|
|
23541
|
+
fs8.open(path2, constants.O_SYMLINK, function(er, fd) {
|
|
23542
23542
|
if (er) {
|
|
23543
23543
|
if (cb)
|
|
23544
23544
|
cb(er);
|
|
23545
23545
|
return;
|
|
23546
23546
|
}
|
|
23547
|
-
|
|
23548
|
-
|
|
23547
|
+
fs8.futimes(fd, at, mt, function(er2) {
|
|
23548
|
+
fs8.close(fd, function(er22) {
|
|
23549
23549
|
if (cb)
|
|
23550
23550
|
cb(er2 || er22);
|
|
23551
23551
|
});
|
|
23552
23552
|
});
|
|
23553
23553
|
});
|
|
23554
23554
|
};
|
|
23555
|
-
|
|
23556
|
-
var fd =
|
|
23555
|
+
fs8.lutimesSync = function(path2, at, mt) {
|
|
23556
|
+
var fd = fs8.openSync(path2, constants.O_SYMLINK);
|
|
23557
23557
|
var ret;
|
|
23558
23558
|
var threw = true;
|
|
23559
23559
|
try {
|
|
23560
|
-
ret =
|
|
23560
|
+
ret = fs8.futimesSync(fd, at, mt);
|
|
23561
23561
|
threw = false;
|
|
23562
23562
|
} finally {
|
|
23563
23563
|
if (threw) {
|
|
23564
23564
|
try {
|
|
23565
|
-
|
|
23565
|
+
fs8.closeSync(fd);
|
|
23566
23566
|
} catch (er) {
|
|
23567
23567
|
}
|
|
23568
23568
|
} else {
|
|
23569
|
-
|
|
23569
|
+
fs8.closeSync(fd);
|
|
23570
23570
|
}
|
|
23571
23571
|
}
|
|
23572
23572
|
return ret;
|
|
23573
23573
|
};
|
|
23574
|
-
} else if (
|
|
23575
|
-
|
|
23574
|
+
} else if (fs8.futimes) {
|
|
23575
|
+
fs8.lutimes = function(_a, _b, _c, cb) {
|
|
23576
23576
|
if (cb)
|
|
23577
23577
|
process.nextTick(cb);
|
|
23578
23578
|
};
|
|
23579
|
-
|
|
23579
|
+
fs8.lutimesSync = function() {
|
|
23580
23580
|
};
|
|
23581
23581
|
}
|
|
23582
23582
|
}
|
|
@@ -23584,7 +23584,7 @@ var require_polyfills = __commonJS({
|
|
|
23584
23584
|
if (!orig)
|
|
23585
23585
|
return orig;
|
|
23586
23586
|
return function(target, mode, cb) {
|
|
23587
|
-
return orig.call(
|
|
23587
|
+
return orig.call(fs7, target, mode, function(er) {
|
|
23588
23588
|
if (chownErOk(er))
|
|
23589
23589
|
er = null;
|
|
23590
23590
|
if (cb)
|
|
@@ -23597,7 +23597,7 @@ var require_polyfills = __commonJS({
|
|
|
23597
23597
|
return orig;
|
|
23598
23598
|
return function(target, mode) {
|
|
23599
23599
|
try {
|
|
23600
|
-
return orig.call(
|
|
23600
|
+
return orig.call(fs7, target, mode);
|
|
23601
23601
|
} catch (er) {
|
|
23602
23602
|
if (!chownErOk(er))
|
|
23603
23603
|
throw er;
|
|
@@ -23608,7 +23608,7 @@ var require_polyfills = __commonJS({
|
|
|
23608
23608
|
if (!orig)
|
|
23609
23609
|
return orig;
|
|
23610
23610
|
return function(target, uid, gid, cb) {
|
|
23611
|
-
return orig.call(
|
|
23611
|
+
return orig.call(fs7, target, uid, gid, function(er) {
|
|
23612
23612
|
if (chownErOk(er))
|
|
23613
23613
|
er = null;
|
|
23614
23614
|
if (cb)
|
|
@@ -23621,7 +23621,7 @@ var require_polyfills = __commonJS({
|
|
|
23621
23621
|
return orig;
|
|
23622
23622
|
return function(target, uid, gid) {
|
|
23623
23623
|
try {
|
|
23624
|
-
return orig.call(
|
|
23624
|
+
return orig.call(fs7, target, uid, gid);
|
|
23625
23625
|
} catch (er) {
|
|
23626
23626
|
if (!chownErOk(er))
|
|
23627
23627
|
throw er;
|
|
@@ -23646,14 +23646,14 @@ var require_polyfills = __commonJS({
|
|
|
23646
23646
|
if (cb)
|
|
23647
23647
|
cb.apply(this, arguments);
|
|
23648
23648
|
}
|
|
23649
|
-
return options ? orig.call(
|
|
23649
|
+
return options ? orig.call(fs7, target, options, callback) : orig.call(fs7, target, callback);
|
|
23650
23650
|
};
|
|
23651
23651
|
}
|
|
23652
23652
|
function statFixSync(orig) {
|
|
23653
23653
|
if (!orig)
|
|
23654
23654
|
return orig;
|
|
23655
23655
|
return function(target, options) {
|
|
23656
|
-
var stats = options ? orig.call(
|
|
23656
|
+
var stats = options ? orig.call(fs7, target, options) : orig.call(fs7, target);
|
|
23657
23657
|
if (stats) {
|
|
23658
23658
|
if (stats.uid < 0)
|
|
23659
23659
|
stats.uid += 4294967296;
|
|
@@ -23684,7 +23684,7 @@ var require_legacy_streams = __commonJS({
|
|
|
23684
23684
|
"../../node_modules/graceful-fs/legacy-streams.js"(exports, module2) {
|
|
23685
23685
|
var Stream = require("stream").Stream;
|
|
23686
23686
|
module2.exports = legacy;
|
|
23687
|
-
function legacy(
|
|
23687
|
+
function legacy(fs7) {
|
|
23688
23688
|
return {
|
|
23689
23689
|
ReadStream,
|
|
23690
23690
|
WriteStream
|
|
@@ -23729,7 +23729,7 @@ var require_legacy_streams = __commonJS({
|
|
|
23729
23729
|
});
|
|
23730
23730
|
return;
|
|
23731
23731
|
}
|
|
23732
|
-
|
|
23732
|
+
fs7.open(this.path, this.flags, this.mode, function(err, fd) {
|
|
23733
23733
|
if (err) {
|
|
23734
23734
|
self2.emit("error", err);
|
|
23735
23735
|
self2.readable = false;
|
|
@@ -23769,7 +23769,7 @@ var require_legacy_streams = __commonJS({
|
|
|
23769
23769
|
this.busy = false;
|
|
23770
23770
|
this._queue = [];
|
|
23771
23771
|
if (this.fd === null) {
|
|
23772
|
-
this._open =
|
|
23772
|
+
this._open = fs7.open;
|
|
23773
23773
|
this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
|
|
23774
23774
|
this.flush();
|
|
23775
23775
|
}
|
|
@@ -23804,7 +23804,7 @@ var require_clone = __commonJS({
|
|
|
23804
23804
|
// ../../node_modules/graceful-fs/graceful-fs.js
|
|
23805
23805
|
var require_graceful_fs = __commonJS({
|
|
23806
23806
|
"../../node_modules/graceful-fs/graceful-fs.js"(exports, module2) {
|
|
23807
|
-
var
|
|
23807
|
+
var fs7 = require("fs");
|
|
23808
23808
|
var polyfills = require_polyfills();
|
|
23809
23809
|
var legacy = require_legacy_streams();
|
|
23810
23810
|
var clone2 = require_clone();
|
|
@@ -23836,12 +23836,12 @@ var require_graceful_fs = __commonJS({
|
|
|
23836
23836
|
m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
|
|
23837
23837
|
console.error(m);
|
|
23838
23838
|
};
|
|
23839
|
-
if (!
|
|
23839
|
+
if (!fs7[gracefulQueue]) {
|
|
23840
23840
|
queue = global[gracefulQueue] || [];
|
|
23841
|
-
publishQueue(
|
|
23842
|
-
|
|
23843
|
-
function
|
|
23844
|
-
return fs$close.call(
|
|
23841
|
+
publishQueue(fs7, queue);
|
|
23842
|
+
fs7.close = function(fs$close) {
|
|
23843
|
+
function close2(fd, cb) {
|
|
23844
|
+
return fs$close.call(fs7, fd, function(err) {
|
|
23845
23845
|
if (!err) {
|
|
23846
23846
|
resetQueue();
|
|
23847
23847
|
}
|
|
@@ -23849,44 +23849,44 @@ var require_graceful_fs = __commonJS({
|
|
|
23849
23849
|
cb.apply(this, arguments);
|
|
23850
23850
|
});
|
|
23851
23851
|
}
|
|
23852
|
-
Object.defineProperty(
|
|
23852
|
+
Object.defineProperty(close2, previousSymbol, {
|
|
23853
23853
|
value: fs$close
|
|
23854
23854
|
});
|
|
23855
|
-
return
|
|
23856
|
-
}(
|
|
23857
|
-
|
|
23855
|
+
return close2;
|
|
23856
|
+
}(fs7.close);
|
|
23857
|
+
fs7.closeSync = function(fs$closeSync) {
|
|
23858
23858
|
function closeSync(fd) {
|
|
23859
|
-
fs$closeSync.apply(
|
|
23859
|
+
fs$closeSync.apply(fs7, arguments);
|
|
23860
23860
|
resetQueue();
|
|
23861
23861
|
}
|
|
23862
23862
|
Object.defineProperty(closeSync, previousSymbol, {
|
|
23863
23863
|
value: fs$closeSync
|
|
23864
23864
|
});
|
|
23865
23865
|
return closeSync;
|
|
23866
|
-
}(
|
|
23866
|
+
}(fs7.closeSync);
|
|
23867
23867
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
|
23868
23868
|
process.on("exit", function() {
|
|
23869
|
-
debug(
|
|
23870
|
-
require("assert").equal(
|
|
23869
|
+
debug(fs7[gracefulQueue]);
|
|
23870
|
+
require("assert").equal(fs7[gracefulQueue].length, 0);
|
|
23871
23871
|
});
|
|
23872
23872
|
}
|
|
23873
23873
|
}
|
|
23874
23874
|
var queue;
|
|
23875
23875
|
if (!global[gracefulQueue]) {
|
|
23876
|
-
publishQueue(global,
|
|
23877
|
-
}
|
|
23878
|
-
module2.exports = patch(clone2(
|
|
23879
|
-
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !
|
|
23880
|
-
module2.exports = patch(
|
|
23881
|
-
|
|
23882
|
-
}
|
|
23883
|
-
function patch(
|
|
23884
|
-
polyfills(
|
|
23885
|
-
|
|
23886
|
-
|
|
23887
|
-
|
|
23888
|
-
var fs$readFile =
|
|
23889
|
-
|
|
23876
|
+
publishQueue(global, fs7[gracefulQueue]);
|
|
23877
|
+
}
|
|
23878
|
+
module2.exports = patch(clone2(fs7));
|
|
23879
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs7.__patched) {
|
|
23880
|
+
module2.exports = patch(fs7);
|
|
23881
|
+
fs7.__patched = true;
|
|
23882
|
+
}
|
|
23883
|
+
function patch(fs8) {
|
|
23884
|
+
polyfills(fs8);
|
|
23885
|
+
fs8.gracefulify = patch;
|
|
23886
|
+
fs8.createReadStream = createReadStream3;
|
|
23887
|
+
fs8.createWriteStream = createWriteStream3;
|
|
23888
|
+
var fs$readFile = fs8.readFile;
|
|
23889
|
+
fs8.readFile = readFile2;
|
|
23890
23890
|
function readFile2(path2, options, cb) {
|
|
23891
23891
|
if (typeof options === "function")
|
|
23892
23892
|
cb = options, options = null;
|
|
@@ -23902,8 +23902,8 @@ var require_graceful_fs = __commonJS({
|
|
|
23902
23902
|
});
|
|
23903
23903
|
}
|
|
23904
23904
|
}
|
|
23905
|
-
var fs$writeFile =
|
|
23906
|
-
|
|
23905
|
+
var fs$writeFile = fs8.writeFile;
|
|
23906
|
+
fs8.writeFile = writeFile4;
|
|
23907
23907
|
function writeFile4(path2, data, options, cb) {
|
|
23908
23908
|
if (typeof options === "function")
|
|
23909
23909
|
cb = options, options = null;
|
|
@@ -23919,9 +23919,9 @@ var require_graceful_fs = __commonJS({
|
|
|
23919
23919
|
});
|
|
23920
23920
|
}
|
|
23921
23921
|
}
|
|
23922
|
-
var fs$appendFile =
|
|
23922
|
+
var fs$appendFile = fs8.appendFile;
|
|
23923
23923
|
if (fs$appendFile)
|
|
23924
|
-
|
|
23924
|
+
fs8.appendFile = appendFile;
|
|
23925
23925
|
function appendFile(path2, data, options, cb) {
|
|
23926
23926
|
if (typeof options === "function")
|
|
23927
23927
|
cb = options, options = null;
|
|
@@ -23937,9 +23937,9 @@ var require_graceful_fs = __commonJS({
|
|
|
23937
23937
|
});
|
|
23938
23938
|
}
|
|
23939
23939
|
}
|
|
23940
|
-
var fs$copyFile =
|
|
23940
|
+
var fs$copyFile = fs8.copyFile;
|
|
23941
23941
|
if (fs$copyFile)
|
|
23942
|
-
|
|
23942
|
+
fs8.copyFile = copyFile;
|
|
23943
23943
|
function copyFile(src, dest, flags, cb) {
|
|
23944
23944
|
if (typeof flags === "function") {
|
|
23945
23945
|
cb = flags;
|
|
@@ -23957,8 +23957,8 @@ var require_graceful_fs = __commonJS({
|
|
|
23957
23957
|
});
|
|
23958
23958
|
}
|
|
23959
23959
|
}
|
|
23960
|
-
var fs$readdir =
|
|
23961
|
-
|
|
23960
|
+
var fs$readdir = fs8.readdir;
|
|
23961
|
+
fs8.readdir = readdir2;
|
|
23962
23962
|
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
23963
23963
|
function readdir2(path2, options, cb) {
|
|
23964
23964
|
if (typeof options === "function")
|
|
@@ -23989,21 +23989,21 @@ var require_graceful_fs = __commonJS({
|
|
|
23989
23989
|
}
|
|
23990
23990
|
}
|
|
23991
23991
|
if (process.version.substr(0, 4) === "v0.8") {
|
|
23992
|
-
var legStreams = legacy(
|
|
23992
|
+
var legStreams = legacy(fs8);
|
|
23993
23993
|
ReadStream = legStreams.ReadStream;
|
|
23994
23994
|
WriteStream = legStreams.WriteStream;
|
|
23995
23995
|
}
|
|
23996
|
-
var fs$ReadStream =
|
|
23996
|
+
var fs$ReadStream = fs8.ReadStream;
|
|
23997
23997
|
if (fs$ReadStream) {
|
|
23998
23998
|
ReadStream.prototype = Object.create(fs$ReadStream.prototype);
|
|
23999
23999
|
ReadStream.prototype.open = ReadStream$open;
|
|
24000
24000
|
}
|
|
24001
|
-
var fs$WriteStream =
|
|
24001
|
+
var fs$WriteStream = fs8.WriteStream;
|
|
24002
24002
|
if (fs$WriteStream) {
|
|
24003
24003
|
WriteStream.prototype = Object.create(fs$WriteStream.prototype);
|
|
24004
24004
|
WriteStream.prototype.open = WriteStream$open;
|
|
24005
24005
|
}
|
|
24006
|
-
Object.defineProperty(
|
|
24006
|
+
Object.defineProperty(fs8, "ReadStream", {
|
|
24007
24007
|
get: function() {
|
|
24008
24008
|
return ReadStream;
|
|
24009
24009
|
},
|
|
@@ -24013,7 +24013,7 @@ var require_graceful_fs = __commonJS({
|
|
|
24013
24013
|
enumerable: true,
|
|
24014
24014
|
configurable: true
|
|
24015
24015
|
});
|
|
24016
|
-
Object.defineProperty(
|
|
24016
|
+
Object.defineProperty(fs8, "WriteStream", {
|
|
24017
24017
|
get: function() {
|
|
24018
24018
|
return WriteStream;
|
|
24019
24019
|
},
|
|
@@ -24024,7 +24024,7 @@ var require_graceful_fs = __commonJS({
|
|
|
24024
24024
|
configurable: true
|
|
24025
24025
|
});
|
|
24026
24026
|
var FileReadStream = ReadStream;
|
|
24027
|
-
Object.defineProperty(
|
|
24027
|
+
Object.defineProperty(fs8, "FileReadStream", {
|
|
24028
24028
|
get: function() {
|
|
24029
24029
|
return FileReadStream;
|
|
24030
24030
|
},
|
|
@@ -24035,7 +24035,7 @@ var require_graceful_fs = __commonJS({
|
|
|
24035
24035
|
configurable: true
|
|
24036
24036
|
});
|
|
24037
24037
|
var FileWriteStream = WriteStream;
|
|
24038
|
-
Object.defineProperty(
|
|
24038
|
+
Object.defineProperty(fs8, "FileWriteStream", {
|
|
24039
24039
|
get: function() {
|
|
24040
24040
|
return FileWriteStream;
|
|
24041
24041
|
},
|
|
@@ -24053,7 +24053,7 @@ var require_graceful_fs = __commonJS({
|
|
|
24053
24053
|
}
|
|
24054
24054
|
function ReadStream$open() {
|
|
24055
24055
|
var that = this;
|
|
24056
|
-
|
|
24056
|
+
open2(that.path, that.flags, that.mode, function(err, fd) {
|
|
24057
24057
|
if (err) {
|
|
24058
24058
|
if (that.autoClose)
|
|
24059
24059
|
that.destroy();
|
|
@@ -24073,7 +24073,7 @@ var require_graceful_fs = __commonJS({
|
|
|
24073
24073
|
}
|
|
24074
24074
|
function WriteStream$open() {
|
|
24075
24075
|
var that = this;
|
|
24076
|
-
|
|
24076
|
+
open2(that.path, that.flags, that.mode, function(err, fd) {
|
|
24077
24077
|
if (err) {
|
|
24078
24078
|
that.destroy();
|
|
24079
24079
|
that.emit("error", err);
|
|
@@ -24084,14 +24084,14 @@ var require_graceful_fs = __commonJS({
|
|
|
24084
24084
|
});
|
|
24085
24085
|
}
|
|
24086
24086
|
function createReadStream3(path2, options) {
|
|
24087
|
-
return new
|
|
24087
|
+
return new fs8.ReadStream(path2, options);
|
|
24088
24088
|
}
|
|
24089
24089
|
function createWriteStream3(path2, options) {
|
|
24090
|
-
return new
|
|
24090
|
+
return new fs8.WriteStream(path2, options);
|
|
24091
24091
|
}
|
|
24092
|
-
var fs$open =
|
|
24093
|
-
|
|
24094
|
-
function
|
|
24092
|
+
var fs$open = fs8.open;
|
|
24093
|
+
fs8.open = open2;
|
|
24094
|
+
function open2(path2, flags, mode, cb) {
|
|
24095
24095
|
if (typeof mode === "function")
|
|
24096
24096
|
cb = mode, mode = null;
|
|
24097
24097
|
return go$open(path2, flags, mode, cb);
|
|
@@ -24106,20 +24106,20 @@ var require_graceful_fs = __commonJS({
|
|
|
24106
24106
|
});
|
|
24107
24107
|
}
|
|
24108
24108
|
}
|
|
24109
|
-
return
|
|
24109
|
+
return fs8;
|
|
24110
24110
|
}
|
|
24111
24111
|
function enqueue(elem) {
|
|
24112
24112
|
debug("ENQUEUE", elem[0].name, elem[1]);
|
|
24113
|
-
|
|
24113
|
+
fs7[gracefulQueue].push(elem);
|
|
24114
24114
|
retry();
|
|
24115
24115
|
}
|
|
24116
24116
|
var retryTimer;
|
|
24117
24117
|
function resetQueue() {
|
|
24118
24118
|
var now = Date.now();
|
|
24119
|
-
for (var i = 0; i <
|
|
24120
|
-
if (
|
|
24121
|
-
|
|
24122
|
-
|
|
24119
|
+
for (var i = 0; i < fs7[gracefulQueue].length; ++i) {
|
|
24120
|
+
if (fs7[gracefulQueue][i].length > 2) {
|
|
24121
|
+
fs7[gracefulQueue][i][3] = now;
|
|
24122
|
+
fs7[gracefulQueue][i][4] = now;
|
|
24123
24123
|
}
|
|
24124
24124
|
}
|
|
24125
24125
|
retry();
|
|
@@ -24127,9 +24127,9 @@ var require_graceful_fs = __commonJS({
|
|
|
24127
24127
|
function retry() {
|
|
24128
24128
|
clearTimeout(retryTimer);
|
|
24129
24129
|
retryTimer = void 0;
|
|
24130
|
-
if (
|
|
24130
|
+
if (fs7[gracefulQueue].length === 0)
|
|
24131
24131
|
return;
|
|
24132
|
-
var elem =
|
|
24132
|
+
var elem = fs7[gracefulQueue].shift();
|
|
24133
24133
|
var fn = elem[0];
|
|
24134
24134
|
var args = elem[1];
|
|
24135
24135
|
var err = elem[2];
|
|
@@ -24151,7 +24151,7 @@ var require_graceful_fs = __commonJS({
|
|
|
24151
24151
|
debug("RETRY", fn.name, args);
|
|
24152
24152
|
fn.apply(null, args.concat([startTime]));
|
|
24153
24153
|
} else {
|
|
24154
|
-
|
|
24154
|
+
fs7[gracefulQueue].push(elem);
|
|
24155
24155
|
}
|
|
24156
24156
|
}
|
|
24157
24157
|
if (retryTimer === void 0) {
|
|
@@ -25348,7 +25348,7 @@ var require_old = __commonJS({
|
|
|
25348
25348
|
"../../node_modules/fs.realpath/old.js"(exports) {
|
|
25349
25349
|
var pathModule = require("path");
|
|
25350
25350
|
var isWindows = process.platform === "win32";
|
|
25351
|
-
var
|
|
25351
|
+
var fs7 = require("fs");
|
|
25352
25352
|
var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);
|
|
25353
25353
|
function rethrow() {
|
|
25354
25354
|
var callback;
|
|
@@ -25413,7 +25413,7 @@ var require_old = __commonJS({
|
|
|
25413
25413
|
base = m[0];
|
|
25414
25414
|
previous = "";
|
|
25415
25415
|
if (isWindows && !knownHard[base]) {
|
|
25416
|
-
|
|
25416
|
+
fs7.lstatSync(base);
|
|
25417
25417
|
knownHard[base] = true;
|
|
25418
25418
|
}
|
|
25419
25419
|
}
|
|
@@ -25431,7 +25431,7 @@ var require_old = __commonJS({
|
|
|
25431
25431
|
if (cache3 && Object.prototype.hasOwnProperty.call(cache3, base)) {
|
|
25432
25432
|
resolvedLink = cache3[base];
|
|
25433
25433
|
} else {
|
|
25434
|
-
var stat3 =
|
|
25434
|
+
var stat3 = fs7.lstatSync(base);
|
|
25435
25435
|
if (!stat3.isSymbolicLink()) {
|
|
25436
25436
|
knownHard[base] = true;
|
|
25437
25437
|
if (cache3)
|
|
@@ -25446,8 +25446,8 @@ var require_old = __commonJS({
|
|
|
25446
25446
|
}
|
|
25447
25447
|
}
|
|
25448
25448
|
if (linkTarget === null) {
|
|
25449
|
-
|
|
25450
|
-
linkTarget =
|
|
25449
|
+
fs7.statSync(base);
|
|
25450
|
+
linkTarget = fs7.readlinkSync(base);
|
|
25451
25451
|
}
|
|
25452
25452
|
resolvedLink = pathModule.resolve(previous, linkTarget);
|
|
25453
25453
|
if (cache3)
|
|
@@ -25484,7 +25484,7 @@ var require_old = __commonJS({
|
|
|
25484
25484
|
base = m[0];
|
|
25485
25485
|
previous = "";
|
|
25486
25486
|
if (isWindows && !knownHard[base]) {
|
|
25487
|
-
|
|
25487
|
+
fs7.lstat(base, function(err) {
|
|
25488
25488
|
if (err)
|
|
25489
25489
|
return cb(err);
|
|
25490
25490
|
knownHard[base] = true;
|
|
@@ -25512,7 +25512,7 @@ var require_old = __commonJS({
|
|
|
25512
25512
|
if (cache3 && Object.prototype.hasOwnProperty.call(cache3, base)) {
|
|
25513
25513
|
return gotResolvedLink(cache3[base]);
|
|
25514
25514
|
}
|
|
25515
|
-
return
|
|
25515
|
+
return fs7.lstat(base, gotStat);
|
|
25516
25516
|
}
|
|
25517
25517
|
function gotStat(err, stat3) {
|
|
25518
25518
|
if (err)
|
|
@@ -25529,10 +25529,10 @@ var require_old = __commonJS({
|
|
|
25529
25529
|
return gotTarget(null, seenLinks[id], base);
|
|
25530
25530
|
}
|
|
25531
25531
|
}
|
|
25532
|
-
|
|
25532
|
+
fs7.stat(base, function(err2) {
|
|
25533
25533
|
if (err2)
|
|
25534
25534
|
return cb(err2);
|
|
25535
|
-
|
|
25535
|
+
fs7.readlink(base, function(err3, target) {
|
|
25536
25536
|
if (!isWindows)
|
|
25537
25537
|
seenLinks[id] = target;
|
|
25538
25538
|
gotTarget(err3, target);
|
|
@@ -25564,9 +25564,9 @@ var require_fs = __commonJS({
|
|
|
25564
25564
|
realpath.realpathSync = realpathSync;
|
|
25565
25565
|
realpath.monkeypatch = monkeypatch;
|
|
25566
25566
|
realpath.unmonkeypatch = unmonkeypatch;
|
|
25567
|
-
var
|
|
25568
|
-
var origRealpath =
|
|
25569
|
-
var origRealpathSync =
|
|
25567
|
+
var fs7 = require("fs");
|
|
25568
|
+
var origRealpath = fs7.realpath;
|
|
25569
|
+
var origRealpathSync = fs7.realpathSync;
|
|
25570
25570
|
var version2 = process.version;
|
|
25571
25571
|
var ok = /^v[0-5]\./.test(version2);
|
|
25572
25572
|
var old = require_old();
|
|
@@ -25604,12 +25604,12 @@ var require_fs = __commonJS({
|
|
|
25604
25604
|
}
|
|
25605
25605
|
}
|
|
25606
25606
|
function monkeypatch() {
|
|
25607
|
-
|
|
25608
|
-
|
|
25607
|
+
fs7.realpath = realpath;
|
|
25608
|
+
fs7.realpathSync = realpathSync;
|
|
25609
25609
|
}
|
|
25610
25610
|
function unmonkeypatch() {
|
|
25611
|
-
|
|
25612
|
-
|
|
25611
|
+
fs7.realpath = origRealpath;
|
|
25612
|
+
fs7.realpathSync = origRealpathSync;
|
|
25613
25613
|
}
|
|
25614
25614
|
}
|
|
25615
25615
|
});
|
|
@@ -26399,7 +26399,7 @@ var require_common4 = __commonJS({
|
|
|
26399
26399
|
function ownProp(obj, field) {
|
|
26400
26400
|
return Object.prototype.hasOwnProperty.call(obj, field);
|
|
26401
26401
|
}
|
|
26402
|
-
var
|
|
26402
|
+
var fs7 = require("fs");
|
|
26403
26403
|
var path2 = require("path");
|
|
26404
26404
|
var minimatch = require_minimatch2();
|
|
26405
26405
|
var isAbsolute2 = require_path_is_absolute();
|
|
@@ -26454,7 +26454,7 @@ var require_common4 = __commonJS({
|
|
|
26454
26454
|
self2.stat = !!options.stat;
|
|
26455
26455
|
self2.noprocess = !!options.noprocess;
|
|
26456
26456
|
self2.absolute = !!options.absolute;
|
|
26457
|
-
self2.fs = options.fs ||
|
|
26457
|
+
self2.fs = options.fs || fs7;
|
|
26458
26458
|
self2.maxLength = options.maxLength || Infinity;
|
|
26459
26459
|
self2.cache = options.cache || Object.create(null);
|
|
26460
26460
|
self2.statCache = options.statCache || Object.create(null);
|
|
@@ -26661,27 +26661,27 @@ var require_sync = __commonJS({
|
|
|
26661
26661
|
break;
|
|
26662
26662
|
}
|
|
26663
26663
|
var remain = pattern.slice(n);
|
|
26664
|
-
var
|
|
26664
|
+
var read3;
|
|
26665
26665
|
if (prefix === null)
|
|
26666
|
-
|
|
26666
|
+
read3 = ".";
|
|
26667
26667
|
else if (isAbsolute2(prefix) || isAbsolute2(pattern.map(function(p) {
|
|
26668
26668
|
return typeof p === "string" ? p : "[*]";
|
|
26669
26669
|
}).join("/"))) {
|
|
26670
26670
|
if (!prefix || !isAbsolute2(prefix))
|
|
26671
26671
|
prefix = "/" + prefix;
|
|
26672
|
-
|
|
26672
|
+
read3 = prefix;
|
|
26673
26673
|
} else
|
|
26674
|
-
|
|
26675
|
-
var abs = this._makeAbs(
|
|
26676
|
-
if (childrenIgnored(this,
|
|
26674
|
+
read3 = prefix;
|
|
26675
|
+
var abs = this._makeAbs(read3);
|
|
26676
|
+
if (childrenIgnored(this, read3))
|
|
26677
26677
|
return;
|
|
26678
26678
|
var isGlobStar = remain[0] === minimatch.GLOBSTAR;
|
|
26679
26679
|
if (isGlobStar)
|
|
26680
|
-
this._processGlobStar(prefix,
|
|
26680
|
+
this._processGlobStar(prefix, read3, abs, remain, index, inGlobStar);
|
|
26681
26681
|
else
|
|
26682
|
-
this._processReaddir(prefix,
|
|
26682
|
+
this._processReaddir(prefix, read3, abs, remain, index, inGlobStar);
|
|
26683
26683
|
};
|
|
26684
|
-
GlobSync.prototype._processReaddir = function(prefix,
|
|
26684
|
+
GlobSync.prototype._processReaddir = function(prefix, read3, abs, remain, index, inGlobStar) {
|
|
26685
26685
|
var entries = this._readdir(abs, inGlobStar);
|
|
26686
26686
|
if (!entries)
|
|
26687
26687
|
return;
|
|
@@ -26836,7 +26836,7 @@ var require_sync = __commonJS({
|
|
|
26836
26836
|
break;
|
|
26837
26837
|
}
|
|
26838
26838
|
};
|
|
26839
|
-
GlobSync.prototype._processGlobStar = function(prefix,
|
|
26839
|
+
GlobSync.prototype._processGlobStar = function(prefix, read3, abs, remain, index, inGlobStar) {
|
|
26840
26840
|
var entries = this._readdir(abs, inGlobStar);
|
|
26841
26841
|
if (!entries)
|
|
26842
26842
|
return;
|
|
@@ -27285,33 +27285,33 @@ var require_glob = __commonJS({
|
|
|
27285
27285
|
break;
|
|
27286
27286
|
}
|
|
27287
27287
|
var remain = pattern.slice(n);
|
|
27288
|
-
var
|
|
27288
|
+
var read3;
|
|
27289
27289
|
if (prefix === null)
|
|
27290
|
-
|
|
27290
|
+
read3 = ".";
|
|
27291
27291
|
else if (isAbsolute2(prefix) || isAbsolute2(pattern.map(function(p) {
|
|
27292
27292
|
return typeof p === "string" ? p : "[*]";
|
|
27293
27293
|
}).join("/"))) {
|
|
27294
27294
|
if (!prefix || !isAbsolute2(prefix))
|
|
27295
27295
|
prefix = "/" + prefix;
|
|
27296
|
-
|
|
27296
|
+
read3 = prefix;
|
|
27297
27297
|
} else
|
|
27298
|
-
|
|
27299
|
-
var abs = this._makeAbs(
|
|
27300
|
-
if (childrenIgnored(this,
|
|
27298
|
+
read3 = prefix;
|
|
27299
|
+
var abs = this._makeAbs(read3);
|
|
27300
|
+
if (childrenIgnored(this, read3))
|
|
27301
27301
|
return cb();
|
|
27302
27302
|
var isGlobStar = remain[0] === minimatch.GLOBSTAR;
|
|
27303
27303
|
if (isGlobStar)
|
|
27304
|
-
this._processGlobStar(prefix,
|
|
27304
|
+
this._processGlobStar(prefix, read3, abs, remain, index, inGlobStar, cb);
|
|
27305
27305
|
else
|
|
27306
|
-
this._processReaddir(prefix,
|
|
27306
|
+
this._processReaddir(prefix, read3, abs, remain, index, inGlobStar, cb);
|
|
27307
27307
|
};
|
|
27308
|
-
Glob.prototype._processReaddir = function(prefix,
|
|
27308
|
+
Glob.prototype._processReaddir = function(prefix, read3, abs, remain, index, inGlobStar, cb) {
|
|
27309
27309
|
var self2 = this;
|
|
27310
27310
|
this._readdir(abs, inGlobStar, function(er, entries) {
|
|
27311
|
-
return self2._processReaddir2(prefix,
|
|
27311
|
+
return self2._processReaddir2(prefix, read3, abs, remain, index, inGlobStar, entries, cb);
|
|
27312
27312
|
});
|
|
27313
27313
|
};
|
|
27314
|
-
Glob.prototype._processReaddir2 = function(prefix,
|
|
27314
|
+
Glob.prototype._processReaddir2 = function(prefix, read3, abs, remain, index, inGlobStar, entries, cb) {
|
|
27315
27315
|
if (!entries)
|
|
27316
27316
|
return cb();
|
|
27317
27317
|
var pn = remain[0];
|
|
@@ -27492,13 +27492,13 @@ var require_glob = __commonJS({
|
|
|
27492
27492
|
}
|
|
27493
27493
|
return cb();
|
|
27494
27494
|
};
|
|
27495
|
-
Glob.prototype._processGlobStar = function(prefix,
|
|
27495
|
+
Glob.prototype._processGlobStar = function(prefix, read3, abs, remain, index, inGlobStar, cb) {
|
|
27496
27496
|
var self2 = this;
|
|
27497
27497
|
this._readdir(abs, inGlobStar, function(er, entries) {
|
|
27498
|
-
self2._processGlobStar2(prefix,
|
|
27498
|
+
self2._processGlobStar2(prefix, read3, abs, remain, index, inGlobStar, entries, cb);
|
|
27499
27499
|
});
|
|
27500
27500
|
};
|
|
27501
|
-
Glob.prototype._processGlobStar2 = function(prefix,
|
|
27501
|
+
Glob.prototype._processGlobStar2 = function(prefix, read3, abs, remain, index, inGlobStar, entries, cb) {
|
|
27502
27502
|
if (!entries)
|
|
27503
27503
|
return cb();
|
|
27504
27504
|
var remainWithoutGlobStar = remain.slice(1);
|
|
@@ -27613,7 +27613,7 @@ var require_glob = __commonJS({
|
|
|
27613
27613
|
// ../../node_modules/archiver-utils/file.js
|
|
27614
27614
|
var require_file = __commonJS({
|
|
27615
27615
|
"../../node_modules/archiver-utils/file.js"(exports, module2) {
|
|
27616
|
-
var
|
|
27616
|
+
var fs7 = require_graceful_fs();
|
|
27617
27617
|
var path2 = require("path");
|
|
27618
27618
|
var flatten = require_lodash2();
|
|
27619
27619
|
var difference = require_lodash3();
|
|
@@ -27640,7 +27640,7 @@ var require_file = __commonJS({
|
|
|
27640
27640
|
};
|
|
27641
27641
|
file.exists = function() {
|
|
27642
27642
|
var filepath = path2.join.apply(path2, arguments);
|
|
27643
|
-
return
|
|
27643
|
+
return fs7.existsSync(filepath);
|
|
27644
27644
|
};
|
|
27645
27645
|
file.expand = function(...args) {
|
|
27646
27646
|
var options = isPlainObject(args[0]) ? args.shift() : {};
|
|
@@ -27658,7 +27658,7 @@ var require_file = __commonJS({
|
|
|
27658
27658
|
if (typeof options.filter === "function") {
|
|
27659
27659
|
return options.filter(filepath);
|
|
27660
27660
|
} else {
|
|
27661
|
-
return
|
|
27661
|
+
return fs7.statSync(filepath)[options.filter]();
|
|
27662
27662
|
}
|
|
27663
27663
|
} catch (e) {
|
|
27664
27664
|
return false;
|
|
@@ -27766,7 +27766,7 @@ var require_file = __commonJS({
|
|
|
27766
27766
|
// ../../node_modules/archiver-utils/index.js
|
|
27767
27767
|
var require_archiver_utils = __commonJS({
|
|
27768
27768
|
"../../node_modules/archiver-utils/index.js"(exports, module2) {
|
|
27769
|
-
var
|
|
27769
|
+
var fs7 = require_graceful_fs();
|
|
27770
27770
|
var path2 = require("path");
|
|
27771
27771
|
var nutil = require("util");
|
|
27772
27772
|
var lazystream = require_lazystream();
|
|
@@ -27815,7 +27815,7 @@ var require_archiver_utils = __commonJS({
|
|
|
27815
27815
|
};
|
|
27816
27816
|
utils.lazyReadStream = function(filepath) {
|
|
27817
27817
|
return new lazystream.Readable(function() {
|
|
27818
|
-
return
|
|
27818
|
+
return fs7.createReadStream(filepath);
|
|
27819
27819
|
});
|
|
27820
27820
|
};
|
|
27821
27821
|
utils.normalizeInputSource = function(source) {
|
|
@@ -27845,7 +27845,7 @@ var require_archiver_utils = __commonJS({
|
|
|
27845
27845
|
callback = base;
|
|
27846
27846
|
base = dirpath;
|
|
27847
27847
|
}
|
|
27848
|
-
|
|
27848
|
+
fs7.readdir(dirpath, function(err, list) {
|
|
27849
27849
|
var i = 0;
|
|
27850
27850
|
var file;
|
|
27851
27851
|
var filepath;
|
|
@@ -27858,7 +27858,7 @@ var require_archiver_utils = __commonJS({
|
|
|
27858
27858
|
return callback(null, results);
|
|
27859
27859
|
}
|
|
27860
27860
|
filepath = path2.join(dirpath, file);
|
|
27861
|
-
|
|
27861
|
+
fs7.stat(filepath, function(err2, stats) {
|
|
27862
27862
|
results.push({
|
|
27863
27863
|
path: filepath,
|
|
27864
27864
|
relative: path2.relative(base, filepath).replace(/\\/g, "/"),
|
|
@@ -30731,7 +30731,7 @@ var require_readable2 = __commonJS({
|
|
|
30731
30731
|
// ../../node_modules/archiver/lib/core.js
|
|
30732
30732
|
var require_core = __commonJS({
|
|
30733
30733
|
"../../node_modules/archiver/lib/core.js"(exports, module2) {
|
|
30734
|
-
var
|
|
30734
|
+
var fs7 = require("fs");
|
|
30735
30735
|
var glob = require_readdir_glob();
|
|
30736
30736
|
var async = require_async();
|
|
30737
30737
|
var path2 = require("path");
|
|
@@ -30795,7 +30795,7 @@ var require_core = __commonJS({
|
|
|
30795
30795
|
data.sourcePath = filepath;
|
|
30796
30796
|
task.data = data;
|
|
30797
30797
|
this._entriesCount++;
|
|
30798
|
-
if (data.stats && data.stats instanceof
|
|
30798
|
+
if (data.stats && data.stats instanceof fs7.Stats) {
|
|
30799
30799
|
task = this._updateQueueTaskWithStats(task, data.stats);
|
|
30800
30800
|
if (task) {
|
|
30801
30801
|
if (data.stats.size) {
|
|
@@ -30966,7 +30966,7 @@ var require_core = __commonJS({
|
|
|
30966
30966
|
callback();
|
|
30967
30967
|
return;
|
|
30968
30968
|
}
|
|
30969
|
-
|
|
30969
|
+
fs7.lstat(task.filepath, function(err, stats) {
|
|
30970
30970
|
if (this._state.aborted) {
|
|
30971
30971
|
setImmediate(callback);
|
|
30972
30972
|
return;
|
|
@@ -31009,7 +31009,7 @@ var require_core = __commonJS({
|
|
|
31009
31009
|
task.data.sourceType = "buffer";
|
|
31010
31010
|
task.source = Buffer.concat([]);
|
|
31011
31011
|
} else if (stats.isSymbolicLink() && this._moduleSupports("symlink")) {
|
|
31012
|
-
var linkPath =
|
|
31012
|
+
var linkPath = fs7.readlinkSync(task.filepath);
|
|
31013
31013
|
var dirName = path2.dirname(task.filepath);
|
|
31014
31014
|
task.data.type = "symlink";
|
|
31015
31015
|
task.data.linkname = path2.relative(dirName, path2.resolve(dirName, linkPath));
|
|
@@ -46582,12 +46582,37 @@ var isBrowser = Boolean(typeof process !== "object" || String(process) !== "[obj
|
|
|
46582
46582
|
var matches = typeof process !== "undefined" && process.version && /v([0-9]*)/.exec(process.version);
|
|
46583
46583
|
var nodeVersion = matches && parseFloat(matches[1]) || 0;
|
|
46584
46584
|
|
|
46585
|
+
// ../loader-utils/src/lib/option-utils/merge-loader-options.ts
|
|
46586
|
+
function mergeLoaderOptions(baseOptions, newOptions) {
|
|
46587
|
+
return mergeOptionsRecursively(baseOptions || {}, newOptions);
|
|
46588
|
+
}
|
|
46589
|
+
function mergeOptionsRecursively(baseOptions, newOptions) {
|
|
46590
|
+
const options = { ...baseOptions };
|
|
46591
|
+
for (const [key, newValue] of Object.entries(newOptions)) {
|
|
46592
|
+
if (newValue && typeof newValue === "object" && !Array.isArray(newValue)) {
|
|
46593
|
+
options[key] = mergeOptionsRecursively(options[key] || {}, newOptions[key]);
|
|
46594
|
+
} else {
|
|
46595
|
+
options[key] = newOptions[key];
|
|
46596
|
+
}
|
|
46597
|
+
}
|
|
46598
|
+
return options;
|
|
46599
|
+
}
|
|
46600
|
+
|
|
46585
46601
|
// ../worker-utils/src/lib/env-utils/version.ts
|
|
46586
|
-
var
|
|
46587
|
-
|
|
46588
|
-
if (
|
|
46589
|
-
|
|
46602
|
+
var NPM_TAG = "beta";
|
|
46603
|
+
function getVersion() {
|
|
46604
|
+
if (!globalThis._loadersgl_?.version) {
|
|
46605
|
+
globalThis._loadersgl_ = globalThis._loadersgl_ || {};
|
|
46606
|
+
if (typeof __VERSION__ === "undefined") {
|
|
46607
|
+
console.error("loaders.gl: The __VERSION__ variable is not injected using babel plugin. Latest unstable workers would be fetched from the CDN.");
|
|
46608
|
+
globalThis._loadersgl_.version = NPM_TAG;
|
|
46609
|
+
} else {
|
|
46610
|
+
globalThis._loadersgl_.version = __VERSION__;
|
|
46611
|
+
}
|
|
46612
|
+
}
|
|
46613
|
+
return globalThis._loadersgl_.version;
|
|
46590
46614
|
}
|
|
46615
|
+
var VERSION = getVersion();
|
|
46591
46616
|
|
|
46592
46617
|
// ../worker-utils/src/lib/env-utils/assert.ts
|
|
46593
46618
|
function assert3(condition, message) {
|
|
@@ -46994,10 +47019,8 @@ var WorkerFarm = class {
|
|
|
46994
47019
|
};
|
|
46995
47020
|
|
|
46996
47021
|
// ../worker-utils/src/lib/worker-api/get-worker-url.ts
|
|
46997
|
-
var NPM_TAG = "beta";
|
|
46998
|
-
var VERSION2 = typeof VERSION !== "undefined" ? VERSION : NPM_TAG;
|
|
46999
47022
|
function getWorkerName(worker) {
|
|
47000
|
-
const warning = worker.version !==
|
|
47023
|
+
const warning = worker.version !== VERSION ? ` (worker-utils@${VERSION})` : "";
|
|
47001
47024
|
return `${worker.name}@${worker.version}${warning}`;
|
|
47002
47025
|
}
|
|
47003
47026
|
function getWorkerURL(worker, options = {}) {
|
|
@@ -47135,8 +47158,6 @@ function requireFromString(code, filename2 = "", options) {
|
|
|
47135
47158
|
}
|
|
47136
47159
|
|
|
47137
47160
|
// ../worker-utils/src/lib/library-utils/library-utils.ts
|
|
47138
|
-
var LATEST = "beta";
|
|
47139
|
-
var VERSION3 = typeof VERSION !== "undefined" ? VERSION : LATEST;
|
|
47140
47161
|
var loadLibraryPromises = {};
|
|
47141
47162
|
async function loadLibrary(libraryUrl, moduleName = null, options = {}, libraryName = null) {
|
|
47142
47163
|
if (moduleName) {
|
|
@@ -47159,7 +47180,7 @@ function getLibraryUrl(library, moduleName, options = {}, libraryName = null) {
|
|
|
47159
47180
|
}
|
|
47160
47181
|
if (options.CDN) {
|
|
47161
47182
|
assert3(options.CDN.startsWith("http"));
|
|
47162
|
-
return `${options.CDN}/${moduleName}@${
|
|
47183
|
+
return `${options.CDN}/${moduleName}@${VERSION}/dist/libs/${libraryName}`;
|
|
47163
47184
|
}
|
|
47164
47185
|
if (isWorker) {
|
|
47165
47186
|
return `../src/libs/${libraryName}`;
|
|
@@ -47617,12 +47638,12 @@ function resolvePath(filename2) {
|
|
|
47617
47638
|
}
|
|
47618
47639
|
|
|
47619
47640
|
// ../loader-utils/src/json-loader.ts
|
|
47620
|
-
var
|
|
47641
|
+
var VERSION2 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
47621
47642
|
var JSONLoader = {
|
|
47622
47643
|
name: "JSON",
|
|
47623
47644
|
id: "json",
|
|
47624
47645
|
module: "json",
|
|
47625
|
-
version:
|
|
47646
|
+
version: VERSION2,
|
|
47626
47647
|
extensions: ["json", "geojson"],
|
|
47627
47648
|
mimeTypes: ["application/json"],
|
|
47628
47649
|
category: "json",
|
|
@@ -47855,26 +47876,27 @@ __export(fs_exports, {
|
|
|
47855
47876
|
readFile: () => readFile,
|
|
47856
47877
|
readFileSync: () => readFileSync,
|
|
47857
47878
|
readdir: () => readdir,
|
|
47858
|
-
stat: () =>
|
|
47879
|
+
stat: () => stat2,
|
|
47859
47880
|
statSync: () => statSync,
|
|
47860
47881
|
writeFile: () => writeFile,
|
|
47861
47882
|
writeFileSync: () => writeFileSync
|
|
47862
47883
|
});
|
|
47863
|
-
var
|
|
47864
|
-
var
|
|
47865
|
-
var
|
|
47866
|
-
var
|
|
47867
|
-
var
|
|
47868
|
-
var
|
|
47869
|
-
var
|
|
47870
|
-
var
|
|
47871
|
-
var
|
|
47872
|
-
var
|
|
47873
|
-
var
|
|
47874
|
-
var
|
|
47875
|
-
var
|
|
47876
|
-
var
|
|
47877
|
-
var
|
|
47884
|
+
var fs2 = __toModule(require("fs"));
|
|
47885
|
+
var fsPromises = __toModule(require("fs/promises"));
|
|
47886
|
+
var readdir = promisify2(fs2.readdir);
|
|
47887
|
+
var stat2 = fsPromises.stat;
|
|
47888
|
+
var statSync = fs2.statSync;
|
|
47889
|
+
var readFile = fs2.readFile;
|
|
47890
|
+
var readFileSync = fs2.readFileSync;
|
|
47891
|
+
var writeFile = promisify3(fs2.writeFile);
|
|
47892
|
+
var writeFileSync = fs2.writeFileSync;
|
|
47893
|
+
var open = fs2.open;
|
|
47894
|
+
var close = (fd) => new Promise((resolve2, reject) => fs2.close(fd, (err) => err ? reject(err) : resolve2()));
|
|
47895
|
+
var read = fs2.read;
|
|
47896
|
+
var fstat = fs2.fstat;
|
|
47897
|
+
var createReadStream = fs2.createReadStream;
|
|
47898
|
+
var createWriteStream = fs2.createWriteStream;
|
|
47899
|
+
var isSupported = Boolean(fs2);
|
|
47878
47900
|
async function _readToArrayBuffer(fd, start, length) {
|
|
47879
47901
|
const buffer = Buffer.alloc(length);
|
|
47880
47902
|
const { bytesRead } = await read(fd, buffer, 0, length, start);
|
|
@@ -47890,12 +47912,11 @@ var isFileProvider = (fileProvider) => {
|
|
|
47890
47912
|
};
|
|
47891
47913
|
|
|
47892
47914
|
// ../loader-utils/src/lib/file-provider/file-handle.ts
|
|
47893
|
-
var import_fs3 = __toModule(require("fs"));
|
|
47894
47915
|
var FileHandle = class {
|
|
47895
47916
|
constructor(fileDescriptor, stats) {
|
|
47896
47917
|
this.read = (buffer, offset, length, position) => {
|
|
47897
47918
|
return new Promise((s) => {
|
|
47898
|
-
|
|
47919
|
+
read(this.fileDescriptor, buffer, offset, length, position, (_err, bytesRead, buffer2) => s({ bytesRead, buffer: buffer2 }));
|
|
47899
47920
|
});
|
|
47900
47921
|
};
|
|
47901
47922
|
this.fileDescriptor = fileDescriptor;
|
|
@@ -47904,18 +47925,14 @@ var FileHandle = class {
|
|
|
47904
47925
|
static async open(path2) {
|
|
47905
47926
|
const [fd, stats] = await Promise.all([
|
|
47906
47927
|
new Promise((resolve2, reject) => {
|
|
47907
|
-
|
|
47928
|
+
open(path2, void 0, void 0, (_err, fd2) => _err ? reject(_err) : resolve2(fd2));
|
|
47908
47929
|
}),
|
|
47909
|
-
|
|
47910
|
-
(0, import_fs3.stat)(path2, { bigint: true }, (_err, stats2) => _err ? reject(_err) : resolve2(stats2));
|
|
47911
|
-
})
|
|
47930
|
+
stat2(path2, { bigint: true })
|
|
47912
47931
|
]);
|
|
47913
47932
|
return new FileHandle(fd, stats);
|
|
47914
47933
|
}
|
|
47915
47934
|
async close() {
|
|
47916
|
-
return
|
|
47917
|
-
(0, import_fs3.close)(this.fileDescriptor, (_err) => resolve2());
|
|
47918
|
-
});
|
|
47935
|
+
return close(this.fileDescriptor);
|
|
47919
47936
|
}
|
|
47920
47937
|
get stat() {
|
|
47921
47938
|
return this.stats;
|
|
@@ -48251,7 +48268,7 @@ var console_ = globalThis.console;
|
|
|
48251
48268
|
var navigator_ = globalThis.navigator || {};
|
|
48252
48269
|
|
|
48253
48270
|
// ../../node_modules/@probe.gl/log/node_modules/@probe.gl/env/dist/utils/globals.js
|
|
48254
|
-
var
|
|
48271
|
+
var VERSION3 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "untranspiled source";
|
|
48255
48272
|
var isBrowser4 = isBrowser3();
|
|
48256
48273
|
|
|
48257
48274
|
// ../../node_modules/@probe.gl/log/dist/utils/local-storage.js
|
|
@@ -48436,7 +48453,7 @@ var Log = class {
|
|
|
48436
48453
|
id: ""
|
|
48437
48454
|
};
|
|
48438
48455
|
_defineProperty(this, "id", void 0);
|
|
48439
|
-
_defineProperty(this, "VERSION",
|
|
48456
|
+
_defineProperty(this, "VERSION", VERSION3);
|
|
48440
48457
|
_defineProperty(this, "_startTs", getHiResTimestamp());
|
|
48441
48458
|
_defineProperty(this, "_deltaTs", getHiResTimestamp());
|
|
48442
48459
|
_defineProperty(this, "_storage", void 0);
|
|
@@ -48639,7 +48656,7 @@ var Log = class {
|
|
|
48639
48656
|
return noop;
|
|
48640
48657
|
}
|
|
48641
48658
|
};
|
|
48642
|
-
_defineProperty(Log, "VERSION",
|
|
48659
|
+
_defineProperty(Log, "VERSION", VERSION3);
|
|
48643
48660
|
function normalizeLogLevel(logLevel) {
|
|
48644
48661
|
if (!logLevel) {
|
|
48645
48662
|
return 0;
|
|
@@ -49369,6 +49386,7 @@ async function parse(data, loaders, options, context) {
|
|
|
49369
49386
|
}
|
|
49370
49387
|
async function parseWithLoader(loader, data, options, context) {
|
|
49371
49388
|
validateWorkerVersion(loader);
|
|
49389
|
+
options = mergeLoaderOptions(loader.options, options);
|
|
49372
49390
|
if (isResponse(data)) {
|
|
49373
49391
|
const response = data;
|
|
49374
49392
|
const { ok, redirected, status, statusText, type, url } = response;
|
|
@@ -49473,7 +49491,7 @@ async function encodeURLtoURL(inputUrl, outputUrl, writer, options) {
|
|
|
49473
49491
|
return outputFilename;
|
|
49474
49492
|
}
|
|
49475
49493
|
function getIterator(data) {
|
|
49476
|
-
const dataIterator = [{
|
|
49494
|
+
const dataIterator = [{ ...data, start: 0, end: data.length }];
|
|
49477
49495
|
return dataIterator;
|
|
49478
49496
|
}
|
|
49479
49497
|
function getTemporaryFilename(filename2) {
|
|
@@ -49590,7 +49608,7 @@ function createSphere(sphere, transform11, result) {
|
|
|
49590
49608
|
}
|
|
49591
49609
|
|
|
49592
49610
|
// ../3d-tiles/src/lib/utils/version.ts
|
|
49593
|
-
var
|
|
49611
|
+
var VERSION4 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
49594
49612
|
|
|
49595
49613
|
// ../3d-tiles/src/lib/constants.ts
|
|
49596
49614
|
var TILE3D_TYPE = {
|
|
@@ -49624,7 +49642,7 @@ function getMagicString3(arrayBuffer, byteOffset = 0) {
|
|
|
49624
49642
|
}
|
|
49625
49643
|
|
|
49626
49644
|
// ../draco/src/lib/utils/version.ts
|
|
49627
|
-
var
|
|
49645
|
+
var VERSION5 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
49628
49646
|
|
|
49629
49647
|
// ../draco/src/draco-loader.ts
|
|
49630
49648
|
var DEFAULT_DRACO_OPTIONS = {
|
|
@@ -49639,7 +49657,7 @@ var DracoLoader = {
|
|
|
49639
49657
|
name: "Draco",
|
|
49640
49658
|
id: "draco",
|
|
49641
49659
|
module: "draco",
|
|
49642
|
-
version:
|
|
49660
|
+
version: VERSION5,
|
|
49643
49661
|
worker: true,
|
|
49644
49662
|
extensions: ["drc"],
|
|
49645
49663
|
mimeTypes: ["application/octet-stream"],
|
|
@@ -50166,7 +50184,7 @@ var DracoWriterWorker = {
|
|
|
50166
50184
|
id: "draco-writer",
|
|
50167
50185
|
name: "Draco compressed geometry writer",
|
|
50168
50186
|
module: "draco",
|
|
50169
|
-
version:
|
|
50187
|
+
version: VERSION5,
|
|
50170
50188
|
worker: true,
|
|
50171
50189
|
options: {
|
|
50172
50190
|
draco: {},
|
|
@@ -51328,12 +51346,12 @@ async function loadDraco(tile, dracoData, options, context) {
|
|
|
51328
51346
|
// ../gltf/src/lib/extensions/EXT_mesh_features.ts
|
|
51329
51347
|
var EXT_mesh_features_exports = {};
|
|
51330
51348
|
__export(EXT_mesh_features_exports, {
|
|
51331
|
-
decode: () =>
|
|
51332
|
-
name: () =>
|
|
51349
|
+
decode: () => decode,
|
|
51350
|
+
name: () => name
|
|
51333
51351
|
});
|
|
51334
51352
|
|
|
51335
51353
|
// ../images/src/lib/utils/version.ts
|
|
51336
|
-
var
|
|
51354
|
+
var VERSION6 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
51337
51355
|
|
|
51338
51356
|
// ../images/src/lib/category-api/image-type.ts
|
|
51339
51357
|
var { _parseImageNode } = globalThis;
|
|
@@ -51724,7 +51742,7 @@ var ImageLoader = {
|
|
|
51724
51742
|
id: "image",
|
|
51725
51743
|
module: "images",
|
|
51726
51744
|
name: "Images",
|
|
51727
|
-
version:
|
|
51745
|
+
version: VERSION6,
|
|
51728
51746
|
mimeTypes: MIME_TYPES,
|
|
51729
51747
|
extensions: EXTENSIONS,
|
|
51730
51748
|
parse: parseImage,
|
|
@@ -51787,7 +51805,7 @@ var ImageWriter = {
|
|
|
51787
51805
|
name: "Images",
|
|
51788
51806
|
id: "image",
|
|
51789
51807
|
module: "images",
|
|
51790
|
-
version:
|
|
51808
|
+
version: VERSION6,
|
|
51791
51809
|
extensions: ["jpeg"],
|
|
51792
51810
|
options: {
|
|
51793
51811
|
image: {
|
|
@@ -51838,6 +51856,25 @@ function assert6(condition, message) {
|
|
|
51838
51856
|
}
|
|
51839
51857
|
}
|
|
51840
51858
|
|
|
51859
|
+
// ../gltf/src/lib/gltf-utils/gltf-constants.ts
|
|
51860
|
+
var COMPONENTS = {
|
|
51861
|
+
SCALAR: 1,
|
|
51862
|
+
VEC2: 2,
|
|
51863
|
+
VEC3: 3,
|
|
51864
|
+
VEC4: 4,
|
|
51865
|
+
MAT2: 4,
|
|
51866
|
+
MAT3: 9,
|
|
51867
|
+
MAT4: 16
|
|
51868
|
+
};
|
|
51869
|
+
var BYTES = {
|
|
51870
|
+
5120: 1,
|
|
51871
|
+
5121: 1,
|
|
51872
|
+
5122: 2,
|
|
51873
|
+
5123: 2,
|
|
51874
|
+
5125: 4,
|
|
51875
|
+
5126: 4
|
|
51876
|
+
};
|
|
51877
|
+
|
|
51841
51878
|
// ../gltf/src/lib/gltf-utils/gltf-utils.ts
|
|
51842
51879
|
var MIPMAP_FACTOR = 1.33;
|
|
51843
51880
|
var TYPES = ["SCALAR", "VEC2", "VEC3", "VEC4"];
|
|
@@ -51896,6 +51933,27 @@ function getAccessorArrayTypeAndLength(accessor, bufferView) {
|
|
|
51896
51933
|
assert6(byteLength >= 0 && byteLength <= bufferView.byteLength);
|
|
51897
51934
|
return { ArrayType, length, byteLength };
|
|
51898
51935
|
}
|
|
51936
|
+
function getFloat32ArrayForAccessor(gltfData, texCoordAccessor) {
|
|
51937
|
+
const accessor = gltfData.json.accessors?.[texCoordAccessor];
|
|
51938
|
+
if (accessor && typeof accessor.bufferView !== "undefined") {
|
|
51939
|
+
const bufferView = gltfData.json.bufferViews?.[accessor.bufferView];
|
|
51940
|
+
if (bufferView) {
|
|
51941
|
+
const { arrayBuffer, byteOffset: bufferByteOffset } = gltfData.buffers[bufferView.buffer];
|
|
51942
|
+
const byteOffset = (bufferByteOffset || 0) + (accessor.byteOffset || 0) + (bufferView.byteOffset || 0);
|
|
51943
|
+
const { ArrayType, length } = getAccessorArrayTypeAndLength(accessor, bufferView);
|
|
51944
|
+
const bytes = BYTES[accessor.componentType];
|
|
51945
|
+
const components = COMPONENTS[accessor.type];
|
|
51946
|
+
const elementAddressScale = bufferView.byteStride || bytes * components;
|
|
51947
|
+
const result = new Float32Array(length);
|
|
51948
|
+
for (let i = 0; i < accessor.count; i++) {
|
|
51949
|
+
const uv = new ArrayType(arrayBuffer, byteOffset + i * elementAddressScale, 2);
|
|
51950
|
+
result.set(uv, i * components);
|
|
51951
|
+
}
|
|
51952
|
+
return result;
|
|
51953
|
+
}
|
|
51954
|
+
}
|
|
51955
|
+
return null;
|
|
51956
|
+
}
|
|
51899
51957
|
function getMemoryUsageGLTF(gltf) {
|
|
51900
51958
|
let { images, bufferViews } = gltf;
|
|
51901
51959
|
images = images || [];
|
|
@@ -52393,9 +52451,10 @@ function getPrimitiveTextureData(scenegraph, textureInfo, primitive) {
|
|
|
52393
52451
|
const json = scenegraph.gltf.json;
|
|
52394
52452
|
const texCoordAccessorKey = `TEXCOORD_${textureInfo.texCoord || 0}`;
|
|
52395
52453
|
const texCoordAccessorIndex = primitive.attributes[texCoordAccessorKey];
|
|
52396
|
-
const
|
|
52397
|
-
|
|
52398
|
-
|
|
52454
|
+
const textureCoordinates = getFloat32ArrayForAccessor(scenegraph.gltf, texCoordAccessorIndex);
|
|
52455
|
+
if (!textureCoordinates) {
|
|
52456
|
+
return null;
|
|
52457
|
+
}
|
|
52399
52458
|
const textureIndex = textureInfo.index;
|
|
52400
52459
|
const imageIndex = json.textures?.[textureIndex]?.source;
|
|
52401
52460
|
if (typeof imageIndex !== "undefined") {
|
|
@@ -52413,8 +52472,9 @@ function getPrimitiveTextureData(scenegraph, textureInfo, primitive) {
|
|
|
52413
52472
|
return null;
|
|
52414
52473
|
}
|
|
52415
52474
|
function primitivePropertyDataToAttributes(scenegraph, attributeName, propertyData, featureTable, primitive) {
|
|
52416
|
-
if (propertyData
|
|
52475
|
+
if (!propertyData?.length) {
|
|
52417
52476
|
return;
|
|
52477
|
+
}
|
|
52418
52478
|
const featureIndices = [];
|
|
52419
52479
|
for (const texelData of propertyData) {
|
|
52420
52480
|
let index = featureTable.findIndex((item) => item === texelData);
|
|
@@ -52438,12 +52498,12 @@ function primitivePropertyDataToAttributes(scenegraph, attributeName, propertyDa
|
|
|
52438
52498
|
primitive.attributes[attributeName] = accessorIndex;
|
|
52439
52499
|
}
|
|
52440
52500
|
function getImageValueByCoordinates(parsedImage, mimeType, textureCoordinates, index, channels = [0]) {
|
|
52441
|
-
const CHANNELS_MAP =
|
|
52442
|
-
{ offset: 0, shift: 0 },
|
|
52443
|
-
{ offset: 1, shift: 8 },
|
|
52444
|
-
{ offset: 2, shift: 16 },
|
|
52445
|
-
{ offset: 3, shift: 24 }
|
|
52446
|
-
|
|
52501
|
+
const CHANNELS_MAP = {
|
|
52502
|
+
r: { offset: 0, shift: 0 },
|
|
52503
|
+
g: { offset: 1, shift: 8 },
|
|
52504
|
+
b: { offset: 2, shift: 16 },
|
|
52505
|
+
a: { offset: 3, shift: 24 }
|
|
52506
|
+
};
|
|
52447
52507
|
const u = textureCoordinates[index];
|
|
52448
52508
|
const v = textureCoordinates[index + 1];
|
|
52449
52509
|
let components = 1;
|
|
@@ -52452,7 +52512,7 @@ function getImageValueByCoordinates(parsedImage, mimeType, textureCoordinates, i
|
|
|
52452
52512
|
const offset = coordinatesToOffset(u, v, parsedImage, components);
|
|
52453
52513
|
let value = 0;
|
|
52454
52514
|
for (const c of channels) {
|
|
52455
|
-
const map = CHANNELS_MAP[c];
|
|
52515
|
+
const map = typeof c === "number" ? Object.values(CHANNELS_MAP)[c] : CHANNELS_MAP[c];
|
|
52456
52516
|
const imageOffset = offset + map.offset;
|
|
52457
52517
|
const imageData = getImageData(parsedImage);
|
|
52458
52518
|
if (imageData.data.length <= imageOffset) {
|
|
@@ -52475,19 +52535,81 @@ function coordinatesToOffset(u, v, parsedImage, componentsCount = 1) {
|
|
|
52475
52535
|
return offset;
|
|
52476
52536
|
}
|
|
52477
52537
|
|
|
52538
|
+
// ../gltf/src/lib/extensions/EXT_mesh_features.ts
|
|
52539
|
+
var EXT_MESH_FEATURES_NAME = "EXT_mesh_features";
|
|
52540
|
+
var name = EXT_MESH_FEATURES_NAME;
|
|
52541
|
+
async function decode(gltfData, options) {
|
|
52542
|
+
const scenegraph = new GLTFScenegraph(gltfData);
|
|
52543
|
+
decodeExtMeshFeatures(scenegraph, options);
|
|
52544
|
+
}
|
|
52545
|
+
function decodeExtMeshFeatures(scenegraph, options) {
|
|
52546
|
+
const json = scenegraph.gltf.json;
|
|
52547
|
+
if (!json.meshes) {
|
|
52548
|
+
return;
|
|
52549
|
+
}
|
|
52550
|
+
for (const mesh of json.meshes) {
|
|
52551
|
+
for (const primitive of mesh.primitives) {
|
|
52552
|
+
processMeshPrimitiveFeatures(scenegraph, primitive, options);
|
|
52553
|
+
}
|
|
52554
|
+
}
|
|
52555
|
+
}
|
|
52556
|
+
function processMeshPrimitiveFeatures(scenegraph, primitive, options) {
|
|
52557
|
+
if (!options?.gltf?.loadBuffers) {
|
|
52558
|
+
return;
|
|
52559
|
+
}
|
|
52560
|
+
const extension = primitive.extensions?.[EXT_MESH_FEATURES_NAME];
|
|
52561
|
+
const featureIds = extension?.featureIds;
|
|
52562
|
+
if (!featureIds) {
|
|
52563
|
+
return;
|
|
52564
|
+
}
|
|
52565
|
+
for (const featureId of featureIds) {
|
|
52566
|
+
let featureIdData = null;
|
|
52567
|
+
if (typeof featureId.attribute !== "undefined") {
|
|
52568
|
+
const accessorKey = `_FEATURE_ID_${featureId.attribute}`;
|
|
52569
|
+
const accessorIndex = primitive.attributes[accessorKey];
|
|
52570
|
+
featureIdData = scenegraph.getTypedArrayForAccessor(accessorIndex);
|
|
52571
|
+
} else if (typeof featureId.texture !== "undefined" && options?.gltf?.loadImages) {
|
|
52572
|
+
featureIdData = getPrimitiveTextureData(scenegraph, featureId.texture, primitive);
|
|
52573
|
+
} else {
|
|
52574
|
+
}
|
|
52575
|
+
featureId.data = featureIdData;
|
|
52576
|
+
}
|
|
52577
|
+
}
|
|
52578
|
+
|
|
52478
52579
|
// ../gltf/src/lib/extensions/EXT_structural_metadata.ts
|
|
52479
52580
|
var EXT_structural_metadata_exports = {};
|
|
52480
52581
|
__export(EXT_structural_metadata_exports, {
|
|
52481
|
-
decode: () =>
|
|
52582
|
+
decode: () => decode2,
|
|
52583
|
+
getPropertyTableFromExtStructuralMetadata: () => getPropertyTableFromExtStructuralMetadata,
|
|
52482
52584
|
getPropertyTablePopulated: () => getPropertyTablePopulated,
|
|
52483
|
-
name: () =>
|
|
52585
|
+
name: () => name2
|
|
52484
52586
|
});
|
|
52485
52587
|
var EXT_STRUCTURAL_METADATA_NAME = "EXT_structural_metadata";
|
|
52486
|
-
var
|
|
52487
|
-
async function
|
|
52588
|
+
var name2 = EXT_STRUCTURAL_METADATA_NAME;
|
|
52589
|
+
async function decode2(gltfData, options) {
|
|
52488
52590
|
const scenegraph = new GLTFScenegraph(gltfData);
|
|
52489
52591
|
decodeExtStructuralMetadata(scenegraph, options);
|
|
52490
52592
|
}
|
|
52593
|
+
function getPropertyTableFromExtStructuralMetadata(extension, metadataClass) {
|
|
52594
|
+
if (extension.propertyTables) {
|
|
52595
|
+
const firstPropertyTable = extension?.propertyTables[0];
|
|
52596
|
+
const propertyTableWithData = {};
|
|
52597
|
+
for (const propertyName in firstPropertyTable.properties) {
|
|
52598
|
+
propertyTableWithData[propertyName] = firstPropertyTable.properties[propertyName].data;
|
|
52599
|
+
}
|
|
52600
|
+
return propertyTableWithData;
|
|
52601
|
+
}
|
|
52602
|
+
if (extension.propertyTextures) {
|
|
52603
|
+
const firstPropertyTexture = extension?.propertyTextures[0];
|
|
52604
|
+
const propertyTableWithData = {};
|
|
52605
|
+
for (const propertyName in firstPropertyTexture.properties) {
|
|
52606
|
+
propertyTableWithData[propertyName] = firstPropertyTexture.properties[propertyName].data;
|
|
52607
|
+
}
|
|
52608
|
+
return propertyTableWithData;
|
|
52609
|
+
}
|
|
52610
|
+
console.warn("Cannot get property table from EXT_structural_metadata extension. There is neither propertyTables, nor propertyTextures in the extension.");
|
|
52611
|
+
return null;
|
|
52612
|
+
}
|
|
52491
52613
|
function getPropertyTablePopulated(scenegraph, propertyTableIndex) {
|
|
52492
52614
|
const extension = scenegraph.getExtension(EXT_STRUCTURAL_METADATA_NAME);
|
|
52493
52615
|
const propertyTable = extension?.propertyTables?.[propertyTableIndex];
|
|
@@ -52498,33 +52620,47 @@ function getPropertyTablePopulated(scenegraph, propertyTableIndex) {
|
|
|
52498
52620
|
throw new Error(`Incorrect data in the EXT_structural_metadata extension: no property table with index ${propertyTableIndex}`);
|
|
52499
52621
|
}
|
|
52500
52622
|
function decodeExtStructuralMetadata(scenegraph, options) {
|
|
52623
|
+
if (!options.gltf?.loadBuffers) {
|
|
52624
|
+
return;
|
|
52625
|
+
}
|
|
52501
52626
|
const extension = scenegraph.getExtension(EXT_STRUCTURAL_METADATA_NAME);
|
|
52502
|
-
if (!extension
|
|
52627
|
+
if (!extension) {
|
|
52503
52628
|
return;
|
|
52504
52629
|
}
|
|
52630
|
+
if (options.gltf?.loadImages) {
|
|
52631
|
+
decodePropertyTextures(scenegraph, extension);
|
|
52632
|
+
}
|
|
52633
|
+
decodePropertyTables(scenegraph, extension);
|
|
52634
|
+
}
|
|
52635
|
+
function decodePropertyTextures(scenegraph, extension) {
|
|
52505
52636
|
const propertyTextures = extension.propertyTextures;
|
|
52506
52637
|
const json = scenegraph.gltf.json;
|
|
52507
|
-
if (propertyTextures && json.meshes
|
|
52638
|
+
if (propertyTextures && json.meshes) {
|
|
52508
52639
|
for (const mesh of json.meshes) {
|
|
52509
52640
|
for (const primitive of mesh.primitives) {
|
|
52510
52641
|
processPrimitivePropertyTextures(scenegraph, propertyTextures, primitive, extension);
|
|
52511
52642
|
}
|
|
52512
52643
|
}
|
|
52513
52644
|
}
|
|
52514
|
-
|
|
52645
|
+
}
|
|
52646
|
+
function decodePropertyTables(scenegraph, extension) {
|
|
52647
|
+
const schema = extension.schema;
|
|
52648
|
+
if (!schema) {
|
|
52649
|
+
return;
|
|
52650
|
+
}
|
|
52651
|
+
const schemaClasses = schema.classes;
|
|
52515
52652
|
const propertyTables = extension.propertyTables;
|
|
52516
52653
|
if (schemaClasses && propertyTables) {
|
|
52517
52654
|
for (const schemaName in schemaClasses) {
|
|
52518
52655
|
const propertyTable = findPropertyTableByClass(propertyTables, schemaName);
|
|
52519
52656
|
if (propertyTable) {
|
|
52520
|
-
processPropertyTable(scenegraph,
|
|
52657
|
+
processPropertyTable(scenegraph, schema, propertyTable);
|
|
52521
52658
|
}
|
|
52522
52659
|
}
|
|
52523
52660
|
}
|
|
52524
52661
|
}
|
|
52525
52662
|
function findPropertyTableByClass(propertyTables, schemaClassName) {
|
|
52526
|
-
for (
|
|
52527
|
-
const propertyTable = propertyTables[i];
|
|
52663
|
+
for (const propertyTable of propertyTables) {
|
|
52528
52664
|
if (propertyTable.class === schemaClassName) {
|
|
52529
52665
|
return propertyTable;
|
|
52530
52666
|
}
|
|
@@ -52553,9 +52689,9 @@ function processPrimitivePropertyTexture(scenegraph, propertyTexture, primitive,
|
|
|
52553
52689
|
extension.dataAttributeNames = [];
|
|
52554
52690
|
}
|
|
52555
52691
|
const className = propertyTexture.class;
|
|
52556
|
-
for (const
|
|
52557
|
-
const attributeName = `${className}_${
|
|
52558
|
-
const textureInfoTopLevel = propertyTexture.properties?.[
|
|
52692
|
+
for (const propertyName in propertyTexture.properties) {
|
|
52693
|
+
const attributeName = `${className}_${propertyName}`;
|
|
52694
|
+
const textureInfoTopLevel = propertyTexture.properties?.[propertyName];
|
|
52559
52695
|
if (!textureInfoTopLevel) {
|
|
52560
52696
|
continue;
|
|
52561
52697
|
}
|
|
@@ -52621,14 +52757,14 @@ function getPropertyDataFromBinarySource(scenegraph, schema, classProperty, numb
|
|
|
52621
52757
|
return data;
|
|
52622
52758
|
}
|
|
52623
52759
|
function getArrayOffsetsForProperty(scenegraph, classProperty, propertyTableProperty, numberOfElements) {
|
|
52624
|
-
if (classProperty.array && typeof classProperty.count === "undefined" && typeof propertyTableProperty.arrayOffsets !== "undefined"
|
|
52625
|
-
return getOffsetsForProperty(scenegraph, propertyTableProperty.arrayOffsets, propertyTableProperty.arrayOffsetType, numberOfElements);
|
|
52760
|
+
if (classProperty.array && typeof classProperty.count === "undefined" && typeof propertyTableProperty.arrayOffsets !== "undefined") {
|
|
52761
|
+
return getOffsetsForProperty(scenegraph, propertyTableProperty.arrayOffsets, propertyTableProperty.arrayOffsetType || "UINT32", numberOfElements);
|
|
52626
52762
|
}
|
|
52627
52763
|
return null;
|
|
52628
52764
|
}
|
|
52629
52765
|
function getStringOffsetsForProperty(scenegraph, propertyTableProperty, numberOfElements) {
|
|
52630
|
-
if (typeof propertyTableProperty.stringOffsets !== "undefined"
|
|
52631
|
-
return getOffsetsForProperty(scenegraph, propertyTableProperty.stringOffsets, propertyTableProperty.stringOffsetType, numberOfElements);
|
|
52766
|
+
if (typeof propertyTableProperty.stringOffsets !== "undefined") {
|
|
52767
|
+
return getOffsetsForProperty(scenegraph, propertyTableProperty.stringOffsets, propertyTableProperty.stringOffsetType || "UINT32", numberOfElements);
|
|
52632
52768
|
}
|
|
52633
52769
|
return null;
|
|
52634
52770
|
}
|
|
@@ -52793,63 +52929,11 @@ function getEnumByValue(enumEntry, value) {
|
|
|
52793
52929
|
return null;
|
|
52794
52930
|
}
|
|
52795
52931
|
|
|
52796
|
-
// ../gltf/src/lib/extensions/EXT_mesh_features.ts
|
|
52797
|
-
var EXT_MESH_FEATURES_NAME = "EXT_mesh_features";
|
|
52798
|
-
var name2 = EXT_MESH_FEATURES_NAME;
|
|
52799
|
-
async function decode2(gltfData, options) {
|
|
52800
|
-
const scenegraph = new GLTFScenegraph(gltfData);
|
|
52801
|
-
decodeExtMeshFeatures(scenegraph, options);
|
|
52802
|
-
}
|
|
52803
|
-
function decodeExtMeshFeatures(scenegraph, options) {
|
|
52804
|
-
const json = scenegraph.gltf.json;
|
|
52805
|
-
if (!json.meshes) {
|
|
52806
|
-
return;
|
|
52807
|
-
}
|
|
52808
|
-
for (const mesh of json.meshes) {
|
|
52809
|
-
for (const primitive of mesh.primitives) {
|
|
52810
|
-
processMeshPrimitiveFeatures(scenegraph, primitive, options);
|
|
52811
|
-
}
|
|
52812
|
-
}
|
|
52813
|
-
}
|
|
52814
|
-
function processMeshPrimitiveFeatures(scenegraph, primitive, options) {
|
|
52815
|
-
const extension = primitive.extensions?.[EXT_MESH_FEATURES_NAME];
|
|
52816
|
-
const featureIds = extension?.featureIds;
|
|
52817
|
-
if (!featureIds)
|
|
52818
|
-
return;
|
|
52819
|
-
if (!extension.dataAttributeNames) {
|
|
52820
|
-
extension.dataAttributeNames = [];
|
|
52821
|
-
}
|
|
52822
|
-
let featureIdCount = 0;
|
|
52823
|
-
for (const featureId of featureIds) {
|
|
52824
|
-
let propertyTable = null;
|
|
52825
|
-
if (typeof featureId.propertyTable === "number") {
|
|
52826
|
-
propertyTable = getPropertyTablePopulated(scenegraph, featureId.propertyTable);
|
|
52827
|
-
}
|
|
52828
|
-
let propertyData = null;
|
|
52829
|
-
if (typeof featureId.attribute !== "undefined") {
|
|
52830
|
-
const accessorKey = `_FEATURE_ID_${featureId.attribute}`;
|
|
52831
|
-
const accessorIndex = primitive.attributes[accessorKey];
|
|
52832
|
-
const propertyDataTypedArray = scenegraph.getTypedArrayForAccessor(accessorIndex);
|
|
52833
|
-
propertyData = Array.prototype.slice.call(propertyDataTypedArray);
|
|
52834
|
-
} else if (typeof featureId.texture !== "undefined" && options?.gltf?.loadImages) {
|
|
52835
|
-
propertyData = getPrimitiveTextureData(scenegraph, featureId.texture, primitive);
|
|
52836
|
-
} else {
|
|
52837
|
-
}
|
|
52838
|
-
const attributeName = featureId.label || propertyTable?.name || `featureAttribute${featureIdCount}`;
|
|
52839
|
-
const featureTable = [];
|
|
52840
|
-
if (propertyData) {
|
|
52841
|
-
primitivePropertyDataToAttributes(scenegraph, attributeName, propertyData, featureTable, primitive);
|
|
52842
|
-
}
|
|
52843
|
-
extension.dataAttributeNames.push(attributeName);
|
|
52844
|
-
featureId.data = featureTable;
|
|
52845
|
-
featureIdCount++;
|
|
52846
|
-
}
|
|
52847
|
-
}
|
|
52848
|
-
|
|
52849
52932
|
// ../gltf/src/lib/extensions/deprecated/EXT_feature_metadata.ts
|
|
52850
52933
|
var EXT_feature_metadata_exports = {};
|
|
52851
52934
|
__export(EXT_feature_metadata_exports, {
|
|
52852
52935
|
decode: () => decode3,
|
|
52936
|
+
getPropertyTableFromExtFeatureMetadata: () => getPropertyTableFromExtFeatureMetadata,
|
|
52853
52937
|
name: () => name3
|
|
52854
52938
|
});
|
|
52855
52939
|
var EXT_FEATURE_METADATA_NAME = "EXT_feature_metadata";
|
|
@@ -52858,6 +52942,38 @@ async function decode3(gltfData, options) {
|
|
|
52858
52942
|
const scenegraph = new GLTFScenegraph(gltfData);
|
|
52859
52943
|
decodeExtFeatureMetadata(scenegraph, options);
|
|
52860
52944
|
}
|
|
52945
|
+
function getPropertyTableFromExtFeatureMetadata(extension, metadataClass) {
|
|
52946
|
+
if (extension.featureTables) {
|
|
52947
|
+
const firstFeatureTableName = Object.keys(extension.featureTables)?.[0];
|
|
52948
|
+
if (firstFeatureTableName) {
|
|
52949
|
+
const featureTable = extension.featureTables[firstFeatureTableName];
|
|
52950
|
+
const propertyTable = {};
|
|
52951
|
+
for (const propertyName in featureTable.properties) {
|
|
52952
|
+
propertyTable[propertyName] = featureTable.properties[propertyName].data;
|
|
52953
|
+
}
|
|
52954
|
+
return propertyTable;
|
|
52955
|
+
}
|
|
52956
|
+
}
|
|
52957
|
+
if (extension.featureTextures) {
|
|
52958
|
+
let featureTexture;
|
|
52959
|
+
for (const textureKey in extension.featureTextures) {
|
|
52960
|
+
const texture = extension.featureTextures[textureKey];
|
|
52961
|
+
if (texture.class === metadataClass) {
|
|
52962
|
+
featureTexture = textureKey;
|
|
52963
|
+
}
|
|
52964
|
+
}
|
|
52965
|
+
if (typeof featureTexture === "string") {
|
|
52966
|
+
const featureTable = extension.featureTextures[featureTexture];
|
|
52967
|
+
const propertyTable = {};
|
|
52968
|
+
for (const propertyName in featureTable.properties) {
|
|
52969
|
+
propertyTable[propertyName] = featureTable.properties[propertyName].data;
|
|
52970
|
+
}
|
|
52971
|
+
return propertyTable;
|
|
52972
|
+
}
|
|
52973
|
+
}
|
|
52974
|
+
console.warn("Cannot get property table from EXT_feature_metadata extension. There is neither featureTables, nor featureTextures in the extension.");
|
|
52975
|
+
return null;
|
|
52976
|
+
}
|
|
52861
52977
|
function decodeExtFeatureMetadata(scenegraph, options) {
|
|
52862
52978
|
const extension = scenegraph.getExtension(EXT_FEATURE_METADATA_NAME);
|
|
52863
52979
|
if (!extension)
|
|
@@ -52963,9 +53079,10 @@ function processPrimitiveTextures(scenegraph, attributeName, featureTexturePrope
|
|
|
52963
53079
|
const textureData = [];
|
|
52964
53080
|
const texCoordAccessorKey = `TEXCOORD_${featureTextureProperty.texture.texCoord}`;
|
|
52965
53081
|
const texCoordAccessorIndex = primitive.attributes[texCoordAccessorKey];
|
|
52966
|
-
const
|
|
52967
|
-
|
|
52968
|
-
|
|
53082
|
+
const textureCoordinates = getFloat32ArrayForAccessor(scenegraph.gltf, texCoordAccessorIndex);
|
|
53083
|
+
if (!textureCoordinates) {
|
|
53084
|
+
return;
|
|
53085
|
+
}
|
|
52969
53086
|
const textureIndex = featureTextureProperty.texture.index;
|
|
52970
53087
|
const texture = json.textures?.[textureIndex];
|
|
52971
53088
|
const imageIndex = texture?.source;
|
|
@@ -53071,10 +53188,10 @@ function getStringAttributes(data, offsetsData, stringsCount) {
|
|
|
53071
53188
|
}
|
|
53072
53189
|
|
|
53073
53190
|
// ../gltf/src/lib/utils/version.ts
|
|
53074
|
-
var
|
|
53191
|
+
var VERSION7 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
53075
53192
|
|
|
53076
53193
|
// ../textures/src/lib/utils/version.ts
|
|
53077
|
-
var
|
|
53194
|
+
var VERSION8 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "beta";
|
|
53078
53195
|
|
|
53079
53196
|
// ../textures/src/lib/parsers/basis-module-loader.ts
|
|
53080
53197
|
var BASIS_EXTERNAL_LIBRARIES = {
|
|
@@ -53579,7 +53696,7 @@ var BasisWorkerLoader = {
|
|
|
53579
53696
|
name: "Basis",
|
|
53580
53697
|
id: "basis",
|
|
53581
53698
|
module: "textures",
|
|
53582
|
-
version:
|
|
53699
|
+
version: VERSION8,
|
|
53583
53700
|
worker: true,
|
|
53584
53701
|
extensions: ["basis", "ktx2"],
|
|
53585
53702
|
mimeTypes: ["application/octet-stream", "image/ktx2"],
|
|
@@ -53886,7 +54003,7 @@ var CompressedTextureWorkerLoader = {
|
|
|
53886
54003
|
name: "Texture Containers",
|
|
53887
54004
|
id: "compressed-texture",
|
|
53888
54005
|
module: "textures",
|
|
53889
|
-
version:
|
|
54006
|
+
version: VERSION8,
|
|
53890
54007
|
worker: true,
|
|
53891
54008
|
extensions: [
|
|
53892
54009
|
"ktx",
|
|
@@ -53934,7 +54051,7 @@ var KTX2BasisWriterWorker = {
|
|
|
53934
54051
|
name: "Basis Universal Supercompressed GPU Texture",
|
|
53935
54052
|
id: "ktx2-basis-writer",
|
|
53936
54053
|
module: "textures",
|
|
53937
|
-
version:
|
|
54054
|
+
version: VERSION8,
|
|
53938
54055
|
extensions: ["ktx2"],
|
|
53939
54056
|
worker: true,
|
|
53940
54057
|
options: {
|
|
@@ -54518,27 +54635,6 @@ __export(KHR_texture_transform_exports, {
|
|
|
54518
54635
|
name: () => name8
|
|
54519
54636
|
});
|
|
54520
54637
|
var import_core6 = __toModule(require_es5());
|
|
54521
|
-
|
|
54522
|
-
// ../gltf/src/lib/gltf-utils/gltf-constants.ts
|
|
54523
|
-
var COMPONENTS = {
|
|
54524
|
-
SCALAR: 1,
|
|
54525
|
-
VEC2: 2,
|
|
54526
|
-
VEC3: 3,
|
|
54527
|
-
VEC4: 4,
|
|
54528
|
-
MAT2: 4,
|
|
54529
|
-
MAT3: 9,
|
|
54530
|
-
MAT4: 16
|
|
54531
|
-
};
|
|
54532
|
-
var BYTES = {
|
|
54533
|
-
5120: 1,
|
|
54534
|
-
5121: 1,
|
|
54535
|
-
5122: 2,
|
|
54536
|
-
5123: 2,
|
|
54537
|
-
5125: 4,
|
|
54538
|
-
5126: 4
|
|
54539
|
-
};
|
|
54540
|
-
|
|
54541
|
-
// ../gltf/src/lib/extensions/KHR_texture_transform.ts
|
|
54542
54638
|
var EXT_MESHOPT_TRANSFORM = "KHR_texture_transform";
|
|
54543
54639
|
var name8 = EXT_MESHOPT_TRANSFORM;
|
|
54544
54640
|
var scratchVector = new import_core6.Vector3();
|
|
@@ -54829,8 +54925,8 @@ function resolveValues(technique, gltfScenegraph) {
|
|
|
54829
54925
|
|
|
54830
54926
|
// ../gltf/src/lib/api/gltf-extensions.ts
|
|
54831
54927
|
var EXTENSIONS2 = [
|
|
54832
|
-
EXT_mesh_features_exports,
|
|
54833
54928
|
EXT_structural_metadata_exports,
|
|
54929
|
+
EXT_mesh_features_exports,
|
|
54834
54930
|
EXT_meshopt_compression_exports,
|
|
54835
54931
|
EXT_texture_webp_exports,
|
|
54836
54932
|
KHR_texture_basisu_exports,
|
|
@@ -55200,7 +55296,7 @@ var GLTFLoader = {
|
|
|
55200
55296
|
name: "glTF",
|
|
55201
55297
|
id: "gltf",
|
|
55202
55298
|
module: "gltf",
|
|
55203
|
-
version:
|
|
55299
|
+
version: VERSION7,
|
|
55204
55300
|
extensions: ["gltf", "glb"],
|
|
55205
55301
|
mimeTypes: ["model/gltf+json", "model/gltf-binary"],
|
|
55206
55302
|
text: true,
|
|
@@ -55298,7 +55394,7 @@ var GLTFWriter = {
|
|
|
55298
55394
|
name: "glTF",
|
|
55299
55395
|
id: "gltf",
|
|
55300
55396
|
module: "gltf",
|
|
55301
|
-
version:
|
|
55397
|
+
version: VERSION7,
|
|
55302
55398
|
extensions: ["glb"],
|
|
55303
55399
|
mimeTypes: ["model/gltf-binary"],
|
|
55304
55400
|
binary: true,
|
|
@@ -56018,7 +56114,7 @@ var Tile3DSubtreeLoader = {
|
|
|
56018
56114
|
id: "3d-tiles-subtree",
|
|
56019
56115
|
name: "3D Tiles Subtree",
|
|
56020
56116
|
module: "3d-tiles",
|
|
56021
|
-
version:
|
|
56117
|
+
version: VERSION4,
|
|
56022
56118
|
extensions: ["subtree"],
|
|
56023
56119
|
mimeTypes: ["application/octet-stream"],
|
|
56024
56120
|
tests: ["subtree"],
|
|
@@ -56057,7 +56153,7 @@ var console_2 = globalThis.console;
|
|
|
56057
56153
|
var navigator_2 = globalThis.navigator || {};
|
|
56058
56154
|
|
|
56059
56155
|
// ../3d-tiles/node_modules/@probe.gl/env/dist/utils/globals.js
|
|
56060
|
-
var
|
|
56156
|
+
var VERSION9 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "untranspiled source";
|
|
56061
56157
|
var isBrowser6 = isBrowser5();
|
|
56062
56158
|
|
|
56063
56159
|
// ../3d-tiles/node_modules/@probe.gl/log/dist/utils/local-storage.js
|
|
@@ -56242,7 +56338,7 @@ var Log2 = class {
|
|
|
56242
56338
|
id: ""
|
|
56243
56339
|
};
|
|
56244
56340
|
this.id = void 0;
|
|
56245
|
-
this.VERSION =
|
|
56341
|
+
this.VERSION = VERSION9;
|
|
56246
56342
|
this._startTs = getHiResTimestamp2();
|
|
56247
56343
|
this._deltaTs = getHiResTimestamp2();
|
|
56248
56344
|
this._storage = void 0;
|
|
@@ -56445,7 +56541,7 @@ var Log2 = class {
|
|
|
56445
56541
|
return noop2;
|
|
56446
56542
|
}
|
|
56447
56543
|
};
|
|
56448
|
-
Log2.VERSION =
|
|
56544
|
+
Log2.VERSION = VERSION9;
|
|
56449
56545
|
function normalizeLogLevel2(logLevel) {
|
|
56450
56546
|
if (!logLevel) {
|
|
56451
56547
|
return 0;
|
|
@@ -58114,7 +58210,7 @@ var Tiles3DLoader = {
|
|
|
58114
58210
|
id: "3d-tiles",
|
|
58115
58211
|
name: "3D Tiles",
|
|
58116
58212
|
module: "3d-tiles",
|
|
58117
|
-
version:
|
|
58213
|
+
version: VERSION4,
|
|
58118
58214
|
extensions: ["cmpt", "pnts", "b3dm", "i3dm"],
|
|
58119
58215
|
mimeTypes: ["application/octet-stream"],
|
|
58120
58216
|
tests: ["cmpt", "pnts", "b3dm", "i3dm"],
|
|
@@ -58940,7 +59036,7 @@ var Tile3DWriter = {
|
|
|
58940
59036
|
name: "3D Tile",
|
|
58941
59037
|
id: "3d-tiles",
|
|
58942
59038
|
module: "3d-tiles",
|
|
58943
|
-
version:
|
|
59039
|
+
version: VERSION4,
|
|
58944
59040
|
extensions: ["cmpt", "pnts", "b3dm", "i3dm"],
|
|
58945
59041
|
mimeTypes: ["application/octet-stream"],
|
|
58946
59042
|
encodeSync: encodeSync3,
|
|
@@ -59001,21 +59097,21 @@ var METADATA = () => ({
|
|
|
59001
59097
|
});
|
|
59002
59098
|
|
|
59003
59099
|
// src/lib/utils/file-utils.ts
|
|
59004
|
-
var
|
|
59100
|
+
var import_fs3 = __toModule(require("fs"));
|
|
59005
59101
|
var import_path3 = __toModule(require("path"));
|
|
59006
59102
|
|
|
59007
59103
|
// src/lib/utils/compress-util.ts
|
|
59008
59104
|
var import_zlib2 = __toModule(require("zlib"));
|
|
59009
59105
|
var import_path2 = __toModule(require("path"));
|
|
59010
|
-
var
|
|
59106
|
+
var import_fs2 = __toModule(require("fs"));
|
|
59011
59107
|
var import_archiver = __toModule(require_archiver());
|
|
59012
59108
|
var import_jszip = __toModule(require_lib3());
|
|
59013
59109
|
var import_crypt = __toModule(require_crypt());
|
|
59014
59110
|
function compressFileWithGzip(pathFile) {
|
|
59015
59111
|
const compressedPathFile = `${pathFile}.gz`;
|
|
59016
59112
|
const gzip = (0, import_zlib2.createGzip)();
|
|
59017
|
-
const input = (0,
|
|
59018
|
-
const output = (0,
|
|
59113
|
+
const input = (0, import_fs2.createReadStream)(pathFile);
|
|
59114
|
+
const output = (0, import_fs2.createWriteStream)(compressedPathFile);
|
|
59019
59115
|
return new Promise((resolve2, reject) => {
|
|
59020
59116
|
input.on("end", () => {
|
|
59021
59117
|
console.log(`${compressedPathFile} compressed and saved.`);
|
|
@@ -59075,10 +59171,10 @@ async function writeFile3(path2, data, fileName = "index.json") {
|
|
|
59075
59171
|
} else {
|
|
59076
59172
|
toWriteData = data;
|
|
59077
59173
|
}
|
|
59078
|
-
await
|
|
59174
|
+
await import_fs3.promises.mkdir(path2, { recursive: true });
|
|
59079
59175
|
const pathFile = (0, import_path3.join)(path2, fileName);
|
|
59080
59176
|
try {
|
|
59081
|
-
await
|
|
59177
|
+
await import_fs3.promises.writeFile(pathFile, toWriteData);
|
|
59082
59178
|
} catch (err) {
|
|
59083
59179
|
throw err;
|
|
59084
59180
|
}
|
|
@@ -59124,17 +59220,17 @@ async function openJson(path2, fileName) {
|
|
|
59124
59220
|
}
|
|
59125
59221
|
async function isFileExists(fileName) {
|
|
59126
59222
|
try {
|
|
59127
|
-
await
|
|
59223
|
+
await import_fs3.promises.stat(fileName);
|
|
59128
59224
|
return true;
|
|
59129
59225
|
} catch {
|
|
59130
59226
|
return false;
|
|
59131
59227
|
}
|
|
59132
59228
|
}
|
|
59133
59229
|
function removeDir(path2) {
|
|
59134
|
-
return
|
|
59230
|
+
return import_fs3.promises.rm(path2, { recursive: true });
|
|
59135
59231
|
}
|
|
59136
59232
|
function removeFile(path2) {
|
|
59137
|
-
return
|
|
59233
|
+
return import_fs3.promises.unlink(path2);
|
|
59138
59234
|
}
|
|
59139
59235
|
function getAbsoluteFilePath(filePath) {
|
|
59140
59236
|
return (0, import_path3.isAbsolute)(filePath) ? filePath : (0, import_path3.join)(process.cwd(), filePath);
|
|
@@ -59321,7 +59417,7 @@ var NodePages = class {
|
|
|
59321
59417
|
|
|
59322
59418
|
// src/lib/utils/statistic-utills.ts
|
|
59323
59419
|
var import_path5 = __toModule(require("path"));
|
|
59324
|
-
var
|
|
59420
|
+
var import_fs4 = __toModule(require("fs"));
|
|
59325
59421
|
function timeConverter(time) {
|
|
59326
59422
|
const nanoSecondsInMillisecond = 1e6;
|
|
59327
59423
|
let timeInSeconds = time[0];
|
|
@@ -59352,7 +59448,7 @@ async function calculateFilesSize(params) {
|
|
|
59352
59448
|
try {
|
|
59353
59449
|
if (slpk) {
|
|
59354
59450
|
const slpkPath = (0, import_path5.join)(fullOutputPath, `${tilesetName}.slpk`);
|
|
59355
|
-
const stat3 = await
|
|
59451
|
+
const stat3 = await import_fs4.promises.stat(slpkPath);
|
|
59356
59452
|
return stat3.size;
|
|
59357
59453
|
}
|
|
59358
59454
|
const directoryPath = (0, import_path5.join)(fullOutputPath, tilesetName);
|
|
@@ -59365,9 +59461,9 @@ async function calculateFilesSize(params) {
|
|
|
59365
59461
|
}
|
|
59366
59462
|
async function getTotalFilesSize(dirPath) {
|
|
59367
59463
|
let totalFileSize = 0;
|
|
59368
|
-
const files = await
|
|
59464
|
+
const files = await import_fs4.promises.readdir(dirPath);
|
|
59369
59465
|
for (const file of files) {
|
|
59370
|
-
const fileStat = await
|
|
59466
|
+
const fileStat = await import_fs4.promises.stat((0, import_path5.join)(dirPath, file));
|
|
59371
59467
|
if (fileStat.isDirectory()) {
|
|
59372
59468
|
totalFileSize += await getTotalFilesSize((0, import_path5.join)(dirPath, file));
|
|
59373
59469
|
} else {
|
|
@@ -59765,29 +59861,19 @@ function handleBatchIdsExtensions(attributes, primitive, images, featureTexture)
|
|
|
59765
59861
|
switch (extensionName) {
|
|
59766
59862
|
case name3:
|
|
59767
59863
|
return handleExtFeatureMetadataExtension(attributes, extensionData, images, featureTexture);
|
|
59768
|
-
case name2:
|
|
59769
|
-
return handleExtMeshFeaturesExtension(attributes, extensionData);
|
|
59770
59864
|
case name:
|
|
59771
|
-
return
|
|
59865
|
+
return handleExtMeshFeaturesExtension(attributes, extensionData);
|
|
59772
59866
|
default:
|
|
59773
59867
|
return [];
|
|
59774
59868
|
}
|
|
59775
59869
|
}
|
|
59776
59870
|
return [];
|
|
59777
59871
|
}
|
|
59778
|
-
function handleExtStructuralMetadataExtension(attributes, extStructuralMetadata) {
|
|
59779
|
-
const dataAttributeNames = extStructuralMetadata?.dataAttributeNames;
|
|
59780
|
-
if (dataAttributeNames?.length) {
|
|
59781
|
-
const batchIdsAttribute = attributes[dataAttributeNames[0]];
|
|
59782
|
-
return batchIdsAttribute.value;
|
|
59783
|
-
}
|
|
59784
|
-
return [];
|
|
59785
|
-
}
|
|
59786
59872
|
function handleExtMeshFeaturesExtension(attributes, extMeshFeatures) {
|
|
59787
|
-
|
|
59788
|
-
|
|
59789
|
-
|
|
59790
|
-
|
|
59873
|
+
for (let ids of extMeshFeatures.featureIds) {
|
|
59874
|
+
if (typeof ids.propertyTable !== "undefined") {
|
|
59875
|
+
return ids.data;
|
|
59876
|
+
}
|
|
59791
59877
|
}
|
|
59792
59878
|
return [];
|
|
59793
59879
|
}
|
|
@@ -60753,17 +60839,13 @@ function getPropertyTable(tileContent, metadataClass) {
|
|
|
60753
60839
|
return null;
|
|
60754
60840
|
}
|
|
60755
60841
|
let propertyTable;
|
|
60756
|
-
const batchTableJson = tileContent
|
|
60842
|
+
const batchTableJson = tileContent.batchTableJson;
|
|
60757
60843
|
if (batchTableJson) {
|
|
60758
60844
|
return batchTableJson;
|
|
60759
60845
|
}
|
|
60760
60846
|
const { extensionName, extension } = getPropertyTableExtension(tileContent);
|
|
60761
60847
|
switch (extensionName) {
|
|
60762
60848
|
case name2: {
|
|
60763
|
-
propertyTable = getPropertyTableFromExtMeshFeatures(extension, metadataClass);
|
|
60764
|
-
return propertyTable;
|
|
60765
|
-
}
|
|
60766
|
-
case name: {
|
|
60767
60849
|
propertyTable = getPropertyTableFromExtStructuralMetadata(extension, metadataClass);
|
|
60768
60850
|
return propertyTable;
|
|
60769
60851
|
}
|
|
@@ -60776,11 +60858,7 @@ function getPropertyTable(tileContent, metadataClass) {
|
|
|
60776
60858
|
}
|
|
60777
60859
|
}
|
|
60778
60860
|
function getPropertyTableExtension(tileContent) {
|
|
60779
|
-
const extensionsWithPropertyTables = [
|
|
60780
|
-
name3,
|
|
60781
|
-
name,
|
|
60782
|
-
name2
|
|
60783
|
-
];
|
|
60861
|
+
const extensionsWithPropertyTables = [name3, name2];
|
|
60784
60862
|
const extensionsUsed = tileContent?.gltf?.extensionsUsed;
|
|
60785
60863
|
if (!extensionsUsed) {
|
|
60786
60864
|
return { extensionName: null, extension: null };
|
|
@@ -60798,72 +60876,6 @@ function getPropertyTableExtension(tileContent) {
|
|
|
60798
60876
|
const extension = tileContent?.gltf?.extensions?.[extensionName];
|
|
60799
60877
|
return { extensionName, extension };
|
|
60800
60878
|
}
|
|
60801
|
-
function getPropertyTableFromExtFeatureMetadata(extension, metadataClass) {
|
|
60802
|
-
if (extension?.featureTables) {
|
|
60803
|
-
const firstFeatureTableName = Object.keys(extension.featureTables)?.[0];
|
|
60804
|
-
if (firstFeatureTableName) {
|
|
60805
|
-
const featureTable = extension?.featureTables[firstFeatureTableName];
|
|
60806
|
-
const propertyTable = {};
|
|
60807
|
-
for (const propertyName in featureTable.properties) {
|
|
60808
|
-
propertyTable[propertyName] = featureTable.properties[propertyName].data;
|
|
60809
|
-
}
|
|
60810
|
-
return propertyTable;
|
|
60811
|
-
}
|
|
60812
|
-
}
|
|
60813
|
-
if (extension?.featureTextures) {
|
|
60814
|
-
let featureTexture;
|
|
60815
|
-
for (const textureKey in extension.featureTextures) {
|
|
60816
|
-
const texture = extension.featureTextures[textureKey];
|
|
60817
|
-
if (texture.class === metadataClass) {
|
|
60818
|
-
featureTexture = textureKey;
|
|
60819
|
-
}
|
|
60820
|
-
}
|
|
60821
|
-
if (typeof featureTexture === "string") {
|
|
60822
|
-
const featureTable = extension?.featureTextures[featureTexture];
|
|
60823
|
-
const propertyTable = {};
|
|
60824
|
-
for (const propertyName in featureTable.properties) {
|
|
60825
|
-
propertyTable[propertyName] = featureTable.properties[propertyName].data;
|
|
60826
|
-
}
|
|
60827
|
-
return propertyTable;
|
|
60828
|
-
}
|
|
60829
|
-
}
|
|
60830
|
-
console.warn("The I3S converter couldn't handle EXT_feature_metadata extension: There is neither featureTables, no featureTextures in the extension.");
|
|
60831
|
-
return null;
|
|
60832
|
-
}
|
|
60833
|
-
function getPropertyTableFromExtStructuralMetadata(extension, metadataClass) {
|
|
60834
|
-
if (extension?.propertyTables) {
|
|
60835
|
-
const firstPropertyTable = extension?.propertyTables[0];
|
|
60836
|
-
const propertyTableWithData = {};
|
|
60837
|
-
for (const propertyName in firstPropertyTable.properties) {
|
|
60838
|
-
propertyTableWithData[propertyName] = firstPropertyTable.properties[propertyName].data;
|
|
60839
|
-
}
|
|
60840
|
-
return propertyTableWithData;
|
|
60841
|
-
}
|
|
60842
|
-
if (extension?.propertyTextures) {
|
|
60843
|
-
if (extension?.propertyTextures) {
|
|
60844
|
-
const firstPropertyTexture = extension?.propertyTextures[0];
|
|
60845
|
-
const propertyTableWithData = {};
|
|
60846
|
-
for (const propertyName in firstPropertyTexture.properties) {
|
|
60847
|
-
propertyTableWithData[propertyName] = firstPropertyTexture.properties[propertyName].data;
|
|
60848
|
-
}
|
|
60849
|
-
return propertyTableWithData;
|
|
60850
|
-
}
|
|
60851
|
-
}
|
|
60852
|
-
console.warn("The I3S converter couldn't handle EXT_structural_metadata extension: There is neither propertyTables, no propertyTextures in the extension.");
|
|
60853
|
-
return null;
|
|
60854
|
-
}
|
|
60855
|
-
function getPropertyTableFromExtMeshFeatures(extension, metadataClass) {
|
|
60856
|
-
if (extension?.featureIds) {
|
|
60857
|
-
const firstFeatureId = extension?.featureIds[0];
|
|
60858
|
-
const propertyTableWithData = {};
|
|
60859
|
-
if (!firstFeatureId.propertyTable) {
|
|
60860
|
-
console.warn("Should be implemented as we have the tileset with Ext_mesh_features not linked with EXT_structural_metadata extension");
|
|
60861
|
-
}
|
|
60862
|
-
return propertyTableWithData;
|
|
60863
|
-
}
|
|
60864
|
-
console.warn("The I3S converter couldn't handle EXT_mesh_features extension: There is no featureIds in the extension.");
|
|
60865
|
-
return null;
|
|
60866
|
-
}
|
|
60867
60879
|
|
|
60868
60880
|
// src/i3s-converter/helpers/create-scene-server-path.ts
|
|
60869
60881
|
var import_json_map_transform2 = __toModule(require_json_map_transform());
|
|
@@ -60950,12 +60962,12 @@ function convertScreenThresholdToGeometricError(node2) {
|
|
|
60950
60962
|
|
|
60951
60963
|
// src/pgm-loader.ts
|
|
60952
60964
|
var import_geoid = __toModule(require_es54());
|
|
60953
|
-
var
|
|
60965
|
+
var VERSION10 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
60954
60966
|
var PGMLoader = {
|
|
60955
60967
|
name: "PGM - Netpbm grayscale image format",
|
|
60956
60968
|
id: "pgm",
|
|
60957
60969
|
module: "tile-converter",
|
|
60958
|
-
version:
|
|
60970
|
+
version: VERSION10,
|
|
60959
60971
|
mimeTypes: ["image/x-portable-graymap"],
|
|
60960
60972
|
parse: async (arrayBuffer, options) => (0, import_geoid.parsePGM)(new Uint8Array(arrayBuffer), options?.pgm || {}),
|
|
60961
60973
|
extensions: ["pgm"],
|
|
@@ -62021,14 +62033,14 @@ var analyzeTileContent = async (tileContent) => {
|
|
|
62021
62033
|
if (!gltf) {
|
|
62022
62034
|
return defaultResult;
|
|
62023
62035
|
}
|
|
62024
|
-
const meshTopologyTypes =
|
|
62025
|
-
const metadataClasses =
|
|
62036
|
+
const meshTopologyTypes = getMeshTypesFromGLTF(gltf);
|
|
62037
|
+
const metadataClasses = getMetadataClassesFromGLTF(gltf);
|
|
62026
62038
|
return {
|
|
62027
62039
|
meshTopologyTypes,
|
|
62028
62040
|
metadataClasses
|
|
62029
62041
|
};
|
|
62030
62042
|
};
|
|
62031
|
-
var
|
|
62043
|
+
var getMeshTypesFromGLTF = (gltfJson) => {
|
|
62032
62044
|
const result = new Set();
|
|
62033
62045
|
for (const mesh of gltfJson.meshes || []) {
|
|
62034
62046
|
for (const primitive of mesh.primitives) {
|
|
@@ -62041,11 +62053,17 @@ var getMeshTypesFromGltf = (gltfJson) => {
|
|
|
62041
62053
|
}
|
|
62042
62054
|
return result;
|
|
62043
62055
|
};
|
|
62044
|
-
var
|
|
62056
|
+
var getMetadataClassesFromGLTF = (gltfJson) => {
|
|
62045
62057
|
const result = new Set();
|
|
62046
|
-
const
|
|
62047
|
-
if (
|
|
62048
|
-
for (const classKey of Object.keys(
|
|
62058
|
+
const extFeatureMetadataClasses = gltfJson.extensions?.[name3]?.schema?.classes;
|
|
62059
|
+
if (extFeatureMetadataClasses) {
|
|
62060
|
+
for (const classKey of Object.keys(extFeatureMetadataClasses)) {
|
|
62061
|
+
result.add(classKey);
|
|
62062
|
+
}
|
|
62063
|
+
}
|
|
62064
|
+
const extStructuralMetadataClasses = gltfJson.extensions?.[name2]?.schema?.classes;
|
|
62065
|
+
if (extStructuralMetadataClasses) {
|
|
62066
|
+
for (const classKey of Object.keys(extStructuralMetadataClasses)) {
|
|
62049
62067
|
result.add(classKey);
|
|
62050
62068
|
}
|
|
62051
62069
|
}
|
|
@@ -62900,12 +62918,12 @@ function parseStringsAttribute(arrayBuffer) {
|
|
|
62900
62918
|
}
|
|
62901
62919
|
|
|
62902
62920
|
// ../i3s/src/i3s-attribute-loader.ts
|
|
62903
|
-
var
|
|
62921
|
+
var VERSION11 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
62904
62922
|
var I3SAttributeLoader = {
|
|
62905
62923
|
name: "I3S Attribute",
|
|
62906
62924
|
id: "i3s-attribute",
|
|
62907
62925
|
module: "i3s",
|
|
62908
|
-
version:
|
|
62926
|
+
version: VERSION11,
|
|
62909
62927
|
mimeTypes: ["application/binary"],
|
|
62910
62928
|
parse: async (arrayBuffer, options) => parseI3STileAttribute(arrayBuffer, options),
|
|
62911
62929
|
extensions: ["bin"],
|
|
@@ -63365,13 +63383,13 @@ function getFeatureIdsFromFeatureIndexMetadata(featureIndex) {
|
|
|
63365
63383
|
}
|
|
63366
63384
|
|
|
63367
63385
|
// ../i3s/src/i3s-content-loader.ts
|
|
63368
|
-
var
|
|
63386
|
+
var VERSION12 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "beta";
|
|
63369
63387
|
var I3SContentLoader = {
|
|
63370
63388
|
name: "I3S Content (Indexed Scene Layers)",
|
|
63371
63389
|
id: "i3s-content",
|
|
63372
63390
|
module: "i3s",
|
|
63373
63391
|
worker: true,
|
|
63374
|
-
version:
|
|
63392
|
+
version: VERSION12,
|
|
63375
63393
|
mimeTypes: ["application/octet-stream"],
|
|
63376
63394
|
parse: parse6,
|
|
63377
63395
|
extensions: ["bin"],
|
|
@@ -63394,12 +63412,12 @@ var import_culling5 = __toModule(require_es53());
|
|
|
63394
63412
|
var import_geospatial9 = __toModule(require_es52());
|
|
63395
63413
|
|
|
63396
63414
|
// ../i3s/src/i3s-node-page-loader.ts
|
|
63397
|
-
var
|
|
63415
|
+
var VERSION13 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
63398
63416
|
var I3SNodePageLoader = {
|
|
63399
63417
|
name: "I3S Node Page",
|
|
63400
63418
|
id: "i3s-node-page",
|
|
63401
63419
|
module: "i3s",
|
|
63402
|
-
version:
|
|
63420
|
+
version: VERSION13,
|
|
63403
63421
|
mimeTypes: ["application/json"],
|
|
63404
63422
|
parse: parseNodePage,
|
|
63405
63423
|
extensions: ["json"],
|
|
@@ -63668,7 +63686,7 @@ async function normalizeTilesetData(tileset, options, context) {
|
|
|
63668
63686
|
}
|
|
63669
63687
|
|
|
63670
63688
|
// ../i3s/src/i3s-loader.ts
|
|
63671
|
-
var
|
|
63689
|
+
var VERSION14 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
63672
63690
|
var TILESET_REGEX = /layers\/[0-9]+$/;
|
|
63673
63691
|
var TILE_HEADER_REGEX = /nodes\/([0-9-]+|root)$/;
|
|
63674
63692
|
var SLPK_HEX = "504b0304";
|
|
@@ -63677,7 +63695,7 @@ var I3SLoader = {
|
|
|
63677
63695
|
name: "I3S (Indexed Scene Layers)",
|
|
63678
63696
|
id: "i3s",
|
|
63679
63697
|
module: "i3s",
|
|
63680
|
-
version:
|
|
63698
|
+
version: VERSION14,
|
|
63681
63699
|
mimeTypes: ["application/octet-stream"],
|
|
63682
63700
|
parse: parseI3S,
|
|
63683
63701
|
extensions: ["bin"],
|
|
@@ -63841,7 +63859,7 @@ var Z_UP_TO_Y_UP_MATRIX = new import_core31.Matrix4([1, 0, 0, 0, 0, 0, -1, 0, 0,
|
|
|
63841
63859
|
var scratchVector6 = new import_core31.Vector3();
|
|
63842
63860
|
var B3dmConverter = class {
|
|
63843
63861
|
async convert(i3sAttributesData, featureAttributes = null) {
|
|
63844
|
-
const gltf = await this.
|
|
63862
|
+
const gltf = await this.buildGLTF(i3sAttributesData, featureAttributes);
|
|
63845
63863
|
const b3dm = encodeSync({
|
|
63846
63864
|
gltfEncoded: new Uint8Array(gltf),
|
|
63847
63865
|
type: "b3dm",
|
|
@@ -63850,12 +63868,12 @@ var B3dmConverter = class {
|
|
|
63850
63868
|
}, Tile3DWriter);
|
|
63851
63869
|
return b3dm;
|
|
63852
63870
|
}
|
|
63853
|
-
async
|
|
63871
|
+
async buildGLTF(i3sAttributesData, featureAttributes) {
|
|
63854
63872
|
const { tileContent, textureFormat, box } = i3sAttributesData;
|
|
63855
63873
|
const { material, attributes, indices: originalIndices, modelMatrix } = tileContent;
|
|
63856
63874
|
const gltfBuilder = new GLTFScenegraph();
|
|
63857
|
-
const textureIndex = await this.
|
|
63858
|
-
const pbrMaterialInfo = this.
|
|
63875
|
+
const textureIndex = await this._addI3sTextureToGLTF(tileContent, textureFormat, gltfBuilder);
|
|
63876
|
+
const pbrMaterialInfo = this._convertI3sMaterialToGLTFMaterial(material, textureIndex);
|
|
63859
63877
|
const materialIndex = gltfBuilder.addMaterial(pbrMaterialInfo);
|
|
63860
63878
|
const positions = attributes.positions;
|
|
63861
63879
|
const positionsValue = positions.value;
|
|
@@ -63884,7 +63902,7 @@ var B3dmConverter = class {
|
|
|
63884
63902
|
const gltfBuffer = encodeSync(gltfBuilder.gltf, GLTFWriter);
|
|
63885
63903
|
return gltfBuffer;
|
|
63886
63904
|
}
|
|
63887
|
-
async
|
|
63905
|
+
async _addI3sTextureToGLTF(tileContent, textureFormat, gltfBuilder) {
|
|
63888
63906
|
const { texture, material, attributes } = tileContent;
|
|
63889
63907
|
let textureIndex = null;
|
|
63890
63908
|
let selectedTexture = texture;
|
|
@@ -63946,7 +63964,7 @@ var B3dmConverter = class {
|
|
|
63946
63964
|
return "image/jpeg";
|
|
63947
63965
|
}
|
|
63948
63966
|
}
|
|
63949
|
-
|
|
63967
|
+
_convertI3sMaterialToGLTFMaterial(material, textureIndex) {
|
|
63950
63968
|
const isTextureIndexExists = textureIndex !== null;
|
|
63951
63969
|
if (!material) {
|
|
63952
63970
|
material = {
|
|
@@ -63968,11 +63986,11 @@ var B3dmConverter = class {
|
|
|
63968
63986
|
return material;
|
|
63969
63987
|
}
|
|
63970
63988
|
if (textureIndex !== null) {
|
|
63971
|
-
material = this.
|
|
63989
|
+
material = this._setGLTFTexture(material, textureIndex);
|
|
63972
63990
|
}
|
|
63973
63991
|
return material;
|
|
63974
63992
|
}
|
|
63975
|
-
|
|
63993
|
+
_setGLTFTexture(materialDefinition, textureIndex) {
|
|
63976
63994
|
const material = {
|
|
63977
63995
|
...materialDefinition,
|
|
63978
63996
|
pbrMetallicRoughness: { ...materialDefinition.pbrMetallicRoughness }
|