@loaders.gl/3d-tiles 3.4.14 → 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 +65 -64
- 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
|
@@ -5511,7 +5511,7 @@
|
|
|
5511
5511
|
}
|
|
5512
5512
|
});
|
|
5513
5513
|
|
|
5514
|
-
//
|
|
5514
|
+
// ../../node_modules/@probe.gl/env/dist/esm/lib/is-electron.js
|
|
5515
5515
|
function isElectron(mockUserAgent) {
|
|
5516
5516
|
if (typeof window !== "undefined" && typeof window.process === "object" && window.process.type === "renderer") {
|
|
5517
5517
|
return true;
|
|
@@ -5527,54 +5527,59 @@
|
|
|
5527
5527
|
return false;
|
|
5528
5528
|
}
|
|
5529
5529
|
var init_is_electron = __esm({
|
|
5530
|
-
"
|
|
5530
|
+
"../../node_modules/@probe.gl/env/dist/esm/lib/is-electron.js"() {
|
|
5531
5531
|
}
|
|
5532
5532
|
});
|
|
5533
5533
|
|
|
5534
|
-
//
|
|
5534
|
+
// ../../node_modules/@probe.gl/env/dist/esm/lib/is-browser.js
|
|
5535
5535
|
function isBrowser3() {
|
|
5536
5536
|
const isNode = typeof process === "object" && String(process) === "[object process]" && !process.browser;
|
|
5537
5537
|
return !isNode || isElectron();
|
|
5538
5538
|
}
|
|
5539
5539
|
var init_is_browser = __esm({
|
|
5540
|
-
"
|
|
5540
|
+
"../../node_modules/@probe.gl/env/dist/esm/lib/is-browser.js"() {
|
|
5541
5541
|
init_is_electron();
|
|
5542
5542
|
}
|
|
5543
5543
|
});
|
|
5544
5544
|
|
|
5545
|
-
//
|
|
5546
|
-
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_;
|
|
5547
5547
|
var init_globals3 = __esm({
|
|
5548
|
-
"
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
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 || {};
|
|
5555
5560
|
}
|
|
5556
5561
|
});
|
|
5557
5562
|
|
|
5558
|
-
//
|
|
5563
|
+
// ../../node_modules/@probe.gl/env/dist/esm/utils/globals.js
|
|
5559
5564
|
var VERSION3, isBrowser4;
|
|
5560
5565
|
var init_globals4 = __esm({
|
|
5561
|
-
"
|
|
5566
|
+
"../../node_modules/@probe.gl/env/dist/esm/utils/globals.js"() {
|
|
5562
5567
|
init_is_browser();
|
|
5563
5568
|
VERSION3 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "untranspiled source";
|
|
5564
5569
|
isBrowser4 = isBrowser3();
|
|
5565
5570
|
}
|
|
5566
5571
|
});
|
|
5567
5572
|
|
|
5568
|
-
//
|
|
5569
|
-
var
|
|
5570
|
-
"
|
|
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"() {
|
|
5571
5576
|
init_globals4();
|
|
5572
5577
|
init_globals3();
|
|
5573
5578
|
init_is_browser();
|
|
5574
5579
|
}
|
|
5575
5580
|
});
|
|
5576
5581
|
|
|
5577
|
-
//
|
|
5582
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/local-storage.js
|
|
5578
5583
|
function getStorage(type) {
|
|
5579
5584
|
try {
|
|
5580
5585
|
const storage = window[type];
|
|
@@ -5588,7 +5593,7 @@
|
|
|
5588
5593
|
}
|
|
5589
5594
|
var LocalStorage;
|
|
5590
5595
|
var init_local_storage = __esm({
|
|
5591
|
-
"
|
|
5596
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/local-storage.js"() {
|
|
5592
5597
|
init_defineProperty();
|
|
5593
5598
|
LocalStorage = class {
|
|
5594
5599
|
constructor(id, defaultConfig) {
|
|
@@ -5624,7 +5629,7 @@
|
|
|
5624
5629
|
}
|
|
5625
5630
|
});
|
|
5626
5631
|
|
|
5627
|
-
//
|
|
5632
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/formatters.js
|
|
5628
5633
|
function formatTime(ms) {
|
|
5629
5634
|
let formatted;
|
|
5630
5635
|
if (ms < 10) {
|
|
@@ -5655,35 +5660,31 @@
|
|
|
5655
5660
|
return ["".concat(message, " %c+"), style];
|
|
5656
5661
|
}
|
|
5657
5662
|
var init_formatters = __esm({
|
|
5658
|
-
"
|
|
5663
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/formatters.js"() {
|
|
5659
5664
|
}
|
|
5660
5665
|
});
|
|
5661
5666
|
|
|
5662
|
-
//
|
|
5667
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/color.js
|
|
5663
5668
|
function getColor(color) {
|
|
5664
|
-
|
|
5665
|
-
return color;
|
|
5666
|
-
}
|
|
5667
|
-
color = color.toUpperCase();
|
|
5668
|
-
return COLOR[color] || COLOR.WHITE;
|
|
5669
|
+
return typeof color === "string" ? COLOR[color.toUpperCase()] || COLOR.WHITE : color;
|
|
5669
5670
|
}
|
|
5670
5671
|
function addColor(string, color, background) {
|
|
5671
5672
|
if (!isBrowser3 && typeof string === "string") {
|
|
5672
5673
|
if (color) {
|
|
5673
|
-
|
|
5674
|
-
string = "[".concat(
|
|
5674
|
+
color = getColor(color);
|
|
5675
|
+
string = "[".concat(color, "m").concat(string, "[39m");
|
|
5675
5676
|
}
|
|
5676
5677
|
if (background) {
|
|
5677
|
-
|
|
5678
|
-
string = "[".concat(
|
|
5678
|
+
color = getColor(background);
|
|
5679
|
+
string = "[".concat(background + 10, "m").concat(string, "[49m");
|
|
5679
5680
|
}
|
|
5680
5681
|
}
|
|
5681
5682
|
return string;
|
|
5682
5683
|
}
|
|
5683
|
-
var COLOR
|
|
5684
|
+
var COLOR;
|
|
5684
5685
|
var init_color = __esm({
|
|
5685
|
-
"
|
|
5686
|
-
|
|
5686
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/color.js"() {
|
|
5687
|
+
init_esm4();
|
|
5687
5688
|
(function(COLOR2) {
|
|
5688
5689
|
COLOR2[COLOR2["BLACK"] = 30] = "BLACK";
|
|
5689
5690
|
COLOR2[COLOR2["RED"] = 31] = "RED";
|
|
@@ -5702,45 +5703,42 @@
|
|
|
5702
5703
|
COLOR2[COLOR2["BRIGHT_CYAN"] = 96] = "BRIGHT_CYAN";
|
|
5703
5704
|
COLOR2[COLOR2["BRIGHT_WHITE"] = 97] = "BRIGHT_WHITE";
|
|
5704
5705
|
})(COLOR || (COLOR = {}));
|
|
5705
|
-
BACKGROUND_INCREMENT = 10;
|
|
5706
5706
|
}
|
|
5707
5707
|
});
|
|
5708
5708
|
|
|
5709
|
-
//
|
|
5709
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/autobind.js
|
|
5710
5710
|
function autobind(obj) {
|
|
5711
5711
|
let predefined = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ["constructor"];
|
|
5712
5712
|
const proto = Object.getPrototypeOf(obj);
|
|
5713
5713
|
const propNames = Object.getOwnPropertyNames(proto);
|
|
5714
|
-
const object = obj;
|
|
5715
5714
|
for (const key of propNames) {
|
|
5716
|
-
|
|
5717
|
-
if (typeof value === "function") {
|
|
5715
|
+
if (typeof obj[key] === "function") {
|
|
5718
5716
|
if (!predefined.find((name10) => key === name10)) {
|
|
5719
|
-
|
|
5717
|
+
obj[key] = obj[key].bind(obj);
|
|
5720
5718
|
}
|
|
5721
5719
|
}
|
|
5722
5720
|
}
|
|
5723
5721
|
}
|
|
5724
5722
|
var init_autobind = __esm({
|
|
5725
|
-
"
|
|
5723
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/autobind.js"() {
|
|
5726
5724
|
}
|
|
5727
5725
|
});
|
|
5728
5726
|
|
|
5729
|
-
//
|
|
5727
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/assert.js
|
|
5730
5728
|
function assert5(condition, message) {
|
|
5731
5729
|
if (!condition) {
|
|
5732
5730
|
throw new Error(message || "Assertion failed");
|
|
5733
5731
|
}
|
|
5734
5732
|
}
|
|
5735
5733
|
var init_assert4 = __esm({
|
|
5736
|
-
"
|
|
5734
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/assert.js"() {
|
|
5737
5735
|
}
|
|
5738
5736
|
});
|
|
5739
5737
|
|
|
5740
|
-
//
|
|
5738
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/hi-res-timestamp.js
|
|
5741
5739
|
function getHiResTimestamp() {
|
|
5742
5740
|
let timestamp;
|
|
5743
|
-
if (isBrowser3
|
|
5741
|
+
if (isBrowser3 && "performance" in window_3) {
|
|
5744
5742
|
var _window$performance, _window$performance$n;
|
|
5745
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);
|
|
5746
5744
|
} else if ("hrtime" in process_) {
|
|
@@ -5753,12 +5751,12 @@
|
|
|
5753
5751
|
return timestamp;
|
|
5754
5752
|
}
|
|
5755
5753
|
var init_hi_res_timestamp = __esm({
|
|
5756
|
-
"
|
|
5757
|
-
|
|
5754
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/hi-res-timestamp.js"() {
|
|
5755
|
+
init_esm4();
|
|
5758
5756
|
}
|
|
5759
5757
|
});
|
|
5760
5758
|
|
|
5761
|
-
//
|
|
5759
|
+
// ../../node_modules/@probe.gl/log/dist/esm/log.js
|
|
5762
5760
|
function noop() {
|
|
5763
5761
|
}
|
|
5764
5762
|
function normalizeLogLevel(logLevel) {
|
|
@@ -5863,11 +5861,11 @@
|
|
|
5863
5861
|
}
|
|
5864
5862
|
return "empty";
|
|
5865
5863
|
}
|
|
5866
|
-
var originalConsole,
|
|
5864
|
+
var originalConsole, DEFAULT_SETTINGS, cache, ONCE, Log;
|
|
5867
5865
|
var init_log = __esm({
|
|
5868
|
-
"
|
|
5866
|
+
"../../node_modules/@probe.gl/log/dist/esm/log.js"() {
|
|
5869
5867
|
init_defineProperty();
|
|
5870
|
-
|
|
5868
|
+
init_esm4();
|
|
5871
5869
|
init_local_storage();
|
|
5872
5870
|
init_formatters();
|
|
5873
5871
|
init_color();
|
|
@@ -5875,13 +5873,13 @@
|
|
|
5875
5873
|
init_assert4();
|
|
5876
5874
|
init_hi_res_timestamp();
|
|
5877
5875
|
originalConsole = {
|
|
5878
|
-
debug: isBrowser3
|
|
5876
|
+
debug: isBrowser3 ? console.debug || console.log : console.log,
|
|
5879
5877
|
log: console.log,
|
|
5880
5878
|
info: console.info,
|
|
5881
5879
|
warn: console.warn,
|
|
5882
5880
|
error: console.error
|
|
5883
5881
|
};
|
|
5884
|
-
|
|
5882
|
+
DEFAULT_SETTINGS = {
|
|
5885
5883
|
enabled: true,
|
|
5886
5884
|
level: 0
|
|
5887
5885
|
};
|
|
@@ -5905,7 +5903,7 @@
|
|
|
5905
5903
|
_defineProperty(this, "LOG_THROTTLE_TIMEOUT", 0);
|
|
5906
5904
|
this.id = id;
|
|
5907
5905
|
this.userData = {};
|
|
5908
|
-
this._storage = new LocalStorage("__probe-".concat(this.id, "__"),
|
|
5906
|
+
this._storage = new LocalStorage("__probe-".concat(this.id, "__"), DEFAULT_SETTINGS);
|
|
5909
5907
|
this.timeStamp("".concat(this.id, " started"));
|
|
5910
5908
|
autobind(this);
|
|
5911
5909
|
Object.seal(this);
|
|
@@ -5993,6 +5991,9 @@
|
|
|
5993
5991
|
return this._getLogFunction(logLevel, message, console.info, arguments);
|
|
5994
5992
|
}
|
|
5995
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
|
+
}
|
|
5996
5997
|
return this._getLogFunction(logLevel, message, originalConsole.debug || originalConsole.info, arguments, ONCE);
|
|
5997
5998
|
}
|
|
5998
5999
|
table(logLevel, table, columns) {
|
|
@@ -6014,7 +6015,7 @@
|
|
|
6014
6015
|
if (!this._shouldLog(logLevel || priority)) {
|
|
6015
6016
|
return noop;
|
|
6016
6017
|
}
|
|
6017
|
-
return isBrowser3
|
|
6018
|
+
return isBrowser3 ? logImageInBrowser({
|
|
6018
6019
|
image,
|
|
6019
6020
|
message,
|
|
6020
6021
|
scale: scale5
|
|
@@ -6087,7 +6088,7 @@
|
|
|
6087
6088
|
opts.delta = this.getDelta();
|
|
6088
6089
|
this._deltaTs = getHiResTimestamp();
|
|
6089
6090
|
const tag = opts.tag || opts.message;
|
|
6090
|
-
if (opts.once
|
|
6091
|
+
if (opts.once) {
|
|
6091
6092
|
if (!cache[tag]) {
|
|
6092
6093
|
cache[tag] = getHiResTimestamp();
|
|
6093
6094
|
} else {
|
|
@@ -6104,13 +6105,13 @@
|
|
|
6104
6105
|
}
|
|
6105
6106
|
});
|
|
6106
6107
|
|
|
6107
|
-
//
|
|
6108
|
-
var
|
|
6109
|
-
var
|
|
6110
|
-
"
|
|
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"() {
|
|
6111
6112
|
init_log();
|
|
6112
6113
|
init_log();
|
|
6113
|
-
|
|
6114
|
+
esm_default = new Log({
|
|
6114
6115
|
id: "@probe.gl/log"
|
|
6115
6116
|
});
|
|
6116
6117
|
}
|
|
@@ -6120,7 +6121,7 @@
|
|
|
6120
6121
|
var probeLog, NullLog, ConsoleLog;
|
|
6121
6122
|
var init_loggers = __esm({
|
|
6122
6123
|
"../core/src/lib/loader-utils/loggers.ts"() {
|
|
6123
|
-
|
|
6124
|
+
init_esm5();
|
|
6124
6125
|
probeLog = new Log({ id: "loaders.gl" });
|
|
6125
6126
|
NullLog = class {
|
|
6126
6127
|
log() {
|
|
@@ -6363,7 +6364,7 @@
|
|
|
6363
6364
|
var log;
|
|
6364
6365
|
var init_log2 = __esm({
|
|
6365
6366
|
"../core/src/lib/utils/log.ts"() {
|
|
6366
|
-
|
|
6367
|
+
init_esm5();
|
|
6367
6368
|
log = new Log({ id: "loaders.gl" });
|
|
6368
6369
|
}
|
|
6369
6370
|
});
|
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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cesium-ion-loader.js","names":["_tiles3dLoader","require","_ion","
|
|
1
|
+
{"version":3,"file":"cesium-ion-loader.js","names":["_tiles3dLoader","require","_ion","preload","url","options","arguments","length","undefined","accessToken","assetId","Number","isFinite","matched","match","getIonTilesetMetadata","CesiumIonLoader","Tiles3DLoader","id","name","parse","data","context","loader","exports"],"sources":["../../src/cesium-ion-loader.ts"],"sourcesContent":["import type {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport {Tiles3DLoader} from './tiles-3d-loader';\nimport {getIonTilesetMetadata} from './lib/ion/ion';\n\nasync function preload(url, options = {}) {\n options = options['cesium-ion'] || {};\n // @ts-ignore\n const {accessToken} = options;\n // @ts-ignore\n let assetId = options.assetId;\n if (!Number.isFinite(assetId)) {\n const matched = url.match(/\\/([0-9]+)\\/tileset.json/);\n assetId = matched && matched[1];\n }\n return getIonTilesetMetadata(accessToken, assetId);\n}\n\n/**\n * Loader for 3D tiles from Cesium ION\n */\nexport const CesiumIonLoader: LoaderWithParser = {\n ...Tiles3DLoader,\n id: 'cesium-ion',\n name: 'Cesium Ion',\n // @ts-ignore\n preload,\n parse: async (data, options?, context?) => {\n options = {...options};\n options['3d-tiles'] = options['cesium-ion'];\n // @ts-ignore\n options.loader = CesiumIonLoader;\n return Tiles3DLoader.parse(data, options, context); // , loader);\n },\n options: {\n 'cesium-ion': {\n // @ts-expect-error\n ...Tiles3DLoader.options['3d-tiles'],\n accessToken: null\n }\n }\n};\n"],"mappings":";;;;;;AACA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AAEA,eAAeE,OAAOA,CAACC,GAAG,EAAgB;EAAA,IAAdC,OAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACtCD,OAAO,GAAGA,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;EAErC,MAAM;IAACI;EAAW,CAAC,GAAGJ,OAAO;EAE7B,IAAIK,OAAO,GAAGL,OAAO,CAACK,OAAO;EAC7B,IAAI,CAACC,MAAM,CAACC,QAAQ,CAACF,OAAO,CAAC,EAAE;IAC7B,MAAMG,OAAO,GAAGT,GAAG,CAACU,KAAK,CAAC,0BAA0B,CAAC;IACrDJ,OAAO,GAAGG,OAAO,IAAIA,OAAO,CAAC,CAAC,CAAC;EACjC;EACA,OAAO,IAAAE,0BAAqB,EAACN,WAAW,EAAEC,OAAO,CAAC;AACpD;AAKO,MAAMM,eAAiC,GAAG;EAC/C,GAAGC,4BAAa;EAChBC,EAAE,EAAE,YAAY;EAChBC,IAAI,EAAE,YAAY;EAElBhB,OAAO;EACPiB,KAAK,EAAE,MAAAA,CAAOC,IAAI,EAAEhB,OAAQ,EAAEiB,OAAQ,KAAK;IACzCjB,OAAO,GAAG;MAAC,GAAGA;IAAO,CAAC;IACtBA,OAAO,CAAC,UAAU,CAAC,GAAGA,OAAO,CAAC,YAAY,CAAC;IAE3CA,OAAO,CAACkB,MAAM,GAAGP,eAAe;IAChC,OAAOC,4BAAa,CAACG,KAAK,CAACC,IAAI,EAAEhB,OAAO,EAAEiB,OAAO,CAAC;EACpD,CAAC;EACDjB,OAAO,EAAE;IACP,YAAY,EAAE;MAEZ,GAAGY,4BAAa,CAACZ,OAAO,CAAC,UAAU,CAAC;MACpCI,WAAW,EAAE;IACf;EACF;AACF,CAAC;AAACe,OAAA,CAAAR,eAAA,GAAAA,eAAA"}
|
package/dist/es5/index.js
CHANGED
|
@@ -6,49 +6,49 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
Object.defineProperty(exports, "CesiumIonLoader", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function
|
|
9
|
+
get: function () {
|
|
10
10
|
return _cesiumIonLoader.CesiumIonLoader;
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "TILE3D_TYPE", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function
|
|
15
|
+
get: function () {
|
|
16
16
|
return _constants.TILE3D_TYPE;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "Tile3DBatchTable", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function
|
|
21
|
+
get: function () {
|
|
22
22
|
return _tile3dBatchTable.default;
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
Object.defineProperty(exports, "Tile3DFeatureTable", {
|
|
26
26
|
enumerable: true,
|
|
27
|
-
get: function
|
|
27
|
+
get: function () {
|
|
28
28
|
return _tile3dFeatureTable.default;
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "Tile3DSubtreeLoader", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function
|
|
33
|
+
get: function () {
|
|
34
34
|
return _tile3dSubtreeLoader.Tile3DSubtreeLoader;
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
Object.defineProperty(exports, "Tile3DWriter", {
|
|
38
38
|
enumerable: true,
|
|
39
|
-
get: function
|
|
39
|
+
get: function () {
|
|
40
40
|
return _tile3dWriter.Tile3DWriter;
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "Tiles3DLoader", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function
|
|
45
|
+
get: function () {
|
|
46
46
|
return _tiles3dLoader.Tiles3DLoader;
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
49
|
Object.defineProperty(exports, "_getIonTilesetMetadata", {
|
|
50
50
|
enumerable: true,
|
|
51
|
-
get: function
|
|
51
|
+
get: function () {
|
|
52
52
|
return _ion.getIonTilesetMetadata;
|
|
53
53
|
}
|
|
54
54
|
});
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.createTypedArrayFromAccessor = createTypedArrayFromAccessor;
|
|
7
7
|
var _math = require("@loaders.gl/math");
|
|
8
8
|
var _loaderUtils = require("@loaders.gl/loader-utils");
|
|
9
|
-
|
|
9
|
+
const COMPONENTS_PER_ATTRIBUTE = {
|
|
10
10
|
SCALAR: 1,
|
|
11
11
|
VEC2: 2,
|
|
12
12
|
VEC3: 3,
|
|
@@ -15,55 +15,41 @@ var COMPONENTS_PER_ATTRIBUTE = {
|
|
|
15
15
|
MAT3: 9,
|
|
16
16
|
MAT4: 16
|
|
17
17
|
};
|
|
18
|
-
|
|
19
|
-
SCALAR:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return [values[3 * i + 0], values[3 * i + 1], values[3 * i + 2]];
|
|
27
|
-
},
|
|
28
|
-
VEC4: function VEC4(values, i) {
|
|
29
|
-
return [values[4 * i + 0], values[4 * i + 1], values[4 * i + 2], values[4 * i + 3]];
|
|
30
|
-
},
|
|
31
|
-
MAT2: function MAT2(values, i) {
|
|
32
|
-
return [values[4 * i + 0], values[4 * i + 1], values[4 * i + 2], values[4 * i + 3]];
|
|
33
|
-
},
|
|
34
|
-
MAT3: function MAT3(values, i) {
|
|
35
|
-
return [values[9 * i + 0], values[9 * i + 1], values[9 * i + 2], values[9 * i + 3], values[9 * i + 4], values[9 * i + 5], values[9 * i + 6], values[9 * i + 7], values[9 * i + 8]];
|
|
36
|
-
},
|
|
37
|
-
MAT4: function MAT4(values, i) {
|
|
38
|
-
return [values[16 * i + 0], values[16 * i + 1], values[16 * i + 2], values[16 * i + 3], values[16 * i + 4], values[16 * i + 5], values[16 * i + 6], values[16 * i + 7], values[16 * i + 8], values[16 * i + 9], values[16 * i + 10], values[16 * i + 11], values[16 * i + 12], values[16 * i + 13], values[16 * i + 14], values[16 * i + 15]];
|
|
39
|
-
}
|
|
18
|
+
const UNPACKER = {
|
|
19
|
+
SCALAR: (values, i) => values[i],
|
|
20
|
+
VEC2: (values, i) => [values[2 * i + 0], values[2 * i + 1]],
|
|
21
|
+
VEC3: (values, i) => [values[3 * i + 0], values[3 * i + 1], values[3 * i + 2]],
|
|
22
|
+
VEC4: (values, i) => [values[4 * i + 0], values[4 * i + 1], values[4 * i + 2], values[4 * i + 3]],
|
|
23
|
+
MAT2: (values, i) => [values[4 * i + 0], values[4 * i + 1], values[4 * i + 2], values[4 * i + 3]],
|
|
24
|
+
MAT3: (values, i) => [values[9 * i + 0], values[9 * i + 1], values[9 * i + 2], values[9 * i + 3], values[9 * i + 4], values[9 * i + 5], values[9 * i + 6], values[9 * i + 7], values[9 * i + 8]],
|
|
25
|
+
MAT4: (values, i) => [values[16 * i + 0], values[16 * i + 1], values[16 * i + 2], values[16 * i + 3], values[16 * i + 4], values[16 * i + 5], values[16 * i + 6], values[16 * i + 7], values[16 * i + 8], values[16 * i + 9], values[16 * i + 10], values[16 * i + 11], values[16 * i + 12], values[16 * i + 13], values[16 * i + 14], values[16 * i + 15]]
|
|
40
26
|
};
|
|
41
|
-
|
|
42
|
-
SCALAR:
|
|
27
|
+
const PACKER = {
|
|
28
|
+
SCALAR: (x, values, i) => {
|
|
43
29
|
values[i] = x;
|
|
44
30
|
},
|
|
45
|
-
VEC2:
|
|
31
|
+
VEC2: (x, values, i) => {
|
|
46
32
|
values[2 * i + 0] = x[0];
|
|
47
33
|
values[2 * i + 1] = x[1];
|
|
48
34
|
},
|
|
49
|
-
VEC3:
|
|
35
|
+
VEC3: (x, values, i) => {
|
|
50
36
|
values[3 * i + 0] = x[0];
|
|
51
37
|
values[3 * i + 1] = x[1];
|
|
52
38
|
values[3 * i + 2] = x[2];
|
|
53
39
|
},
|
|
54
|
-
VEC4:
|
|
40
|
+
VEC4: (x, values, i) => {
|
|
55
41
|
values[4 * i + 0] = x[0];
|
|
56
42
|
values[4 * i + 1] = x[1];
|
|
57
43
|
values[4 * i + 2] = x[2];
|
|
58
44
|
values[4 * i + 3] = x[3];
|
|
59
45
|
},
|
|
60
|
-
MAT2:
|
|
46
|
+
MAT2: (x, values, i) => {
|
|
61
47
|
values[4 * i + 0] = x[0];
|
|
62
48
|
values[4 * i + 1] = x[1];
|
|
63
49
|
values[4 * i + 2] = x[2];
|
|
64
50
|
values[4 * i + 3] = x[3];
|
|
65
51
|
},
|
|
66
|
-
MAT3:
|
|
52
|
+
MAT3: (x, values, i) => {
|
|
67
53
|
values[9 * i + 0] = x[0];
|
|
68
54
|
values[9 * i + 1] = x[1];
|
|
69
55
|
values[9 * i + 2] = x[2];
|
|
@@ -75,7 +61,7 @@ var PACKER = {
|
|
|
75
61
|
values[9 * i + 8] = x[8];
|
|
76
62
|
values[9 * i + 9] = x[9];
|
|
77
63
|
},
|
|
78
|
-
MAT4:
|
|
64
|
+
MAT4: (x, values, i) => {
|
|
79
65
|
values[16 * i + 0] = x[0];
|
|
80
66
|
values[16 * i + 1] = x[1];
|
|
81
67
|
values[16 * i + 2] = x[2];
|
|
@@ -95,20 +81,22 @@ var PACKER = {
|
|
|
95
81
|
}
|
|
96
82
|
};
|
|
97
83
|
function createTypedArrayFromAccessor(tile3DAccessor, buffer, byteOffset, length) {
|
|
98
|
-
|
|
84
|
+
const {
|
|
85
|
+
componentType
|
|
86
|
+
} = tile3DAccessor;
|
|
99
87
|
(0, _loaderUtils.assert)(tile3DAccessor.componentType);
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
88
|
+
const type = typeof componentType === 'string' ? _math.GLType.fromName(componentType) : componentType;
|
|
89
|
+
const size = COMPONENTS_PER_ATTRIBUTE[tile3DAccessor.type];
|
|
90
|
+
const unpacker = UNPACKER[tile3DAccessor.type];
|
|
91
|
+
const packer = PACKER[tile3DAccessor.type];
|
|
104
92
|
byteOffset += tile3DAccessor.byteOffset;
|
|
105
|
-
|
|
93
|
+
const values = _math.GLType.createTypedArray(type, buffer, byteOffset, size * length);
|
|
106
94
|
return {
|
|
107
|
-
values
|
|
108
|
-
type
|
|
109
|
-
size
|
|
110
|
-
unpacker
|
|
111
|
-
packer
|
|
95
|
+
values,
|
|
96
|
+
type,
|
|
97
|
+
size,
|
|
98
|
+
unpacker,
|
|
99
|
+
packer
|
|
112
100
|
};
|
|
113
101
|
}
|
|
114
102
|
//# sourceMappingURL=tile-3d-accessor-utils.js.map
|