@loaders.gl/scene 5.0.0-beta.6 → 5.0.0-beta.8
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/dist.dev.js +989 -211
- package/dist/dist.min.js +18 -18
- package/dist/draco/lib/draco-parser.cjs +8 -5
- package/dist/draco/lib/draco-parser.cjs.map +2 -2
- package/dist/draco/lib/draco-parser.d.ts +2 -1
- package/dist/draco/lib/draco-parser.d.ts.map +1 -1
- package/dist/draco/lib/draco-parser.js +6 -3
- package/dist/draco/lib/draco-parser.js.map +1 -1
- package/dist/draco/lib/parse-draco.cjs +2 -1
- package/dist/draco/lib/parse-draco.cjs.map +2 -2
- package/dist/draco/lib/parse-draco.d.ts.map +1 -1
- package/dist/draco/lib/parse-draco.js +2 -1
- package/dist/draco/lib/parse-draco.js.map +1 -1
- package/dist/draco/lib/utils/version.cjs +1 -1
- package/dist/draco/lib/utils/version.js +1 -1
- package/dist/draco-worker-node.js +933 -152
- package/dist/draco-worker-node.js.map +4 -4
- package/dist/draco-worker.js +830 -56
- package/dist/draco-worker.js.map +4 -4
- package/dist/draco-writer-worker-node.cjs +773 -186
- package/dist/draco-writer-worker-node.cjs.map +4 -4
- package/dist/draco-writer-worker.js +630 -46
- package/dist/draco-writer-worker.js.map +4 -4
- package/dist/gltf/lib/parsers/parse-gltf.cjs +8 -7
- package/dist/gltf/lib/parsers/parse-gltf.cjs.map +3 -3
- package/dist/gltf/lib/parsers/parse-gltf.d.ts.map +1 -1
- package/dist/gltf/lib/parsers/parse-gltf.js +3 -1
- package/dist/gltf/lib/parsers/parse-gltf.js.map +1 -1
- package/dist/gltf/lib/utils/version.cjs +1 -1
- package/dist/gltf/lib/utils/version.js +1 -1
- package/dist/mtl-loader-types.cjs +1 -1
- package/dist/obj/mtl-loader-types.cjs +1 -1
- package/dist/obj/mtl-loader-types.js +1 -1
- package/dist/obj/obj-loader-types.cjs +1 -1
- package/dist/obj/obj-loader-types.js +1 -1
- package/dist/obj/obj-writer.cjs +1 -1
- package/dist/obj/obj-writer.js +1 -1
- package/dist/obj-loader-types.cjs +1 -1
- package/dist/obj-worker.js +37 -1
- package/dist/obj-writer.cjs +1 -1
- package/dist/stl-loader-types.cjs +1 -1
- package/dist/stl-loader-types.js +1 -1
- package/dist/usd/usd-loader-types.cjs +1 -1
- package/dist/usd/usd-loader-types.js +1 -1
- package/dist/usd-loader-types.cjs +1 -1
- package/package.json +6 -6
- package/src/draco/lib/draco-parser.ts +6 -3
- package/src/draco/lib/parse-draco.ts +2 -1
- package/src/gltf/lib/parsers/parse-gltf.ts +2 -1
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
|
|
51
51
|
// ../core/src/worker-utils/lib/env-utils/version.ts
|
|
52
52
|
function getVersion() {
|
|
53
|
-
const
|
|
53
|
+
const version2 = false ? NPM_TAG : "5.0.0-beta.8";
|
|
54
54
|
globalThis._loadersgl_ = globalThis._loadersgl_ || {};
|
|
55
|
-
globalThis._loadersgl_.version ||=
|
|
56
|
-
return
|
|
55
|
+
globalThis._loadersgl_.version ||= version2;
|
|
56
|
+
return version2;
|
|
57
57
|
}
|
|
58
58
|
var VERSION = getVersion();
|
|
59
59
|
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
|
|
90
90
|
// ../../node_modules/@math.gl/tasks/dist/worker-utils/lib/env-utils/version.js
|
|
91
91
|
function getVersion2() {
|
|
92
|
-
return false ? NPM_TAG2 : "5.0.0-beta.
|
|
92
|
+
return false ? NPM_TAG2 : "5.0.0-beta.8";
|
|
93
93
|
}
|
|
94
94
|
var VERSION2 = getVersion2();
|
|
95
95
|
|
|
@@ -1401,11 +1401,11 @@
|
|
|
1401
1401
|
}
|
|
1402
1402
|
function getDefaultWorkerURL(worker, warn = false) {
|
|
1403
1403
|
const workerFile = isBrowser2 ? worker.workerFile || `${worker.id}-worker.js` : worker.workerNode || `${worker.id}-worker-node.js`;
|
|
1404
|
-
let
|
|
1405
|
-
if (
|
|
1406
|
-
|
|
1404
|
+
let version2 = worker.version;
|
|
1405
|
+
if (version2 === "latest") {
|
|
1406
|
+
version2 = NPM_TAG2;
|
|
1407
1407
|
}
|
|
1408
|
-
const versionTag =
|
|
1408
|
+
const versionTag = version2 ? `@${version2}` : "";
|
|
1409
1409
|
const packageName = worker.packageName || `@loaders.gl/${worker.module}`;
|
|
1410
1410
|
const url = `https://unpkg.com/${packageName}${versionTag}/dist/${workerFile}`;
|
|
1411
1411
|
if (warn) {
|
|
@@ -3376,6 +3376,590 @@
|
|
|
3376
3376
|
}
|
|
3377
3377
|
}
|
|
3378
3378
|
|
|
3379
|
+
// ../../node_modules/probe.gl/dist/env/lib/globals.js
|
|
3380
|
+
var window_3 = globalThis;
|
|
3381
|
+
var document_3 = globalThis.document || {};
|
|
3382
|
+
var process_ = globalThis.process || {};
|
|
3383
|
+
var console_ = globalThis.console;
|
|
3384
|
+
var navigator_ = globalThis.navigator || {};
|
|
3385
|
+
|
|
3386
|
+
// ../../node_modules/probe.gl/dist/env/lib/is-electron.js
|
|
3387
|
+
function isElectron(mockUserAgent) {
|
|
3388
|
+
if (typeof window !== "undefined" && window.process?.type === "renderer") {
|
|
3389
|
+
return true;
|
|
3390
|
+
}
|
|
3391
|
+
if (typeof process !== "undefined" && Boolean(process.versions?.["electron"])) {
|
|
3392
|
+
return true;
|
|
3393
|
+
}
|
|
3394
|
+
const realUserAgent = typeof navigator !== "undefined" && navigator.userAgent;
|
|
3395
|
+
const userAgent = mockUserAgent || realUserAgent;
|
|
3396
|
+
return Boolean(userAgent && userAgent.indexOf("Electron") >= 0);
|
|
3397
|
+
}
|
|
3398
|
+
|
|
3399
|
+
// ../../node_modules/probe.gl/dist/env/lib/is-browser.js
|
|
3400
|
+
function isBrowser3() {
|
|
3401
|
+
const isNode = (
|
|
3402
|
+
// @ts-expect-error
|
|
3403
|
+
typeof process === "object" && String(process) === "[object process]" && !process?.browser
|
|
3404
|
+
);
|
|
3405
|
+
return !isNode || isElectron();
|
|
3406
|
+
}
|
|
3407
|
+
|
|
3408
|
+
// ../../node_modules/probe.gl/dist/env/index.js
|
|
3409
|
+
var VERSION3 = true ? "5.0.0" : "untranspiled source";
|
|
3410
|
+
|
|
3411
|
+
// ../../node_modules/probe.gl/dist/log/utils/assert.js
|
|
3412
|
+
function assert4(condition, message) {
|
|
3413
|
+
if (!condition) {
|
|
3414
|
+
throw new Error(message || "Assertion failed");
|
|
3415
|
+
}
|
|
3416
|
+
}
|
|
3417
|
+
|
|
3418
|
+
// ../../node_modules/probe.gl/dist/log/loggers/log-utils.js
|
|
3419
|
+
function normalizeLogLevel(logLevel) {
|
|
3420
|
+
if (!logLevel) {
|
|
3421
|
+
return 0;
|
|
3422
|
+
}
|
|
3423
|
+
let resolvedLevel;
|
|
3424
|
+
switch (typeof logLevel) {
|
|
3425
|
+
case "number":
|
|
3426
|
+
resolvedLevel = logLevel;
|
|
3427
|
+
break;
|
|
3428
|
+
case "object":
|
|
3429
|
+
resolvedLevel = logLevel.logLevel || logLevel.priority || 0;
|
|
3430
|
+
break;
|
|
3431
|
+
default:
|
|
3432
|
+
return 0;
|
|
3433
|
+
}
|
|
3434
|
+
assert4(Number.isFinite(resolvedLevel) && resolvedLevel >= 0);
|
|
3435
|
+
return resolvedLevel;
|
|
3436
|
+
}
|
|
3437
|
+
function normalizeArguments(opts) {
|
|
3438
|
+
const { logLevel, message } = opts;
|
|
3439
|
+
opts.logLevel = normalizeLogLevel(logLevel);
|
|
3440
|
+
const args = opts.args ? Array.from(opts.args) : [];
|
|
3441
|
+
while (args.length && args.shift() !== message) {
|
|
3442
|
+
}
|
|
3443
|
+
switch (typeof logLevel) {
|
|
3444
|
+
case "string":
|
|
3445
|
+
case "function":
|
|
3446
|
+
if (message !== void 0) {
|
|
3447
|
+
args.unshift(message);
|
|
3448
|
+
}
|
|
3449
|
+
opts.message = logLevel;
|
|
3450
|
+
break;
|
|
3451
|
+
case "object":
|
|
3452
|
+
Object.assign(opts, logLevel);
|
|
3453
|
+
break;
|
|
3454
|
+
default:
|
|
3455
|
+
}
|
|
3456
|
+
if (typeof opts.message === "function") {
|
|
3457
|
+
opts.message = opts.message();
|
|
3458
|
+
}
|
|
3459
|
+
const messageType = typeof opts.message;
|
|
3460
|
+
assert4(messageType === "string" || messageType === "object");
|
|
3461
|
+
return Object.assign(opts, { args }, opts.opts);
|
|
3462
|
+
}
|
|
3463
|
+
|
|
3464
|
+
// ../../node_modules/probe.gl/dist/log/loggers/base-log.js
|
|
3465
|
+
var noop = () => {
|
|
3466
|
+
};
|
|
3467
|
+
var BaseLog = class {
|
|
3468
|
+
constructor({ level = 0 } = {}) {
|
|
3469
|
+
this.userData = {};
|
|
3470
|
+
this._onceCache = /* @__PURE__ */ new Set();
|
|
3471
|
+
this._level = level;
|
|
3472
|
+
}
|
|
3473
|
+
set level(newLevel) {
|
|
3474
|
+
this.setLevel(newLevel);
|
|
3475
|
+
}
|
|
3476
|
+
get level() {
|
|
3477
|
+
return this.getLevel();
|
|
3478
|
+
}
|
|
3479
|
+
setLevel(level) {
|
|
3480
|
+
this._level = level;
|
|
3481
|
+
return this;
|
|
3482
|
+
}
|
|
3483
|
+
getLevel() {
|
|
3484
|
+
return this._level;
|
|
3485
|
+
}
|
|
3486
|
+
// Unconditional logging
|
|
3487
|
+
warn(message, ...args) {
|
|
3488
|
+
return this._log("warn", 0, message, args, { once: true });
|
|
3489
|
+
}
|
|
3490
|
+
error(message, ...args) {
|
|
3491
|
+
return this._log("error", 0, message, args);
|
|
3492
|
+
}
|
|
3493
|
+
// Conditional logging
|
|
3494
|
+
log(logLevel, message, ...args) {
|
|
3495
|
+
return this._log("log", logLevel, message, args);
|
|
3496
|
+
}
|
|
3497
|
+
info(logLevel, message, ...args) {
|
|
3498
|
+
return this._log("info", logLevel, message, args);
|
|
3499
|
+
}
|
|
3500
|
+
once(logLevel, message, ...args) {
|
|
3501
|
+
return this._log("once", logLevel, message, args, { once: true });
|
|
3502
|
+
}
|
|
3503
|
+
_log(type, logLevel, message, args, options = {}) {
|
|
3504
|
+
const normalized = normalizeArguments({
|
|
3505
|
+
logLevel,
|
|
3506
|
+
message,
|
|
3507
|
+
args: this._buildArgs(logLevel, message, args),
|
|
3508
|
+
opts: options
|
|
3509
|
+
});
|
|
3510
|
+
return this._createLogFunction(type, normalized, options);
|
|
3511
|
+
}
|
|
3512
|
+
_buildArgs(logLevel, message, args) {
|
|
3513
|
+
return [logLevel, message, ...args];
|
|
3514
|
+
}
|
|
3515
|
+
_createLogFunction(type, normalized, options) {
|
|
3516
|
+
if (!this._shouldLog(normalized.logLevel)) {
|
|
3517
|
+
return noop;
|
|
3518
|
+
}
|
|
3519
|
+
const tag = this._getOnceTag(options.tag ?? normalized.tag ?? normalized.message);
|
|
3520
|
+
if ((options.once || normalized.once) && tag !== void 0) {
|
|
3521
|
+
if (this._onceCache.has(tag)) {
|
|
3522
|
+
return noop;
|
|
3523
|
+
}
|
|
3524
|
+
this._onceCache.add(tag);
|
|
3525
|
+
}
|
|
3526
|
+
return this._emit(type, normalized);
|
|
3527
|
+
}
|
|
3528
|
+
_shouldLog(logLevel) {
|
|
3529
|
+
return this.getLevel() >= normalizeLogLevel(logLevel);
|
|
3530
|
+
}
|
|
3531
|
+
_getOnceTag(tag) {
|
|
3532
|
+
if (tag === void 0) {
|
|
3533
|
+
return void 0;
|
|
3534
|
+
}
|
|
3535
|
+
try {
|
|
3536
|
+
return typeof tag === "string" ? tag : String(tag);
|
|
3537
|
+
} catch {
|
|
3538
|
+
return void 0;
|
|
3539
|
+
}
|
|
3540
|
+
}
|
|
3541
|
+
};
|
|
3542
|
+
|
|
3543
|
+
// ../../node_modules/probe.gl/dist/log/utils/local-storage.js
|
|
3544
|
+
function getStorage(type) {
|
|
3545
|
+
try {
|
|
3546
|
+
const storage = window[type];
|
|
3547
|
+
const x = "__storage_test__";
|
|
3548
|
+
storage.setItem(x, x);
|
|
3549
|
+
storage.removeItem(x);
|
|
3550
|
+
return storage;
|
|
3551
|
+
} catch (e) {
|
|
3552
|
+
return null;
|
|
3553
|
+
}
|
|
3554
|
+
}
|
|
3555
|
+
var LocalStorage = class {
|
|
3556
|
+
constructor(id, defaultConfig, type = "sessionStorage") {
|
|
3557
|
+
this.storage = getStorage(type);
|
|
3558
|
+
this.id = id;
|
|
3559
|
+
this.config = defaultConfig;
|
|
3560
|
+
this._loadConfiguration();
|
|
3561
|
+
}
|
|
3562
|
+
getConfiguration() {
|
|
3563
|
+
return this.config;
|
|
3564
|
+
}
|
|
3565
|
+
setConfiguration(configuration) {
|
|
3566
|
+
Object.assign(this.config, configuration);
|
|
3567
|
+
if (this.storage) {
|
|
3568
|
+
const serialized = JSON.stringify(this.config);
|
|
3569
|
+
this.storage.setItem(this.id, serialized);
|
|
3570
|
+
}
|
|
3571
|
+
}
|
|
3572
|
+
// Get config from persistent store, if available
|
|
3573
|
+
_loadConfiguration() {
|
|
3574
|
+
let configuration = {};
|
|
3575
|
+
if (this.storage) {
|
|
3576
|
+
const serializedConfiguration = this.storage.getItem(this.id);
|
|
3577
|
+
configuration = serializedConfiguration ? JSON.parse(serializedConfiguration) : {};
|
|
3578
|
+
}
|
|
3579
|
+
Object.assign(this.config, configuration);
|
|
3580
|
+
return this;
|
|
3581
|
+
}
|
|
3582
|
+
};
|
|
3583
|
+
|
|
3584
|
+
// ../../node_modules/probe.gl/dist/log/utils/formatters.js
|
|
3585
|
+
function formatTime(ms) {
|
|
3586
|
+
let formatted;
|
|
3587
|
+
if (ms < 10) {
|
|
3588
|
+
formatted = `${ms.toFixed(2)}ms`;
|
|
3589
|
+
} else if (ms < 100) {
|
|
3590
|
+
formatted = `${ms.toFixed(1)}ms`;
|
|
3591
|
+
} else if (ms < 1e3) {
|
|
3592
|
+
formatted = `${ms.toFixed(0)}ms`;
|
|
3593
|
+
} else {
|
|
3594
|
+
formatted = `${(ms / 1e3).toFixed(2)}s`;
|
|
3595
|
+
}
|
|
3596
|
+
return formatted;
|
|
3597
|
+
}
|
|
3598
|
+
function leftPad(string, length = 8) {
|
|
3599
|
+
const padLength = Math.max(length - string.length, 0);
|
|
3600
|
+
return `${" ".repeat(padLength)}${string}`;
|
|
3601
|
+
}
|
|
3602
|
+
|
|
3603
|
+
// ../../node_modules/probe.gl/dist/log/utils/color.js
|
|
3604
|
+
var COLOR;
|
|
3605
|
+
(function(COLOR2) {
|
|
3606
|
+
COLOR2[COLOR2["BLACK"] = 30] = "BLACK";
|
|
3607
|
+
COLOR2[COLOR2["RED"] = 31] = "RED";
|
|
3608
|
+
COLOR2[COLOR2["GREEN"] = 32] = "GREEN";
|
|
3609
|
+
COLOR2[COLOR2["YELLOW"] = 33] = "YELLOW";
|
|
3610
|
+
COLOR2[COLOR2["BLUE"] = 34] = "BLUE";
|
|
3611
|
+
COLOR2[COLOR2["MAGENTA"] = 35] = "MAGENTA";
|
|
3612
|
+
COLOR2[COLOR2["CYAN"] = 36] = "CYAN";
|
|
3613
|
+
COLOR2[COLOR2["WHITE"] = 37] = "WHITE";
|
|
3614
|
+
COLOR2[COLOR2["BRIGHT_BLACK"] = 90] = "BRIGHT_BLACK";
|
|
3615
|
+
COLOR2[COLOR2["BRIGHT_RED"] = 91] = "BRIGHT_RED";
|
|
3616
|
+
COLOR2[COLOR2["BRIGHT_GREEN"] = 92] = "BRIGHT_GREEN";
|
|
3617
|
+
COLOR2[COLOR2["BRIGHT_YELLOW"] = 93] = "BRIGHT_YELLOW";
|
|
3618
|
+
COLOR2[COLOR2["BRIGHT_BLUE"] = 94] = "BRIGHT_BLUE";
|
|
3619
|
+
COLOR2[COLOR2["BRIGHT_MAGENTA"] = 95] = "BRIGHT_MAGENTA";
|
|
3620
|
+
COLOR2[COLOR2["BRIGHT_CYAN"] = 96] = "BRIGHT_CYAN";
|
|
3621
|
+
COLOR2[COLOR2["BRIGHT_WHITE"] = 97] = "BRIGHT_WHITE";
|
|
3622
|
+
})(COLOR || (COLOR = {}));
|
|
3623
|
+
var BACKGROUND_INCREMENT = 10;
|
|
3624
|
+
function getColor(color) {
|
|
3625
|
+
if (typeof color !== "string") {
|
|
3626
|
+
return color;
|
|
3627
|
+
}
|
|
3628
|
+
color = color.toUpperCase();
|
|
3629
|
+
return COLOR[color] || COLOR.WHITE;
|
|
3630
|
+
}
|
|
3631
|
+
function addColor(string, color, background) {
|
|
3632
|
+
if (!isBrowser3 && typeof string === "string") {
|
|
3633
|
+
if (color) {
|
|
3634
|
+
const colorCode = getColor(color);
|
|
3635
|
+
string = `\x1B[${colorCode}m${string}\x1B[39m`;
|
|
3636
|
+
}
|
|
3637
|
+
if (background) {
|
|
3638
|
+
const colorCode = getColor(background);
|
|
3639
|
+
string = `\x1B[${colorCode + BACKGROUND_INCREMENT}m${string}\x1B[49m`;
|
|
3640
|
+
}
|
|
3641
|
+
}
|
|
3642
|
+
return string;
|
|
3643
|
+
}
|
|
3644
|
+
|
|
3645
|
+
// ../../node_modules/probe.gl/dist/log/utils/autobind.js
|
|
3646
|
+
function autobind(obj, predefined = ["constructor"]) {
|
|
3647
|
+
const proto = Object.getPrototypeOf(obj);
|
|
3648
|
+
const propNames = Object.getOwnPropertyNames(proto);
|
|
3649
|
+
const object = obj;
|
|
3650
|
+
for (const key of propNames) {
|
|
3651
|
+
const value = object[key];
|
|
3652
|
+
if (typeof value === "function") {
|
|
3653
|
+
if (!predefined.find((name) => key === name)) {
|
|
3654
|
+
object[key] = value.bind(obj);
|
|
3655
|
+
}
|
|
3656
|
+
}
|
|
3657
|
+
}
|
|
3658
|
+
}
|
|
3659
|
+
|
|
3660
|
+
// ../../node_modules/probe.gl/dist/log/probe.js
|
|
3661
|
+
var Probe = class {
|
|
3662
|
+
getHighResolutionTimer() {
|
|
3663
|
+
let timestamp;
|
|
3664
|
+
if (isBrowser3() && window_3.performance) {
|
|
3665
|
+
timestamp = window_3?.performance?.now?.();
|
|
3666
|
+
} else if ("hrtime" in process_) {
|
|
3667
|
+
const timeParts = process_?.hrtime?.();
|
|
3668
|
+
timestamp = timeParts[0] * 1e3 + timeParts[1] / 1e6;
|
|
3669
|
+
} else {
|
|
3670
|
+
timestamp = Date.now();
|
|
3671
|
+
}
|
|
3672
|
+
return timestamp;
|
|
3673
|
+
}
|
|
3674
|
+
getMemoryUsageMB() {
|
|
3675
|
+
const performance2 = window_3?.performance;
|
|
3676
|
+
const usedJSHeapSize = performance2?.memory?.usedJSHeapSize;
|
|
3677
|
+
if (usedJSHeapSize === void 0 || usedJSHeapSize === null) {
|
|
3678
|
+
return null;
|
|
3679
|
+
}
|
|
3680
|
+
return Math.trunc(usedJSHeapSize / 1024 / 1024);
|
|
3681
|
+
}
|
|
3682
|
+
};
|
|
3683
|
+
var probe = new Probe();
|
|
3684
|
+
globalThis.Probe = Probe;
|
|
3685
|
+
globalThis.probe = probe;
|
|
3686
|
+
|
|
3687
|
+
// ../../node_modules/probe.gl/dist/log/loggers/probe-log.js
|
|
3688
|
+
var originalConsole = {
|
|
3689
|
+
debug: isBrowser3() ? console.debug || console.log : console.log,
|
|
3690
|
+
log: console.log,
|
|
3691
|
+
info: console.info,
|
|
3692
|
+
warn: console.warn,
|
|
3693
|
+
error: console.error
|
|
3694
|
+
};
|
|
3695
|
+
var DEFAULT_LOG_CONFIGURATION = {
|
|
3696
|
+
enabled: true,
|
|
3697
|
+
level: 0
|
|
3698
|
+
};
|
|
3699
|
+
var ProbeLog = class extends BaseLog {
|
|
3700
|
+
constructor({ id } = { id: "" }) {
|
|
3701
|
+
super({ level: 0 });
|
|
3702
|
+
this.VERSION = VERSION3;
|
|
3703
|
+
this._startTs = probe.getHighResolutionTimer();
|
|
3704
|
+
this._deltaTs = probe.getHighResolutionTimer();
|
|
3705
|
+
this.userData = {};
|
|
3706
|
+
this.LOG_THROTTLE_TIMEOUT = 0;
|
|
3707
|
+
this.id = id;
|
|
3708
|
+
this.userData = {};
|
|
3709
|
+
this._storage = new LocalStorage(`__probe-${this.id}__`, { [this.id]: DEFAULT_LOG_CONFIGURATION });
|
|
3710
|
+
this.timeStamp(`${this.id} started`);
|
|
3711
|
+
autobind(this);
|
|
3712
|
+
Object.seal(this);
|
|
3713
|
+
}
|
|
3714
|
+
isEnabled() {
|
|
3715
|
+
return this._getConfiguration().enabled;
|
|
3716
|
+
}
|
|
3717
|
+
getLevel() {
|
|
3718
|
+
return this._getConfiguration().level;
|
|
3719
|
+
}
|
|
3720
|
+
/** @return milliseconds, with fractions */
|
|
3721
|
+
getTotal() {
|
|
3722
|
+
return Number((probe.getHighResolutionTimer() - this._startTs).toPrecision(10));
|
|
3723
|
+
}
|
|
3724
|
+
/** @return milliseconds, with fractions */
|
|
3725
|
+
getDelta() {
|
|
3726
|
+
return Number((probe.getHighResolutionTimer() - this._deltaTs).toPrecision(10));
|
|
3727
|
+
}
|
|
3728
|
+
/** @deprecated use logLevel */
|
|
3729
|
+
set priority(newPriority) {
|
|
3730
|
+
this.level = newPriority;
|
|
3731
|
+
}
|
|
3732
|
+
/** @deprecated use logLevel */
|
|
3733
|
+
get priority() {
|
|
3734
|
+
return this.level;
|
|
3735
|
+
}
|
|
3736
|
+
/** @deprecated use logLevel */
|
|
3737
|
+
getPriority() {
|
|
3738
|
+
return this.level;
|
|
3739
|
+
}
|
|
3740
|
+
// Configure
|
|
3741
|
+
enable(enabled = true) {
|
|
3742
|
+
this._updateConfiguration({ enabled });
|
|
3743
|
+
return this;
|
|
3744
|
+
}
|
|
3745
|
+
setLevel(level) {
|
|
3746
|
+
this._updateConfiguration({ level });
|
|
3747
|
+
return this;
|
|
3748
|
+
}
|
|
3749
|
+
/** return the current status of the setting */
|
|
3750
|
+
get(setting) {
|
|
3751
|
+
return this._getConfiguration()[setting];
|
|
3752
|
+
}
|
|
3753
|
+
// update the status of the setting
|
|
3754
|
+
set(setting, value) {
|
|
3755
|
+
this._updateConfiguration({ [setting]: value });
|
|
3756
|
+
}
|
|
3757
|
+
/** Logs the current settings as a table */
|
|
3758
|
+
settings() {
|
|
3759
|
+
if (console.table) {
|
|
3760
|
+
console.table(this._storage.config);
|
|
3761
|
+
} else {
|
|
3762
|
+
console.log(this._storage.config);
|
|
3763
|
+
}
|
|
3764
|
+
}
|
|
3765
|
+
// Unconditional logging
|
|
3766
|
+
assert(condition, message) {
|
|
3767
|
+
if (!condition) {
|
|
3768
|
+
throw new Error(message || "Assertion failed");
|
|
3769
|
+
}
|
|
3770
|
+
}
|
|
3771
|
+
warn(message, ...args) {
|
|
3772
|
+
return this._log("warn", 0, message, args, {
|
|
3773
|
+
method: originalConsole.warn,
|
|
3774
|
+
once: true
|
|
3775
|
+
});
|
|
3776
|
+
}
|
|
3777
|
+
error(message, ...args) {
|
|
3778
|
+
return this._log("error", 0, message, args, {
|
|
3779
|
+
method: originalConsole.error
|
|
3780
|
+
});
|
|
3781
|
+
}
|
|
3782
|
+
/** Print a deprecation warning */
|
|
3783
|
+
deprecated(oldUsage, newUsage) {
|
|
3784
|
+
return this.warn(`\`${oldUsage}\` is deprecated and will be removed in a later version. Use \`${newUsage}\` instead`);
|
|
3785
|
+
}
|
|
3786
|
+
/** Print a removal warning */
|
|
3787
|
+
removed(oldUsage, newUsage) {
|
|
3788
|
+
return this.error(`\`${oldUsage}\` has been removed. Use \`${newUsage}\` instead`);
|
|
3789
|
+
}
|
|
3790
|
+
probe(logLevel, message, ...args) {
|
|
3791
|
+
const memoryUsageMB = probe.getMemoryUsageMB();
|
|
3792
|
+
if (memoryUsageMB !== null) {
|
|
3793
|
+
const memoryUsagePrefix = `${memoryUsageMB}MB `;
|
|
3794
|
+
if (typeof message === "function") {
|
|
3795
|
+
message = () => `${memoryUsagePrefix}${message()}`;
|
|
3796
|
+
} else if (typeof message === "string") {
|
|
3797
|
+
message = `${memoryUsagePrefix}${message}`;
|
|
3798
|
+
}
|
|
3799
|
+
}
|
|
3800
|
+
return this._log("log", logLevel, message, args, {
|
|
3801
|
+
method: originalConsole.log,
|
|
3802
|
+
time: true,
|
|
3803
|
+
once: true
|
|
3804
|
+
});
|
|
3805
|
+
}
|
|
3806
|
+
log(logLevel, message, ...args) {
|
|
3807
|
+
return this._log("log", logLevel, message, args, {
|
|
3808
|
+
method: originalConsole.debug
|
|
3809
|
+
});
|
|
3810
|
+
}
|
|
3811
|
+
info(logLevel, message, ...args) {
|
|
3812
|
+
return this._log("info", logLevel, message, args, { method: console.info });
|
|
3813
|
+
}
|
|
3814
|
+
once(logLevel, message, ...args) {
|
|
3815
|
+
return this._log("once", logLevel, message, args, {
|
|
3816
|
+
method: originalConsole.debug || originalConsole.info,
|
|
3817
|
+
once: true
|
|
3818
|
+
});
|
|
3819
|
+
}
|
|
3820
|
+
/** Logs an object as a table */
|
|
3821
|
+
table(logLevel, table, columns) {
|
|
3822
|
+
if (table) {
|
|
3823
|
+
return this._log("table", logLevel, table, columns && [columns] || [], {
|
|
3824
|
+
method: console.table || noop,
|
|
3825
|
+
tag: getTableHeader(table)
|
|
3826
|
+
});
|
|
3827
|
+
}
|
|
3828
|
+
return noop;
|
|
3829
|
+
}
|
|
3830
|
+
time(logLevel, message) {
|
|
3831
|
+
return this._log("time", logLevel, message, [], {
|
|
3832
|
+
method: console.time ? console.time : console.info
|
|
3833
|
+
});
|
|
3834
|
+
}
|
|
3835
|
+
timeEnd(logLevel, message) {
|
|
3836
|
+
return this._log("time", logLevel, message, [], {
|
|
3837
|
+
method: console.timeEnd ? console.timeEnd : console.info
|
|
3838
|
+
});
|
|
3839
|
+
}
|
|
3840
|
+
timeStamp(logLevel, message) {
|
|
3841
|
+
return this._log("time", logLevel, message, [], {
|
|
3842
|
+
method: console.timeStamp || noop
|
|
3843
|
+
});
|
|
3844
|
+
}
|
|
3845
|
+
group(logLevel, message, opts = { collapsed: false }) {
|
|
3846
|
+
const method = (opts.collapsed ? console.groupCollapsed : console.group) || console.info;
|
|
3847
|
+
return this._log("group", logLevel, message, [], { method });
|
|
3848
|
+
}
|
|
3849
|
+
groupCollapsed(logLevel, message, opts = {}) {
|
|
3850
|
+
return this.group(logLevel, message, Object.assign({}, opts, { collapsed: true }));
|
|
3851
|
+
}
|
|
3852
|
+
groupEnd(logLevel) {
|
|
3853
|
+
return this._log("groupEnd", logLevel, "", [], {
|
|
3854
|
+
method: console.groupEnd || noop
|
|
3855
|
+
});
|
|
3856
|
+
}
|
|
3857
|
+
// EXPERIMENTAL
|
|
3858
|
+
withGroup(logLevel, message, func) {
|
|
3859
|
+
this.group(logLevel, message)();
|
|
3860
|
+
try {
|
|
3861
|
+
func();
|
|
3862
|
+
} finally {
|
|
3863
|
+
this.groupEnd(logLevel)();
|
|
3864
|
+
}
|
|
3865
|
+
}
|
|
3866
|
+
trace() {
|
|
3867
|
+
if (console.trace) {
|
|
3868
|
+
console.trace();
|
|
3869
|
+
}
|
|
3870
|
+
}
|
|
3871
|
+
_shouldLog(logLevel) {
|
|
3872
|
+
return this.isEnabled() && super._shouldLog(logLevel);
|
|
3873
|
+
}
|
|
3874
|
+
_emit(_type, normalized) {
|
|
3875
|
+
const method = normalized.method;
|
|
3876
|
+
assert4(method);
|
|
3877
|
+
normalized.total = this.getTotal();
|
|
3878
|
+
normalized.delta = this.getDelta();
|
|
3879
|
+
this._deltaTs = probe.getHighResolutionTimer();
|
|
3880
|
+
const message = decorateMessage(this.id, normalized.message, normalized);
|
|
3881
|
+
return method.bind(console, message, ...normalized.args);
|
|
3882
|
+
}
|
|
3883
|
+
_getConfiguration() {
|
|
3884
|
+
if (!this._storage.config[this.id]) {
|
|
3885
|
+
this._updateConfiguration(DEFAULT_LOG_CONFIGURATION);
|
|
3886
|
+
}
|
|
3887
|
+
return this._storage.config[this.id];
|
|
3888
|
+
}
|
|
3889
|
+
_updateConfiguration(configuration) {
|
|
3890
|
+
const currentConfiguration = this._storage.config[this.id] || {
|
|
3891
|
+
...DEFAULT_LOG_CONFIGURATION
|
|
3892
|
+
};
|
|
3893
|
+
this._storage.setConfiguration({
|
|
3894
|
+
[this.id]: { ...currentConfiguration, ...configuration }
|
|
3895
|
+
});
|
|
3896
|
+
}
|
|
3897
|
+
};
|
|
3898
|
+
ProbeLog.VERSION = VERSION3;
|
|
3899
|
+
function decorateMessage(id, message, opts) {
|
|
3900
|
+
if (typeof message === "string") {
|
|
3901
|
+
const time = opts.time ? leftPad(formatTime(opts.total)) : "";
|
|
3902
|
+
message = opts.time ? `${id}: ${time} ${message}` : `${id}: ${message}`;
|
|
3903
|
+
message = addColor(message, opts.color, opts.background);
|
|
3904
|
+
}
|
|
3905
|
+
return message;
|
|
3906
|
+
}
|
|
3907
|
+
function getTableHeader(table) {
|
|
3908
|
+
for (const key in table) {
|
|
3909
|
+
for (const title in table[key]) {
|
|
3910
|
+
return title || "untitled";
|
|
3911
|
+
}
|
|
3912
|
+
}
|
|
3913
|
+
return "empty";
|
|
3914
|
+
}
|
|
3915
|
+
|
|
3916
|
+
// ../../node_modules/probe.gl/dist/log/init.js
|
|
3917
|
+
if (!globalThis.probe) {
|
|
3918
|
+
globalThis.probe = probe;
|
|
3919
|
+
}
|
|
3920
|
+
|
|
3921
|
+
// ../../node_modules/probe.gl/dist/log/index.js
|
|
3922
|
+
var log = new ProbeLog({ id: "@probe.gl/log" });
|
|
3923
|
+
|
|
3924
|
+
// ../core/src/loader-utils/lib/log-utils/log.ts
|
|
3925
|
+
var VERSION4 = true ? "5.0.0-beta.8" : "latest";
|
|
3926
|
+
var version = VERSION4[0] >= "0" && VERSION4[0] <= "9" ? `v${VERSION4}` : "";
|
|
3927
|
+
function createLog() {
|
|
3928
|
+
const log3 = new ProbeLog({ id: "loaders.gl" });
|
|
3929
|
+
globalThis.loaders ||= {};
|
|
3930
|
+
globalThis.loaders.log = log3;
|
|
3931
|
+
globalThis.loaders.version = version;
|
|
3932
|
+
globalThis.probe ||= {};
|
|
3933
|
+
globalThis.probe.loaders = log3;
|
|
3934
|
+
return log3;
|
|
3935
|
+
}
|
|
3936
|
+
var log2 = createLog();
|
|
3937
|
+
var NullLog = class {
|
|
3938
|
+
/** Discards debug messages. */
|
|
3939
|
+
log() {
|
|
3940
|
+
return ignoreMessage;
|
|
3941
|
+
}
|
|
3942
|
+
/** Discards informational messages. */
|
|
3943
|
+
info() {
|
|
3944
|
+
return ignoreMessage;
|
|
3945
|
+
}
|
|
3946
|
+
/** Discards messages marked to be emitted once. */
|
|
3947
|
+
once() {
|
|
3948
|
+
return ignoreMessage;
|
|
3949
|
+
}
|
|
3950
|
+
/** Discards warnings. */
|
|
3951
|
+
warn() {
|
|
3952
|
+
return ignoreMessage;
|
|
3953
|
+
}
|
|
3954
|
+
/** Discards errors. */
|
|
3955
|
+
error() {
|
|
3956
|
+
return ignoreMessage;
|
|
3957
|
+
}
|
|
3958
|
+
};
|
|
3959
|
+
function ignoreMessage() {
|
|
3960
|
+
}
|
|
3961
|
+
var nullLog = new NullLog();
|
|
3962
|
+
|
|
3379
3963
|
// ../core/src/worker-utils/lib/worker-api/get-worker-url.ts
|
|
3380
3964
|
var warnedWorkerVersionFallbacks2 = /* @__PURE__ */ new Set();
|
|
3381
3965
|
function getCustomWorkerURL2(worker, options = {}) {
|
|
@@ -3406,11 +3990,11 @@
|
|
|
3406
3990
|
}
|
|
3407
3991
|
function getDefaultWorkerURL2(worker, warn = false) {
|
|
3408
3992
|
const workerFile = isBrowser ? worker.workerFile || `${worker.id}-worker.js` : worker.workerNode || `${worker.id}-worker-node.js`;
|
|
3409
|
-
let
|
|
3410
|
-
if (
|
|
3411
|
-
|
|
3993
|
+
let version2 = worker.version;
|
|
3994
|
+
if (version2 === "latest") {
|
|
3995
|
+
version2 = NPM_TAG;
|
|
3412
3996
|
}
|
|
3413
|
-
const versionTag =
|
|
3997
|
+
const versionTag = version2 ? `@${version2}` : "";
|
|
3414
3998
|
const url = `https://unpkg.com/@loaders.gl/${worker.module}${versionTag}/dist/${workerFile}`;
|
|
3415
3999
|
if (warn) {
|
|
3416
4000
|
warnIfUsingNpmTagFallback2(worker, url);
|
|
@@ -3426,9 +4010,9 @@
|
|
|
3426
4010
|
return;
|
|
3427
4011
|
}
|
|
3428
4012
|
warnedWorkerVersionFallbacks2.add(workerId);
|
|
3429
|
-
|
|
4013
|
+
log2.warn(
|
|
3430
4014
|
`loaders.gl: ${worker.name} loader worker version is "latest" because __VERSION__ was not injected. Fetching ${url} from CDN.`
|
|
3431
|
-
);
|
|
4015
|
+
)();
|
|
3432
4016
|
}
|
|
3433
4017
|
|
|
3434
4018
|
// ../core/src/worker-utils/lib/worker-api/task-runtime.ts
|
|
@@ -3846,7 +4430,7 @@
|
|
|
3846
4430
|
} catch {
|
|
3847
4431
|
}
|
|
3848
4432
|
}
|
|
3849
|
-
|
|
4433
|
+
log2.error(String(error))();
|
|
3850
4434
|
return null;
|
|
3851
4435
|
}
|
|
3852
4436
|
}
|
|
@@ -3920,10 +4504,10 @@
|
|
|
3920
4504
|
document: typeof document !== "undefined" && document
|
|
3921
4505
|
};
|
|
3922
4506
|
var self_3 = globals3.self || globals3.window || globals3.global || {};
|
|
3923
|
-
var
|
|
3924
|
-
var
|
|
3925
|
-
var
|
|
3926
|
-
var
|
|
4507
|
+
var window_4 = globals3.window || globals3.self || globals3.global || {};
|
|
4508
|
+
var global_4 = globals3.global || globals3.self || globals3.window || {};
|
|
4509
|
+
var document_4 = globals3.document || {};
|
|
4510
|
+
var isBrowser4 = (
|
|
3927
4511
|
// @ts-ignore process does not exist on browser
|
|
3928
4512
|
Boolean(typeof process !== "object" || String(process) !== "[object process]" || process.browser)
|
|
3929
4513
|
);
|
|
@@ -3964,7 +4548,7 @@
|
|
|
3964
4548
|
function canEncodeWithWorker(writer, options) {
|
|
3965
4549
|
const nodeWorkers = options?._nodeWorkers ?? options?.core?._nodeWorkers;
|
|
3966
4550
|
const useWorkers = options?.worker ?? options?.core?.worker;
|
|
3967
|
-
if (!
|
|
4551
|
+
if (!isBrowser4 && !nodeWorkers) {
|
|
3968
4552
|
return false;
|
|
3969
4553
|
}
|
|
3970
4554
|
return canProcessOnWorker2(
|
|
@@ -11468,8 +12052,8 @@ return true;`);
|
|
|
11468
12052
|
static startFooter(builder) {
|
|
11469
12053
|
builder.startObject(5);
|
|
11470
12054
|
}
|
|
11471
|
-
static addVersion(builder,
|
|
11472
|
-
builder.addFieldInt16(0,
|
|
12055
|
+
static addVersion(builder, version2) {
|
|
12056
|
+
builder.addFieldInt16(0, version2, MetadataVersion.V1);
|
|
11473
12057
|
}
|
|
11474
12058
|
static addSchema(builder, schemaOffset) {
|
|
11475
12059
|
builder.addFieldOffset(1, schemaOffset, 0);
|
|
@@ -11696,9 +12280,9 @@ return true;`);
|
|
|
11696
12280
|
get numDictionaries() {
|
|
11697
12281
|
return this._dictionaryBatches.length;
|
|
11698
12282
|
}
|
|
11699
|
-
constructor(schema,
|
|
12283
|
+
constructor(schema, version2 = MetadataVersion.V5, recordBatches, dictionaryBatches) {
|
|
11700
12284
|
this.schema = schema;
|
|
11701
|
-
this.version =
|
|
12285
|
+
this.version = version2;
|
|
11702
12286
|
recordBatches && (this._recordBatches = recordBatches);
|
|
11703
12287
|
dictionaryBatches && (this._dictionaryBatches = dictionaryBatches);
|
|
11704
12288
|
}
|
|
@@ -11817,8 +12401,8 @@ return true;`);
|
|
|
11817
12401
|
static startMessage(builder) {
|
|
11818
12402
|
builder.startObject(5);
|
|
11819
12403
|
}
|
|
11820
|
-
static addVersion(builder,
|
|
11821
|
-
builder.addFieldInt16(0,
|
|
12404
|
+
static addVersion(builder, version2) {
|
|
12405
|
+
builder.addFieldInt16(0, version2, MetadataVersion.V1);
|
|
11822
12406
|
}
|
|
11823
12407
|
static addHeaderType(builder, headerType) {
|
|
11824
12408
|
builder.addFieldInt8(1, headerType, MessageHeader.NONE);
|
|
@@ -11852,9 +12436,9 @@ return true;`);
|
|
|
11852
12436
|
static finishSizePrefixedMessageBuffer(builder, offset) {
|
|
11853
12437
|
builder.finish(offset, void 0, true);
|
|
11854
12438
|
}
|
|
11855
|
-
static createMessage(builder,
|
|
12439
|
+
static createMessage(builder, version2, headerType, headerOffset, bodyLength, customMetadataOffset) {
|
|
11856
12440
|
_Message.startMessage(builder);
|
|
11857
|
-
_Message.addVersion(builder,
|
|
12441
|
+
_Message.addVersion(builder, version2);
|
|
11858
12442
|
_Message.addHeaderType(builder, headerType);
|
|
11859
12443
|
_Message.addHeader(builder, headerOffset);
|
|
11860
12444
|
_Message.addBodyLength(builder, bodyLength);
|
|
@@ -12174,10 +12758,10 @@ return true;`);
|
|
|
12174
12758
|
buf = new ByteBuffer3(toUint8Array(buf));
|
|
12175
12759
|
const _message = Message.getRootAsMessage(buf);
|
|
12176
12760
|
const bodyLength = _message.bodyLength();
|
|
12177
|
-
const
|
|
12761
|
+
const version2 = _message.version();
|
|
12178
12762
|
const headerType = _message.headerType();
|
|
12179
12763
|
const metadata = decodeMessageCustomMetadata(_message);
|
|
12180
|
-
const message = new _Message(bodyLength,
|
|
12764
|
+
const message = new _Message(bodyLength, version2, headerType, void 0, metadata);
|
|
12181
12765
|
message._createHeader = decodeMessageHeader(_message, headerType);
|
|
12182
12766
|
return message;
|
|
12183
12767
|
}
|
|
@@ -12254,8 +12838,8 @@ return true;`);
|
|
|
12254
12838
|
isDictionaryBatch() {
|
|
12255
12839
|
return this.headerType === MessageHeader.DictionaryBatch;
|
|
12256
12840
|
}
|
|
12257
|
-
constructor(bodyLength,
|
|
12258
|
-
this._version =
|
|
12841
|
+
constructor(bodyLength, version2, headerType, header, metadata) {
|
|
12842
|
+
this._version = version2;
|
|
12259
12843
|
this._headerType = headerType;
|
|
12260
12844
|
this.body = new Uint8Array(0);
|
|
12261
12845
|
this._compression = header === null || header === void 0 ? void 0 : header.compression;
|
|
@@ -12379,16 +12963,16 @@ return true;`);
|
|
|
12379
12963
|
BufferRegion["decode"] = decodeBufferRegion;
|
|
12380
12964
|
BodyCompression2["encode"] = encodeBodyCompression;
|
|
12381
12965
|
BodyCompression2["decode"] = decodeBodyCompression;
|
|
12382
|
-
function decodeSchema(_schema, dictionaries = /* @__PURE__ */ new Map(),
|
|
12966
|
+
function decodeSchema(_schema, dictionaries = /* @__PURE__ */ new Map(), version2 = MetadataVersion.V5) {
|
|
12383
12967
|
const fields = decodeSchemaFields(_schema, dictionaries);
|
|
12384
|
-
return new Schema2(fields, decodeCustomMetadata(_schema), dictionaries,
|
|
12968
|
+
return new Schema2(fields, decodeCustomMetadata(_schema), dictionaries, version2);
|
|
12385
12969
|
}
|
|
12386
|
-
function decodeRecordBatch(batch,
|
|
12387
|
-
const recordBatch = new RecordBatch2(batch.length(), decodeFieldNodes(batch), decodeBuffers(batch,
|
|
12970
|
+
function decodeRecordBatch(batch, version2 = MetadataVersion.V5) {
|
|
12971
|
+
const recordBatch = new RecordBatch2(batch.length(), decodeFieldNodes(batch), decodeBuffers(batch, version2), decodeBodyCompression(batch.compression()), decodeVariadicBufferCounts(batch));
|
|
12388
12972
|
return recordBatch;
|
|
12389
12973
|
}
|
|
12390
|
-
function decodeDictionaryBatch(batch,
|
|
12391
|
-
return new DictionaryBatch2(RecordBatch2.decode(batch.data(),
|
|
12974
|
+
function decodeDictionaryBatch(batch, version2 = MetadataVersion.V5) {
|
|
12975
|
+
return new DictionaryBatch2(RecordBatch2.decode(batch.data(), version2), batch.id(), batch.isDelta());
|
|
12392
12976
|
}
|
|
12393
12977
|
function decodeBufferRegion(b) {
|
|
12394
12978
|
return new BufferRegion(b.offset(), b.length());
|
|
@@ -12405,11 +12989,11 @@ return true;`);
|
|
|
12405
12989
|
}
|
|
12406
12990
|
return nodes;
|
|
12407
12991
|
}
|
|
12408
|
-
function decodeBuffers(batch,
|
|
12992
|
+
function decodeBuffers(batch, version2) {
|
|
12409
12993
|
const bufferRegions = [];
|
|
12410
12994
|
for (let b, i = -1, j = -1, n = batch.buffersLength(); ++i < n; ) {
|
|
12411
12995
|
if (b = batch.buffers(i)) {
|
|
12412
|
-
if (
|
|
12996
|
+
if (version2 < MetadataVersion.V4) {
|
|
12413
12997
|
b.bb_pos += 8 * (i + 1);
|
|
12414
12998
|
}
|
|
12415
12999
|
bufferRegions[++j] = BufferRegion.decode(b);
|
|
@@ -18245,14 +18829,14 @@ return true;`);
|
|
|
18245
18829
|
COLOR_0: "COLOR",
|
|
18246
18830
|
TEXCOORD_0: "TEX_COORD"
|
|
18247
18831
|
};
|
|
18248
|
-
var
|
|
18832
|
+
var noop2 = () => {
|
|
18249
18833
|
};
|
|
18250
18834
|
var DracoBuilder = class {
|
|
18251
18835
|
draco;
|
|
18252
18836
|
dracoEncoder;
|
|
18253
18837
|
dracoMeshBuilder;
|
|
18254
18838
|
dracoMetadataBuilder;
|
|
18255
|
-
log =
|
|
18839
|
+
log = noop2;
|
|
18256
18840
|
// draco - the draco decoder, either import `draco3d` or load dynamically
|
|
18257
18841
|
constructor(draco) {
|
|
18258
18842
|
this.draco = draco;
|
|
@@ -18286,7 +18870,7 @@ return true;`);
|
|
|
18286
18870
|
/** Shared implementation for ordinary encoding and report-producing encoding. */
|
|
18287
18871
|
_encodeSync(mesh, options, trackEncodedProperties) {
|
|
18288
18872
|
options = applyDracoEncodingPreset(options);
|
|
18289
|
-
this.log = options.log ||
|
|
18873
|
+
this.log = options.log || noop2;
|
|
18290
18874
|
return options.pointcloud ? this._encodePointCloud(mesh, options, trackEncodedProperties) : this._encodeMesh(mesh, options, trackEncodedProperties);
|
|
18291
18875
|
}
|
|
18292
18876
|
// PRIVATE
|
|
@@ -19032,7 +19616,7 @@ return true;`);
|
|
|
19032
19616
|
}
|
|
19033
19617
|
|
|
19034
19618
|
// src/draco/lib/utils/version.ts
|
|
19035
|
-
var
|
|
19619
|
+
var VERSION5 = true ? "5.0.0-beta.8" : "latest";
|
|
19036
19620
|
|
|
19037
19621
|
// src/draco/draco-format.ts
|
|
19038
19622
|
var DracoFormat = {
|
|
@@ -19064,7 +19648,7 @@ return true;`);
|
|
|
19064
19648
|
id: "draco-writer",
|
|
19065
19649
|
name: "Draco compressed geometry writer",
|
|
19066
19650
|
module: "scene",
|
|
19067
|
-
version:
|
|
19651
|
+
version: VERSION5,
|
|
19068
19652
|
worker: true,
|
|
19069
19653
|
workerNode: "draco-writer-worker-node.cjs",
|
|
19070
19654
|
/** Node test workers live with the Draco implementation. */
|
|
@@ -19076,7 +19660,7 @@ return true;`);
|
|
|
19076
19660
|
var DracoWriter = {
|
|
19077
19661
|
...DracoFormat,
|
|
19078
19662
|
name: "DRACO",
|
|
19079
|
-
version:
|
|
19663
|
+
version: VERSION5,
|
|
19080
19664
|
options: {
|
|
19081
19665
|
draco: DEFAULT_DRACO_WRITER_OPTIONS
|
|
19082
19666
|
},
|