@loaders.gl/3d-tiles 3.4.13 → 3.4.15
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.min.js +117 -120
- package/dist/es5/bundle.js +1 -1
- package/dist/es5/bundle.js.map +1 -1
- package/dist/es5/cesium-ion-loader.js +27 -61
- package/dist/es5/cesium-ion-loader.js.map +1 -1
- package/dist/es5/index.js +8 -8
- package/dist/es5/lib/classes/helpers/tile-3d-accessor-utils.js +30 -42
- package/dist/es5/lib/classes/helpers/tile-3d-accessor-utils.js.map +1 -1
- package/dist/es5/lib/classes/tile-3d-batch-table-hierarchy.js +57 -59
- package/dist/es5/lib/classes/tile-3d-batch-table-hierarchy.js.map +1 -1
- package/dist/es5/lib/classes/tile-3d-batch-table.js +177 -223
- package/dist/es5/lib/classes/tile-3d-batch-table.js.map +1 -1
- package/dist/es5/lib/classes/tile-3d-feature-table.js +52 -71
- package/dist/es5/lib/classes/tile-3d-feature-table.js.map +1 -1
- package/dist/es5/lib/constants.js +4 -4
- package/dist/es5/lib/constants.js.map +1 -1
- package/dist/es5/lib/encoders/encode-3d-tile-batched-model.js +15 -18
- package/dist/es5/lib/encoders/encode-3d-tile-batched-model.js.map +1 -1
- package/dist/es5/lib/encoders/encode-3d-tile-composite.js +6 -9
- package/dist/es5/lib/encoders/encode-3d-tile-composite.js.map +1 -1
- package/dist/es5/lib/encoders/encode-3d-tile-instanced-model.js +14 -19
- package/dist/es5/lib/encoders/encode-3d-tile-instanced-model.js.map +1 -1
- package/dist/es5/lib/encoders/encode-3d-tile-point-cloud.js +15 -18
- package/dist/es5/lib/encoders/encode-3d-tile-point-cloud.js.map +1 -1
- package/dist/es5/lib/encoders/encode-3d-tile.js +3 -3
- package/dist/es5/lib/encoders/encode-3d-tile.js.map +1 -1
- package/dist/es5/lib/encoders/helpers/encode-3d-tile-header.js +6 -6
- package/dist/es5/lib/encoders/helpers/encode-3d-tile-header.js.map +1 -1
- package/dist/es5/lib/ion/ion.js +63 -155
- package/dist/es5/lib/ion/ion.js.map +1 -1
- package/dist/es5/lib/parsers/helpers/normalize-3d-tile-colors.js +17 -17
- package/dist/es5/lib/parsers/helpers/normalize-3d-tile-colors.js.map +1 -1
- package/dist/es5/lib/parsers/helpers/normalize-3d-tile-normals.js +3 -3
- package/dist/es5/lib/parsers/helpers/normalize-3d-tile-normals.js.map +1 -1
- package/dist/es5/lib/parsers/helpers/normalize-3d-tile-positions.js +3 -3
- package/dist/es5/lib/parsers/helpers/normalize-3d-tile-positions.js.map +1 -1
- package/dist/es5/lib/parsers/helpers/parse-3d-implicit-tiles.js +166 -198
- package/dist/es5/lib/parsers/helpers/parse-3d-implicit-tiles.js.map +1 -1
- package/dist/es5/lib/parsers/helpers/parse-3d-tile-gltf-view.js +25 -53
- package/dist/es5/lib/parsers/helpers/parse-3d-tile-gltf-view.js.map +1 -1
- package/dist/es5/lib/parsers/helpers/parse-3d-tile-header.js +3 -3
- package/dist/es5/lib/parsers/helpers/parse-3d-tile-header.js.map +1 -1
- package/dist/es5/lib/parsers/helpers/parse-3d-tile-subtree.js +57 -129
- package/dist/es5/lib/parsers/helpers/parse-3d-tile-subtree.js.map +1 -1
- package/dist/es5/lib/parsers/helpers/parse-3d-tile-tables.js +19 -17
- package/dist/es5/lib/parsers/helpers/parse-3d-tile-tables.js.map +1 -1
- package/dist/es5/lib/parsers/helpers/parse-utils.js +7 -7
- package/dist/es5/lib/parsers/helpers/parse-utils.js.map +1 -1
- package/dist/es5/lib/parsers/parse-3d-tile-batched-model.js +10 -29
- package/dist/es5/lib/parsers/parse-3d-tile-batched-model.js.map +1 -1
- package/dist/es5/lib/parsers/parse-3d-tile-composite.js +12 -39
- package/dist/es5/lib/parsers/parse-3d-tile-composite.js.map +1 -1
- package/dist/es5/lib/parsers/parse-3d-tile-gltf.js +8 -27
- package/dist/es5/lib/parsers/parse-3d-tile-gltf.js.map +1 -1
- package/dist/es5/lib/parsers/parse-3d-tile-header.js +99 -197
- package/dist/es5/lib/parsers/parse-3d-tile-header.js.map +1 -1
- package/dist/es5/lib/parsers/parse-3d-tile-instanced-model.js +37 -55
- package/dist/es5/lib/parsers/parse-3d-tile-instanced-model.js.map +1 -1
- package/dist/es5/lib/parsers/parse-3d-tile-point-cloud.js +110 -162
- package/dist/es5/lib/parsers/parse-3d-tile-point-cloud.js.map +1 -1
- package/dist/es5/lib/parsers/parse-3d-tile.js +21 -59
- package/dist/es5/lib/parsers/parse-3d-tile.js.map +1 -1
- package/dist/es5/lib/utils/obb/s2-corners-to-obb.js +10 -12
- package/dist/es5/lib/utils/obb/s2-corners-to-obb.js.map +1 -1
- package/dist/es5/lib/utils/s2/converters/s2-to-boundary.js +22 -20
- package/dist/es5/lib/utils/s2/converters/s2-to-boundary.js.map +1 -1
- package/dist/es5/lib/utils/s2/converters/s2-to-obb-points.js +9 -9
- package/dist/es5/lib/utils/s2/converters/s2-to-obb-points.js.map +1 -1
- package/dist/es5/lib/utils/s2/converters/s2-to-region.js +14 -18
- package/dist/es5/lib/utils/s2/converters/s2-to-region.js.map +1 -1
- package/dist/es5/lib/utils/s2/index.js +13 -13
- package/dist/es5/lib/utils/s2/s2-geometry-functions.js +2 -2
- package/dist/es5/lib/utils/s2/s2-geometry-functions.js.map +1 -1
- package/dist/es5/lib/utils/s2/s2-token-functions.js +10 -10
- package/dist/es5/lib/utils/s2/s2-token-functions.js.map +1 -1
- package/dist/es5/lib/utils/s2/s2geometry/s2-cell-utils.js +3 -3
- package/dist/es5/lib/utils/s2/s2geometry/s2-cell-utils.js.map +1 -1
- package/dist/es5/lib/utils/s2/s2geometry/s2-geometry.js +48 -54
- package/dist/es5/lib/utils/s2/s2geometry/s2-geometry.js.map +1 -1
- package/dist/es5/lib/utils/version.js +1 -1
- package/dist/es5/lib/utils/version.js.map +1 -1
- package/dist/es5/tile-3d-subtree-loader.js +1 -1
- package/dist/es5/tile-3d-subtree-loader.js.map +1 -1
- package/dist/es5/tile-3d-writer.js +5 -4
- package/dist/es5/tile-3d-writer.js.map +1 -1
- package/dist/es5/tiles-3d-loader.js +37 -100
- package/dist/es5/tiles-3d-loader.js.map +1 -1
- package/dist/esm/lib/utils/version.js +1 -1
- package/package.json +7 -7
package/dist/dist.min.js
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
(() => {
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
3
|
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
9
4
|
var __esm = (fn, res) => function __init() {
|
|
10
5
|
return fn && (res = (0, fn[Object.keys(fn)[0]])(fn = 0)), res;
|
|
@@ -17,17 +12,6 @@
|
|
|
17
12
|
for (var name10 in all)
|
|
18
13
|
__defProp(target, name10, { get: all[name10], enumerable: true });
|
|
19
14
|
};
|
|
20
|
-
var __reExport = (target, module, desc) => {
|
|
21
|
-
if (module && typeof module === "object" || typeof module === "function") {
|
|
22
|
-
for (let key of __getOwnPropNames(module))
|
|
23
|
-
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
24
|
-
__defProp(target, key, { get: () => module[key], enumerable: !(desc = __getOwnPropDesc(module, key)) || desc.enumerable });
|
|
25
|
-
}
|
|
26
|
-
return target;
|
|
27
|
-
};
|
|
28
|
-
var __toModule = (module) => {
|
|
29
|
-
return __reExport(__markAsModule(__defProp(module != null ? __create(__getProtoOf(module)) : {}, "default", module && module.__esModule && "default" in module ? { get: () => module.default, enumerable: true } : { value: module, enumerable: true })), module);
|
|
30
|
-
};
|
|
31
15
|
|
|
32
16
|
// ../loader-utils/src/lib/env-utils/assert.ts
|
|
33
17
|
function assert2(condition, message) {
|
|
@@ -558,9 +542,21 @@
|
|
|
558
542
|
}
|
|
559
543
|
});
|
|
560
544
|
|
|
561
|
-
//
|
|
562
|
-
var
|
|
563
|
-
|
|
545
|
+
// ../worker-utils/src/lib/node/require-utils.browser.ts
|
|
546
|
+
var require_utils_browser_exports = {};
|
|
547
|
+
__export(require_utils_browser_exports, {
|
|
548
|
+
readFileAsArrayBuffer: () => readFileAsArrayBuffer,
|
|
549
|
+
readFileAsText: () => readFileAsText,
|
|
550
|
+
requireFromFile: () => requireFromFile,
|
|
551
|
+
requireFromString: () => requireFromString
|
|
552
|
+
});
|
|
553
|
+
var readFileAsArrayBuffer, readFileAsText, requireFromFile, requireFromString;
|
|
554
|
+
var init_require_utils_browser = __esm({
|
|
555
|
+
"../worker-utils/src/lib/node/require-utils.browser.ts"() {
|
|
556
|
+
readFileAsArrayBuffer = null;
|
|
557
|
+
readFileAsText = null;
|
|
558
|
+
requireFromFile = null;
|
|
559
|
+
requireFromString = null;
|
|
564
560
|
}
|
|
565
561
|
});
|
|
566
562
|
|
|
@@ -599,7 +595,7 @@
|
|
|
599
595
|
}
|
|
600
596
|
if (!isBrowser2) {
|
|
601
597
|
try {
|
|
602
|
-
return
|
|
598
|
+
return require_utils_browser_exports && requireFromFile && await requireFromFile(libraryUrl);
|
|
603
599
|
} catch {
|
|
604
600
|
return null;
|
|
605
601
|
}
|
|
@@ -613,7 +609,7 @@
|
|
|
613
609
|
}
|
|
614
610
|
function loadLibraryFromString(scriptSource, id) {
|
|
615
611
|
if (!isBrowser2) {
|
|
616
|
-
return
|
|
612
|
+
return requireFromString && requireFromString(scriptSource, id);
|
|
617
613
|
}
|
|
618
614
|
if (isWorker) {
|
|
619
615
|
eval.call(global_2, scriptSource);
|
|
@@ -629,11 +625,11 @@
|
|
|
629
625
|
document.body.appendChild(script);
|
|
630
626
|
return null;
|
|
631
627
|
}
|
|
632
|
-
var
|
|
628
|
+
var LATEST, VERSION2, loadLibraryPromises;
|
|
633
629
|
var init_library_utils = __esm({
|
|
634
630
|
"../worker-utils/src/lib/library-utils/library-utils.ts"() {
|
|
635
631
|
init_globals2();
|
|
636
|
-
|
|
632
|
+
init_require_utils_browser();
|
|
637
633
|
init_assert2();
|
|
638
634
|
init_version();
|
|
639
635
|
LATEST = "latest";
|
|
@@ -5515,7 +5511,7 @@
|
|
|
5515
5511
|
}
|
|
5516
5512
|
});
|
|
5517
5513
|
|
|
5518
|
-
//
|
|
5514
|
+
// ../../node_modules/@probe.gl/env/dist/esm/lib/is-electron.js
|
|
5519
5515
|
function isElectron(mockUserAgent) {
|
|
5520
5516
|
if (typeof window !== "undefined" && typeof window.process === "object" && window.process.type === "renderer") {
|
|
5521
5517
|
return true;
|
|
@@ -5531,54 +5527,59 @@
|
|
|
5531
5527
|
return false;
|
|
5532
5528
|
}
|
|
5533
5529
|
var init_is_electron = __esm({
|
|
5534
|
-
"
|
|
5530
|
+
"../../node_modules/@probe.gl/env/dist/esm/lib/is-electron.js"() {
|
|
5535
5531
|
}
|
|
5536
5532
|
});
|
|
5537
5533
|
|
|
5538
|
-
//
|
|
5534
|
+
// ../../node_modules/@probe.gl/env/dist/esm/lib/is-browser.js
|
|
5539
5535
|
function isBrowser3() {
|
|
5540
5536
|
const isNode = typeof process === "object" && String(process) === "[object process]" && !process.browser;
|
|
5541
5537
|
return !isNode || isElectron();
|
|
5542
5538
|
}
|
|
5543
5539
|
var init_is_browser = __esm({
|
|
5544
|
-
"
|
|
5540
|
+
"../../node_modules/@probe.gl/env/dist/esm/lib/is-browser.js"() {
|
|
5545
5541
|
init_is_electron();
|
|
5546
5542
|
}
|
|
5547
5543
|
});
|
|
5548
5544
|
|
|
5549
|
-
//
|
|
5550
|
-
var self_3, window_3, document_3, process_
|
|
5545
|
+
// ../../node_modules/@probe.gl/env/dist/esm/lib/globals.js
|
|
5546
|
+
var globals3, self_3, window_3, document_3, process_;
|
|
5551
5547
|
var init_globals3 = __esm({
|
|
5552
|
-
"
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5548
|
+
"../../node_modules/@probe.gl/env/dist/esm/lib/globals.js"() {
|
|
5549
|
+
globals3 = {
|
|
5550
|
+
self: typeof self !== "undefined" && self,
|
|
5551
|
+
window: typeof window !== "undefined" && window,
|
|
5552
|
+
global: typeof global !== "undefined" && global,
|
|
5553
|
+
document: typeof document !== "undefined" && document,
|
|
5554
|
+
process: typeof process === "object" && process
|
|
5555
|
+
};
|
|
5556
|
+
self_3 = globals3.self || globals3.window || globals3.global;
|
|
5557
|
+
window_3 = globals3.window || globals3.self || globals3.global;
|
|
5558
|
+
document_3 = globals3.document || {};
|
|
5559
|
+
process_ = globals3.process || {};
|
|
5559
5560
|
}
|
|
5560
5561
|
});
|
|
5561
5562
|
|
|
5562
|
-
//
|
|
5563
|
+
// ../../node_modules/@probe.gl/env/dist/esm/utils/globals.js
|
|
5563
5564
|
var VERSION3, isBrowser4;
|
|
5564
5565
|
var init_globals4 = __esm({
|
|
5565
|
-
"
|
|
5566
|
+
"../../node_modules/@probe.gl/env/dist/esm/utils/globals.js"() {
|
|
5566
5567
|
init_is_browser();
|
|
5567
5568
|
VERSION3 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "untranspiled source";
|
|
5568
5569
|
isBrowser4 = isBrowser3();
|
|
5569
5570
|
}
|
|
5570
5571
|
});
|
|
5571
5572
|
|
|
5572
|
-
//
|
|
5573
|
-
var
|
|
5574
|
-
"
|
|
5573
|
+
// ../../node_modules/@probe.gl/env/dist/esm/index.js
|
|
5574
|
+
var init_esm4 = __esm({
|
|
5575
|
+
"../../node_modules/@probe.gl/env/dist/esm/index.js"() {
|
|
5575
5576
|
init_globals4();
|
|
5576
5577
|
init_globals3();
|
|
5577
5578
|
init_is_browser();
|
|
5578
5579
|
}
|
|
5579
5580
|
});
|
|
5580
5581
|
|
|
5581
|
-
//
|
|
5582
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/local-storage.js
|
|
5582
5583
|
function getStorage(type) {
|
|
5583
5584
|
try {
|
|
5584
5585
|
const storage = window[type];
|
|
@@ -5592,7 +5593,7 @@
|
|
|
5592
5593
|
}
|
|
5593
5594
|
var LocalStorage;
|
|
5594
5595
|
var init_local_storage = __esm({
|
|
5595
|
-
"
|
|
5596
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/local-storage.js"() {
|
|
5596
5597
|
init_defineProperty();
|
|
5597
5598
|
LocalStorage = class {
|
|
5598
5599
|
constructor(id, defaultConfig) {
|
|
@@ -5628,7 +5629,7 @@
|
|
|
5628
5629
|
}
|
|
5629
5630
|
});
|
|
5630
5631
|
|
|
5631
|
-
//
|
|
5632
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/formatters.js
|
|
5632
5633
|
function formatTime(ms) {
|
|
5633
5634
|
let formatted;
|
|
5634
5635
|
if (ms < 10) {
|
|
@@ -5659,35 +5660,31 @@
|
|
|
5659
5660
|
return ["".concat(message, " %c+"), style];
|
|
5660
5661
|
}
|
|
5661
5662
|
var init_formatters = __esm({
|
|
5662
|
-
"
|
|
5663
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/formatters.js"() {
|
|
5663
5664
|
}
|
|
5664
5665
|
});
|
|
5665
5666
|
|
|
5666
|
-
//
|
|
5667
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/color.js
|
|
5667
5668
|
function getColor(color) {
|
|
5668
|
-
|
|
5669
|
-
return color;
|
|
5670
|
-
}
|
|
5671
|
-
color = color.toUpperCase();
|
|
5672
|
-
return COLOR[color] || COLOR.WHITE;
|
|
5669
|
+
return typeof color === "string" ? COLOR[color.toUpperCase()] || COLOR.WHITE : color;
|
|
5673
5670
|
}
|
|
5674
5671
|
function addColor(string, color, background) {
|
|
5675
5672
|
if (!isBrowser3 && typeof string === "string") {
|
|
5676
5673
|
if (color) {
|
|
5677
|
-
|
|
5678
|
-
string = "[".concat(
|
|
5674
|
+
color = getColor(color);
|
|
5675
|
+
string = "[".concat(color, "m").concat(string, "[39m");
|
|
5679
5676
|
}
|
|
5680
5677
|
if (background) {
|
|
5681
|
-
|
|
5682
|
-
string = "[".concat(
|
|
5678
|
+
color = getColor(background);
|
|
5679
|
+
string = "[".concat(background + 10, "m").concat(string, "[49m");
|
|
5683
5680
|
}
|
|
5684
5681
|
}
|
|
5685
5682
|
return string;
|
|
5686
5683
|
}
|
|
5687
|
-
var COLOR
|
|
5684
|
+
var COLOR;
|
|
5688
5685
|
var init_color = __esm({
|
|
5689
|
-
"
|
|
5690
|
-
|
|
5686
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/color.js"() {
|
|
5687
|
+
init_esm4();
|
|
5691
5688
|
(function(COLOR2) {
|
|
5692
5689
|
COLOR2[COLOR2["BLACK"] = 30] = "BLACK";
|
|
5693
5690
|
COLOR2[COLOR2["RED"] = 31] = "RED";
|
|
@@ -5706,45 +5703,42 @@
|
|
|
5706
5703
|
COLOR2[COLOR2["BRIGHT_CYAN"] = 96] = "BRIGHT_CYAN";
|
|
5707
5704
|
COLOR2[COLOR2["BRIGHT_WHITE"] = 97] = "BRIGHT_WHITE";
|
|
5708
5705
|
})(COLOR || (COLOR = {}));
|
|
5709
|
-
BACKGROUND_INCREMENT = 10;
|
|
5710
5706
|
}
|
|
5711
5707
|
});
|
|
5712
5708
|
|
|
5713
|
-
//
|
|
5709
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/autobind.js
|
|
5714
5710
|
function autobind(obj) {
|
|
5715
5711
|
let predefined = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ["constructor"];
|
|
5716
5712
|
const proto = Object.getPrototypeOf(obj);
|
|
5717
5713
|
const propNames = Object.getOwnPropertyNames(proto);
|
|
5718
|
-
const object = obj;
|
|
5719
5714
|
for (const key of propNames) {
|
|
5720
|
-
|
|
5721
|
-
if (typeof value === "function") {
|
|
5715
|
+
if (typeof obj[key] === "function") {
|
|
5722
5716
|
if (!predefined.find((name10) => key === name10)) {
|
|
5723
|
-
|
|
5717
|
+
obj[key] = obj[key].bind(obj);
|
|
5724
5718
|
}
|
|
5725
5719
|
}
|
|
5726
5720
|
}
|
|
5727
5721
|
}
|
|
5728
5722
|
var init_autobind = __esm({
|
|
5729
|
-
"
|
|
5723
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/autobind.js"() {
|
|
5730
5724
|
}
|
|
5731
5725
|
});
|
|
5732
5726
|
|
|
5733
|
-
//
|
|
5727
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/assert.js
|
|
5734
5728
|
function assert5(condition, message) {
|
|
5735
5729
|
if (!condition) {
|
|
5736
5730
|
throw new Error(message || "Assertion failed");
|
|
5737
5731
|
}
|
|
5738
5732
|
}
|
|
5739
5733
|
var init_assert4 = __esm({
|
|
5740
|
-
"
|
|
5734
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/assert.js"() {
|
|
5741
5735
|
}
|
|
5742
5736
|
});
|
|
5743
5737
|
|
|
5744
|
-
//
|
|
5738
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/hi-res-timestamp.js
|
|
5745
5739
|
function getHiResTimestamp() {
|
|
5746
5740
|
let timestamp;
|
|
5747
|
-
if (isBrowser3
|
|
5741
|
+
if (isBrowser3 && "performance" in window_3) {
|
|
5748
5742
|
var _window$performance, _window$performance$n;
|
|
5749
5743
|
timestamp = window_3 === null || window_3 === void 0 ? void 0 : (_window$performance = window_3.performance) === null || _window$performance === void 0 ? void 0 : (_window$performance$n = _window$performance.now) === null || _window$performance$n === void 0 ? void 0 : _window$performance$n.call(_window$performance);
|
|
5750
5744
|
} else if ("hrtime" in process_) {
|
|
@@ -5757,12 +5751,12 @@
|
|
|
5757
5751
|
return timestamp;
|
|
5758
5752
|
}
|
|
5759
5753
|
var init_hi_res_timestamp = __esm({
|
|
5760
|
-
"
|
|
5761
|
-
|
|
5754
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/hi-res-timestamp.js"() {
|
|
5755
|
+
init_esm4();
|
|
5762
5756
|
}
|
|
5763
5757
|
});
|
|
5764
5758
|
|
|
5765
|
-
//
|
|
5759
|
+
// ../../node_modules/@probe.gl/log/dist/esm/log.js
|
|
5766
5760
|
function noop() {
|
|
5767
5761
|
}
|
|
5768
5762
|
function normalizeLogLevel(logLevel) {
|
|
@@ -5867,11 +5861,11 @@
|
|
|
5867
5861
|
}
|
|
5868
5862
|
return "empty";
|
|
5869
5863
|
}
|
|
5870
|
-
var originalConsole,
|
|
5864
|
+
var originalConsole, DEFAULT_SETTINGS, cache, ONCE, Log;
|
|
5871
5865
|
var init_log = __esm({
|
|
5872
|
-
"
|
|
5866
|
+
"../../node_modules/@probe.gl/log/dist/esm/log.js"() {
|
|
5873
5867
|
init_defineProperty();
|
|
5874
|
-
|
|
5868
|
+
init_esm4();
|
|
5875
5869
|
init_local_storage();
|
|
5876
5870
|
init_formatters();
|
|
5877
5871
|
init_color();
|
|
@@ -5879,13 +5873,13 @@
|
|
|
5879
5873
|
init_assert4();
|
|
5880
5874
|
init_hi_res_timestamp();
|
|
5881
5875
|
originalConsole = {
|
|
5882
|
-
debug: isBrowser3
|
|
5876
|
+
debug: isBrowser3 ? console.debug || console.log : console.log,
|
|
5883
5877
|
log: console.log,
|
|
5884
5878
|
info: console.info,
|
|
5885
5879
|
warn: console.warn,
|
|
5886
5880
|
error: console.error
|
|
5887
5881
|
};
|
|
5888
|
-
|
|
5882
|
+
DEFAULT_SETTINGS = {
|
|
5889
5883
|
enabled: true,
|
|
5890
5884
|
level: 0
|
|
5891
5885
|
};
|
|
@@ -5909,7 +5903,7 @@
|
|
|
5909
5903
|
_defineProperty(this, "LOG_THROTTLE_TIMEOUT", 0);
|
|
5910
5904
|
this.id = id;
|
|
5911
5905
|
this.userData = {};
|
|
5912
|
-
this._storage = new LocalStorage("__probe-".concat(this.id, "__"),
|
|
5906
|
+
this._storage = new LocalStorage("__probe-".concat(this.id, "__"), DEFAULT_SETTINGS);
|
|
5913
5907
|
this.timeStamp("".concat(this.id, " started"));
|
|
5914
5908
|
autobind(this);
|
|
5915
5909
|
Object.seal(this);
|
|
@@ -5997,6 +5991,9 @@
|
|
|
5997
5991
|
return this._getLogFunction(logLevel, message, console.info, arguments);
|
|
5998
5992
|
}
|
|
5999
5993
|
once(logLevel, message) {
|
|
5994
|
+
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
5995
|
+
args[_key - 2] = arguments[_key];
|
|
5996
|
+
}
|
|
6000
5997
|
return this._getLogFunction(logLevel, message, originalConsole.debug || originalConsole.info, arguments, ONCE);
|
|
6001
5998
|
}
|
|
6002
5999
|
table(logLevel, table, columns) {
|
|
@@ -6018,7 +6015,7 @@
|
|
|
6018
6015
|
if (!this._shouldLog(logLevel || priority)) {
|
|
6019
6016
|
return noop;
|
|
6020
6017
|
}
|
|
6021
|
-
return isBrowser3
|
|
6018
|
+
return isBrowser3 ? logImageInBrowser({
|
|
6022
6019
|
image,
|
|
6023
6020
|
message,
|
|
6024
6021
|
scale: scale5
|
|
@@ -6091,7 +6088,7 @@
|
|
|
6091
6088
|
opts.delta = this.getDelta();
|
|
6092
6089
|
this._deltaTs = getHiResTimestamp();
|
|
6093
6090
|
const tag = opts.tag || opts.message;
|
|
6094
|
-
if (opts.once
|
|
6091
|
+
if (opts.once) {
|
|
6095
6092
|
if (!cache[tag]) {
|
|
6096
6093
|
cache[tag] = getHiResTimestamp();
|
|
6097
6094
|
} else {
|
|
@@ -6108,13 +6105,13 @@
|
|
|
6108
6105
|
}
|
|
6109
6106
|
});
|
|
6110
6107
|
|
|
6111
|
-
//
|
|
6112
|
-
var
|
|
6113
|
-
var
|
|
6114
|
-
"
|
|
6108
|
+
// ../../node_modules/@probe.gl/log/dist/esm/index.js
|
|
6109
|
+
var esm_default;
|
|
6110
|
+
var init_esm5 = __esm({
|
|
6111
|
+
"../../node_modules/@probe.gl/log/dist/esm/index.js"() {
|
|
6115
6112
|
init_log();
|
|
6116
6113
|
init_log();
|
|
6117
|
-
|
|
6114
|
+
esm_default = new Log({
|
|
6118
6115
|
id: "@probe.gl/log"
|
|
6119
6116
|
});
|
|
6120
6117
|
}
|
|
@@ -6124,7 +6121,7 @@
|
|
|
6124
6121
|
var probeLog, NullLog, ConsoleLog;
|
|
6125
6122
|
var init_loggers = __esm({
|
|
6126
6123
|
"../core/src/lib/loader-utils/loggers.ts"() {
|
|
6127
|
-
|
|
6124
|
+
init_esm5();
|
|
6128
6125
|
probeLog = new Log({ id: "loaders.gl" });
|
|
6129
6126
|
NullLog = class {
|
|
6130
6127
|
log() {
|
|
@@ -6367,7 +6364,7 @@
|
|
|
6367
6364
|
var log;
|
|
6368
6365
|
var init_log2 = __esm({
|
|
6369
6366
|
"../core/src/lib/utils/log.ts"() {
|
|
6370
|
-
|
|
6367
|
+
init_esm5();
|
|
6371
6368
|
log = new Log({ id: "loaders.gl" });
|
|
6372
6369
|
}
|
|
6373
6370
|
});
|
|
@@ -10608,8 +10605,8 @@
|
|
|
10608
10605
|
this.json.scenes.push({ nodes: nodeIndices });
|
|
10609
10606
|
return this.json.scenes.length - 1;
|
|
10610
10607
|
}
|
|
10611
|
-
addNode(
|
|
10612
|
-
const { meshIndex, matrix } =
|
|
10608
|
+
addNode(node2) {
|
|
10609
|
+
const { meshIndex, matrix } = node2;
|
|
10613
10610
|
this.json.nodes = this.json.nodes || [];
|
|
10614
10611
|
const nodeData = { mesh: meshIndex };
|
|
10615
10612
|
if (matrix) {
|
|
@@ -11479,12 +11476,12 @@
|
|
|
11479
11476
|
gltfScenegraph.json.lights = extension.lights;
|
|
11480
11477
|
gltfScenegraph.removeExtension(KHR_LIGHTS_PUNCTUAL);
|
|
11481
11478
|
}
|
|
11482
|
-
for (const
|
|
11483
|
-
const nodeExtension = gltfScenegraph.getObjectExtension(
|
|
11479
|
+
for (const node2 of json.nodes || []) {
|
|
11480
|
+
const nodeExtension = gltfScenegraph.getObjectExtension(node2, KHR_LIGHTS_PUNCTUAL);
|
|
11484
11481
|
if (nodeExtension) {
|
|
11485
|
-
|
|
11482
|
+
node2.light = nodeExtension.light;
|
|
11486
11483
|
}
|
|
11487
|
-
gltfScenegraph.removeObjectExtension(
|
|
11484
|
+
gltfScenegraph.removeObjectExtension(node2, KHR_LIGHTS_PUNCTUAL);
|
|
11488
11485
|
}
|
|
11489
11486
|
}
|
|
11490
11487
|
async function encode2(gltfData) {
|
|
@@ -11498,8 +11495,8 @@
|
|
|
11498
11495
|
}
|
|
11499
11496
|
if (gltfScenegraph.json.lights) {
|
|
11500
11497
|
for (const light of gltfScenegraph.json.lights) {
|
|
11501
|
-
const
|
|
11502
|
-
gltfScenegraph.addObjectExtension(
|
|
11498
|
+
const node2 = light.node;
|
|
11499
|
+
gltfScenegraph.addObjectExtension(node2, KHR_LIGHTS_PUNCTUAL, light);
|
|
11503
11500
|
}
|
|
11504
11501
|
delete gltfScenegraph.json.lights;
|
|
11505
11502
|
}
|
|
@@ -11890,11 +11887,11 @@
|
|
|
11890
11887
|
for (const mesh of json.meshes) {
|
|
11891
11888
|
this._convertMeshIds(mesh);
|
|
11892
11889
|
}
|
|
11893
|
-
for (const
|
|
11894
|
-
this._convertNodeIds(
|
|
11890
|
+
for (const node2 of json.nodes) {
|
|
11891
|
+
this._convertNodeIds(node2);
|
|
11895
11892
|
}
|
|
11896
|
-
for (const
|
|
11897
|
-
this._convertSceneIds(
|
|
11893
|
+
for (const node2 of json.scenes) {
|
|
11894
|
+
this._convertSceneIds(node2);
|
|
11898
11895
|
}
|
|
11899
11896
|
}
|
|
11900
11897
|
_convertTextureIds(texture) {
|
|
@@ -11916,17 +11913,17 @@
|
|
|
11916
11913
|
}
|
|
11917
11914
|
}
|
|
11918
11915
|
}
|
|
11919
|
-
_convertNodeIds(
|
|
11920
|
-
if (
|
|
11921
|
-
|
|
11916
|
+
_convertNodeIds(node2) {
|
|
11917
|
+
if (node2.children) {
|
|
11918
|
+
node2.children = node2.children.map((child) => this._convertIdToIndex(child, "node"));
|
|
11922
11919
|
}
|
|
11923
|
-
if (
|
|
11924
|
-
|
|
11920
|
+
if (node2.meshes) {
|
|
11921
|
+
node2.meshes = node2.meshes.map((mesh) => this._convertIdToIndex(mesh, "mesh"));
|
|
11925
11922
|
}
|
|
11926
11923
|
}
|
|
11927
11924
|
_convertSceneIds(scene) {
|
|
11928
11925
|
if (scene.nodes) {
|
|
11929
|
-
scene.nodes = scene.nodes.map((
|
|
11926
|
+
scene.nodes = scene.nodes.map((node2) => this._convertIdToIndex(node2, "node"));
|
|
11930
11927
|
}
|
|
11931
11928
|
}
|
|
11932
11929
|
_convertIdsToIndices(json, topLevelArrayName) {
|
|
@@ -12069,7 +12066,7 @@
|
|
|
12069
12066
|
json.meshes = json.meshes.map((mesh, i2) => this._resolveMesh(mesh, i2));
|
|
12070
12067
|
}
|
|
12071
12068
|
if (json.nodes) {
|
|
12072
|
-
json.nodes = json.nodes.map((
|
|
12069
|
+
json.nodes = json.nodes.map((node2, i2) => this._resolveNode(node2, i2));
|
|
12073
12070
|
}
|
|
12074
12071
|
if (json.skins) {
|
|
12075
12072
|
json.skins = json.skins.map((skin, i2) => this._resolveSkin(skin, i2));
|
|
@@ -12129,31 +12126,31 @@
|
|
|
12129
12126
|
}
|
|
12130
12127
|
_resolveScene(scene, index) {
|
|
12131
12128
|
scene.id = scene.id || `scene-${index}`;
|
|
12132
|
-
scene.nodes = (scene.nodes || []).map((
|
|
12129
|
+
scene.nodes = (scene.nodes || []).map((node2) => this.getNode(node2));
|
|
12133
12130
|
return scene;
|
|
12134
12131
|
}
|
|
12135
|
-
_resolveNode(
|
|
12136
|
-
|
|
12137
|
-
if (
|
|
12138
|
-
|
|
12132
|
+
_resolveNode(node2, index) {
|
|
12133
|
+
node2.id = node2.id || `node-${index}`;
|
|
12134
|
+
if (node2.children) {
|
|
12135
|
+
node2.children = node2.children.map((child) => this.getNode(child));
|
|
12139
12136
|
}
|
|
12140
|
-
if (
|
|
12141
|
-
|
|
12142
|
-
} else if (
|
|
12143
|
-
|
|
12137
|
+
if (node2.mesh !== void 0) {
|
|
12138
|
+
node2.mesh = this.getMesh(node2.mesh);
|
|
12139
|
+
} else if (node2.meshes !== void 0 && node2.meshes.length) {
|
|
12140
|
+
node2.mesh = node2.meshes.reduce((accum, meshIndex) => {
|
|
12144
12141
|
const mesh = this.getMesh(meshIndex);
|
|
12145
12142
|
accum.id = mesh.id;
|
|
12146
12143
|
accum.primitives = accum.primitives.concat(mesh.primitives);
|
|
12147
12144
|
return accum;
|
|
12148
12145
|
}, { primitives: [] });
|
|
12149
12146
|
}
|
|
12150
|
-
if (
|
|
12151
|
-
|
|
12147
|
+
if (node2.camera !== void 0) {
|
|
12148
|
+
node2.camera = this.getCamera(node2.camera);
|
|
12152
12149
|
}
|
|
12153
|
-
if (
|
|
12154
|
-
|
|
12150
|
+
if (node2.skin !== void 0) {
|
|
12151
|
+
node2.skin = this.getSkin(node2.skin);
|
|
12155
12152
|
}
|
|
12156
|
-
return
|
|
12153
|
+
return node2;
|
|
12157
12154
|
}
|
|
12158
12155
|
_resolveSkin(skin, index) {
|
|
12159
12156
|
skin.id = skin.id || `skin-${index}`;
|
package/dist/es5/bundle.js
CHANGED
package/dist/es5/bundle.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.js","names":["moduleExports","require","globalThis","loaders","module","exports","Object","assign"],"sources":["../../src/bundle.ts"],"sourcesContent":["// @ts-nocheck\nconst moduleExports = require('./index');\nglobalThis.loaders = globalThis.loaders || {};\nmodule.exports = Object.assign(globalThis.loaders, moduleExports);\n"],"mappings":";;AACA,
|
|
1
|
+
{"version":3,"file":"bundle.js","names":["moduleExports","require","globalThis","loaders","module","exports","Object","assign"],"sources":["../../src/bundle.ts"],"sourcesContent":["// @ts-nocheck\nconst moduleExports = require('./index');\nglobalThis.loaders = globalThis.loaders || {};\nmodule.exports = Object.assign(globalThis.loaders, moduleExports);\n"],"mappings":";;AACA,MAAMA,aAAa,GAAGC,OAAO,CAAC,SAAS,CAAC;AACxCC,UAAU,CAACC,OAAO,GAAGD,UAAU,CAACC,OAAO,IAAI,CAAC,CAAC;AAC7CC,MAAM,CAACC,OAAO,GAAGC,MAAM,CAACC,MAAM,CAACL,UAAU,CAACC,OAAO,EAAEH,aAAa,CAAC"}
|
|
@@ -1,77 +1,43 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.CesiumIonLoader = void 0;
|
|
8
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
7
|
var _tiles3dLoader = require("./tiles-3d-loader");
|
|
12
8
|
var _ion = require("./lib/ion/ion");
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
_args2 = arguments;
|
|
26
|
-
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
27
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
28
|
-
case 0:
|
|
29
|
-
options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
|
|
30
|
-
options = options['cesium-ion'] || {};
|
|
31
|
-
_options = options, accessToken = _options.accessToken;
|
|
32
|
-
assetId = options.assetId;
|
|
33
|
-
if (!Number.isFinite(assetId)) {
|
|
34
|
-
matched = url.match(/\/([0-9]+)\/tileset.json/);
|
|
35
|
-
assetId = matched && matched[1];
|
|
36
|
-
}
|
|
37
|
-
return _context2.abrupt("return", (0, _ion.getIonTilesetMetadata)(accessToken, assetId));
|
|
38
|
-
case 6:
|
|
39
|
-
case "end":
|
|
40
|
-
return _context2.stop();
|
|
41
|
-
}
|
|
42
|
-
}, _callee2);
|
|
43
|
-
}));
|
|
44
|
-
return _preload.apply(this, arguments);
|
|
9
|
+
async function preload(url) {
|
|
10
|
+
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
11
|
+
options = options['cesium-ion'] || {};
|
|
12
|
+
const {
|
|
13
|
+
accessToken
|
|
14
|
+
} = options;
|
|
15
|
+
let assetId = options.assetId;
|
|
16
|
+
if (!Number.isFinite(assetId)) {
|
|
17
|
+
const matched = url.match(/\/([0-9]+)\/tileset.json/);
|
|
18
|
+
assetId = matched && matched[1];
|
|
19
|
+
}
|
|
20
|
+
return (0, _ion.getIonTilesetMetadata)(accessToken, assetId);
|
|
45
21
|
}
|
|
46
|
-
|
|
22
|
+
const CesiumIonLoader = {
|
|
23
|
+
..._tiles3dLoader.Tiles3DLoader,
|
|
47
24
|
id: 'cesium-ion',
|
|
48
25
|
name: 'Cesium Ion',
|
|
49
|
-
preload
|
|
50
|
-
parse:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
return _context.abrupt("return", _tiles3dLoader.Tiles3DLoader.parse(data, options, context));
|
|
59
|
-
case 4:
|
|
60
|
-
case "end":
|
|
61
|
-
return _context.stop();
|
|
62
|
-
}
|
|
63
|
-
}, _callee);
|
|
64
|
-
}));
|
|
65
|
-
function parse(_x2, _x3, _x4) {
|
|
66
|
-
return _parse.apply(this, arguments);
|
|
67
|
-
}
|
|
68
|
-
return parse;
|
|
69
|
-
}(),
|
|
26
|
+
preload,
|
|
27
|
+
parse: async (data, options, context) => {
|
|
28
|
+
options = {
|
|
29
|
+
...options
|
|
30
|
+
};
|
|
31
|
+
options['3d-tiles'] = options['cesium-ion'];
|
|
32
|
+
options.loader = CesiumIonLoader;
|
|
33
|
+
return _tiles3dLoader.Tiles3DLoader.parse(data, options, context);
|
|
34
|
+
},
|
|
70
35
|
options: {
|
|
71
|
-
'cesium-ion':
|
|
36
|
+
'cesium-ion': {
|
|
37
|
+
..._tiles3dLoader.Tiles3DLoader.options['3d-tiles'],
|
|
72
38
|
accessToken: null
|
|
73
|
-
}
|
|
39
|
+
}
|
|
74
40
|
}
|
|
75
|
-
}
|
|
41
|
+
};
|
|
76
42
|
exports.CesiumIonLoader = CesiumIonLoader;
|
|
77
43
|
//# sourceMappingURL=cesium-ion-loader.js.map
|