@loaders.gl/i3s 3.4.0-alpha.1 → 3.4.0-alpha.3
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 +421 -210
- package/dist/es5/arcgis-webscene-loader.js +7 -11
- package/dist/es5/arcgis-webscene-loader.js.map +1 -1
- package/dist/es5/i3s-attribute-loader.js +51 -63
- package/dist/es5/i3s-attribute-loader.js.map +1 -1
- package/dist/es5/i3s-building-scene-layer-loader.js +13 -16
- package/dist/es5/i3s-building-scene-layer-loader.js.map +1 -1
- package/dist/es5/i3s-content-loader.js +19 -22
- package/dist/es5/i3s-content-loader.js.map +1 -1
- package/dist/es5/i3s-loader.js +86 -94
- package/dist/es5/i3s-loader.js.map +1 -1
- package/dist/es5/i3s-node-page-loader.js +14 -18
- package/dist/es5/i3s-node-page-loader.js.map +1 -1
- package/dist/es5/index.js.map +1 -1
- package/dist/es5/lib/helpers/i3s-nodepages-tiles.js +109 -124
- package/dist/es5/lib/helpers/i3s-nodepages-tiles.js.map +1 -1
- package/dist/es5/lib/parsers/constants.js +4 -5
- package/dist/es5/lib/parsers/constants.js.map +1 -1
- package/dist/es5/lib/parsers/parse-arcgis-webscene.js +99 -107
- package/dist/es5/lib/parsers/parse-arcgis-webscene.js.map +1 -1
- package/dist/es5/lib/parsers/parse-i3s-attribute.js +14 -21
- package/dist/es5/lib/parsers/parse-i3s-attribute.js.map +1 -1
- package/dist/es5/lib/parsers/parse-i3s-building-scene-layer.js +13 -17
- package/dist/es5/lib/parsers/parse-i3s-building-scene-layer.js.map +1 -1
- package/dist/es5/lib/parsers/parse-i3s-tile-content.js +166 -187
- package/dist/es5/lib/parsers/parse-i3s-tile-content.js.map +1 -1
- package/dist/es5/lib/parsers/parse-i3s.js +31 -35
- package/dist/es5/lib/parsers/parse-i3s.js.map +1 -1
- package/dist/es5/lib/utils/convert-i3s-obb-to-mbs.js.map +1 -1
- package/dist/es5/lib/utils/customizeColors.js +102 -107
- package/dist/es5/lib/utils/customizeColors.js.map +1 -1
- package/dist/es5/lib/utils/url-utils.js +0 -2
- package/dist/es5/lib/utils/url-utils.js.map +1 -1
- package/dist/es5/types.js +8 -8
- package/dist/es5/types.js.map +1 -1
- package/dist/es5/workers/i3s-content-nodejs-worker.js.map +1 -1
- package/dist/es5/workers/i3s-content-worker.js.map +1 -1
- package/dist/esm/arcgis-webscene-loader.js +1 -4
- package/dist/esm/arcgis-webscene-loader.js.map +1 -1
- package/dist/esm/bundle.js +0 -1
- package/dist/esm/bundle.js.map +1 -1
- package/dist/esm/i3s-attribute-loader.js +2 -14
- package/dist/esm/i3s-attribute-loader.js.map +1 -1
- package/dist/esm/i3s-building-scene-layer-loader.js +1 -2
- package/dist/esm/i3s-building-scene-layer-loader.js.map +1 -1
- package/dist/esm/i3s-content-loader.js +1 -2
- package/dist/esm/i3s-content-loader.js.map +1 -1
- package/dist/esm/i3s-loader.js +1 -3
- package/dist/esm/i3s-loader.js.map +1 -1
- package/dist/esm/i3s-node-page-loader.js +1 -3
- package/dist/esm/i3s-node-page-loader.js.map +1 -1
- package/dist/esm/lib/helpers/i3s-nodepages-tiles.js +0 -8
- package/dist/esm/lib/helpers/i3s-nodepages-tiles.js.map +1 -1
- package/dist/esm/lib/parsers/constants.js +3 -4
- package/dist/esm/lib/parsers/constants.js.map +1 -1
- package/dist/esm/lib/parsers/parse-arcgis-webscene.js +0 -4
- package/dist/esm/lib/parsers/parse-arcgis-webscene.js.map +1 -1
- package/dist/esm/lib/parsers/parse-i3s-attribute.js +0 -7
- package/dist/esm/lib/parsers/parse-i3s-attribute.js.map +1 -1
- package/dist/esm/lib/parsers/parse-i3s-building-scene-layer.js +0 -3
- package/dist/esm/lib/parsers/parse-i3s-building-scene-layer.js.map +1 -1
- package/dist/esm/lib/parsers/parse-i3s-tile-content.js +0 -20
- package/dist/esm/lib/parsers/parse-i3s-tile-content.js.map +1 -1
- package/dist/esm/lib/parsers/parse-i3s.js +2 -8
- package/dist/esm/lib/parsers/parse-i3s.js.map +1 -1
- package/dist/esm/lib/utils/convert-i3s-obb-to-mbs.js.map +1 -1
- package/dist/esm/lib/utils/customizeColors.js +0 -4
- package/dist/esm/lib/utils/customizeColors.js.map +1 -1
- package/dist/esm/lib/utils/url-utils.js +0 -3
- package/dist/esm/lib/utils/url-utils.js.map +1 -1
- package/dist/esm/types.js +6 -6
- package/dist/esm/types.js.map +1 -1
- package/dist/i3s-content-nodejs-worker.js +59 -62
- package/dist/i3s-content-nodejs-worker.js.map +3 -3
- package/dist/i3s-content-worker.js +328 -146
- package/dist/lib/helpers/i3s-nodepages-tiles.d.ts.map +1 -1
- package/dist/lib/helpers/i3s-nodepages-tiles.js +5 -1
- package/dist/lib/parsers/parse-i3s-tile-content.d.ts.map +1 -1
- package/dist/lib/parsers/parse-i3s-tile-content.js +2 -0
- package/dist/lib/parsers/parse-i3s.d.ts.map +1 -1
- package/dist/lib/parsers/parse-i3s.js +2 -0
- package/dist/types.d.ts +5 -5
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/lib/helpers/i3s-nodepages-tiles.ts +3 -0
- package/src/lib/parsers/parse-i3s-tile-content.ts +2 -0
- package/src/lib/parsers/parse-i3s.ts +2 -0
- package/src/types.ts +6 -5
package/dist/dist.min.js
CHANGED
|
@@ -119,8 +119,8 @@
|
|
|
119
119
|
};
|
|
120
120
|
this.name = jobName;
|
|
121
121
|
this.workerThread = workerThread;
|
|
122
|
-
this.result = new Promise((
|
|
123
|
-
this._resolve =
|
|
122
|
+
this.result = new Promise((resolve2, reject) => {
|
|
123
|
+
this._resolve = resolve2;
|
|
124
124
|
this._reject = reject;
|
|
125
125
|
});
|
|
126
126
|
}
|
|
@@ -709,46 +709,7 @@
|
|
|
709
709
|
}
|
|
710
710
|
});
|
|
711
711
|
|
|
712
|
-
// ../loader-utils/src/lib/binary-utils/buffer-utils.ts
|
|
713
|
-
function isBuffer(value) {
|
|
714
|
-
return value && typeof value === "object" && value.isBuffer;
|
|
715
|
-
}
|
|
716
|
-
function bufferToArrayBuffer(buffer) {
|
|
717
|
-
if (isBuffer(buffer)) {
|
|
718
|
-
const typedArray = new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.length);
|
|
719
|
-
return typedArray.slice().buffer;
|
|
720
|
-
}
|
|
721
|
-
return buffer;
|
|
722
|
-
}
|
|
723
|
-
var init_buffer_utils = __esm({
|
|
724
|
-
"../loader-utils/src/lib/binary-utils/buffer-utils.ts"() {
|
|
725
|
-
}
|
|
726
|
-
});
|
|
727
|
-
|
|
728
712
|
// ../loader-utils/src/lib/binary-utils/array-buffer-utils.ts
|
|
729
|
-
function toArrayBuffer(data) {
|
|
730
|
-
if (isBuffer(data)) {
|
|
731
|
-
return bufferToArrayBuffer(data);
|
|
732
|
-
}
|
|
733
|
-
if (data instanceof ArrayBuffer) {
|
|
734
|
-
return data;
|
|
735
|
-
}
|
|
736
|
-
if (ArrayBuffer.isView(data)) {
|
|
737
|
-
if (data.byteOffset === 0 && data.byteLength === data.buffer.byteLength) {
|
|
738
|
-
return data.buffer;
|
|
739
|
-
}
|
|
740
|
-
return data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength);
|
|
741
|
-
}
|
|
742
|
-
if (typeof data === "string") {
|
|
743
|
-
const text = data;
|
|
744
|
-
const uint8Array = new TextEncoder().encode(text);
|
|
745
|
-
return uint8Array.buffer;
|
|
746
|
-
}
|
|
747
|
-
if (data && typeof data === "object" && data._toArrayBuffer) {
|
|
748
|
-
return data._toArrayBuffer();
|
|
749
|
-
}
|
|
750
|
-
throw new Error("toArrayBuffer");
|
|
751
|
-
}
|
|
752
713
|
function compareArrayBuffers(arrayBuffer1, arrayBuffer2, byteLength) {
|
|
753
714
|
byteLength = byteLength || arrayBuffer1.byteLength;
|
|
754
715
|
if (arrayBuffer1.byteLength < byteLength || arrayBuffer2.byteLength < byteLength) {
|
|
@@ -776,7 +737,6 @@
|
|
|
776
737
|
}
|
|
777
738
|
var init_array_buffer_utils = __esm({
|
|
778
739
|
"../loader-utils/src/lib/binary-utils/array-buffer-utils.ts"() {
|
|
779
|
-
init_buffer_utils();
|
|
780
740
|
}
|
|
781
741
|
});
|
|
782
742
|
|
|
@@ -794,8 +754,54 @@
|
|
|
794
754
|
}
|
|
795
755
|
});
|
|
796
756
|
|
|
757
|
+
// ../../node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
758
|
+
function _typeof(obj) {
|
|
759
|
+
"@babel/helpers - typeof";
|
|
760
|
+
return _typeof = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(obj2) {
|
|
761
|
+
return typeof obj2;
|
|
762
|
+
} : function(obj2) {
|
|
763
|
+
return obj2 && typeof Symbol == "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
764
|
+
}, _typeof(obj);
|
|
765
|
+
}
|
|
766
|
+
var init_typeof = __esm({
|
|
767
|
+
"../../node_modules/@babel/runtime/helpers/esm/typeof.js"() {
|
|
768
|
+
}
|
|
769
|
+
});
|
|
770
|
+
|
|
771
|
+
// ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
|
772
|
+
function _toPrimitive(input, hint) {
|
|
773
|
+
if (_typeof(input) !== "object" || input === null)
|
|
774
|
+
return input;
|
|
775
|
+
var prim = input[Symbol.toPrimitive];
|
|
776
|
+
if (prim !== void 0) {
|
|
777
|
+
var res = prim.call(input, hint || "default");
|
|
778
|
+
if (_typeof(res) !== "object")
|
|
779
|
+
return res;
|
|
780
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
781
|
+
}
|
|
782
|
+
return (hint === "string" ? String : Number)(input);
|
|
783
|
+
}
|
|
784
|
+
var init_toPrimitive = __esm({
|
|
785
|
+
"../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js"() {
|
|
786
|
+
init_typeof();
|
|
787
|
+
}
|
|
788
|
+
});
|
|
789
|
+
|
|
790
|
+
// ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
|
791
|
+
function _toPropertyKey(arg) {
|
|
792
|
+
var key = _toPrimitive(arg, "string");
|
|
793
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
794
|
+
}
|
|
795
|
+
var init_toPropertyKey = __esm({
|
|
796
|
+
"../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js"() {
|
|
797
|
+
init_typeof();
|
|
798
|
+
init_toPrimitive();
|
|
799
|
+
}
|
|
800
|
+
});
|
|
801
|
+
|
|
797
802
|
// ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
798
803
|
function _defineProperty(obj, key, value) {
|
|
804
|
+
key = _toPropertyKey(key);
|
|
799
805
|
if (key in obj) {
|
|
800
806
|
Object.defineProperty(obj, key, {
|
|
801
807
|
value,
|
|
@@ -810,6 +816,7 @@
|
|
|
810
816
|
}
|
|
811
817
|
var init_defineProperty = __esm({
|
|
812
818
|
"../../node_modules/@babel/runtime/helpers/esm/defineProperty.js"() {
|
|
819
|
+
init_toPropertyKey();
|
|
813
820
|
}
|
|
814
821
|
});
|
|
815
822
|
|
|
@@ -858,19 +865,75 @@
|
|
|
858
865
|
}
|
|
859
866
|
});
|
|
860
867
|
|
|
868
|
+
// ../loader-utils/src/lib/node/buffer.browser.ts
|
|
869
|
+
function toArrayBuffer(buffer) {
|
|
870
|
+
return buffer;
|
|
871
|
+
}
|
|
872
|
+
var init_buffer_browser = __esm({
|
|
873
|
+
"../loader-utils/src/lib/node/buffer.browser.ts"() {
|
|
874
|
+
}
|
|
875
|
+
});
|
|
876
|
+
|
|
877
|
+
// ../loader-utils/src/lib/binary-utils/memory-conversion-utils.ts
|
|
878
|
+
function isBuffer(value) {
|
|
879
|
+
return value && typeof value === "object" && value.isBuffer;
|
|
880
|
+
}
|
|
881
|
+
function toArrayBuffer2(data) {
|
|
882
|
+
if (isBuffer(data)) {
|
|
883
|
+
return toArrayBuffer(data);
|
|
884
|
+
}
|
|
885
|
+
if (data instanceof ArrayBuffer) {
|
|
886
|
+
return data;
|
|
887
|
+
}
|
|
888
|
+
if (ArrayBuffer.isView(data)) {
|
|
889
|
+
if (data.byteOffset === 0 && data.byteLength === data.buffer.byteLength) {
|
|
890
|
+
return data.buffer;
|
|
891
|
+
}
|
|
892
|
+
return data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength);
|
|
893
|
+
}
|
|
894
|
+
if (typeof data === "string") {
|
|
895
|
+
const text = data;
|
|
896
|
+
const uint8Array = new TextEncoder().encode(text);
|
|
897
|
+
return uint8Array.buffer;
|
|
898
|
+
}
|
|
899
|
+
if (data && typeof data === "object" && data._toArrayBuffer) {
|
|
900
|
+
return data._toArrayBuffer();
|
|
901
|
+
}
|
|
902
|
+
throw new Error("toArrayBuffer");
|
|
903
|
+
}
|
|
904
|
+
var init_memory_conversion_utils = __esm({
|
|
905
|
+
"../loader-utils/src/lib/binary-utils/memory-conversion-utils.ts"() {
|
|
906
|
+
init_buffer_browser();
|
|
907
|
+
}
|
|
908
|
+
});
|
|
909
|
+
|
|
910
|
+
// ../loader-utils/src/lib/path-utils/get-cwd.ts
|
|
911
|
+
function getCWD() {
|
|
912
|
+
if (typeof process !== "undefined" && typeof process.cwd !== "undefined") {
|
|
913
|
+
return process.cwd();
|
|
914
|
+
}
|
|
915
|
+
const pathname = window.location?.pathname;
|
|
916
|
+
return pathname?.slice(0, pathname.lastIndexOf("/") + 1) || "";
|
|
917
|
+
}
|
|
918
|
+
var init_get_cwd = __esm({
|
|
919
|
+
"../loader-utils/src/lib/path-utils/get-cwd.ts"() {
|
|
920
|
+
}
|
|
921
|
+
});
|
|
922
|
+
|
|
861
923
|
// ../loader-utils/src/lib/path-utils/path.ts
|
|
862
924
|
var path_exports = {};
|
|
863
925
|
__export(path_exports, {
|
|
864
926
|
dirname: () => dirname,
|
|
865
927
|
filename: () => filename,
|
|
866
|
-
join: () => join
|
|
928
|
+
join: () => join,
|
|
929
|
+
resolve: () => resolve
|
|
867
930
|
});
|
|
868
931
|
function filename(url) {
|
|
869
|
-
const slashIndex = url
|
|
932
|
+
const slashIndex = url ? url.lastIndexOf("/") : -1;
|
|
870
933
|
return slashIndex >= 0 ? url.substr(slashIndex + 1) : "";
|
|
871
934
|
}
|
|
872
935
|
function dirname(url) {
|
|
873
|
-
const slashIndex = url
|
|
936
|
+
const slashIndex = url ? url.lastIndexOf("/") : -1;
|
|
874
937
|
return slashIndex >= 0 ? url.substr(0, slashIndex) : "";
|
|
875
938
|
}
|
|
876
939
|
function join(...parts) {
|
|
@@ -886,8 +949,112 @@
|
|
|
886
949
|
});
|
|
887
950
|
return parts.join(separator);
|
|
888
951
|
}
|
|
952
|
+
function resolve(...components) {
|
|
953
|
+
const paths = [];
|
|
954
|
+
for (let _i = 0; _i < components.length; _i++) {
|
|
955
|
+
paths[_i] = components[_i];
|
|
956
|
+
}
|
|
957
|
+
let resolvedPath = "";
|
|
958
|
+
let resolvedAbsolute = false;
|
|
959
|
+
let cwd;
|
|
960
|
+
for (let i2 = paths.length - 1; i2 >= -1 && !resolvedAbsolute; i2--) {
|
|
961
|
+
let path;
|
|
962
|
+
if (i2 >= 0) {
|
|
963
|
+
path = paths[i2];
|
|
964
|
+
} else {
|
|
965
|
+
if (cwd === void 0) {
|
|
966
|
+
cwd = getCWD();
|
|
967
|
+
}
|
|
968
|
+
path = cwd;
|
|
969
|
+
}
|
|
970
|
+
if (path.length === 0) {
|
|
971
|
+
continue;
|
|
972
|
+
}
|
|
973
|
+
resolvedPath = `${path}/${resolvedPath}`;
|
|
974
|
+
resolvedAbsolute = path.charCodeAt(0) === SLASH;
|
|
975
|
+
}
|
|
976
|
+
resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);
|
|
977
|
+
if (resolvedAbsolute) {
|
|
978
|
+
return `/${resolvedPath}`;
|
|
979
|
+
} else if (resolvedPath.length > 0) {
|
|
980
|
+
return resolvedPath;
|
|
981
|
+
}
|
|
982
|
+
return ".";
|
|
983
|
+
}
|
|
984
|
+
function normalizeStringPosix(path, allowAboveRoot) {
|
|
985
|
+
let res = "";
|
|
986
|
+
let lastSlash = -1;
|
|
987
|
+
let dots = 0;
|
|
988
|
+
let code;
|
|
989
|
+
let isAboveRoot = false;
|
|
990
|
+
for (let i2 = 0; i2 <= path.length; ++i2) {
|
|
991
|
+
if (i2 < path.length) {
|
|
992
|
+
code = path.charCodeAt(i2);
|
|
993
|
+
} else if (code === SLASH) {
|
|
994
|
+
break;
|
|
995
|
+
} else {
|
|
996
|
+
code = SLASH;
|
|
997
|
+
}
|
|
998
|
+
if (code === SLASH) {
|
|
999
|
+
if (lastSlash === i2 - 1 || dots === 1) {
|
|
1000
|
+
} else if (lastSlash !== i2 - 1 && dots === 2) {
|
|
1001
|
+
if (res.length < 2 || !isAboveRoot || res.charCodeAt(res.length - 1) !== DOT || res.charCodeAt(res.length - 2) !== DOT) {
|
|
1002
|
+
if (res.length > 2) {
|
|
1003
|
+
const start = res.length - 1;
|
|
1004
|
+
let j = start;
|
|
1005
|
+
for (; j >= 0; --j) {
|
|
1006
|
+
if (res.charCodeAt(j) === SLASH) {
|
|
1007
|
+
break;
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
if (j !== start) {
|
|
1011
|
+
res = j === -1 ? "" : res.slice(0, j);
|
|
1012
|
+
lastSlash = i2;
|
|
1013
|
+
dots = 0;
|
|
1014
|
+
isAboveRoot = false;
|
|
1015
|
+
continue;
|
|
1016
|
+
}
|
|
1017
|
+
} else if (res.length === 2 || res.length === 1) {
|
|
1018
|
+
res = "";
|
|
1019
|
+
lastSlash = i2;
|
|
1020
|
+
dots = 0;
|
|
1021
|
+
isAboveRoot = false;
|
|
1022
|
+
continue;
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
if (allowAboveRoot) {
|
|
1026
|
+
if (res.length > 0) {
|
|
1027
|
+
res += "/..";
|
|
1028
|
+
} else {
|
|
1029
|
+
res = "..";
|
|
1030
|
+
}
|
|
1031
|
+
isAboveRoot = true;
|
|
1032
|
+
}
|
|
1033
|
+
} else {
|
|
1034
|
+
const slice = path.slice(lastSlash + 1, i2);
|
|
1035
|
+
if (res.length > 0) {
|
|
1036
|
+
res += `/${slice}`;
|
|
1037
|
+
} else {
|
|
1038
|
+
res = slice;
|
|
1039
|
+
}
|
|
1040
|
+
isAboveRoot = false;
|
|
1041
|
+
}
|
|
1042
|
+
lastSlash = i2;
|
|
1043
|
+
dots = 0;
|
|
1044
|
+
} else if (code === DOT && dots !== -1) {
|
|
1045
|
+
++dots;
|
|
1046
|
+
} else {
|
|
1047
|
+
dots = -1;
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
return res;
|
|
1051
|
+
}
|
|
1052
|
+
var SLASH, DOT;
|
|
889
1053
|
var init_path = __esm({
|
|
890
1054
|
"../loader-utils/src/lib/path-utils/path.ts"() {
|
|
1055
|
+
init_get_cwd();
|
|
1056
|
+
SLASH = 47;
|
|
1057
|
+
DOT = 46;
|
|
891
1058
|
}
|
|
892
1059
|
});
|
|
893
1060
|
|
|
@@ -901,6 +1068,7 @@
|
|
|
901
1068
|
init_async_iteration();
|
|
902
1069
|
init_file_aliases();
|
|
903
1070
|
init_json_loader();
|
|
1071
|
+
init_memory_conversion_utils();
|
|
904
1072
|
init_path();
|
|
905
1073
|
}
|
|
906
1074
|
});
|
|
@@ -1056,9 +1224,9 @@
|
|
|
1056
1224
|
}
|
|
1057
1225
|
if (resource instanceof Blob) {
|
|
1058
1226
|
const blobSlice = resource.slice(0, 5);
|
|
1059
|
-
return await new Promise((
|
|
1227
|
+
return await new Promise((resolve2) => {
|
|
1060
1228
|
const reader = new FileReader();
|
|
1061
|
-
reader.onload = (event) =>
|
|
1229
|
+
reader.onload = (event) => resolve2(event?.target?.result);
|
|
1062
1230
|
reader.readAsDataURL(blobSlice);
|
|
1063
1231
|
});
|
|
1064
1232
|
}
|
|
@@ -1103,12 +1271,12 @@
|
|
|
1103
1271
|
}
|
|
1104
1272
|
});
|
|
1105
1273
|
|
|
1106
|
-
//
|
|
1274
|
+
// ../core/node_modules/@probe.gl/env/dist/lib/is-electron.js
|
|
1107
1275
|
function isElectron(mockUserAgent) {
|
|
1108
1276
|
if (typeof window !== "undefined" && typeof window.process === "object" && window.process.type === "renderer") {
|
|
1109
1277
|
return true;
|
|
1110
1278
|
}
|
|
1111
|
-
if (typeof process !== "undefined" && typeof process.versions === "object" && Boolean(process.versions
|
|
1279
|
+
if (typeof process !== "undefined" && typeof process.versions === "object" && Boolean(process.versions["electron"])) {
|
|
1112
1280
|
return true;
|
|
1113
1281
|
}
|
|
1114
1282
|
const realUserAgent = typeof navigator === "object" && typeof navigator.userAgent === "string" && navigator.userAgent;
|
|
@@ -1119,59 +1287,54 @@
|
|
|
1119
1287
|
return false;
|
|
1120
1288
|
}
|
|
1121
1289
|
var init_is_electron = __esm({
|
|
1122
|
-
"
|
|
1290
|
+
"../core/node_modules/@probe.gl/env/dist/lib/is-electron.js"() {
|
|
1123
1291
|
}
|
|
1124
1292
|
});
|
|
1125
1293
|
|
|
1126
|
-
//
|
|
1294
|
+
// ../core/node_modules/@probe.gl/env/dist/lib/is-browser.js
|
|
1127
1295
|
function isBrowser3() {
|
|
1128
1296
|
const isNode = typeof process === "object" && String(process) === "[object process]" && !process.browser;
|
|
1129
1297
|
return !isNode || isElectron();
|
|
1130
1298
|
}
|
|
1131
1299
|
var init_is_browser = __esm({
|
|
1132
|
-
"
|
|
1300
|
+
"../core/node_modules/@probe.gl/env/dist/lib/is-browser.js"() {
|
|
1133
1301
|
init_is_electron();
|
|
1134
1302
|
}
|
|
1135
1303
|
});
|
|
1136
1304
|
|
|
1137
|
-
//
|
|
1138
|
-
var
|
|
1305
|
+
// ../core/node_modules/@probe.gl/env/dist/lib/globals.js
|
|
1306
|
+
var self2, window2, document2, process2, console2, navigator2;
|
|
1139
1307
|
var init_globals3 = __esm({
|
|
1140
|
-
"
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
};
|
|
1148
|
-
self_3 = globals3.self || globals3.window || globals3.global;
|
|
1149
|
-
window_3 = globals3.window || globals3.self || globals3.global;
|
|
1150
|
-
document_3 = globals3.document || {};
|
|
1151
|
-
process_ = globals3.process || {};
|
|
1308
|
+
"../core/node_modules/@probe.gl/env/dist/lib/globals.js"() {
|
|
1309
|
+
self2 = globalThis.self || globalThis.window || globalThis.global;
|
|
1310
|
+
window2 = globalThis.window || globalThis.self || globalThis.global;
|
|
1311
|
+
document2 = globalThis.document || {};
|
|
1312
|
+
process2 = globalThis.process || {};
|
|
1313
|
+
console2 = globalThis.console;
|
|
1314
|
+
navigator2 = globalThis.navigator || {};
|
|
1152
1315
|
}
|
|
1153
1316
|
});
|
|
1154
1317
|
|
|
1155
|
-
//
|
|
1318
|
+
// ../core/node_modules/@probe.gl/env/dist/utils/globals.js
|
|
1156
1319
|
var VERSION4, isBrowser4;
|
|
1157
1320
|
var init_globals4 = __esm({
|
|
1158
|
-
"
|
|
1321
|
+
"../core/node_modules/@probe.gl/env/dist/utils/globals.js"() {
|
|
1159
1322
|
init_is_browser();
|
|
1160
1323
|
VERSION4 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "untranspiled source";
|
|
1161
1324
|
isBrowser4 = isBrowser3();
|
|
1162
1325
|
}
|
|
1163
1326
|
});
|
|
1164
1327
|
|
|
1165
|
-
//
|
|
1166
|
-
var
|
|
1167
|
-
"
|
|
1328
|
+
// ../core/node_modules/@probe.gl/env/dist/index.js
|
|
1329
|
+
var init_dist = __esm({
|
|
1330
|
+
"../core/node_modules/@probe.gl/env/dist/index.js"() {
|
|
1168
1331
|
init_globals4();
|
|
1169
1332
|
init_globals3();
|
|
1170
1333
|
init_is_browser();
|
|
1171
1334
|
}
|
|
1172
1335
|
});
|
|
1173
1336
|
|
|
1174
|
-
//
|
|
1337
|
+
// ../core/node_modules/@probe.gl/log/dist/utils/local-storage.js
|
|
1175
1338
|
function getStorage(type) {
|
|
1176
1339
|
try {
|
|
1177
1340
|
const storage = window[type];
|
|
@@ -1185,35 +1348,28 @@
|
|
|
1185
1348
|
}
|
|
1186
1349
|
var LocalStorage;
|
|
1187
1350
|
var init_local_storage = __esm({
|
|
1188
|
-
"
|
|
1351
|
+
"../core/node_modules/@probe.gl/log/dist/utils/local-storage.js"() {
|
|
1189
1352
|
init_defineProperty();
|
|
1190
1353
|
LocalStorage = class {
|
|
1191
|
-
constructor(id) {
|
|
1192
|
-
let defaultSettings = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1354
|
+
constructor(id, defaultConfig) {
|
|
1193
1355
|
let type = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "sessionStorage";
|
|
1194
1356
|
_defineProperty(this, "storage", void 0);
|
|
1195
1357
|
_defineProperty(this, "id", void 0);
|
|
1196
|
-
_defineProperty(this, "config",
|
|
1358
|
+
_defineProperty(this, "config", void 0);
|
|
1197
1359
|
this.storage = getStorage(type);
|
|
1198
1360
|
this.id = id;
|
|
1199
|
-
this.config =
|
|
1200
|
-
Object.assign(this.config, defaultSettings);
|
|
1361
|
+
this.config = defaultConfig;
|
|
1201
1362
|
this._loadConfiguration();
|
|
1202
1363
|
}
|
|
1203
1364
|
getConfiguration() {
|
|
1204
1365
|
return this.config;
|
|
1205
1366
|
}
|
|
1206
1367
|
setConfiguration(configuration) {
|
|
1207
|
-
this.config = {};
|
|
1208
|
-
return this.updateConfiguration(configuration);
|
|
1209
|
-
}
|
|
1210
|
-
updateConfiguration(configuration) {
|
|
1211
1368
|
Object.assign(this.config, configuration);
|
|
1212
1369
|
if (this.storage) {
|
|
1213
1370
|
const serialized = JSON.stringify(this.config);
|
|
1214
1371
|
this.storage.setItem(this.id, serialized);
|
|
1215
1372
|
}
|
|
1216
|
-
return this;
|
|
1217
1373
|
}
|
|
1218
1374
|
_loadConfiguration() {
|
|
1219
1375
|
let configuration = {};
|
|
@@ -1228,7 +1384,7 @@
|
|
|
1228
1384
|
}
|
|
1229
1385
|
});
|
|
1230
1386
|
|
|
1231
|
-
//
|
|
1387
|
+
// ../core/node_modules/@probe.gl/log/dist/utils/formatters.js
|
|
1232
1388
|
function formatTime(ms) {
|
|
1233
1389
|
let formatted;
|
|
1234
1390
|
if (ms < 10) {
|
|
@@ -1259,31 +1415,35 @@
|
|
|
1259
1415
|
return ["".concat(message, " %c+"), style];
|
|
1260
1416
|
}
|
|
1261
1417
|
var init_formatters = __esm({
|
|
1262
|
-
"
|
|
1418
|
+
"../core/node_modules/@probe.gl/log/dist/utils/formatters.js"() {
|
|
1263
1419
|
}
|
|
1264
1420
|
});
|
|
1265
1421
|
|
|
1266
|
-
//
|
|
1422
|
+
// ../core/node_modules/@probe.gl/log/dist/utils/color.js
|
|
1267
1423
|
function getColor(color) {
|
|
1268
|
-
|
|
1424
|
+
if (typeof color !== "string") {
|
|
1425
|
+
return color;
|
|
1426
|
+
}
|
|
1427
|
+
color = color.toUpperCase();
|
|
1428
|
+
return COLOR[color] || COLOR.WHITE;
|
|
1269
1429
|
}
|
|
1270
1430
|
function addColor(string, color, background) {
|
|
1271
1431
|
if (!isBrowser3 && typeof string === "string") {
|
|
1272
1432
|
if (color) {
|
|
1273
|
-
|
|
1274
|
-
string = "[".concat(
|
|
1433
|
+
const colorCode = getColor(color);
|
|
1434
|
+
string = "[".concat(colorCode, "m").concat(string, "[39m");
|
|
1275
1435
|
}
|
|
1276
1436
|
if (background) {
|
|
1277
|
-
|
|
1278
|
-
string = "[".concat(
|
|
1437
|
+
const colorCode = getColor(background);
|
|
1438
|
+
string = "[".concat(colorCode + BACKGROUND_INCREMENT, "m").concat(string, "[49m");
|
|
1279
1439
|
}
|
|
1280
1440
|
}
|
|
1281
1441
|
return string;
|
|
1282
1442
|
}
|
|
1283
|
-
var COLOR;
|
|
1443
|
+
var COLOR, BACKGROUND_INCREMENT;
|
|
1284
1444
|
var init_color = __esm({
|
|
1285
|
-
"
|
|
1286
|
-
|
|
1445
|
+
"../core/node_modules/@probe.gl/log/dist/utils/color.js"() {
|
|
1446
|
+
init_dist();
|
|
1287
1447
|
(function(COLOR2) {
|
|
1288
1448
|
COLOR2[COLOR2["BLACK"] = 30] = "BLACK";
|
|
1289
1449
|
COLOR2[COLOR2["RED"] = 31] = "RED";
|
|
@@ -1302,47 +1462,50 @@
|
|
|
1302
1462
|
COLOR2[COLOR2["BRIGHT_CYAN"] = 96] = "BRIGHT_CYAN";
|
|
1303
1463
|
COLOR2[COLOR2["BRIGHT_WHITE"] = 97] = "BRIGHT_WHITE";
|
|
1304
1464
|
})(COLOR || (COLOR = {}));
|
|
1465
|
+
BACKGROUND_INCREMENT = 10;
|
|
1305
1466
|
}
|
|
1306
1467
|
});
|
|
1307
1468
|
|
|
1308
|
-
//
|
|
1469
|
+
// ../core/node_modules/@probe.gl/log/dist/utils/autobind.js
|
|
1309
1470
|
function autobind(obj) {
|
|
1310
1471
|
let predefined = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ["constructor"];
|
|
1311
1472
|
const proto = Object.getPrototypeOf(obj);
|
|
1312
1473
|
const propNames = Object.getOwnPropertyNames(proto);
|
|
1474
|
+
const object = obj;
|
|
1313
1475
|
for (const key of propNames) {
|
|
1314
|
-
|
|
1476
|
+
const value = object[key];
|
|
1477
|
+
if (typeof value === "function") {
|
|
1315
1478
|
if (!predefined.find((name) => key === name)) {
|
|
1316
|
-
|
|
1479
|
+
object[key] = value.bind(obj);
|
|
1317
1480
|
}
|
|
1318
1481
|
}
|
|
1319
1482
|
}
|
|
1320
1483
|
}
|
|
1321
1484
|
var init_autobind = __esm({
|
|
1322
|
-
"
|
|
1485
|
+
"../core/node_modules/@probe.gl/log/dist/utils/autobind.js"() {
|
|
1323
1486
|
}
|
|
1324
1487
|
});
|
|
1325
1488
|
|
|
1326
|
-
//
|
|
1489
|
+
// ../core/node_modules/@probe.gl/log/dist/utils/assert.js
|
|
1327
1490
|
function assert3(condition, message) {
|
|
1328
1491
|
if (!condition) {
|
|
1329
1492
|
throw new Error(message || "Assertion failed");
|
|
1330
1493
|
}
|
|
1331
1494
|
}
|
|
1332
1495
|
var init_assert3 = __esm({
|
|
1333
|
-
"
|
|
1496
|
+
"../core/node_modules/@probe.gl/log/dist/utils/assert.js"() {
|
|
1334
1497
|
}
|
|
1335
1498
|
});
|
|
1336
1499
|
|
|
1337
|
-
//
|
|
1500
|
+
// ../core/node_modules/@probe.gl/log/dist/utils/hi-res-timestamp.js
|
|
1338
1501
|
function getHiResTimestamp() {
|
|
1339
1502
|
let timestamp;
|
|
1340
|
-
if (isBrowser3 &&
|
|
1503
|
+
if (isBrowser3() && window2.performance) {
|
|
1341
1504
|
var _window$performance, _window$performance$n;
|
|
1342
|
-
timestamp =
|
|
1343
|
-
} else if ("hrtime" in
|
|
1505
|
+
timestamp = window2 === null || window2 === void 0 ? void 0 : (_window$performance = window2.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);
|
|
1506
|
+
} else if ("hrtime" in process2) {
|
|
1344
1507
|
var _process$hrtime;
|
|
1345
|
-
const timeParts =
|
|
1508
|
+
const timeParts = process2 === null || process2 === void 0 ? void 0 : (_process$hrtime = process2.hrtime) === null || _process$hrtime === void 0 ? void 0 : _process$hrtime.call(process2);
|
|
1346
1509
|
timestamp = timeParts[0] * 1e3 + timeParts[1] / 1e6;
|
|
1347
1510
|
} else {
|
|
1348
1511
|
timestamp = Date.now();
|
|
@@ -1350,18 +1513,12 @@
|
|
|
1350
1513
|
return timestamp;
|
|
1351
1514
|
}
|
|
1352
1515
|
var init_hi_res_timestamp = __esm({
|
|
1353
|
-
"
|
|
1354
|
-
|
|
1355
|
-
}
|
|
1356
|
-
});
|
|
1357
|
-
|
|
1358
|
-
// (disabled):../../node_modules/@probe.gl/log/dist/esm/node/node-asciify-image
|
|
1359
|
-
var init_node_asciify_image = __esm({
|
|
1360
|
-
"(disabled):../../node_modules/@probe.gl/log/dist/esm/node/node-asciify-image"() {
|
|
1516
|
+
"../core/node_modules/@probe.gl/log/dist/utils/hi-res-timestamp.js"() {
|
|
1517
|
+
init_dist();
|
|
1361
1518
|
}
|
|
1362
1519
|
});
|
|
1363
1520
|
|
|
1364
|
-
//
|
|
1521
|
+
// ../core/node_modules/@probe.gl/log/dist/log.js
|
|
1365
1522
|
function noop() {
|
|
1366
1523
|
}
|
|
1367
1524
|
function normalizeLogLevel(logLevel) {
|
|
@@ -1427,11 +1584,7 @@
|
|
|
1427
1584
|
message = "",
|
|
1428
1585
|
scale: scale5 = 1
|
|
1429
1586
|
} = _ref2;
|
|
1430
|
-
|
|
1431
|
-
image,
|
|
1432
|
-
message,
|
|
1433
|
-
scale: scale5
|
|
1434
|
-
});
|
|
1587
|
+
console.warn("removed");
|
|
1435
1588
|
return noop;
|
|
1436
1589
|
}
|
|
1437
1590
|
function logImageInBrowser(_ref3) {
|
|
@@ -1470,26 +1623,25 @@
|
|
|
1470
1623
|
}
|
|
1471
1624
|
return "empty";
|
|
1472
1625
|
}
|
|
1473
|
-
var originalConsole,
|
|
1626
|
+
var originalConsole, DEFAULT_LOG_CONFIGURATION, cache, ONCE, Log;
|
|
1474
1627
|
var init_log = __esm({
|
|
1475
|
-
"
|
|
1628
|
+
"../core/node_modules/@probe.gl/log/dist/log.js"() {
|
|
1476
1629
|
init_defineProperty();
|
|
1477
|
-
|
|
1630
|
+
init_dist();
|
|
1478
1631
|
init_local_storage();
|
|
1479
1632
|
init_formatters();
|
|
1480
1633
|
init_color();
|
|
1481
1634
|
init_autobind();
|
|
1482
1635
|
init_assert3();
|
|
1483
1636
|
init_hi_res_timestamp();
|
|
1484
|
-
init_node_asciify_image();
|
|
1485
1637
|
originalConsole = {
|
|
1486
|
-
debug: isBrowser3 ? console.debug || console.log : console.log,
|
|
1638
|
+
debug: isBrowser3() ? console.debug || console.log : console.log,
|
|
1487
1639
|
log: console.log,
|
|
1488
1640
|
info: console.info,
|
|
1489
1641
|
warn: console.warn,
|
|
1490
1642
|
error: console.error
|
|
1491
1643
|
};
|
|
1492
|
-
|
|
1644
|
+
DEFAULT_LOG_CONFIGURATION = {
|
|
1493
1645
|
enabled: true,
|
|
1494
1646
|
level: 0
|
|
1495
1647
|
};
|
|
@@ -1512,8 +1664,8 @@
|
|
|
1512
1664
|
_defineProperty(this, "userData", {});
|
|
1513
1665
|
_defineProperty(this, "LOG_THROTTLE_TIMEOUT", 0);
|
|
1514
1666
|
this.id = id;
|
|
1515
|
-
this._storage = new LocalStorage("__probe-".concat(this.id, "__"), DEFAULT_SETTINGS);
|
|
1516
1667
|
this.userData = {};
|
|
1668
|
+
this._storage = new LocalStorage("__probe-".concat(this.id, "__"), DEFAULT_LOG_CONFIGURATION);
|
|
1517
1669
|
this.timeStamp("".concat(this.id, " started"));
|
|
1518
1670
|
autobind(this);
|
|
1519
1671
|
Object.seal(this);
|
|
@@ -1547,13 +1699,13 @@
|
|
|
1547
1699
|
}
|
|
1548
1700
|
enable() {
|
|
1549
1701
|
let enabled = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
|
|
1550
|
-
this._storage.
|
|
1702
|
+
this._storage.setConfiguration({
|
|
1551
1703
|
enabled
|
|
1552
1704
|
});
|
|
1553
1705
|
return this;
|
|
1554
1706
|
}
|
|
1555
1707
|
setLevel(level) {
|
|
1556
|
-
this._storage.
|
|
1708
|
+
this._storage.setConfiguration({
|
|
1557
1709
|
level
|
|
1558
1710
|
});
|
|
1559
1711
|
return this;
|
|
@@ -1562,7 +1714,7 @@
|
|
|
1562
1714
|
return this._storage.config[setting];
|
|
1563
1715
|
}
|
|
1564
1716
|
set(setting, value) {
|
|
1565
|
-
this._storage.
|
|
1717
|
+
this._storage.setConfiguration({
|
|
1566
1718
|
[setting]: value
|
|
1567
1719
|
});
|
|
1568
1720
|
}
|
|
@@ -1601,9 +1753,6 @@
|
|
|
1601
1753
|
return this._getLogFunction(logLevel, message, console.info, arguments);
|
|
1602
1754
|
}
|
|
1603
1755
|
once(logLevel, message) {
|
|
1604
|
-
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
1605
|
-
args[_key - 2] = arguments[_key];
|
|
1606
|
-
}
|
|
1607
1756
|
return this._getLogFunction(logLevel, message, originalConsole.debug || originalConsole.info, arguments, ONCE);
|
|
1608
1757
|
}
|
|
1609
1758
|
table(logLevel, table, columns) {
|
|
@@ -1625,7 +1774,7 @@
|
|
|
1625
1774
|
if (!this._shouldLog(logLevel || priority)) {
|
|
1626
1775
|
return noop;
|
|
1627
1776
|
}
|
|
1628
|
-
return isBrowser3 ? logImageInBrowser({
|
|
1777
|
+
return isBrowser3() ? logImageInBrowser({
|
|
1629
1778
|
image,
|
|
1630
1779
|
message,
|
|
1631
1780
|
scale: scale5
|
|
@@ -1698,7 +1847,7 @@
|
|
|
1698
1847
|
opts.delta = this.getDelta();
|
|
1699
1848
|
this._deltaTs = getHiResTimestamp();
|
|
1700
1849
|
const tag = opts.tag || opts.message;
|
|
1701
|
-
if (opts.once) {
|
|
1850
|
+
if (opts.once && tag) {
|
|
1702
1851
|
if (!cache[tag]) {
|
|
1703
1852
|
cache[tag] = getHiResTimestamp();
|
|
1704
1853
|
} else {
|
|
@@ -1715,13 +1864,13 @@
|
|
|
1715
1864
|
}
|
|
1716
1865
|
});
|
|
1717
1866
|
|
|
1718
|
-
//
|
|
1719
|
-
var
|
|
1720
|
-
var
|
|
1721
|
-
"
|
|
1867
|
+
// ../core/node_modules/@probe.gl/log/dist/index.js
|
|
1868
|
+
var dist_default;
|
|
1869
|
+
var init_dist2 = __esm({
|
|
1870
|
+
"../core/node_modules/@probe.gl/log/dist/index.js"() {
|
|
1722
1871
|
init_log();
|
|
1723
1872
|
init_log();
|
|
1724
|
-
|
|
1873
|
+
dist_default = new Log({
|
|
1725
1874
|
id: "@probe.gl/log"
|
|
1726
1875
|
});
|
|
1727
1876
|
}
|
|
@@ -1731,7 +1880,7 @@
|
|
|
1731
1880
|
var probeLog, NullLog, ConsoleLog;
|
|
1732
1881
|
var init_loggers = __esm({
|
|
1733
1882
|
"../core/src/lib/loader-utils/loggers.ts"() {
|
|
1734
|
-
|
|
1883
|
+
init_dist2();
|
|
1735
1884
|
probeLog = new Log({ id: "loaders.gl" });
|
|
1736
1885
|
NullLog = class {
|
|
1737
1886
|
log() {
|
|
@@ -1829,20 +1978,6 @@
|
|
|
1829
1978
|
validateOptions(options, loaders);
|
|
1830
1979
|
return normalizeOptionsInternal(loader, options, url);
|
|
1831
1980
|
}
|
|
1832
|
-
function getFetchFunction(options, context) {
|
|
1833
|
-
const globalOptions = getGlobalLoaderOptions();
|
|
1834
|
-
const fetchOptions = options || globalOptions;
|
|
1835
|
-
if (typeof fetchOptions.fetch === "function") {
|
|
1836
|
-
return fetchOptions.fetch;
|
|
1837
|
-
}
|
|
1838
|
-
if (isObject(fetchOptions.fetch)) {
|
|
1839
|
-
return (url) => fetchFile(url, fetchOptions);
|
|
1840
|
-
}
|
|
1841
|
-
if (context?.fetch) {
|
|
1842
|
-
return context?.fetch;
|
|
1843
|
-
}
|
|
1844
|
-
return fetchFile;
|
|
1845
|
-
}
|
|
1846
1981
|
function validateOptions(options, loaders) {
|
|
1847
1982
|
validateOptionsObject(options, null, DEFAULT_LOADER_OPTIONS, REMOVED_LOADER_OPTIONS, loaders);
|
|
1848
1983
|
for (const loader of loaders) {
|
|
@@ -1921,7 +2056,6 @@
|
|
|
1921
2056
|
var init_option_utils = __esm({
|
|
1922
2057
|
"../core/src/lib/loader-utils/option-utils.ts"() {
|
|
1923
2058
|
init_is_type();
|
|
1924
|
-
init_fetch_file();
|
|
1925
2059
|
init_loggers();
|
|
1926
2060
|
init_option_defaults();
|
|
1927
2061
|
getGlobalLoaderOptions = () => {
|
|
@@ -1989,7 +2123,7 @@
|
|
|
1989
2123
|
var log;
|
|
1990
2124
|
var init_log2 = __esm({
|
|
1991
2125
|
"../core/src/lib/utils/log.ts"() {
|
|
1992
|
-
|
|
2126
|
+
init_dist2();
|
|
1993
2127
|
log = new Log({ id: "loaders.gl" });
|
|
1994
2128
|
}
|
|
1995
2129
|
});
|
|
@@ -2262,7 +2396,7 @@
|
|
|
2262
2396
|
if (done) {
|
|
2263
2397
|
return;
|
|
2264
2398
|
}
|
|
2265
|
-
yield
|
|
2399
|
+
yield toArrayBuffer2(value);
|
|
2266
2400
|
}
|
|
2267
2401
|
} catch (error) {
|
|
2268
2402
|
reader.releaseLock();
|
|
@@ -2270,7 +2404,7 @@
|
|
|
2270
2404
|
}
|
|
2271
2405
|
async function* makeNodeStreamIterator(stream, options) {
|
|
2272
2406
|
for await (const chunk of stream) {
|
|
2273
|
-
yield
|
|
2407
|
+
yield toArrayBuffer2(chunk);
|
|
2274
2408
|
}
|
|
2275
2409
|
}
|
|
2276
2410
|
var init_make_stream_iterator = __esm({
|
|
@@ -2371,6 +2505,29 @@
|
|
|
2371
2505
|
}
|
|
2372
2506
|
});
|
|
2373
2507
|
|
|
2508
|
+
// ../core/src/lib/loader-utils/get-fetch-function.ts
|
|
2509
|
+
function getFetchFunction(options, context) {
|
|
2510
|
+
const globalOptions = getGlobalLoaderOptions();
|
|
2511
|
+
const fetchOptions = options || globalOptions;
|
|
2512
|
+
if (typeof fetchOptions.fetch === "function") {
|
|
2513
|
+
return fetchOptions.fetch;
|
|
2514
|
+
}
|
|
2515
|
+
if (isObject(fetchOptions.fetch)) {
|
|
2516
|
+
return (url) => fetchFile(url, fetchOptions);
|
|
2517
|
+
}
|
|
2518
|
+
if (context?.fetch) {
|
|
2519
|
+
return context?.fetch;
|
|
2520
|
+
}
|
|
2521
|
+
return fetchFile;
|
|
2522
|
+
}
|
|
2523
|
+
var init_get_fetch_function = __esm({
|
|
2524
|
+
"../core/src/lib/loader-utils/get-fetch-function.ts"() {
|
|
2525
|
+
init_is_type();
|
|
2526
|
+
init_fetch_file();
|
|
2527
|
+
init_option_utils();
|
|
2528
|
+
}
|
|
2529
|
+
});
|
|
2530
|
+
|
|
2374
2531
|
// ../core/src/lib/loader-utils/loader-context.ts
|
|
2375
2532
|
function getLoaderContext(context, options, previousContext = null) {
|
|
2376
2533
|
if (previousContext) {
|
|
@@ -2401,7 +2558,7 @@
|
|
|
2401
2558
|
}
|
|
2402
2559
|
var init_loader_context = __esm({
|
|
2403
2560
|
"../core/src/lib/loader-utils/loader-context.ts"() {
|
|
2404
|
-
|
|
2561
|
+
init_get_fetch_function();
|
|
2405
2562
|
}
|
|
2406
2563
|
});
|
|
2407
2564
|
|
|
@@ -2486,7 +2643,7 @@
|
|
|
2486
2643
|
"../core/src/lib/api/load.ts"() {
|
|
2487
2644
|
init_is_type();
|
|
2488
2645
|
init_normalize_loader();
|
|
2489
|
-
|
|
2646
|
+
init_get_fetch_function();
|
|
2490
2647
|
init_parse();
|
|
2491
2648
|
}
|
|
2492
2649
|
});
|
|
@@ -5404,7 +5561,7 @@
|
|
|
5404
5561
|
});
|
|
5405
5562
|
|
|
5406
5563
|
// ../../node_modules/@math.gl/core/dist/esm/index.js
|
|
5407
|
-
var
|
|
5564
|
+
var init_esm = __esm({
|
|
5408
5565
|
"../../node_modules/@math.gl/core/dist/esm/index.js"() {
|
|
5409
5566
|
init_vector3();
|
|
5410
5567
|
init_matrix3();
|
|
@@ -5479,7 +5636,7 @@
|
|
|
5479
5636
|
var scratchVector;
|
|
5480
5637
|
var init_type_utils = __esm({
|
|
5481
5638
|
"../../node_modules/@math.gl/geospatial/dist/esm/type-utils.js"() {
|
|
5482
|
-
|
|
5639
|
+
init_esm();
|
|
5483
5640
|
init_constants();
|
|
5484
5641
|
scratchVector = new Vector3();
|
|
5485
5642
|
}
|
|
@@ -5544,7 +5701,7 @@
|
|
|
5544
5701
|
var scratchVector2, scaleToGeodeticSurfaceIntersection, scaleToGeodeticSurfaceGradient;
|
|
5545
5702
|
var init_scale_to_geodetic_surface = __esm({
|
|
5546
5703
|
"../../node_modules/@math.gl/geospatial/dist/esm/ellipsoid/helpers/scale-to-geodetic-surface.js"() {
|
|
5547
|
-
|
|
5704
|
+
init_esm();
|
|
5548
5705
|
scratchVector2 = new Vector3();
|
|
5549
5706
|
scaleToGeodeticSurfaceIntersection = new Vector3();
|
|
5550
5707
|
scaleToGeodeticSurfaceGradient = new Vector3();
|
|
@@ -5616,7 +5773,7 @@
|
|
|
5616
5773
|
var EPSILON14, scratchOrigin, VECTOR_PRODUCT_LOCAL_FRAME, degeneratePositionLocalFrame, scratchAxisVectors, scratchVector1, scratchVector22, scratchVector3;
|
|
5617
5774
|
var init_ellipsoid_transform = __esm({
|
|
5618
5775
|
"../../node_modules/@math.gl/geospatial/dist/esm/ellipsoid/helpers/ellipsoid-transform.js"() {
|
|
5619
|
-
|
|
5776
|
+
init_esm();
|
|
5620
5777
|
EPSILON14 = 1e-14;
|
|
5621
5778
|
scratchOrigin = new Vector3();
|
|
5622
5779
|
VECTOR_PRODUCT_LOCAL_FRAME = {
|
|
@@ -5684,7 +5841,7 @@
|
|
|
5684
5841
|
var init_ellipsoid = __esm({
|
|
5685
5842
|
"../../node_modules/@math.gl/geospatial/dist/esm/ellipsoid/ellipsoid.js"() {
|
|
5686
5843
|
init_defineProperty();
|
|
5687
|
-
|
|
5844
|
+
init_esm();
|
|
5688
5845
|
init_vec3();
|
|
5689
5846
|
init_constants();
|
|
5690
5847
|
init_type_utils();
|
|
@@ -5808,7 +5965,7 @@
|
|
|
5808
5965
|
});
|
|
5809
5966
|
|
|
5810
5967
|
// ../../node_modules/@math.gl/geospatial/dist/esm/index.js
|
|
5811
|
-
var
|
|
5968
|
+
var init_esm2 = __esm({
|
|
5812
5969
|
"../../node_modules/@math.gl/geospatial/dist/esm/index.js"() {
|
|
5813
5970
|
init_ellipsoid();
|
|
5814
5971
|
init_type_utils();
|
|
@@ -5960,9 +6117,9 @@
|
|
|
5960
6117
|
await image.decode();
|
|
5961
6118
|
return image;
|
|
5962
6119
|
}
|
|
5963
|
-
return await new Promise((
|
|
6120
|
+
return await new Promise((resolve2, reject) => {
|
|
5964
6121
|
try {
|
|
5965
|
-
image.onload = () =>
|
|
6122
|
+
image.onload = () => resolve2(image);
|
|
5966
6123
|
image.onerror = (err) => reject(new Error(`Could not load image ${url}: ${err}`));
|
|
5967
6124
|
} catch (error) {
|
|
5968
6125
|
reject(error);
|
|
@@ -6017,10 +6174,62 @@
|
|
|
6017
6174
|
}
|
|
6018
6175
|
});
|
|
6019
6176
|
|
|
6177
|
+
// ../images/src/lib/category-api/parse-isobmff-binary.ts
|
|
6178
|
+
function getISOBMFFMediaType(buffer) {
|
|
6179
|
+
if (!checkString(buffer, "ftyp", 4)) {
|
|
6180
|
+
return null;
|
|
6181
|
+
}
|
|
6182
|
+
if ((buffer[8] & 96) === 0) {
|
|
6183
|
+
return null;
|
|
6184
|
+
}
|
|
6185
|
+
return decodeMajorBrand(buffer);
|
|
6186
|
+
}
|
|
6187
|
+
function decodeMajorBrand(buffer) {
|
|
6188
|
+
const brandMajor = getUTF8String(buffer, 8, 12).replace("\0", " ").trim();
|
|
6189
|
+
switch (brandMajor) {
|
|
6190
|
+
case "avif":
|
|
6191
|
+
case "avis":
|
|
6192
|
+
return { extension: "avif", mimeType: "image/avif" };
|
|
6193
|
+
default:
|
|
6194
|
+
return null;
|
|
6195
|
+
}
|
|
6196
|
+
}
|
|
6197
|
+
function getUTF8String(array, start, end) {
|
|
6198
|
+
return String.fromCharCode(...array.slice(start, end));
|
|
6199
|
+
}
|
|
6200
|
+
function stringToBytes(string) {
|
|
6201
|
+
return [...string].map((character) => character.charCodeAt(0));
|
|
6202
|
+
}
|
|
6203
|
+
function checkString(buffer, header, offset = 0) {
|
|
6204
|
+
const headerBytes = stringToBytes(header);
|
|
6205
|
+
for (let i2 = 0; i2 < headerBytes.length; ++i2) {
|
|
6206
|
+
if (headerBytes[i2] !== buffer[i2 + offset]) {
|
|
6207
|
+
return false;
|
|
6208
|
+
}
|
|
6209
|
+
}
|
|
6210
|
+
return true;
|
|
6211
|
+
}
|
|
6212
|
+
var init_parse_isobmff_binary = __esm({
|
|
6213
|
+
"../images/src/lib/category-api/parse-isobmff-binary.ts"() {
|
|
6214
|
+
}
|
|
6215
|
+
});
|
|
6216
|
+
|
|
6020
6217
|
// ../images/src/lib/category-api/binary-image-api.ts
|
|
6021
6218
|
function getBinaryImageMetadata(binaryData) {
|
|
6022
6219
|
const dataView = toDataView(binaryData);
|
|
6023
|
-
return getPngMetadata(dataView) || getJpegMetadata(dataView) || getGifMetadata(dataView) || getBmpMetadata(dataView);
|
|
6220
|
+
return getPngMetadata(dataView) || getJpegMetadata(dataView) || getGifMetadata(dataView) || getBmpMetadata(dataView) || getISOBMFFMetadata(dataView);
|
|
6221
|
+
}
|
|
6222
|
+
function getISOBMFFMetadata(binaryData) {
|
|
6223
|
+
const buffer = new Uint8Array(binaryData instanceof DataView ? binaryData.buffer : binaryData);
|
|
6224
|
+
const mediaType = getISOBMFFMediaType(buffer);
|
|
6225
|
+
if (!mediaType) {
|
|
6226
|
+
return null;
|
|
6227
|
+
}
|
|
6228
|
+
return {
|
|
6229
|
+
mimeType: mediaType.mimeType,
|
|
6230
|
+
width: 0,
|
|
6231
|
+
height: 0
|
|
6232
|
+
};
|
|
6024
6233
|
}
|
|
6025
6234
|
function getPngMetadata(binaryData) {
|
|
6026
6235
|
const dataView = toDataView(binaryData);
|
|
@@ -6121,6 +6330,7 @@
|
|
|
6121
6330
|
var BIG_ENDIAN, LITTLE_ENDIAN;
|
|
6122
6331
|
var init_binary_image_api = __esm({
|
|
6123
6332
|
"../images/src/lib/category-api/binary-image-api.ts"() {
|
|
6333
|
+
init_parse_isobmff_binary();
|
|
6124
6334
|
BIG_ENDIAN = false;
|
|
6125
6335
|
LITTLE_ENDIAN = true;
|
|
6126
6336
|
}
|
|
@@ -6194,12 +6404,13 @@
|
|
|
6194
6404
|
init_version2();
|
|
6195
6405
|
init_parse_image();
|
|
6196
6406
|
init_binary_image_api();
|
|
6197
|
-
EXTENSIONS = ["png", "jpg", "jpeg", "gif", "webp", "bmp", "ico", "svg"];
|
|
6407
|
+
EXTENSIONS = ["png", "jpg", "jpeg", "gif", "webp", "bmp", "ico", "svg", "avif"];
|
|
6198
6408
|
MIME_TYPES = [
|
|
6199
6409
|
"image/png",
|
|
6200
6410
|
"image/jpeg",
|
|
6201
6411
|
"image/gif",
|
|
6202
6412
|
"image/webp",
|
|
6413
|
+
"image/avif",
|
|
6203
6414
|
"image/bmp",
|
|
6204
6415
|
"image/vnd.microsoft.icon",
|
|
6205
6416
|
"image/svg+xml"
|
|
@@ -7269,10 +7480,10 @@
|
|
|
7269
7480
|
if (wasmBinary) {
|
|
7270
7481
|
options.wasmBinary = wasmBinary;
|
|
7271
7482
|
}
|
|
7272
|
-
return new Promise((
|
|
7483
|
+
return new Promise((resolve2) => {
|
|
7273
7484
|
DracoDecoderModule({
|
|
7274
7485
|
...options,
|
|
7275
|
-
onModuleLoaded: (draco) =>
|
|
7486
|
+
onModuleLoaded: (draco) => resolve2({ draco })
|
|
7276
7487
|
});
|
|
7277
7488
|
});
|
|
7278
7489
|
}
|
|
@@ -7345,11 +7556,11 @@
|
|
|
7345
7556
|
if (wasmBinary) {
|
|
7346
7557
|
options.wasmBinary = wasmBinary;
|
|
7347
7558
|
}
|
|
7348
|
-
return new Promise((
|
|
7559
|
+
return new Promise((resolve2) => {
|
|
7349
7560
|
BasisModule(options).then((module) => {
|
|
7350
7561
|
const { BasisFile, initializeBasis } = module;
|
|
7351
7562
|
initializeBasis();
|
|
7352
|
-
|
|
7563
|
+
resolve2({ BasisFile });
|
|
7353
7564
|
});
|
|
7354
7565
|
});
|
|
7355
7566
|
}
|
|
@@ -7376,11 +7587,11 @@
|
|
|
7376
7587
|
if (wasmBinary) {
|
|
7377
7588
|
options.wasmBinary = wasmBinary;
|
|
7378
7589
|
}
|
|
7379
|
-
return new Promise((
|
|
7590
|
+
return new Promise((resolve2) => {
|
|
7380
7591
|
BasisEncoderModule(options).then((module) => {
|
|
7381
7592
|
const { BasisFile, KTX2File, initializeBasis, BasisEncoder } = module;
|
|
7382
7593
|
initializeBasis();
|
|
7383
|
-
|
|
7594
|
+
resolve2({ BasisFile, KTX2File, BasisEncoder });
|
|
7384
7595
|
});
|
|
7385
7596
|
});
|
|
7386
7597
|
}
|
|
@@ -8400,10 +8611,10 @@
|
|
|
8400
8611
|
});
|
|
8401
8612
|
|
|
8402
8613
|
// ../../node_modules/@luma.gl/constants/dist/esm/index.js
|
|
8403
|
-
var
|
|
8404
|
-
var
|
|
8614
|
+
var esm_default;
|
|
8615
|
+
var init_esm3 = __esm({
|
|
8405
8616
|
"../../node_modules/@luma.gl/constants/dist/esm/index.js"() {
|
|
8406
|
-
|
|
8617
|
+
esm_default = {
|
|
8407
8618
|
DEPTH_BUFFER_BIT: 256,
|
|
8408
8619
|
STENCIL_BUFFER_BIT: 1024,
|
|
8409
8620
|
COLOR_BUFFER_BIT: 16384,
|
|
@@ -9061,14 +9272,14 @@
|
|
|
9061
9272
|
var GL_TYPE_MAP, STRING_ATTRIBUTE_TYPE, OBJECT_ID_ATTRIBUTE_TYPE, FLOAT_64_TYPE, INT_16_ATTRIBUTE_TYPE, COORDINATE_SYSTEM;
|
|
9062
9273
|
var init_constants2 = __esm({
|
|
9063
9274
|
"src/lib/parsers/constants.ts"() {
|
|
9064
|
-
|
|
9275
|
+
init_esm3();
|
|
9065
9276
|
init_types();
|
|
9066
9277
|
GL_TYPE_MAP = {
|
|
9067
|
-
UInt8:
|
|
9068
|
-
UInt16:
|
|
9069
|
-
Float32:
|
|
9070
|
-
UInt32:
|
|
9071
|
-
UInt64:
|
|
9278
|
+
UInt8: esm_default.UNSIGNED_BYTE,
|
|
9279
|
+
UInt16: esm_default.UNSIGNED_SHORT,
|
|
9280
|
+
Float32: esm_default.FLOAT,
|
|
9281
|
+
UInt32: esm_default.UNSIGNED_INT,
|
|
9282
|
+
UInt64: esm_default.DOUBLE
|
|
9072
9283
|
};
|
|
9073
9284
|
STRING_ATTRIBUTE_TYPE = "String";
|
|
9074
9285
|
OBJECT_ID_ATTRIBUTE_TYPE = "Oid32";
|
|
@@ -9703,8 +9914,8 @@
|
|
|
9703
9914
|
var init_parse_i3s_tile_content = __esm({
|
|
9704
9915
|
"src/lib/parsers/parse-i3s-tile-content.ts"() {
|
|
9705
9916
|
init_src3();
|
|
9706
|
-
|
|
9707
|
-
|
|
9917
|
+
init_esm();
|
|
9918
|
+
init_esm2();
|
|
9708
9919
|
init_src4();
|
|
9709
9920
|
init_src6();
|
|
9710
9921
|
init_src7();
|
|
@@ -9766,7 +9977,7 @@
|
|
|
9766
9977
|
var init_axis_aligned_bounding_box = __esm({
|
|
9767
9978
|
"../../node_modules/@math.gl/culling/dist/esm/lib/bounding-volumes/axis-aligned-bounding-box.js"() {
|
|
9768
9979
|
init_defineProperty();
|
|
9769
|
-
|
|
9980
|
+
init_esm();
|
|
9770
9981
|
init_constants3();
|
|
9771
9982
|
scratchVector6 = new Vector3();
|
|
9772
9983
|
scratchNormal2 = new Vector3();
|
|
@@ -9778,7 +9989,7 @@
|
|
|
9778
9989
|
var init_bounding_sphere = __esm({
|
|
9779
9990
|
"../../node_modules/@math.gl/culling/dist/esm/lib/bounding-volumes/bounding-sphere.js"() {
|
|
9780
9991
|
init_defineProperty();
|
|
9781
|
-
|
|
9992
|
+
init_esm();
|
|
9782
9993
|
init_mat4();
|
|
9783
9994
|
init_constants3();
|
|
9784
9995
|
scratchVector7 = new Vector3();
|
|
@@ -9872,7 +10083,7 @@
|
|
|
9872
10083
|
var init_oriented_bounding_box = __esm({
|
|
9873
10084
|
"../../node_modules/@math.gl/culling/dist/esm/lib/bounding-volumes/oriented-bounding-box.js"() {
|
|
9874
10085
|
init_defineProperty();
|
|
9875
|
-
|
|
10086
|
+
init_esm();
|
|
9876
10087
|
init_bounding_sphere();
|
|
9877
10088
|
init_constants3();
|
|
9878
10089
|
scratchVector32 = new Vector3();
|
|
@@ -10069,7 +10280,7 @@
|
|
|
10069
10280
|
var init_plane = __esm({
|
|
10070
10281
|
"../../node_modules/@math.gl/culling/dist/esm/lib/plane.js"() {
|
|
10071
10282
|
init_defineProperty();
|
|
10072
|
-
|
|
10283
|
+
init_esm();
|
|
10073
10284
|
scratchPosition2 = new Vector3();
|
|
10074
10285
|
scratchNormal3 = new Vector3();
|
|
10075
10286
|
Plane = class {
|
|
@@ -10128,7 +10339,7 @@
|
|
|
10128
10339
|
var init_culling_volume = __esm({
|
|
10129
10340
|
"../../node_modules/@math.gl/culling/dist/esm/lib/culling-volume.js"() {
|
|
10130
10341
|
init_defineProperty();
|
|
10131
|
-
|
|
10342
|
+
init_esm();
|
|
10132
10343
|
init_constants3();
|
|
10133
10344
|
init_plane();
|
|
10134
10345
|
faces = [new Vector3([1, 0, 0]), new Vector3([0, 1, 0]), new Vector3([0, 0, 1])];
|
|
@@ -10214,7 +10425,7 @@
|
|
|
10214
10425
|
var init_perspective_off_center_frustum = __esm({
|
|
10215
10426
|
"../../node_modules/@math.gl/culling/dist/esm/lib/perspective-off-center-frustum.js"() {
|
|
10216
10427
|
init_defineProperty();
|
|
10217
|
-
|
|
10428
|
+
init_esm();
|
|
10218
10429
|
init_culling_volume();
|
|
10219
10430
|
init_plane();
|
|
10220
10431
|
scratchPlaneUpVector = new Vector3();
|
|
@@ -10237,7 +10448,7 @@
|
|
|
10237
10448
|
var fromPointsXMin, fromPointsYMin, fromPointsZMin, fromPointsXMax, fromPointsYMax, fromPointsZMax, fromPointsCurrentPos, fromPointsScratch, fromPointsRitterCenter, fromPointsMinBoxPt, fromPointsMaxBoxPt, fromPointsNaiveCenterScratch, volumeConstant;
|
|
10238
10449
|
var init_bounding_sphere_from_points = __esm({
|
|
10239
10450
|
"../../node_modules/@math.gl/culling/dist/esm/lib/algorithms/bounding-sphere-from-points.js"() {
|
|
10240
|
-
|
|
10451
|
+
init_esm();
|
|
10241
10452
|
init_bounding_sphere();
|
|
10242
10453
|
fromPointsXMin = new Vector3();
|
|
10243
10454
|
fromPointsYMin = new Vector3();
|
|
@@ -10259,7 +10470,7 @@
|
|
|
10259
10470
|
var scratchMatrix, scratchUnitary, scratchDiagonal, jMatrix, jMatrixTranspose;
|
|
10260
10471
|
var init_compute_eigen_decomposition = __esm({
|
|
10261
10472
|
"../../node_modules/@math.gl/culling/dist/esm/lib/algorithms/compute-eigen-decomposition.js"() {
|
|
10262
|
-
|
|
10473
|
+
init_esm();
|
|
10263
10474
|
scratchMatrix = new Matrix3();
|
|
10264
10475
|
scratchUnitary = new Matrix3();
|
|
10265
10476
|
scratchDiagonal = new Matrix3();
|
|
@@ -10272,7 +10483,7 @@
|
|
|
10272
10483
|
var scratchVector24, scratchVector33, scratchVector42, scratchVector52, scratchVector62, scratchCovarianceResult, scratchEigenResult;
|
|
10273
10484
|
var init_bounding_box_from_points = __esm({
|
|
10274
10485
|
"../../node_modules/@math.gl/culling/dist/esm/lib/algorithms/bounding-box-from-points.js"() {
|
|
10275
|
-
|
|
10486
|
+
init_esm();
|
|
10276
10487
|
init_compute_eigen_decomposition();
|
|
10277
10488
|
init_oriented_bounding_box();
|
|
10278
10489
|
init_axis_aligned_bounding_box();
|
|
@@ -10290,7 +10501,7 @@
|
|
|
10290
10501
|
});
|
|
10291
10502
|
|
|
10292
10503
|
// ../../node_modules/@math.gl/culling/dist/esm/index.js
|
|
10293
|
-
var
|
|
10504
|
+
var init_esm4 = __esm({
|
|
10294
10505
|
"../../node_modules/@math.gl/culling/dist/esm/index.js"() {
|
|
10295
10506
|
init_constants3();
|
|
10296
10507
|
init_axis_aligned_bounding_box();
|
|
@@ -10400,10 +10611,10 @@
|
|
|
10400
10611
|
return this.nodePages[pageIndex].nodes[nodeIndex];
|
|
10401
10612
|
}
|
|
10402
10613
|
async formTileFromNodePages(id) {
|
|
10403
|
-
const
|
|
10614
|
+
const node3 = await this.getNodeById(id);
|
|
10404
10615
|
const children = [];
|
|
10405
10616
|
const childNodesPromises = [];
|
|
10406
|
-
for (const child of
|
|
10617
|
+
for (const child of node3.children || []) {
|
|
10407
10618
|
childNodesPromises.push(this.getNodeById(child));
|
|
10408
10619
|
}
|
|
10409
10620
|
const childNodes = await Promise.all(childNodesPromises);
|
|
@@ -10419,25 +10630,25 @@
|
|
|
10419
10630
|
let textureFormat = "jpg";
|
|
10420
10631
|
let attributeUrls = [];
|
|
10421
10632
|
let isDracoGeometry = false;
|
|
10422
|
-
if (
|
|
10423
|
-
const { url, isDracoGeometry: isDracoGeometryResult } =
|
|
10633
|
+
if (node3 && node3.mesh) {
|
|
10634
|
+
const { url, isDracoGeometry: isDracoGeometryResult } = node3.mesh.geometry && this.getContentUrl(node3.mesh.geometry) || { isDracoGeometry: false };
|
|
10424
10635
|
contentUrl = url;
|
|
10425
10636
|
isDracoGeometry = isDracoGeometryResult;
|
|
10426
|
-
const { textureData, materialDefinition: nodeMaterialDefinition } = this.getInformationFromMaterial(
|
|
10637
|
+
const { textureData, materialDefinition: nodeMaterialDefinition } = this.getInformationFromMaterial(node3.mesh.material);
|
|
10427
10638
|
materialDefinition = nodeMaterialDefinition;
|
|
10428
10639
|
textureFormat = textureData.format || textureFormat;
|
|
10429
10640
|
if (textureData.name) {
|
|
10430
|
-
textureUrl = `${this.tileset.url}/nodes/${
|
|
10641
|
+
textureUrl = `${this.tileset.url}/nodes/${node3.mesh.material.resource}/textures/${textureData.name}`;
|
|
10431
10642
|
}
|
|
10432
10643
|
if (this.tileset.attributeStorageInfo) {
|
|
10433
|
-
attributeUrls = generateTilesetAttributeUrls(this.tileset,
|
|
10644
|
+
attributeUrls = generateTilesetAttributeUrls(this.tileset, node3.mesh.attribute.resource);
|
|
10434
10645
|
}
|
|
10435
10646
|
}
|
|
10436
|
-
const lodSelection = this.getLodSelection(
|
|
10647
|
+
const lodSelection = this.getLodSelection(node3);
|
|
10437
10648
|
return normalizeTileNonUrlData({
|
|
10438
10649
|
id: id.toString(),
|
|
10439
10650
|
lodSelection,
|
|
10440
|
-
obb:
|
|
10651
|
+
obb: node3.obb,
|
|
10441
10652
|
contentUrl,
|
|
10442
10653
|
textureUrl,
|
|
10443
10654
|
attributeUrls,
|
|
@@ -10467,17 +10678,17 @@
|
|
|
10467
10678
|
}
|
|
10468
10679
|
return result;
|
|
10469
10680
|
}
|
|
10470
|
-
getLodSelection(
|
|
10681
|
+
getLodSelection(node3) {
|
|
10471
10682
|
const lodSelection = [];
|
|
10472
10683
|
if (this.lodSelectionMetricType === "maxScreenThresholdSQ") {
|
|
10473
10684
|
lodSelection.push({
|
|
10474
10685
|
metricType: "maxScreenThreshold",
|
|
10475
|
-
maxError: Math.sqrt(
|
|
10686
|
+
maxError: Math.sqrt(node3.lodThreshold / (Math.PI * 0.25))
|
|
10476
10687
|
});
|
|
10477
10688
|
}
|
|
10478
10689
|
lodSelection.push({
|
|
10479
10690
|
metricType: this.lodSelectionMetricType,
|
|
10480
|
-
maxError:
|
|
10691
|
+
maxError: node3.lodThreshold
|
|
10481
10692
|
});
|
|
10482
10693
|
return lodSelection;
|
|
10483
10694
|
}
|
|
@@ -10614,8 +10825,8 @@
|
|
|
10614
10825
|
}
|
|
10615
10826
|
var init_parse_i3s = __esm({
|
|
10616
10827
|
"src/lib/parsers/parse-i3s.ts"() {
|
|
10617
|
-
init_esm6();
|
|
10618
10828
|
init_esm4();
|
|
10829
|
+
init_esm2();
|
|
10619
10830
|
init_src3();
|
|
10620
10831
|
init_src8();
|
|
10621
10832
|
init_i3s_nodepages_tiles();
|