@loaders.gl/i3s 3.3.0-alpha.5 → 3.3.0-alpha.7
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 +984 -1291
- package/dist/es5/arcgis-webscene-loader.js +2 -8
- package/dist/es5/arcgis-webscene-loader.js.map +1 -1
- package/dist/es5/bundle.js +0 -1
- package/dist/es5/bundle.js.map +1 -1
- package/dist/es5/i3s-attribute-loader.js +19 -60
- package/dist/es5/i3s-attribute-loader.js.map +1 -1
- package/dist/es5/i3s-building-scene-layer-loader.js +1 -10
- package/dist/es5/i3s-building-scene-layer-loader.js.map +1 -1
- package/dist/es5/i3s-content-loader.js +1 -14
- package/dist/es5/i3s-content-loader.js.map +1 -1
- package/dist/es5/i3s-loader.js +7 -45
- package/dist/es5/i3s-loader.js.map +1 -1
- package/dist/es5/i3s-node-page-loader.js +1 -12
- package/dist/es5/i3s-node-page-loader.js.map +1 -1
- package/dist/es5/index.js +12 -18
- package/dist/es5/index.js.map +1 -1
- package/dist/es5/lib/helpers/i3s-nodepages-tiles.js +18 -78
- package/dist/es5/lib/helpers/i3s-nodepages-tiles.js.map +1 -1
- package/dist/es5/lib/parsers/constants.js +2 -18
- package/dist/es5/lib/parsers/constants.js.map +1 -1
- package/dist/es5/lib/parsers/parse-arcgis-webscene.js +128 -30
- package/dist/es5/lib/parsers/parse-arcgis-webscene.js.map +1 -1
- package/dist/es5/lib/parsers/parse-i3s-attribute.js +1 -23
- package/dist/es5/lib/parsers/parse-i3s-attribute.js.map +1 -1
- package/dist/es5/lib/parsers/parse-i3s-building-scene-layer.js +8 -25
- package/dist/es5/lib/parsers/parse-i3s-building-scene-layer.js.map +1 -1
- package/dist/es5/lib/parsers/parse-i3s-tile-content.js +10 -124
- package/dist/es5/lib/parsers/parse-i3s-tile-content.js.map +1 -1
- package/dist/es5/lib/parsers/parse-i3s.js +5 -36
- package/dist/es5/lib/parsers/parse-i3s.js.map +1 -1
- package/dist/es5/lib/utils/convert-i3s-obb-to-mbs.js +0 -7
- package/dist/es5/lib/utils/convert-i3s-obb-to-mbs.js.map +1 -1
- package/dist/es5/lib/utils/customizeColors.js +4 -53
- package/dist/es5/lib/utils/customizeColors.js.map +1 -1
- package/dist/es5/lib/utils/url-utils.js +3 -8
- package/dist/es5/lib/utils/url-utils.js.map +1 -1
- package/dist/es5/types.js +0 -3
- package/dist/es5/types.js.map +1 -1
- package/dist/es5/workers/i3s-content-nodejs-worker.js +0 -3
- package/dist/es5/workers/i3s-content-nodejs-worker.js.map +1 -1
- package/dist/es5/workers/i3s-content-worker.js +0 -2
- package/dist/es5/workers/i3s-content-worker.js.map +1 -1
- package/dist/esm/arcgis-webscene-loader.js +3 -1
- package/dist/esm/arcgis-webscene-loader.js.map +1 -1
- package/dist/esm/bundle.js +1 -1
- package/dist/esm/bundle.js.map +1 -1
- package/dist/esm/i3s-attribute-loader.js +8 -25
- package/dist/esm/i3s-attribute-loader.js.map +1 -1
- package/dist/esm/i3s-building-scene-layer-loader.js +2 -3
- package/dist/esm/i3s-building-scene-layer-loader.js.map +1 -1
- package/dist/esm/i3s-content-loader.js +2 -4
- package/dist/esm/i3s-content-loader.js.map +1 -1
- package/dist/esm/i3s-loader.js +4 -13
- package/dist/esm/i3s-loader.js.map +1 -1
- package/dist/esm/i3s-node-page-loader.js +1 -2
- package/dist/esm/i3s-node-page-loader.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/helpers/i3s-nodepages-tiles.js +2 -45
- package/dist/esm/lib/helpers/i3s-nodepages-tiles.js.map +1 -1
- package/dist/esm/lib/parsers/constants.js +1 -10
- package/dist/esm/lib/parsers/constants.js.map +1 -1
- package/dist/esm/lib/parsers/parse-arcgis-webscene.js +50 -11
- package/dist/esm/lib/parsers/parse-arcgis-webscene.js.map +1 -1
- package/dist/esm/lib/parsers/parse-i3s-attribute.js +1 -8
- package/dist/esm/lib/parsers/parse-i3s-attribute.js.map +1 -1
- package/dist/esm/lib/parsers/parse-i3s-building-scene-layer.js +1 -4
- package/dist/esm/lib/parsers/parse-i3s-building-scene-layer.js.map +1 -1
- package/dist/esm/lib/parsers/parse-i3s-tile-content.js +23 -71
- package/dist/esm/lib/parsers/parse-i3s-tile-content.js.map +1 -1
- package/dist/esm/lib/parsers/parse-i3s.js +15 -17
- 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 +24 -36
- package/dist/esm/lib/utils/customizeColors.js.map +1 -1
- package/dist/esm/lib/utils/url-utils.js +5 -5
- package/dist/esm/lib/utils/url-utils.js.map +1 -1
- package/dist/esm/types.js +0 -3
- package/dist/esm/types.js.map +1 -1
- package/dist/esm/workers/i3s-content-nodejs-worker.js.map +1 -1
- package/dist/esm/workers/i3s-content-worker.js.map +1 -1
- package/dist/i3s-content-nodejs-worker.js +61 -60
- package/dist/i3s-content-nodejs-worker.js.map +3 -3
- package/dist/i3s-content-worker.js +490 -1020
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/lib/parsers/parse-arcgis-webscene.d.ts.map +1 -1
- package/dist/lib/parsers/parse-arcgis-webscene.js +49 -7
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/index.ts +2 -1
- package/src/lib/parsers/parse-arcgis-webscene.ts +57 -7
- package/src/types.ts +1 -0
package/dist/dist.min.js
CHANGED
|
@@ -17,16 +17,16 @@
|
|
|
17
17
|
for (var name in all)
|
|
18
18
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
19
|
};
|
|
20
|
-
var __reExport = (target,
|
|
21
|
-
if (
|
|
22
|
-
for (let key of __getOwnPropNames(
|
|
20
|
+
var __reExport = (target, module, desc) => {
|
|
21
|
+
if (module && typeof module === "object" || typeof module === "function") {
|
|
22
|
+
for (let key of __getOwnPropNames(module))
|
|
23
23
|
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
24
|
-
__defProp(target, key, { get: () =>
|
|
24
|
+
__defProp(target, key, { get: () => module[key], enumerable: !(desc = __getOwnPropDesc(module, key)) || desc.enumerable });
|
|
25
25
|
}
|
|
26
26
|
return target;
|
|
27
27
|
};
|
|
28
|
-
var __toModule = (
|
|
29
|
-
return __reExport(__markAsModule(__defProp(
|
|
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
30
|
};
|
|
31
31
|
|
|
32
32
|
// ../loader-utils/src/lib/env-utils/assert.ts
|
|
@@ -811,6 +811,37 @@
|
|
|
811
811
|
}
|
|
812
812
|
});
|
|
813
813
|
|
|
814
|
+
// ../../node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js
|
|
815
|
+
var init_hi_res_timestamp = __esm({
|
|
816
|
+
"../../node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js"() {
|
|
817
|
+
}
|
|
818
|
+
});
|
|
819
|
+
|
|
820
|
+
// ../../node_modules/@probe.gl/stats/dist/esm/lib/stat.js
|
|
821
|
+
var init_stat = __esm({
|
|
822
|
+
"../../node_modules/@probe.gl/stats/dist/esm/lib/stat.js"() {
|
|
823
|
+
init_defineProperty();
|
|
824
|
+
init_hi_res_timestamp();
|
|
825
|
+
}
|
|
826
|
+
});
|
|
827
|
+
|
|
828
|
+
// ../../node_modules/@probe.gl/stats/dist/esm/lib/stats.js
|
|
829
|
+
var init_stats = __esm({
|
|
830
|
+
"../../node_modules/@probe.gl/stats/dist/esm/lib/stats.js"() {
|
|
831
|
+
init_defineProperty();
|
|
832
|
+
init_stat();
|
|
833
|
+
}
|
|
834
|
+
});
|
|
835
|
+
|
|
836
|
+
// ../../node_modules/@probe.gl/stats/dist/esm/index.js
|
|
837
|
+
var init_esm = __esm({
|
|
838
|
+
"../../node_modules/@probe.gl/stats/dist/esm/index.js"() {
|
|
839
|
+
init_stats();
|
|
840
|
+
init_stat();
|
|
841
|
+
init_hi_res_timestamp();
|
|
842
|
+
}
|
|
843
|
+
});
|
|
844
|
+
|
|
814
845
|
// ../loader-utils/src/lib/path-utils/file-aliases.ts
|
|
815
846
|
function resolvePath(filename2) {
|
|
816
847
|
for (const alias in fileAliases) {
|
|
@@ -832,6 +863,30 @@
|
|
|
832
863
|
}
|
|
833
864
|
});
|
|
834
865
|
|
|
866
|
+
// ../loader-utils/src/json-loader.ts
|
|
867
|
+
function parseTextSync(text) {
|
|
868
|
+
return JSON.parse(text);
|
|
869
|
+
}
|
|
870
|
+
var VERSION3, JSONLoader;
|
|
871
|
+
var init_json_loader = __esm({
|
|
872
|
+
"../loader-utils/src/json-loader.ts"() {
|
|
873
|
+
VERSION3 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
874
|
+
JSONLoader = {
|
|
875
|
+
name: "JSON",
|
|
876
|
+
id: "json",
|
|
877
|
+
module: "json",
|
|
878
|
+
version: VERSION3,
|
|
879
|
+
extensions: ["json", "geojson"],
|
|
880
|
+
mimeTypes: ["application/json"],
|
|
881
|
+
category: "json",
|
|
882
|
+
text: true,
|
|
883
|
+
parseTextSync,
|
|
884
|
+
parse: async (arrayBuffer) => parseTextSync(new TextDecoder().decode(arrayBuffer)),
|
|
885
|
+
options: {}
|
|
886
|
+
};
|
|
887
|
+
}
|
|
888
|
+
});
|
|
889
|
+
|
|
835
890
|
// ../loader-utils/src/lib/path-utils/path.ts
|
|
836
891
|
var path_exports = {};
|
|
837
892
|
__export(path_exports, {
|
|
@@ -874,6 +929,7 @@
|
|
|
874
929
|
init_array_buffer_utils();
|
|
875
930
|
init_async_iteration();
|
|
876
931
|
init_file_aliases();
|
|
932
|
+
init_json_loader();
|
|
877
933
|
init_path();
|
|
878
934
|
}
|
|
879
935
|
});
|
|
@@ -1076,7 +1132,7 @@
|
|
|
1076
1132
|
}
|
|
1077
1133
|
});
|
|
1078
1134
|
|
|
1079
|
-
// ../../node_modules
|
|
1135
|
+
// ../../node_modules/@probe.gl/env/dist/esm/lib/is-electron.js
|
|
1080
1136
|
function isElectron(mockUserAgent) {
|
|
1081
1137
|
if (typeof window !== "undefined" && typeof window.process === "object" && window.process.type === "renderer") {
|
|
1082
1138
|
return true;
|
|
@@ -1092,25 +1148,25 @@
|
|
|
1092
1148
|
return false;
|
|
1093
1149
|
}
|
|
1094
1150
|
var init_is_electron = __esm({
|
|
1095
|
-
"../../node_modules
|
|
1151
|
+
"../../node_modules/@probe.gl/env/dist/esm/lib/is-electron.js"() {
|
|
1096
1152
|
}
|
|
1097
1153
|
});
|
|
1098
1154
|
|
|
1099
|
-
// ../../node_modules
|
|
1155
|
+
// ../../node_modules/@probe.gl/env/dist/esm/lib/is-browser.js
|
|
1100
1156
|
function isBrowser3() {
|
|
1101
1157
|
const isNode = typeof process === "object" && String(process) === "[object process]" && !process.browser;
|
|
1102
1158
|
return !isNode || isElectron();
|
|
1103
1159
|
}
|
|
1104
1160
|
var init_is_browser = __esm({
|
|
1105
|
-
"../../node_modules
|
|
1161
|
+
"../../node_modules/@probe.gl/env/dist/esm/lib/is-browser.js"() {
|
|
1106
1162
|
init_is_electron();
|
|
1107
1163
|
}
|
|
1108
1164
|
});
|
|
1109
1165
|
|
|
1110
|
-
// ../../node_modules
|
|
1111
|
-
var globals3, self_3, window_3,
|
|
1166
|
+
// ../../node_modules/@probe.gl/env/dist/esm/lib/globals.js
|
|
1167
|
+
var globals3, self_3, window_3, document_3, process_;
|
|
1112
1168
|
var init_globals3 = __esm({
|
|
1113
|
-
"../../node_modules
|
|
1169
|
+
"../../node_modules/@probe.gl/env/dist/esm/lib/globals.js"() {
|
|
1114
1170
|
globals3 = {
|
|
1115
1171
|
self: typeof self !== "undefined" && self,
|
|
1116
1172
|
window: typeof window !== "undefined" && window,
|
|
@@ -1120,24 +1176,31 @@
|
|
|
1120
1176
|
};
|
|
1121
1177
|
self_3 = globals3.self || globals3.window || globals3.global;
|
|
1122
1178
|
window_3 = globals3.window || globals3.self || globals3.global;
|
|
1123
|
-
global_3 = globals3.global || globals3.self || globals3.window;
|
|
1124
1179
|
document_3 = globals3.document || {};
|
|
1125
1180
|
process_ = globals3.process || {};
|
|
1126
1181
|
}
|
|
1127
1182
|
});
|
|
1128
1183
|
|
|
1129
|
-
// ../../node_modules
|
|
1130
|
-
var
|
|
1184
|
+
// ../../node_modules/@probe.gl/env/dist/esm/utils/globals.js
|
|
1185
|
+
var VERSION4, isBrowser4;
|
|
1131
1186
|
var init_globals4 = __esm({
|
|
1132
|
-
"../../node_modules
|
|
1187
|
+
"../../node_modules/@probe.gl/env/dist/esm/utils/globals.js"() {
|
|
1133
1188
|
init_is_browser();
|
|
1134
|
-
|
|
1135
|
-
VERSION3 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "untranspiled source";
|
|
1189
|
+
VERSION4 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "untranspiled source";
|
|
1136
1190
|
isBrowser4 = isBrowser3();
|
|
1137
1191
|
}
|
|
1138
1192
|
});
|
|
1139
1193
|
|
|
1140
|
-
// ../../node_modules
|
|
1194
|
+
// ../../node_modules/@probe.gl/env/dist/esm/index.js
|
|
1195
|
+
var init_esm2 = __esm({
|
|
1196
|
+
"../../node_modules/@probe.gl/env/dist/esm/index.js"() {
|
|
1197
|
+
init_globals4();
|
|
1198
|
+
init_globals3();
|
|
1199
|
+
init_is_browser();
|
|
1200
|
+
}
|
|
1201
|
+
});
|
|
1202
|
+
|
|
1203
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/local-storage.js
|
|
1141
1204
|
function getStorage(type) {
|
|
1142
1205
|
try {
|
|
1143
1206
|
const storage = window[type];
|
|
@@ -1151,9 +1214,15 @@
|
|
|
1151
1214
|
}
|
|
1152
1215
|
var LocalStorage;
|
|
1153
1216
|
var init_local_storage = __esm({
|
|
1154
|
-
"../../node_modules
|
|
1217
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/local-storage.js"() {
|
|
1218
|
+
init_defineProperty();
|
|
1155
1219
|
LocalStorage = class {
|
|
1156
|
-
constructor(id
|
|
1220
|
+
constructor(id) {
|
|
1221
|
+
let defaultSettings = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1222
|
+
let type = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "sessionStorage";
|
|
1223
|
+
_defineProperty(this, "storage", void 0);
|
|
1224
|
+
_defineProperty(this, "id", void 0);
|
|
1225
|
+
_defineProperty(this, "config", {});
|
|
1157
1226
|
this.storage = getStorage(type);
|
|
1158
1227
|
this.id = id;
|
|
1159
1228
|
this.config = {};
|
|
@@ -1188,7 +1257,7 @@
|
|
|
1188
1257
|
}
|
|
1189
1258
|
});
|
|
1190
1259
|
|
|
1191
|
-
// ../../node_modules
|
|
1260
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/formatters.js
|
|
1192
1261
|
function formatTime(ms) {
|
|
1193
1262
|
let formatted;
|
|
1194
1263
|
if (ms < 10) {
|
|
@@ -1202,11 +1271,13 @@
|
|
|
1202
1271
|
}
|
|
1203
1272
|
return formatted;
|
|
1204
1273
|
}
|
|
1205
|
-
function leftPad(string
|
|
1274
|
+
function leftPad(string) {
|
|
1275
|
+
let length4 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 8;
|
|
1206
1276
|
const padLength = Math.max(length4 - string.length, 0);
|
|
1207
1277
|
return "".concat(" ".repeat(padLength)).concat(string);
|
|
1208
1278
|
}
|
|
1209
|
-
function formatImage(image, message, scale5
|
|
1279
|
+
function formatImage(image, message, scale5) {
|
|
1280
|
+
let maxWidth = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 600;
|
|
1210
1281
|
const imageUrl = image.src.replace(/\(/g, "%28").replace(/\)/g, "%29");
|
|
1211
1282
|
if (image.width > maxWidth) {
|
|
1212
1283
|
scale5 = Math.min(scale5, maxWidth / image.width);
|
|
@@ -1217,16 +1288,16 @@
|
|
|
1217
1288
|
return ["".concat(message, " %c+"), style];
|
|
1218
1289
|
}
|
|
1219
1290
|
var init_formatters = __esm({
|
|
1220
|
-
"../../node_modules
|
|
1291
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/formatters.js"() {
|
|
1221
1292
|
}
|
|
1222
1293
|
});
|
|
1223
1294
|
|
|
1224
|
-
// ../../node_modules
|
|
1295
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/color.js
|
|
1225
1296
|
function getColor(color) {
|
|
1226
1297
|
return typeof color === "string" ? COLOR[color.toUpperCase()] || COLOR.WHITE : color;
|
|
1227
1298
|
}
|
|
1228
1299
|
function addColor(string, color, background) {
|
|
1229
|
-
if (!
|
|
1300
|
+
if (!isBrowser3 && typeof string === "string") {
|
|
1230
1301
|
if (color) {
|
|
1231
1302
|
color = getColor(color);
|
|
1232
1303
|
string = "[".concat(color, "m").concat(string, "[39m");
|
|
@@ -1240,31 +1311,32 @@
|
|
|
1240
1311
|
}
|
|
1241
1312
|
var COLOR;
|
|
1242
1313
|
var init_color = __esm({
|
|
1243
|
-
"../../node_modules
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
BLACK
|
|
1247
|
-
RED
|
|
1248
|
-
GREEN
|
|
1249
|
-
YELLOW
|
|
1250
|
-
BLUE
|
|
1251
|
-
MAGENTA
|
|
1252
|
-
CYAN
|
|
1253
|
-
WHITE
|
|
1254
|
-
BRIGHT_BLACK
|
|
1255
|
-
BRIGHT_RED
|
|
1256
|
-
BRIGHT_GREEN
|
|
1257
|
-
BRIGHT_YELLOW
|
|
1258
|
-
BRIGHT_BLUE
|
|
1259
|
-
BRIGHT_MAGENTA
|
|
1260
|
-
BRIGHT_CYAN
|
|
1261
|
-
BRIGHT_WHITE
|
|
1262
|
-
};
|
|
1314
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/color.js"() {
|
|
1315
|
+
init_esm2();
|
|
1316
|
+
(function(COLOR2) {
|
|
1317
|
+
COLOR2[COLOR2["BLACK"] = 30] = "BLACK";
|
|
1318
|
+
COLOR2[COLOR2["RED"] = 31] = "RED";
|
|
1319
|
+
COLOR2[COLOR2["GREEN"] = 32] = "GREEN";
|
|
1320
|
+
COLOR2[COLOR2["YELLOW"] = 33] = "YELLOW";
|
|
1321
|
+
COLOR2[COLOR2["BLUE"] = 34] = "BLUE";
|
|
1322
|
+
COLOR2[COLOR2["MAGENTA"] = 35] = "MAGENTA";
|
|
1323
|
+
COLOR2[COLOR2["CYAN"] = 36] = "CYAN";
|
|
1324
|
+
COLOR2[COLOR2["WHITE"] = 37] = "WHITE";
|
|
1325
|
+
COLOR2[COLOR2["BRIGHT_BLACK"] = 90] = "BRIGHT_BLACK";
|
|
1326
|
+
COLOR2[COLOR2["BRIGHT_RED"] = 91] = "BRIGHT_RED";
|
|
1327
|
+
COLOR2[COLOR2["BRIGHT_GREEN"] = 92] = "BRIGHT_GREEN";
|
|
1328
|
+
COLOR2[COLOR2["BRIGHT_YELLOW"] = 93] = "BRIGHT_YELLOW";
|
|
1329
|
+
COLOR2[COLOR2["BRIGHT_BLUE"] = 94] = "BRIGHT_BLUE";
|
|
1330
|
+
COLOR2[COLOR2["BRIGHT_MAGENTA"] = 95] = "BRIGHT_MAGENTA";
|
|
1331
|
+
COLOR2[COLOR2["BRIGHT_CYAN"] = 96] = "BRIGHT_CYAN";
|
|
1332
|
+
COLOR2[COLOR2["BRIGHT_WHITE"] = 97] = "BRIGHT_WHITE";
|
|
1333
|
+
})(COLOR || (COLOR = {}));
|
|
1263
1334
|
}
|
|
1264
1335
|
});
|
|
1265
1336
|
|
|
1266
|
-
// ../../node_modules
|
|
1267
|
-
function autobind(obj
|
|
1337
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/autobind.js
|
|
1338
|
+
function autobind(obj) {
|
|
1339
|
+
let predefined = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ["constructor"];
|
|
1268
1340
|
const proto = Object.getPrototypeOf(obj);
|
|
1269
1341
|
const propNames = Object.getOwnPropertyNames(proto);
|
|
1270
1342
|
for (const key of propNames) {
|
|
@@ -1276,50 +1348,50 @@
|
|
|
1276
1348
|
}
|
|
1277
1349
|
}
|
|
1278
1350
|
var init_autobind = __esm({
|
|
1279
|
-
"../../node_modules
|
|
1351
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/autobind.js"() {
|
|
1280
1352
|
}
|
|
1281
1353
|
});
|
|
1282
1354
|
|
|
1283
|
-
// ../../node_modules
|
|
1355
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/assert.js
|
|
1284
1356
|
function assert3(condition, message) {
|
|
1285
1357
|
if (!condition) {
|
|
1286
1358
|
throw new Error(message || "Assertion failed");
|
|
1287
1359
|
}
|
|
1288
1360
|
}
|
|
1289
1361
|
var init_assert3 = __esm({
|
|
1290
|
-
"../../node_modules
|
|
1362
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/assert.js"() {
|
|
1291
1363
|
}
|
|
1292
1364
|
});
|
|
1293
1365
|
|
|
1294
|
-
// ../../node_modules
|
|
1295
|
-
function
|
|
1366
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/hi-res-timestamp.js
|
|
1367
|
+
function getHiResTimestamp2() {
|
|
1296
1368
|
let timestamp;
|
|
1297
|
-
if (
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1369
|
+
if (isBrowser3 && "performance" in window_3) {
|
|
1370
|
+
var _window$performance, _window$performance$n;
|
|
1371
|
+
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);
|
|
1372
|
+
} else if ("hrtime" in process_) {
|
|
1373
|
+
var _process$hrtime;
|
|
1374
|
+
const timeParts = process_ === null || process_ === void 0 ? void 0 : (_process$hrtime = process_.hrtime) === null || _process$hrtime === void 0 ? void 0 : _process$hrtime.call(process_);
|
|
1301
1375
|
timestamp = timeParts[0] * 1e3 + timeParts[1] / 1e6;
|
|
1302
1376
|
} else {
|
|
1303
1377
|
timestamp = Date.now();
|
|
1304
1378
|
}
|
|
1305
1379
|
return timestamp;
|
|
1306
1380
|
}
|
|
1307
|
-
var
|
|
1308
|
-
"../../node_modules
|
|
1309
|
-
|
|
1381
|
+
var init_hi_res_timestamp2 = __esm({
|
|
1382
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/hi-res-timestamp.js"() {
|
|
1383
|
+
init_esm2();
|
|
1310
1384
|
}
|
|
1311
1385
|
});
|
|
1312
1386
|
|
|
1313
|
-
//
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
function getTableHeader(table) {
|
|
1317
|
-
for (const key in table) {
|
|
1318
|
-
for (const title in table[key]) {
|
|
1319
|
-
return title || "untitled";
|
|
1320
|
-
}
|
|
1387
|
+
// (disabled):../../node_modules/@probe.gl/log/dist/esm/node/node-asciify-image
|
|
1388
|
+
var init_node_asciify_image = __esm({
|
|
1389
|
+
"(disabled):../../node_modules/@probe.gl/log/dist/esm/node/node-asciify-image"() {
|
|
1321
1390
|
}
|
|
1322
|
-
|
|
1391
|
+
});
|
|
1392
|
+
|
|
1393
|
+
// ../../node_modules/@probe.gl/log/dist/esm/log.js
|
|
1394
|
+
function noop() {
|
|
1323
1395
|
}
|
|
1324
1396
|
function normalizeLogLevel(logLevel) {
|
|
1325
1397
|
if (!logLevel) {
|
|
@@ -1348,7 +1420,6 @@
|
|
|
1348
1420
|
const args = opts.args ? Array.from(opts.args) : [];
|
|
1349
1421
|
while (args.length && args.shift() !== message) {
|
|
1350
1422
|
}
|
|
1351
|
-
opts.args = args;
|
|
1352
1423
|
switch (typeof logLevel) {
|
|
1353
1424
|
case "string":
|
|
1354
1425
|
case "function":
|
|
@@ -1367,7 +1438,9 @@
|
|
|
1367
1438
|
}
|
|
1368
1439
|
const messageType = typeof opts.message;
|
|
1369
1440
|
assert3(messageType === "string" || messageType === "object");
|
|
1370
|
-
return Object.assign(opts,
|
|
1441
|
+
return Object.assign(opts, {
|
|
1442
|
+
args
|
|
1443
|
+
}, opts.opts);
|
|
1371
1444
|
}
|
|
1372
1445
|
function decorateMessage(id, message, opts) {
|
|
1373
1446
|
if (typeof message === "string") {
|
|
@@ -1377,29 +1450,25 @@
|
|
|
1377
1450
|
}
|
|
1378
1451
|
return message;
|
|
1379
1452
|
}
|
|
1380
|
-
function logImageInNode({
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
return () => asciify(image, {
|
|
1392
|
-
fit: "box",
|
|
1393
|
-
width: "".concat(Math.round(80 * scale5), "%")
|
|
1394
|
-
}).then((data) => console.log(data));
|
|
1395
|
-
}
|
|
1453
|
+
function logImageInNode(_ref2) {
|
|
1454
|
+
let {
|
|
1455
|
+
image,
|
|
1456
|
+
message = "",
|
|
1457
|
+
scale: scale5 = 1
|
|
1458
|
+
} = _ref2;
|
|
1459
|
+
asciify.nodeAsciifyImage({
|
|
1460
|
+
image,
|
|
1461
|
+
message,
|
|
1462
|
+
scale: scale5
|
|
1463
|
+
});
|
|
1396
1464
|
return noop;
|
|
1397
1465
|
}
|
|
1398
|
-
function logImageInBrowser({
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1466
|
+
function logImageInBrowser(_ref3) {
|
|
1467
|
+
let {
|
|
1468
|
+
image,
|
|
1469
|
+
message = "",
|
|
1470
|
+
scale: scale5 = 1
|
|
1471
|
+
} = _ref3;
|
|
1403
1472
|
if (typeof image === "string") {
|
|
1404
1473
|
const img = new Image();
|
|
1405
1474
|
img.onload = () => {
|
|
@@ -1422,18 +1491,28 @@
|
|
|
1422
1491
|
}
|
|
1423
1492
|
return noop;
|
|
1424
1493
|
}
|
|
1494
|
+
function getTableHeader(table) {
|
|
1495
|
+
for (const key in table) {
|
|
1496
|
+
for (const title in table[key]) {
|
|
1497
|
+
return title || "untitled";
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1500
|
+
return "empty";
|
|
1501
|
+
}
|
|
1425
1502
|
var originalConsole, DEFAULT_SETTINGS, cache, ONCE, Log;
|
|
1426
1503
|
var init_log = __esm({
|
|
1427
|
-
"../../node_modules
|
|
1428
|
-
|
|
1504
|
+
"../../node_modules/@probe.gl/log/dist/esm/log.js"() {
|
|
1505
|
+
init_defineProperty();
|
|
1506
|
+
init_esm2();
|
|
1429
1507
|
init_local_storage();
|
|
1430
1508
|
init_formatters();
|
|
1431
1509
|
init_color();
|
|
1432
1510
|
init_autobind();
|
|
1433
1511
|
init_assert3();
|
|
1434
|
-
|
|
1512
|
+
init_hi_res_timestamp2();
|
|
1513
|
+
init_node_asciify_image();
|
|
1435
1514
|
originalConsole = {
|
|
1436
|
-
debug:
|
|
1515
|
+
debug: isBrowser3 ? console.debug || console.log : console.log,
|
|
1437
1516
|
log: console.log,
|
|
1438
1517
|
info: console.info,
|
|
1439
1518
|
warn: console.warn,
|
|
@@ -1448,16 +1527,20 @@
|
|
|
1448
1527
|
once: true
|
|
1449
1528
|
};
|
|
1450
1529
|
Log = class {
|
|
1451
|
-
constructor({
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1530
|
+
constructor() {
|
|
1531
|
+
let {
|
|
1532
|
+
id
|
|
1533
|
+
} = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
|
|
1534
|
+
id: ""
|
|
1535
|
+
};
|
|
1536
|
+
_defineProperty(this, "id", void 0);
|
|
1537
|
+
_defineProperty(this, "VERSION", VERSION4);
|
|
1538
|
+
_defineProperty(this, "_startTs", getHiResTimestamp2());
|
|
1539
|
+
_defineProperty(this, "_deltaTs", getHiResTimestamp2());
|
|
1540
|
+
_defineProperty(this, "_storage", void 0);
|
|
1541
|
+
_defineProperty(this, "userData", {});
|
|
1542
|
+
_defineProperty(this, "LOG_THROTTLE_TIMEOUT", 0);
|
|
1456
1543
|
this.id = id;
|
|
1457
|
-
this.VERSION = VERSION3;
|
|
1458
|
-
this._startTs = getHiResTimestamp();
|
|
1459
|
-
this._deltaTs = getHiResTimestamp();
|
|
1460
|
-
this.LOG_THROTTLE_TIMEOUT = 0;
|
|
1461
1544
|
this._storage = new LocalStorage("__probe-".concat(this.id, "__"), DEFAULT_SETTINGS);
|
|
1462
1545
|
this.userData = {};
|
|
1463
1546
|
this.timeStamp("".concat(this.id, " started"));
|
|
@@ -1477,10 +1560,10 @@
|
|
|
1477
1560
|
return this._storage.config.level;
|
|
1478
1561
|
}
|
|
1479
1562
|
getTotal() {
|
|
1480
|
-
return Number((
|
|
1563
|
+
return Number((getHiResTimestamp2() - this._startTs).toPrecision(10));
|
|
1481
1564
|
}
|
|
1482
1565
|
getDelta() {
|
|
1483
|
-
return Number((
|
|
1566
|
+
return Number((getHiResTimestamp2() - this._deltaTs).toPrecision(10));
|
|
1484
1567
|
}
|
|
1485
1568
|
set priority(newPriority) {
|
|
1486
1569
|
this.level = newPriority;
|
|
@@ -1491,7 +1574,8 @@
|
|
|
1491
1574
|
getPriority() {
|
|
1492
1575
|
return this.level;
|
|
1493
1576
|
}
|
|
1494
|
-
enable(
|
|
1577
|
+
enable() {
|
|
1578
|
+
let enabled = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
|
|
1495
1579
|
this._storage.updateConfiguration({
|
|
1496
1580
|
enabled
|
|
1497
1581
|
});
|
|
@@ -1503,6 +1587,21 @@
|
|
|
1503
1587
|
});
|
|
1504
1588
|
return this;
|
|
1505
1589
|
}
|
|
1590
|
+
get(setting) {
|
|
1591
|
+
return this._storage.config[setting];
|
|
1592
|
+
}
|
|
1593
|
+
set(setting, value) {
|
|
1594
|
+
this._storage.updateConfiguration({
|
|
1595
|
+
[setting]: value
|
|
1596
|
+
});
|
|
1597
|
+
}
|
|
1598
|
+
settings() {
|
|
1599
|
+
if (console.table) {
|
|
1600
|
+
console.table(this._storage.config);
|
|
1601
|
+
} else {
|
|
1602
|
+
console.log(this._storage.config);
|
|
1603
|
+
}
|
|
1604
|
+
}
|
|
1506
1605
|
assert(condition, message) {
|
|
1507
1606
|
assert3(condition, message);
|
|
1508
1607
|
}
|
|
@@ -1531,6 +1630,9 @@
|
|
|
1531
1630
|
return this._getLogFunction(logLevel, message, console.info, arguments);
|
|
1532
1631
|
}
|
|
1533
1632
|
once(logLevel, message) {
|
|
1633
|
+
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
1634
|
+
args[_key - 2] = arguments[_key];
|
|
1635
|
+
}
|
|
1534
1636
|
return this._getLogFunction(logLevel, message, originalConsole.debug || originalConsole.info, arguments, ONCE);
|
|
1535
1637
|
}
|
|
1536
1638
|
table(logLevel, table, columns) {
|
|
@@ -1541,17 +1643,18 @@
|
|
|
1541
1643
|
}
|
|
1542
1644
|
return noop;
|
|
1543
1645
|
}
|
|
1544
|
-
image({
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1646
|
+
image(_ref) {
|
|
1647
|
+
let {
|
|
1648
|
+
logLevel,
|
|
1649
|
+
priority,
|
|
1650
|
+
image,
|
|
1651
|
+
message = "",
|
|
1652
|
+
scale: scale5 = 1
|
|
1653
|
+
} = _ref;
|
|
1551
1654
|
if (!this._shouldLog(logLevel || priority)) {
|
|
1552
1655
|
return noop;
|
|
1553
1656
|
}
|
|
1554
|
-
return
|
|
1657
|
+
return isBrowser3 ? logImageInBrowser({
|
|
1555
1658
|
image,
|
|
1556
1659
|
message,
|
|
1557
1660
|
scale: scale5
|
|
@@ -1561,21 +1664,6 @@
|
|
|
1561
1664
|
scale: scale5
|
|
1562
1665
|
});
|
|
1563
1666
|
}
|
|
1564
|
-
settings() {
|
|
1565
|
-
if (console.table) {
|
|
1566
|
-
console.table(this._storage.config);
|
|
1567
|
-
} else {
|
|
1568
|
-
console.log(this._storage.config);
|
|
1569
|
-
}
|
|
1570
|
-
}
|
|
1571
|
-
get(setting) {
|
|
1572
|
-
return this._storage.config[setting];
|
|
1573
|
-
}
|
|
1574
|
-
set(setting, value) {
|
|
1575
|
-
this._storage.updateConfiguration({
|
|
1576
|
-
[setting]: value
|
|
1577
|
-
});
|
|
1578
|
-
}
|
|
1579
1667
|
time(logLevel, message) {
|
|
1580
1668
|
return this._getLogFunction(logLevel, message, console.time ? console.time : console.info);
|
|
1581
1669
|
}
|
|
@@ -1585,10 +1673,11 @@
|
|
|
1585
1673
|
timeStamp(logLevel, message) {
|
|
1586
1674
|
return this._getLogFunction(logLevel, message, console.timeStamp || noop);
|
|
1587
1675
|
}
|
|
1588
|
-
group(logLevel, message
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1676
|
+
group(logLevel, message) {
|
|
1677
|
+
let opts = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
|
|
1678
|
+
collapsed: false
|
|
1679
|
+
};
|
|
1680
|
+
const options = normalizeArguments({
|
|
1592
1681
|
logLevel,
|
|
1593
1682
|
message,
|
|
1594
1683
|
opts
|
|
@@ -1596,10 +1685,11 @@
|
|
|
1596
1685
|
const {
|
|
1597
1686
|
collapsed
|
|
1598
1687
|
} = opts;
|
|
1599
|
-
|
|
1600
|
-
return this._getLogFunction(
|
|
1688
|
+
options.method = (collapsed ? console.groupCollapsed : console.group) || console.info;
|
|
1689
|
+
return this._getLogFunction(options);
|
|
1601
1690
|
}
|
|
1602
|
-
groupCollapsed(logLevel, message
|
|
1691
|
+
groupCollapsed(logLevel, message) {
|
|
1692
|
+
let opts = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
1603
1693
|
return this.group(logLevel, message, Object.assign({}, opts, {
|
|
1604
1694
|
collapsed: true
|
|
1605
1695
|
}));
|
|
@@ -1623,7 +1713,7 @@
|
|
|
1623
1713
|
_shouldLog(logLevel) {
|
|
1624
1714
|
return this.isEnabled() && this.getLevel() >= normalizeLogLevel(logLevel);
|
|
1625
1715
|
}
|
|
1626
|
-
_getLogFunction(logLevel, message, method, args
|
|
1716
|
+
_getLogFunction(logLevel, message, method, args, opts) {
|
|
1627
1717
|
if (this._shouldLog(logLevel)) {
|
|
1628
1718
|
opts = normalizeArguments({
|
|
1629
1719
|
logLevel,
|
|
@@ -1635,11 +1725,11 @@
|
|
|
1635
1725
|
assert3(method);
|
|
1636
1726
|
opts.total = this.getTotal();
|
|
1637
1727
|
opts.delta = this.getDelta();
|
|
1638
|
-
this._deltaTs =
|
|
1728
|
+
this._deltaTs = getHiResTimestamp2();
|
|
1639
1729
|
const tag = opts.tag || opts.message;
|
|
1640
1730
|
if (opts.once) {
|
|
1641
1731
|
if (!cache[tag]) {
|
|
1642
|
-
cache[tag] =
|
|
1732
|
+
cache[tag] = getHiResTimestamp2();
|
|
1643
1733
|
} else {
|
|
1644
1734
|
return noop;
|
|
1645
1735
|
}
|
|
@@ -1650,49 +1740,27 @@
|
|
|
1650
1740
|
return noop;
|
|
1651
1741
|
}
|
|
1652
1742
|
};
|
|
1653
|
-
Log
|
|
1654
|
-
}
|
|
1655
|
-
});
|
|
1656
|
-
|
|
1657
|
-
// ../../node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js
|
|
1658
|
-
var init_hi_res_timestamp2 = __esm({
|
|
1659
|
-
"../../node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js"() {
|
|
1660
|
-
}
|
|
1661
|
-
});
|
|
1662
|
-
|
|
1663
|
-
// ../../node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/lib/stat.js
|
|
1664
|
-
var init_stat = __esm({
|
|
1665
|
-
"../../node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/lib/stat.js"() {
|
|
1666
|
-
init_hi_res_timestamp2();
|
|
1743
|
+
_defineProperty(Log, "VERSION", VERSION4);
|
|
1667
1744
|
}
|
|
1668
1745
|
});
|
|
1669
1746
|
|
|
1670
|
-
// ../../node_modules
|
|
1671
|
-
var
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
"../../node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/index.js"() {
|
|
1680
|
-
init_stats();
|
|
1681
|
-
init_stat();
|
|
1682
|
-
init_hi_res_timestamp2();
|
|
1747
|
+
// ../../node_modules/@probe.gl/log/dist/esm/index.js
|
|
1748
|
+
var esm_default;
|
|
1749
|
+
var init_esm3 = __esm({
|
|
1750
|
+
"../../node_modules/@probe.gl/log/dist/esm/index.js"() {
|
|
1751
|
+
init_log();
|
|
1752
|
+
init_log();
|
|
1753
|
+
esm_default = new Log({
|
|
1754
|
+
id: "@probe.gl/log"
|
|
1755
|
+
});
|
|
1683
1756
|
}
|
|
1684
1757
|
});
|
|
1685
1758
|
|
|
1686
1759
|
// ../../node_modules/probe.gl/dist/esm/index.js
|
|
1687
|
-
var
|
|
1688
|
-
var init_esm2 = __esm({
|
|
1760
|
+
var init_esm4 = __esm({
|
|
1689
1761
|
"../../node_modules/probe.gl/dist/esm/index.js"() {
|
|
1690
|
-
|
|
1691
|
-
init_log();
|
|
1762
|
+
init_esm3();
|
|
1692
1763
|
init_esm();
|
|
1693
|
-
esm_default = new Log({
|
|
1694
|
-
id: "probe.gl"
|
|
1695
|
-
});
|
|
1696
1764
|
}
|
|
1697
1765
|
});
|
|
1698
1766
|
|
|
@@ -1700,7 +1768,7 @@
|
|
|
1700
1768
|
var probeLog, NullLog, ConsoleLog;
|
|
1701
1769
|
var init_loggers = __esm({
|
|
1702
1770
|
"../core/src/lib/loader-utils/loggers.ts"() {
|
|
1703
|
-
|
|
1771
|
+
init_esm4();
|
|
1704
1772
|
probeLog = new Log({ id: "loaders.gl" });
|
|
1705
1773
|
NullLog = class {
|
|
1706
1774
|
log() {
|
|
@@ -1899,690 +1967,67 @@
|
|
|
1899
1967
|
return state.globalOptions;
|
|
1900
1968
|
};
|
|
1901
1969
|
}
|
|
1902
|
-
});
|
|
1903
|
-
|
|
1904
|
-
// ../core/src/lib/loader-utils/normalize-loader.ts
|
|
1905
|
-
function isLoaderObject(loader) {
|
|
1906
|
-
if (!loader) {
|
|
1907
|
-
return false;
|
|
1908
|
-
}
|
|
1909
|
-
if (Array.isArray(loader)) {
|
|
1910
|
-
loader = loader[0];
|
|
1911
|
-
}
|
|
1912
|
-
const hasExtensions = Array.isArray(loader?.extensions);
|
|
1913
|
-
return hasExtensions;
|
|
1914
|
-
}
|
|
1915
|
-
function normalizeLoader(loader) {
|
|
1916
|
-
assert(loader, "null loader");
|
|
1917
|
-
assert(isLoaderObject(loader), "invalid loader");
|
|
1918
|
-
let options;
|
|
1919
|
-
if (Array.isArray(loader)) {
|
|
1920
|
-
options = loader[1];
|
|
1921
|
-
loader = loader[0];
|
|
1922
|
-
loader = {
|
|
1923
|
-
...loader,
|
|
1924
|
-
options: { ...loader.options, ...options }
|
|
1925
|
-
};
|
|
1926
|
-
}
|
|
1927
|
-
if (loader?.parseTextSync || loader?.parseText) {
|
|
1928
|
-
loader.text = true;
|
|
1929
|
-
}
|
|
1930
|
-
if (!loader.text) {
|
|
1931
|
-
loader.binary = true;
|
|
1932
|
-
}
|
|
1933
|
-
return loader;
|
|
1934
|
-
}
|
|
1935
|
-
var init_normalize_loader = __esm({
|
|
1936
|
-
"../core/src/lib/loader-utils/normalize-loader.ts"() {
|
|
1937
|
-
init_src2();
|
|
1938
|
-
}
|
|
1939
|
-
});
|
|
1940
|
-
|
|
1941
|
-
// ../core/src/lib/api/register-loaders.ts
|
|
1942
|
-
function getRegisteredLoaders() {
|
|
1943
|
-
return getGlobalLoaderRegistry();
|
|
1944
|
-
}
|
|
1945
|
-
var getGlobalLoaderRegistry;
|
|
1946
|
-
var init_register_loaders = __esm({
|
|
1947
|
-
"../core/src/lib/api/register-loaders.ts"() {
|
|
1948
|
-
init_option_utils();
|
|
1949
|
-
getGlobalLoaderRegistry = () => {
|
|
1950
|
-
const state = getGlobalLoaderState();
|
|
1951
|
-
state.loaderRegistry = state.loaderRegistry || [];
|
|
1952
|
-
return state.loaderRegistry;
|
|
1953
|
-
};
|
|
1954
|
-
}
|
|
1955
|
-
});
|
|
1956
|
-
|
|
1957
|
-
// ../../node_modules/@probe.gl/env/dist/esm/lib/is-electron.js
|
|
1958
|
-
function isElectron2(mockUserAgent) {
|
|
1959
|
-
if (typeof window !== "undefined" && typeof window.process === "object" && window.process.type === "renderer") {
|
|
1960
|
-
return true;
|
|
1961
|
-
}
|
|
1962
|
-
if (typeof process !== "undefined" && typeof process.versions === "object" && Boolean(process.versions.electron)) {
|
|
1963
|
-
return true;
|
|
1964
|
-
}
|
|
1965
|
-
const realUserAgent = typeof navigator === "object" && typeof navigator.userAgent === "string" && navigator.userAgent;
|
|
1966
|
-
const userAgent = mockUserAgent || realUserAgent;
|
|
1967
|
-
if (userAgent && userAgent.indexOf("Electron") >= 0) {
|
|
1968
|
-
return true;
|
|
1969
|
-
}
|
|
1970
|
-
return false;
|
|
1971
|
-
}
|
|
1972
|
-
var init_is_electron2 = __esm({
|
|
1973
|
-
"../../node_modules/@probe.gl/env/dist/esm/lib/is-electron.js"() {
|
|
1974
|
-
}
|
|
1975
|
-
});
|
|
1976
|
-
|
|
1977
|
-
// ../../node_modules/@probe.gl/env/dist/esm/lib/is-browser.js
|
|
1978
|
-
function isBrowser5() {
|
|
1979
|
-
const isNode = typeof process === "object" && String(process) === "[object process]" && !process.browser;
|
|
1980
|
-
return !isNode || isElectron2();
|
|
1981
|
-
}
|
|
1982
|
-
var init_is_browser2 = __esm({
|
|
1983
|
-
"../../node_modules/@probe.gl/env/dist/esm/lib/is-browser.js"() {
|
|
1984
|
-
init_is_electron2();
|
|
1985
|
-
}
|
|
1986
|
-
});
|
|
1987
|
-
|
|
1988
|
-
// ../../node_modules/@probe.gl/env/dist/esm/lib/globals.js
|
|
1989
|
-
var globals4, self_4, window_4, document_4, process_2;
|
|
1990
|
-
var init_globals5 = __esm({
|
|
1991
|
-
"../../node_modules/@probe.gl/env/dist/esm/lib/globals.js"() {
|
|
1992
|
-
globals4 = {
|
|
1993
|
-
self: typeof self !== "undefined" && self,
|
|
1994
|
-
window: typeof window !== "undefined" && window,
|
|
1995
|
-
global: typeof global !== "undefined" && global,
|
|
1996
|
-
document: typeof document !== "undefined" && document,
|
|
1997
|
-
process: typeof process === "object" && process
|
|
1998
|
-
};
|
|
1999
|
-
self_4 = globals4.self || globals4.window || globals4.global;
|
|
2000
|
-
window_4 = globals4.window || globals4.self || globals4.global;
|
|
2001
|
-
document_4 = globals4.document || {};
|
|
2002
|
-
process_2 = globals4.process || {};
|
|
2003
|
-
}
|
|
2004
|
-
});
|
|
2005
|
-
|
|
2006
|
-
// ../../node_modules/@probe.gl/env/dist/esm/utils/globals.js
|
|
2007
|
-
var VERSION4, isBrowser6;
|
|
2008
|
-
var init_globals6 = __esm({
|
|
2009
|
-
"../../node_modules/@probe.gl/env/dist/esm/utils/globals.js"() {
|
|
2010
|
-
init_is_browser2();
|
|
2011
|
-
VERSION4 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "untranspiled source";
|
|
2012
|
-
isBrowser6 = isBrowser5();
|
|
2013
|
-
}
|
|
2014
|
-
});
|
|
2015
|
-
|
|
2016
|
-
// ../../node_modules/@probe.gl/env/dist/esm/index.js
|
|
2017
|
-
var init_esm3 = __esm({
|
|
2018
|
-
"../../node_modules/@probe.gl/env/dist/esm/index.js"() {
|
|
2019
|
-
init_globals6();
|
|
2020
|
-
init_globals5();
|
|
2021
|
-
init_is_browser2();
|
|
2022
|
-
}
|
|
2023
|
-
});
|
|
2024
|
-
|
|
2025
|
-
// ../../node_modules/@probe.gl/log/dist/esm/utils/local-storage.js
|
|
2026
|
-
function getStorage2(type) {
|
|
2027
|
-
try {
|
|
2028
|
-
const storage = window[type];
|
|
2029
|
-
const x = "__storage_test__";
|
|
2030
|
-
storage.setItem(x, x);
|
|
2031
|
-
storage.removeItem(x);
|
|
2032
|
-
return storage;
|
|
2033
|
-
} catch (e2) {
|
|
2034
|
-
return null;
|
|
2035
|
-
}
|
|
2036
|
-
}
|
|
2037
|
-
var LocalStorage2;
|
|
2038
|
-
var init_local_storage2 = __esm({
|
|
2039
|
-
"../../node_modules/@probe.gl/log/dist/esm/utils/local-storage.js"() {
|
|
2040
|
-
init_defineProperty();
|
|
2041
|
-
LocalStorage2 = class {
|
|
2042
|
-
constructor(id) {
|
|
2043
|
-
let defaultSettings = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2044
|
-
let type = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "sessionStorage";
|
|
2045
|
-
_defineProperty(this, "storage", void 0);
|
|
2046
|
-
_defineProperty(this, "id", void 0);
|
|
2047
|
-
_defineProperty(this, "config", {});
|
|
2048
|
-
this.storage = getStorage2(type);
|
|
2049
|
-
this.id = id;
|
|
2050
|
-
this.config = {};
|
|
2051
|
-
Object.assign(this.config, defaultSettings);
|
|
2052
|
-
this._loadConfiguration();
|
|
2053
|
-
}
|
|
2054
|
-
getConfiguration() {
|
|
2055
|
-
return this.config;
|
|
2056
|
-
}
|
|
2057
|
-
setConfiguration(configuration) {
|
|
2058
|
-
this.config = {};
|
|
2059
|
-
return this.updateConfiguration(configuration);
|
|
2060
|
-
}
|
|
2061
|
-
updateConfiguration(configuration) {
|
|
2062
|
-
Object.assign(this.config, configuration);
|
|
2063
|
-
if (this.storage) {
|
|
2064
|
-
const serialized = JSON.stringify(this.config);
|
|
2065
|
-
this.storage.setItem(this.id, serialized);
|
|
2066
|
-
}
|
|
2067
|
-
return this;
|
|
2068
|
-
}
|
|
2069
|
-
_loadConfiguration() {
|
|
2070
|
-
let configuration = {};
|
|
2071
|
-
if (this.storage) {
|
|
2072
|
-
const serializedConfiguration = this.storage.getItem(this.id);
|
|
2073
|
-
configuration = serializedConfiguration ? JSON.parse(serializedConfiguration) : {};
|
|
2074
|
-
}
|
|
2075
|
-
Object.assign(this.config, configuration);
|
|
2076
|
-
return this;
|
|
2077
|
-
}
|
|
2078
|
-
};
|
|
2079
|
-
}
|
|
2080
|
-
});
|
|
2081
|
-
|
|
2082
|
-
// ../../node_modules/@probe.gl/log/dist/esm/utils/formatters.js
|
|
2083
|
-
function formatTime2(ms) {
|
|
2084
|
-
let formatted;
|
|
2085
|
-
if (ms < 10) {
|
|
2086
|
-
formatted = "".concat(ms.toFixed(2), "ms");
|
|
2087
|
-
} else if (ms < 100) {
|
|
2088
|
-
formatted = "".concat(ms.toFixed(1), "ms");
|
|
2089
|
-
} else if (ms < 1e3) {
|
|
2090
|
-
formatted = "".concat(ms.toFixed(0), "ms");
|
|
2091
|
-
} else {
|
|
2092
|
-
formatted = "".concat((ms / 1e3).toFixed(2), "s");
|
|
2093
|
-
}
|
|
2094
|
-
return formatted;
|
|
2095
|
-
}
|
|
2096
|
-
function leftPad2(string) {
|
|
2097
|
-
let length4 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 8;
|
|
2098
|
-
const padLength = Math.max(length4 - string.length, 0);
|
|
2099
|
-
return "".concat(" ".repeat(padLength)).concat(string);
|
|
2100
|
-
}
|
|
2101
|
-
function formatImage2(image, message, scale5) {
|
|
2102
|
-
let maxWidth = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 600;
|
|
2103
|
-
const imageUrl = image.src.replace(/\(/g, "%28").replace(/\)/g, "%29");
|
|
2104
|
-
if (image.width > maxWidth) {
|
|
2105
|
-
scale5 = Math.min(scale5, maxWidth / image.width);
|
|
2106
|
-
}
|
|
2107
|
-
const width = image.width * scale5;
|
|
2108
|
-
const height = image.height * scale5;
|
|
2109
|
-
const style = ["font-size:1px;", "padding:".concat(Math.floor(height / 2), "px ").concat(Math.floor(width / 2), "px;"), "line-height:".concat(height, "px;"), "background:url(".concat(imageUrl, ");"), "background-size:".concat(width, "px ").concat(height, "px;"), "color:transparent;"].join("");
|
|
2110
|
-
return ["".concat(message, " %c+"), style];
|
|
2111
|
-
}
|
|
2112
|
-
var init_formatters2 = __esm({
|
|
2113
|
-
"../../node_modules/@probe.gl/log/dist/esm/utils/formatters.js"() {
|
|
2114
|
-
}
|
|
2115
|
-
});
|
|
2116
|
-
|
|
2117
|
-
// ../../node_modules/@probe.gl/log/dist/esm/utils/color.js
|
|
2118
|
-
function getColor2(color) {
|
|
2119
|
-
return typeof color === "string" ? COLOR2[color.toUpperCase()] || COLOR2.WHITE : color;
|
|
2120
|
-
}
|
|
2121
|
-
function addColor2(string, color, background) {
|
|
2122
|
-
if (!isBrowser5 && typeof string === "string") {
|
|
2123
|
-
if (color) {
|
|
2124
|
-
color = getColor2(color);
|
|
2125
|
-
string = "[".concat(color, "m").concat(string, "[39m");
|
|
2126
|
-
}
|
|
2127
|
-
if (background) {
|
|
2128
|
-
color = getColor2(background);
|
|
2129
|
-
string = "[".concat(background + 10, "m").concat(string, "[49m");
|
|
2130
|
-
}
|
|
2131
|
-
}
|
|
2132
|
-
return string;
|
|
2133
|
-
}
|
|
2134
|
-
var COLOR2;
|
|
2135
|
-
var init_color2 = __esm({
|
|
2136
|
-
"../../node_modules/@probe.gl/log/dist/esm/utils/color.js"() {
|
|
2137
|
-
init_esm3();
|
|
2138
|
-
(function(COLOR3) {
|
|
2139
|
-
COLOR3[COLOR3["BLACK"] = 30] = "BLACK";
|
|
2140
|
-
COLOR3[COLOR3["RED"] = 31] = "RED";
|
|
2141
|
-
COLOR3[COLOR3["GREEN"] = 32] = "GREEN";
|
|
2142
|
-
COLOR3[COLOR3["YELLOW"] = 33] = "YELLOW";
|
|
2143
|
-
COLOR3[COLOR3["BLUE"] = 34] = "BLUE";
|
|
2144
|
-
COLOR3[COLOR3["MAGENTA"] = 35] = "MAGENTA";
|
|
2145
|
-
COLOR3[COLOR3["CYAN"] = 36] = "CYAN";
|
|
2146
|
-
COLOR3[COLOR3["WHITE"] = 37] = "WHITE";
|
|
2147
|
-
COLOR3[COLOR3["BRIGHT_BLACK"] = 90] = "BRIGHT_BLACK";
|
|
2148
|
-
COLOR3[COLOR3["BRIGHT_RED"] = 91] = "BRIGHT_RED";
|
|
2149
|
-
COLOR3[COLOR3["BRIGHT_GREEN"] = 92] = "BRIGHT_GREEN";
|
|
2150
|
-
COLOR3[COLOR3["BRIGHT_YELLOW"] = 93] = "BRIGHT_YELLOW";
|
|
2151
|
-
COLOR3[COLOR3["BRIGHT_BLUE"] = 94] = "BRIGHT_BLUE";
|
|
2152
|
-
COLOR3[COLOR3["BRIGHT_MAGENTA"] = 95] = "BRIGHT_MAGENTA";
|
|
2153
|
-
COLOR3[COLOR3["BRIGHT_CYAN"] = 96] = "BRIGHT_CYAN";
|
|
2154
|
-
COLOR3[COLOR3["BRIGHT_WHITE"] = 97] = "BRIGHT_WHITE";
|
|
2155
|
-
})(COLOR2 || (COLOR2 = {}));
|
|
2156
|
-
}
|
|
2157
|
-
});
|
|
2158
|
-
|
|
2159
|
-
// ../../node_modules/@probe.gl/log/dist/esm/utils/autobind.js
|
|
2160
|
-
function autobind2(obj) {
|
|
2161
|
-
let predefined = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ["constructor"];
|
|
2162
|
-
const proto = Object.getPrototypeOf(obj);
|
|
2163
|
-
const propNames = Object.getOwnPropertyNames(proto);
|
|
2164
|
-
for (const key of propNames) {
|
|
2165
|
-
if (typeof obj[key] === "function") {
|
|
2166
|
-
if (!predefined.find((name) => key === name)) {
|
|
2167
|
-
obj[key] = obj[key].bind(obj);
|
|
2168
|
-
}
|
|
2169
|
-
}
|
|
2170
|
-
}
|
|
2171
|
-
}
|
|
2172
|
-
var init_autobind2 = __esm({
|
|
2173
|
-
"../../node_modules/@probe.gl/log/dist/esm/utils/autobind.js"() {
|
|
2174
|
-
}
|
|
2175
|
-
});
|
|
2176
|
-
|
|
2177
|
-
// ../../node_modules/@probe.gl/log/dist/esm/utils/assert.js
|
|
2178
|
-
function assert4(condition, message) {
|
|
2179
|
-
if (!condition) {
|
|
2180
|
-
throw new Error(message || "Assertion failed");
|
|
2181
|
-
}
|
|
2182
|
-
}
|
|
2183
|
-
var init_assert4 = __esm({
|
|
2184
|
-
"../../node_modules/@probe.gl/log/dist/esm/utils/assert.js"() {
|
|
2185
|
-
}
|
|
2186
|
-
});
|
|
2187
|
-
|
|
2188
|
-
// ../../node_modules/@probe.gl/log/dist/esm/utils/hi-res-timestamp.js
|
|
2189
|
-
function getHiResTimestamp3() {
|
|
2190
|
-
let timestamp;
|
|
2191
|
-
if (isBrowser5 && "performance" in window_4) {
|
|
2192
|
-
var _window$performance, _window$performance$n;
|
|
2193
|
-
timestamp = window_4 === null || window_4 === void 0 ? void 0 : (_window$performance = window_4.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);
|
|
2194
|
-
} else if ("hrtime" in process_2) {
|
|
2195
|
-
var _process$hrtime;
|
|
2196
|
-
const timeParts = process_2 === null || process_2 === void 0 ? void 0 : (_process$hrtime = process_2.hrtime) === null || _process$hrtime === void 0 ? void 0 : _process$hrtime.call(process_2);
|
|
2197
|
-
timestamp = timeParts[0] * 1e3 + timeParts[1] / 1e6;
|
|
2198
|
-
} else {
|
|
2199
|
-
timestamp = Date.now();
|
|
2200
|
-
}
|
|
2201
|
-
return timestamp;
|
|
2202
|
-
}
|
|
2203
|
-
var init_hi_res_timestamp3 = __esm({
|
|
2204
|
-
"../../node_modules/@probe.gl/log/dist/esm/utils/hi-res-timestamp.js"() {
|
|
2205
|
-
init_esm3();
|
|
2206
|
-
}
|
|
2207
|
-
});
|
|
2208
|
-
|
|
2209
|
-
// ../../node_modules/@probe.gl/log/dist/esm/log.js
|
|
2210
|
-
function noop2() {
|
|
2211
|
-
}
|
|
2212
|
-
function normalizeLogLevel2(logLevel) {
|
|
2213
|
-
if (!logLevel) {
|
|
2214
|
-
return 0;
|
|
2215
|
-
}
|
|
2216
|
-
let resolvedLevel;
|
|
2217
|
-
switch (typeof logLevel) {
|
|
2218
|
-
case "number":
|
|
2219
|
-
resolvedLevel = logLevel;
|
|
2220
|
-
break;
|
|
2221
|
-
case "object":
|
|
2222
|
-
resolvedLevel = logLevel.logLevel || logLevel.priority || 0;
|
|
2223
|
-
break;
|
|
2224
|
-
default:
|
|
2225
|
-
return 0;
|
|
2226
|
-
}
|
|
2227
|
-
assert4(Number.isFinite(resolvedLevel) && resolvedLevel >= 0);
|
|
2228
|
-
return resolvedLevel;
|
|
2229
|
-
}
|
|
2230
|
-
function normalizeArguments2(opts) {
|
|
2231
|
-
const {
|
|
2232
|
-
logLevel,
|
|
2233
|
-
message
|
|
2234
|
-
} = opts;
|
|
2235
|
-
opts.logLevel = normalizeLogLevel2(logLevel);
|
|
2236
|
-
const args = opts.args ? Array.from(opts.args) : [];
|
|
2237
|
-
while (args.length && args.shift() !== message) {
|
|
2238
|
-
}
|
|
2239
|
-
switch (typeof logLevel) {
|
|
2240
|
-
case "string":
|
|
2241
|
-
case "function":
|
|
2242
|
-
if (message !== void 0) {
|
|
2243
|
-
args.unshift(message);
|
|
2244
|
-
}
|
|
2245
|
-
opts.message = logLevel;
|
|
2246
|
-
break;
|
|
2247
|
-
case "object":
|
|
2248
|
-
Object.assign(opts, logLevel);
|
|
2249
|
-
break;
|
|
2250
|
-
default:
|
|
2251
|
-
}
|
|
2252
|
-
if (typeof opts.message === "function") {
|
|
2253
|
-
opts.message = opts.message();
|
|
2254
|
-
}
|
|
2255
|
-
const messageType = typeof opts.message;
|
|
2256
|
-
assert4(messageType === "string" || messageType === "object");
|
|
2257
|
-
return Object.assign(opts, {
|
|
2258
|
-
args
|
|
2259
|
-
}, opts.opts);
|
|
2260
|
-
}
|
|
2261
|
-
function decorateMessage2(id, message, opts) {
|
|
2262
|
-
if (typeof message === "string") {
|
|
2263
|
-
const time = opts.time ? leftPad2(formatTime2(opts.total)) : "";
|
|
2264
|
-
message = opts.time ? "".concat(id, ": ").concat(time, " ").concat(message) : "".concat(id, ": ").concat(message);
|
|
2265
|
-
message = addColor2(message, opts.color, opts.background);
|
|
2266
|
-
}
|
|
2267
|
-
return message;
|
|
2268
|
-
}
|
|
2269
|
-
function logImageInNode2(_ref2) {
|
|
2270
|
-
let {
|
|
2271
|
-
image,
|
|
2272
|
-
message = "",
|
|
2273
|
-
scale: scale5 = 1
|
|
2274
|
-
} = _ref2;
|
|
2275
|
-
let asciify = null;
|
|
2276
|
-
try {
|
|
2277
|
-
asciify = module.require("asciify-image");
|
|
2278
|
-
} catch (error) {
|
|
2279
|
-
}
|
|
2280
|
-
if (asciify) {
|
|
2281
|
-
return () => asciify(image, {
|
|
2282
|
-
fit: "box",
|
|
2283
|
-
width: "".concat(Math.round(80 * scale5), "%")
|
|
2284
|
-
}).then((data) => console.log(data));
|
|
2285
|
-
}
|
|
2286
|
-
return noop2;
|
|
2287
|
-
}
|
|
2288
|
-
function logImageInBrowser2(_ref3) {
|
|
2289
|
-
let {
|
|
2290
|
-
image,
|
|
2291
|
-
message = "",
|
|
2292
|
-
scale: scale5 = 1
|
|
2293
|
-
} = _ref3;
|
|
2294
|
-
if (typeof image === "string") {
|
|
2295
|
-
const img = new Image();
|
|
2296
|
-
img.onload = () => {
|
|
2297
|
-
const args = formatImage2(img, message, scale5);
|
|
2298
|
-
console.log(...args);
|
|
2299
|
-
};
|
|
2300
|
-
img.src = image;
|
|
2301
|
-
return noop2;
|
|
2302
|
-
}
|
|
2303
|
-
const element = image.nodeName || "";
|
|
2304
|
-
if (element.toLowerCase() === "img") {
|
|
2305
|
-
console.log(...formatImage2(image, message, scale5));
|
|
2306
|
-
return noop2;
|
|
2307
|
-
}
|
|
2308
|
-
if (element.toLowerCase() === "canvas") {
|
|
2309
|
-
const img = new Image();
|
|
2310
|
-
img.onload = () => console.log(...formatImage2(img, message, scale5));
|
|
2311
|
-
img.src = image.toDataURL();
|
|
2312
|
-
return noop2;
|
|
2313
|
-
}
|
|
2314
|
-
return noop2;
|
|
2315
|
-
}
|
|
2316
|
-
function getTableHeader2(table) {
|
|
2317
|
-
for (const key in table) {
|
|
2318
|
-
for (const title in table[key]) {
|
|
2319
|
-
return title || "untitled";
|
|
2320
|
-
}
|
|
2321
|
-
}
|
|
2322
|
-
return "empty";
|
|
2323
|
-
}
|
|
2324
|
-
var originalConsole2, DEFAULT_SETTINGS2, cache2, ONCE2, Log2;
|
|
2325
|
-
var init_log2 = __esm({
|
|
2326
|
-
"../../node_modules/@probe.gl/log/dist/esm/log.js"() {
|
|
2327
|
-
init_defineProperty();
|
|
2328
|
-
init_esm3();
|
|
2329
|
-
init_local_storage2();
|
|
2330
|
-
init_formatters2();
|
|
2331
|
-
init_color2();
|
|
2332
|
-
init_autobind2();
|
|
2333
|
-
init_assert4();
|
|
2334
|
-
init_hi_res_timestamp3();
|
|
2335
|
-
originalConsole2 = {
|
|
2336
|
-
debug: isBrowser5 ? console.debug || console.log : console.log,
|
|
2337
|
-
log: console.log,
|
|
2338
|
-
info: console.info,
|
|
2339
|
-
warn: console.warn,
|
|
2340
|
-
error: console.error
|
|
2341
|
-
};
|
|
2342
|
-
DEFAULT_SETTINGS2 = {
|
|
2343
|
-
enabled: true,
|
|
2344
|
-
level: 0
|
|
2345
|
-
};
|
|
2346
|
-
cache2 = {};
|
|
2347
|
-
ONCE2 = {
|
|
2348
|
-
once: true
|
|
2349
|
-
};
|
|
2350
|
-
Log2 = class {
|
|
2351
|
-
constructor() {
|
|
2352
|
-
let {
|
|
2353
|
-
id
|
|
2354
|
-
} = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
|
|
2355
|
-
id: ""
|
|
2356
|
-
};
|
|
2357
|
-
_defineProperty(this, "id", void 0);
|
|
2358
|
-
_defineProperty(this, "VERSION", VERSION4);
|
|
2359
|
-
_defineProperty(this, "_startTs", getHiResTimestamp3());
|
|
2360
|
-
_defineProperty(this, "_deltaTs", getHiResTimestamp3());
|
|
2361
|
-
_defineProperty(this, "_storage", void 0);
|
|
2362
|
-
_defineProperty(this, "userData", {});
|
|
2363
|
-
_defineProperty(this, "LOG_THROTTLE_TIMEOUT", 0);
|
|
2364
|
-
this.id = id;
|
|
2365
|
-
this._storage = new LocalStorage2("__probe-".concat(this.id, "__"), DEFAULT_SETTINGS2);
|
|
2366
|
-
this.userData = {};
|
|
2367
|
-
this.timeStamp("".concat(this.id, " started"));
|
|
2368
|
-
autobind2(this);
|
|
2369
|
-
Object.seal(this);
|
|
2370
|
-
}
|
|
2371
|
-
set level(newLevel) {
|
|
2372
|
-
this.setLevel(newLevel);
|
|
2373
|
-
}
|
|
2374
|
-
get level() {
|
|
2375
|
-
return this.getLevel();
|
|
2376
|
-
}
|
|
2377
|
-
isEnabled() {
|
|
2378
|
-
return this._storage.config.enabled;
|
|
2379
|
-
}
|
|
2380
|
-
getLevel() {
|
|
2381
|
-
return this._storage.config.level;
|
|
2382
|
-
}
|
|
2383
|
-
getTotal() {
|
|
2384
|
-
return Number((getHiResTimestamp3() - this._startTs).toPrecision(10));
|
|
2385
|
-
}
|
|
2386
|
-
getDelta() {
|
|
2387
|
-
return Number((getHiResTimestamp3() - this._deltaTs).toPrecision(10));
|
|
2388
|
-
}
|
|
2389
|
-
set priority(newPriority) {
|
|
2390
|
-
this.level = newPriority;
|
|
2391
|
-
}
|
|
2392
|
-
get priority() {
|
|
2393
|
-
return this.level;
|
|
2394
|
-
}
|
|
2395
|
-
getPriority() {
|
|
2396
|
-
return this.level;
|
|
2397
|
-
}
|
|
2398
|
-
enable() {
|
|
2399
|
-
let enabled = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
|
|
2400
|
-
this._storage.updateConfiguration({
|
|
2401
|
-
enabled
|
|
2402
|
-
});
|
|
2403
|
-
return this;
|
|
2404
|
-
}
|
|
2405
|
-
setLevel(level) {
|
|
2406
|
-
this._storage.updateConfiguration({
|
|
2407
|
-
level
|
|
2408
|
-
});
|
|
2409
|
-
return this;
|
|
2410
|
-
}
|
|
2411
|
-
get(setting) {
|
|
2412
|
-
return this._storage.config[setting];
|
|
2413
|
-
}
|
|
2414
|
-
set(setting, value) {
|
|
2415
|
-
this._storage.updateConfiguration({
|
|
2416
|
-
[setting]: value
|
|
2417
|
-
});
|
|
2418
|
-
}
|
|
2419
|
-
settings() {
|
|
2420
|
-
if (console.table) {
|
|
2421
|
-
console.table(this._storage.config);
|
|
2422
|
-
} else {
|
|
2423
|
-
console.log(this._storage.config);
|
|
2424
|
-
}
|
|
2425
|
-
}
|
|
2426
|
-
assert(condition, message) {
|
|
2427
|
-
assert4(condition, message);
|
|
2428
|
-
}
|
|
2429
|
-
warn(message) {
|
|
2430
|
-
return this._getLogFunction(0, message, originalConsole2.warn, arguments, ONCE2);
|
|
2431
|
-
}
|
|
2432
|
-
error(message) {
|
|
2433
|
-
return this._getLogFunction(0, message, originalConsole2.error, arguments);
|
|
2434
|
-
}
|
|
2435
|
-
deprecated(oldUsage, newUsage) {
|
|
2436
|
-
return this.warn("`".concat(oldUsage, "` is deprecated and will be removed in a later version. Use `").concat(newUsage, "` instead"));
|
|
2437
|
-
}
|
|
2438
|
-
removed(oldUsage, newUsage) {
|
|
2439
|
-
return this.error("`".concat(oldUsage, "` has been removed. Use `").concat(newUsage, "` instead"));
|
|
2440
|
-
}
|
|
2441
|
-
probe(logLevel, message) {
|
|
2442
|
-
return this._getLogFunction(logLevel, message, originalConsole2.log, arguments, {
|
|
2443
|
-
time: true,
|
|
2444
|
-
once: true
|
|
2445
|
-
});
|
|
2446
|
-
}
|
|
2447
|
-
log(logLevel, message) {
|
|
2448
|
-
return this._getLogFunction(logLevel, message, originalConsole2.debug, arguments);
|
|
2449
|
-
}
|
|
2450
|
-
info(logLevel, message) {
|
|
2451
|
-
return this._getLogFunction(logLevel, message, console.info, arguments);
|
|
2452
|
-
}
|
|
2453
|
-
once(logLevel, message) {
|
|
2454
|
-
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
2455
|
-
args[_key - 2] = arguments[_key];
|
|
2456
|
-
}
|
|
2457
|
-
return this._getLogFunction(logLevel, message, originalConsole2.debug || originalConsole2.info, arguments, ONCE2);
|
|
2458
|
-
}
|
|
2459
|
-
table(logLevel, table, columns) {
|
|
2460
|
-
if (table) {
|
|
2461
|
-
return this._getLogFunction(logLevel, table, console.table || noop2, columns && [columns], {
|
|
2462
|
-
tag: getTableHeader2(table)
|
|
2463
|
-
});
|
|
2464
|
-
}
|
|
2465
|
-
return noop2;
|
|
2466
|
-
}
|
|
2467
|
-
image(_ref) {
|
|
2468
|
-
let {
|
|
2469
|
-
logLevel,
|
|
2470
|
-
priority,
|
|
2471
|
-
image,
|
|
2472
|
-
message = "",
|
|
2473
|
-
scale: scale5 = 1
|
|
2474
|
-
} = _ref;
|
|
2475
|
-
if (!this._shouldLog(logLevel || priority)) {
|
|
2476
|
-
return noop2;
|
|
2477
|
-
}
|
|
2478
|
-
return isBrowser5 ? logImageInBrowser2({
|
|
2479
|
-
image,
|
|
2480
|
-
message,
|
|
2481
|
-
scale: scale5
|
|
2482
|
-
}) : logImageInNode2({
|
|
2483
|
-
image,
|
|
2484
|
-
message,
|
|
2485
|
-
scale: scale5
|
|
2486
|
-
});
|
|
2487
|
-
}
|
|
2488
|
-
time(logLevel, message) {
|
|
2489
|
-
return this._getLogFunction(logLevel, message, console.time ? console.time : console.info);
|
|
2490
|
-
}
|
|
2491
|
-
timeEnd(logLevel, message) {
|
|
2492
|
-
return this._getLogFunction(logLevel, message, console.timeEnd ? console.timeEnd : console.info);
|
|
2493
|
-
}
|
|
2494
|
-
timeStamp(logLevel, message) {
|
|
2495
|
-
return this._getLogFunction(logLevel, message, console.timeStamp || noop2);
|
|
2496
|
-
}
|
|
2497
|
-
group(logLevel, message) {
|
|
2498
|
-
let opts = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
|
|
2499
|
-
collapsed: false
|
|
2500
|
-
};
|
|
2501
|
-
const options = normalizeArguments2({
|
|
2502
|
-
logLevel,
|
|
2503
|
-
message,
|
|
2504
|
-
opts
|
|
2505
|
-
});
|
|
2506
|
-
const {
|
|
2507
|
-
collapsed
|
|
2508
|
-
} = opts;
|
|
2509
|
-
options.method = (collapsed ? console.groupCollapsed : console.group) || console.info;
|
|
2510
|
-
return this._getLogFunction(options);
|
|
2511
|
-
}
|
|
2512
|
-
groupCollapsed(logLevel, message) {
|
|
2513
|
-
let opts = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
2514
|
-
return this.group(logLevel, message, Object.assign({}, opts, {
|
|
2515
|
-
collapsed: true
|
|
2516
|
-
}));
|
|
2517
|
-
}
|
|
2518
|
-
groupEnd(logLevel) {
|
|
2519
|
-
return this._getLogFunction(logLevel, "", console.groupEnd || noop2);
|
|
2520
|
-
}
|
|
2521
|
-
withGroup(logLevel, message, func) {
|
|
2522
|
-
this.group(logLevel, message)();
|
|
2523
|
-
try {
|
|
2524
|
-
func();
|
|
2525
|
-
} finally {
|
|
2526
|
-
this.groupEnd(logLevel)();
|
|
2527
|
-
}
|
|
2528
|
-
}
|
|
2529
|
-
trace() {
|
|
2530
|
-
if (console.trace) {
|
|
2531
|
-
console.trace();
|
|
2532
|
-
}
|
|
2533
|
-
}
|
|
2534
|
-
_shouldLog(logLevel) {
|
|
2535
|
-
return this.isEnabled() && this.getLevel() >= normalizeLogLevel2(logLevel);
|
|
2536
|
-
}
|
|
2537
|
-
_getLogFunction(logLevel, message, method, args, opts) {
|
|
2538
|
-
if (this._shouldLog(logLevel)) {
|
|
2539
|
-
opts = normalizeArguments2({
|
|
2540
|
-
logLevel,
|
|
2541
|
-
message,
|
|
2542
|
-
args,
|
|
2543
|
-
opts
|
|
2544
|
-
});
|
|
2545
|
-
method = method || opts.method;
|
|
2546
|
-
assert4(method);
|
|
2547
|
-
opts.total = this.getTotal();
|
|
2548
|
-
opts.delta = this.getDelta();
|
|
2549
|
-
this._deltaTs = getHiResTimestamp3();
|
|
2550
|
-
const tag = opts.tag || opts.message;
|
|
2551
|
-
if (opts.once) {
|
|
2552
|
-
if (!cache2[tag]) {
|
|
2553
|
-
cache2[tag] = getHiResTimestamp3();
|
|
2554
|
-
} else {
|
|
2555
|
-
return noop2;
|
|
2556
|
-
}
|
|
2557
|
-
}
|
|
2558
|
-
message = decorateMessage2(this.id, opts.message, opts);
|
|
2559
|
-
return method.bind(console, message, ...opts.args);
|
|
2560
|
-
}
|
|
2561
|
-
return noop2;
|
|
2562
|
-
}
|
|
1970
|
+
});
|
|
1971
|
+
|
|
1972
|
+
// ../core/src/lib/loader-utils/normalize-loader.ts
|
|
1973
|
+
function isLoaderObject(loader) {
|
|
1974
|
+
if (!loader) {
|
|
1975
|
+
return false;
|
|
1976
|
+
}
|
|
1977
|
+
if (Array.isArray(loader)) {
|
|
1978
|
+
loader = loader[0];
|
|
1979
|
+
}
|
|
1980
|
+
const hasExtensions = Array.isArray(loader?.extensions);
|
|
1981
|
+
return hasExtensions;
|
|
1982
|
+
}
|
|
1983
|
+
function normalizeLoader(loader) {
|
|
1984
|
+
assert(loader, "null loader");
|
|
1985
|
+
assert(isLoaderObject(loader), "invalid loader");
|
|
1986
|
+
let options;
|
|
1987
|
+
if (Array.isArray(loader)) {
|
|
1988
|
+
options = loader[1];
|
|
1989
|
+
loader = loader[0];
|
|
1990
|
+
loader = {
|
|
1991
|
+
...loader,
|
|
1992
|
+
options: { ...loader.options, ...options }
|
|
2563
1993
|
};
|
|
2564
|
-
|
|
1994
|
+
}
|
|
1995
|
+
if (loader?.parseTextSync || loader?.parseText) {
|
|
1996
|
+
loader.text = true;
|
|
1997
|
+
}
|
|
1998
|
+
if (!loader.text) {
|
|
1999
|
+
loader.binary = true;
|
|
2000
|
+
}
|
|
2001
|
+
return loader;
|
|
2002
|
+
}
|
|
2003
|
+
var init_normalize_loader = __esm({
|
|
2004
|
+
"../core/src/lib/loader-utils/normalize-loader.ts"() {
|
|
2005
|
+
init_src2();
|
|
2565
2006
|
}
|
|
2566
2007
|
});
|
|
2567
2008
|
|
|
2568
|
-
//
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2009
|
+
// ../core/src/lib/api/register-loaders.ts
|
|
2010
|
+
function getRegisteredLoaders() {
|
|
2011
|
+
return getGlobalLoaderRegistry();
|
|
2012
|
+
}
|
|
2013
|
+
var getGlobalLoaderRegistry;
|
|
2014
|
+
var init_register_loaders = __esm({
|
|
2015
|
+
"../core/src/lib/api/register-loaders.ts"() {
|
|
2016
|
+
init_option_utils();
|
|
2017
|
+
getGlobalLoaderRegistry = () => {
|
|
2018
|
+
const state = getGlobalLoaderState();
|
|
2019
|
+
state.loaderRegistry = state.loaderRegistry || [];
|
|
2020
|
+
return state.loaderRegistry;
|
|
2021
|
+
};
|
|
2577
2022
|
}
|
|
2578
2023
|
});
|
|
2579
2024
|
|
|
2580
2025
|
// ../core/src/lib/utils/log.ts
|
|
2581
2026
|
var log;
|
|
2582
|
-
var
|
|
2027
|
+
var init_log2 = __esm({
|
|
2583
2028
|
"../core/src/lib/utils/log.ts"() {
|
|
2584
|
-
|
|
2585
|
-
log = new
|
|
2029
|
+
init_esm3();
|
|
2030
|
+
log = new Log({ id: "loaders.gl" });
|
|
2586
2031
|
}
|
|
2587
2032
|
});
|
|
2588
2033
|
|
|
@@ -2771,7 +2216,7 @@
|
|
|
2771
2216
|
"../core/src/lib/api/select-loader.ts"() {
|
|
2772
2217
|
init_src2();
|
|
2773
2218
|
init_normalize_loader();
|
|
2774
|
-
|
|
2219
|
+
init_log2();
|
|
2775
2220
|
init_resource_utils();
|
|
2776
2221
|
init_register_loaders();
|
|
2777
2222
|
init_is_type();
|
|
@@ -3088,26 +2533,24 @@
|
|
|
3088
2533
|
"../core/src/index.ts"() {
|
|
3089
2534
|
init_parse();
|
|
3090
2535
|
init_load();
|
|
2536
|
+
init_src2();
|
|
3091
2537
|
}
|
|
3092
2538
|
});
|
|
3093
2539
|
|
|
3094
2540
|
// ../../node_modules/@math.gl/core/dist/esm/lib/assert.js
|
|
3095
|
-
function
|
|
2541
|
+
function assert4(condition, message) {
|
|
3096
2542
|
if (!condition) {
|
|
3097
2543
|
throw new Error("math.gl assertion ".concat(message));
|
|
3098
2544
|
}
|
|
3099
2545
|
}
|
|
3100
|
-
var
|
|
2546
|
+
var init_assert4 = __esm({
|
|
3101
2547
|
"../../node_modules/@math.gl/core/dist/esm/lib/assert.js"() {
|
|
3102
2548
|
}
|
|
3103
2549
|
});
|
|
3104
2550
|
|
|
3105
2551
|
// ../../node_modules/@math.gl/core/dist/esm/lib/common.js
|
|
3106
|
-
function round(value) {
|
|
3107
|
-
return Math.round(value / config.EPSILON) * config.EPSILON;
|
|
3108
|
-
}
|
|
3109
2552
|
function formatValue(value, {
|
|
3110
|
-
precision = config.precision
|
|
2553
|
+
precision = config.precision
|
|
3111
2554
|
} = {}) {
|
|
3112
2555
|
value = round(value);
|
|
3113
2556
|
return "".concat(parseFloat(value.toPrecision(precision)));
|
|
@@ -3115,19 +2558,6 @@
|
|
|
3115
2558
|
function isArray(value) {
|
|
3116
2559
|
return Array.isArray(value) || ArrayBuffer.isView(value) && !(value instanceof DataView);
|
|
3117
2560
|
}
|
|
3118
|
-
function duplicateArray(array) {
|
|
3119
|
-
return array.clone ? array.clone() : new Array(array.length);
|
|
3120
|
-
}
|
|
3121
|
-
function map(value, func, result) {
|
|
3122
|
-
if (isArray(value)) {
|
|
3123
|
-
result = result || duplicateArray(value);
|
|
3124
|
-
for (let i2 = 0; i2 < result.length && i2 < value.length; ++i2) {
|
|
3125
|
-
result[i2] = func(value[i2], i2, result);
|
|
3126
|
-
}
|
|
3127
|
-
return result;
|
|
3128
|
-
}
|
|
3129
|
-
return func(value);
|
|
3130
|
-
}
|
|
3131
2561
|
function toRadians(degrees2) {
|
|
3132
2562
|
return radians(degrees2);
|
|
3133
2563
|
}
|
|
@@ -3166,7 +2596,7 @@
|
|
|
3166
2596
|
if (b && b.equals) {
|
|
3167
2597
|
return b.equals(a2);
|
|
3168
2598
|
}
|
|
3169
|
-
if (
|
|
2599
|
+
if (typeof a2 === "number" && typeof b === "number") {
|
|
3170
2600
|
return Math.abs(a2 - b) <= config.EPSILON * Math.max(1, Math.abs(a2), Math.abs(b));
|
|
3171
2601
|
}
|
|
3172
2602
|
return false;
|
|
@@ -3174,18 +2604,36 @@
|
|
|
3174
2604
|
config.EPSILON = oldEpsilon;
|
|
3175
2605
|
}
|
|
3176
2606
|
}
|
|
2607
|
+
function round(value) {
|
|
2608
|
+
return Math.round(value / config.EPSILON) * config.EPSILON;
|
|
2609
|
+
}
|
|
2610
|
+
function duplicateArray(array) {
|
|
2611
|
+
return array.clone ? array.clone() : new Array(array.length);
|
|
2612
|
+
}
|
|
2613
|
+
function map(value, func, result) {
|
|
2614
|
+
if (isArray(value)) {
|
|
2615
|
+
const array = value;
|
|
2616
|
+
result = result || duplicateArray(array);
|
|
2617
|
+
for (let i2 = 0; i2 < result.length && i2 < array.length; ++i2) {
|
|
2618
|
+
result[i2] = func(value[i2], i2, result);
|
|
2619
|
+
}
|
|
2620
|
+
return result;
|
|
2621
|
+
}
|
|
2622
|
+
return func(value);
|
|
2623
|
+
}
|
|
3177
2624
|
var RADIANS_TO_DEGREES, DEGREES_TO_RADIANS, config;
|
|
3178
2625
|
var init_common = __esm({
|
|
3179
2626
|
"../../node_modules/@math.gl/core/dist/esm/lib/common.js"() {
|
|
3180
2627
|
RADIANS_TO_DEGREES = 1 / Math.PI * 180;
|
|
3181
2628
|
DEGREES_TO_RADIANS = 1 / 180 * Math.PI;
|
|
3182
|
-
config = {
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
2629
|
+
config = {
|
|
2630
|
+
EPSILON: 1e-12,
|
|
2631
|
+
debug: false,
|
|
2632
|
+
precision: 4,
|
|
2633
|
+
printTypes: false,
|
|
2634
|
+
printDegrees: false,
|
|
2635
|
+
printRowMajor: true
|
|
2636
|
+
};
|
|
3189
2637
|
}
|
|
3190
2638
|
});
|
|
3191
2639
|
|
|
@@ -3215,24 +2663,25 @@
|
|
|
3215
2663
|
var init_math_array = __esm({
|
|
3216
2664
|
"../../node_modules/@math.gl/core/dist/esm/classes/base/math-array.js"() {
|
|
3217
2665
|
init_common();
|
|
3218
|
-
init_assert5();
|
|
3219
2666
|
MathArray = class extends _extendableBuiltin(Array) {
|
|
3220
|
-
get ELEMENTS() {
|
|
3221
|
-
assert5(false);
|
|
3222
|
-
return 0;
|
|
3223
|
-
}
|
|
3224
2667
|
clone() {
|
|
3225
2668
|
return new this.constructor().copy(this);
|
|
3226
2669
|
}
|
|
3227
|
-
from(arrayOrObject) {
|
|
3228
|
-
return Array.isArray(arrayOrObject) ? this.copy(arrayOrObject) : this.fromObject(arrayOrObject);
|
|
3229
|
-
}
|
|
3230
2670
|
fromArray(array, offset = 0) {
|
|
3231
2671
|
for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
|
|
3232
2672
|
this[i2] = array[i2 + offset];
|
|
3233
2673
|
}
|
|
3234
2674
|
return this.check();
|
|
3235
2675
|
}
|
|
2676
|
+
toArray(targetArray = [], offset = 0) {
|
|
2677
|
+
for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
|
|
2678
|
+
targetArray[offset + i2] = this[i2];
|
|
2679
|
+
}
|
|
2680
|
+
return targetArray;
|
|
2681
|
+
}
|
|
2682
|
+
from(arrayOrObject) {
|
|
2683
|
+
return Array.isArray(arrayOrObject) ? this.copy(arrayOrObject) : this.fromObject(arrayOrObject);
|
|
2684
|
+
}
|
|
3236
2685
|
to(arrayOrObject) {
|
|
3237
2686
|
if (arrayOrObject === this) {
|
|
3238
2687
|
return this;
|
|
@@ -3242,12 +2691,6 @@
|
|
|
3242
2691
|
toTarget(target) {
|
|
3243
2692
|
return target ? this.to(target) : this;
|
|
3244
2693
|
}
|
|
3245
|
-
toArray(array = [], offset = 0) {
|
|
3246
|
-
for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
|
|
3247
|
-
array[offset + i2] = this[i2];
|
|
3248
|
-
}
|
|
3249
|
-
return array;
|
|
3250
|
-
}
|
|
3251
2694
|
toFloat32Array() {
|
|
3252
2695
|
return new Float32Array(this);
|
|
3253
2696
|
}
|
|
@@ -3291,9 +2734,7 @@
|
|
|
3291
2734
|
}
|
|
3292
2735
|
lerp(a2, b, t2) {
|
|
3293
2736
|
if (t2 === void 0) {
|
|
3294
|
-
|
|
3295
|
-
b = a2;
|
|
3296
|
-
a2 = this;
|
|
2737
|
+
return this.lerp(this, a2, b);
|
|
3297
2738
|
}
|
|
3298
2739
|
for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
|
|
3299
2740
|
const ai = a2[i2];
|
|
@@ -3336,14 +2777,36 @@
|
|
|
3336
2777
|
return this.check();
|
|
3337
2778
|
}
|
|
3338
2779
|
scale(scale5) {
|
|
3339
|
-
if (
|
|
3340
|
-
|
|
2780
|
+
if (typeof scale5 === "number") {
|
|
2781
|
+
for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
|
|
2782
|
+
this[i2] *= scale5;
|
|
2783
|
+
}
|
|
2784
|
+
} else {
|
|
2785
|
+
for (let i2 = 0; i2 < this.ELEMENTS && i2 < scale5.length; ++i2) {
|
|
2786
|
+
this[i2] *= scale5[i2];
|
|
2787
|
+
}
|
|
3341
2788
|
}
|
|
2789
|
+
return this.check();
|
|
2790
|
+
}
|
|
2791
|
+
multiplyByScalar(scalar) {
|
|
3342
2792
|
for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
|
|
3343
|
-
this[i2] *=
|
|
2793
|
+
this[i2] *= scalar;
|
|
3344
2794
|
}
|
|
3345
2795
|
return this.check();
|
|
3346
2796
|
}
|
|
2797
|
+
check() {
|
|
2798
|
+
if (config.debug && !this.validate()) {
|
|
2799
|
+
throw new Error("math.gl: ".concat(this.constructor.name, " some fields set to invalid numbers'"));
|
|
2800
|
+
}
|
|
2801
|
+
return this;
|
|
2802
|
+
}
|
|
2803
|
+
validate() {
|
|
2804
|
+
let valid = this.length === this.ELEMENTS;
|
|
2805
|
+
for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
|
|
2806
|
+
valid = valid && Number.isFinite(this[i2]);
|
|
2807
|
+
}
|
|
2808
|
+
return valid;
|
|
2809
|
+
}
|
|
3347
2810
|
sub(a2) {
|
|
3348
2811
|
return this.subtract(a2);
|
|
3349
2812
|
}
|
|
@@ -3369,7 +2832,7 @@
|
|
|
3369
2832
|
return this.check();
|
|
3370
2833
|
}
|
|
3371
2834
|
divideScalar(a2) {
|
|
3372
|
-
return this.
|
|
2835
|
+
return this.multiplyByScalar(1 / a2);
|
|
3373
2836
|
}
|
|
3374
2837
|
clampScalar(min, max) {
|
|
3375
2838
|
for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
|
|
@@ -3377,25 +2840,9 @@
|
|
|
3377
2840
|
}
|
|
3378
2841
|
return this.check();
|
|
3379
2842
|
}
|
|
3380
|
-
multiplyByScalar(scalar) {
|
|
3381
|
-
return this.scale(scalar);
|
|
3382
|
-
}
|
|
3383
2843
|
get elements() {
|
|
3384
2844
|
return this;
|
|
3385
2845
|
}
|
|
3386
|
-
check() {
|
|
3387
|
-
if (config.debug && !this.validate()) {
|
|
3388
|
-
throw new Error("math.gl: ".concat(this.constructor.name, " some fields set to invalid numbers'"));
|
|
3389
|
-
}
|
|
3390
|
-
return this;
|
|
3391
|
-
}
|
|
3392
|
-
validate() {
|
|
3393
|
-
let valid = this.length === this.ELEMENTS;
|
|
3394
|
-
for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
|
|
3395
|
-
valid = valid && Number.isFinite(this[i2]);
|
|
3396
|
-
}
|
|
3397
|
-
return valid;
|
|
3398
|
-
}
|
|
3399
2846
|
};
|
|
3400
2847
|
}
|
|
3401
2848
|
});
|
|
@@ -3424,17 +2871,9 @@
|
|
|
3424
2871
|
}
|
|
3425
2872
|
return v;
|
|
3426
2873
|
}
|
|
3427
|
-
function deprecated(method, version) {
|
|
3428
|
-
if (!map2[method]) {
|
|
3429
|
-
map2[method] = true;
|
|
3430
|
-
console.warn("".concat(method, " has been removed in version ").concat(version, ", see upgrade guide for more information"));
|
|
3431
|
-
}
|
|
3432
|
-
}
|
|
3433
|
-
var map2;
|
|
3434
2874
|
var init_validators = __esm({
|
|
3435
2875
|
"../../node_modules/@math.gl/core/dist/esm/lib/validators.js"() {
|
|
3436
2876
|
init_common();
|
|
3437
|
-
map2 = {};
|
|
3438
2877
|
}
|
|
3439
2878
|
});
|
|
3440
2879
|
|
|
@@ -3444,16 +2883,8 @@
|
|
|
3444
2883
|
"../../node_modules/@math.gl/core/dist/esm/classes/base/vector.js"() {
|
|
3445
2884
|
init_math_array();
|
|
3446
2885
|
init_validators();
|
|
3447
|
-
|
|
2886
|
+
init_assert4();
|
|
3448
2887
|
Vector = class extends MathArray {
|
|
3449
|
-
get ELEMENTS() {
|
|
3450
|
-
assert5(false);
|
|
3451
|
-
return 0;
|
|
3452
|
-
}
|
|
3453
|
-
copy(vector) {
|
|
3454
|
-
assert5(false);
|
|
3455
|
-
return this;
|
|
3456
|
-
}
|
|
3457
2888
|
get x() {
|
|
3458
2889
|
return this[0];
|
|
3459
2890
|
}
|
|
@@ -3535,11 +2966,11 @@
|
|
|
3535
2966
|
return this.distanceSquared(vector);
|
|
3536
2967
|
}
|
|
3537
2968
|
getComponent(i2) {
|
|
3538
|
-
|
|
2969
|
+
assert4(i2 >= 0 && i2 < this.ELEMENTS, "index is out of range");
|
|
3539
2970
|
return checkNumber(this[i2]);
|
|
3540
2971
|
}
|
|
3541
2972
|
setComponent(i2, value) {
|
|
3542
|
-
|
|
2973
|
+
assert4(i2 >= 0 && i2 < this.ELEMENTS, "index is out of range");
|
|
3543
2974
|
this[i2] = value;
|
|
3544
2975
|
return this.check();
|
|
3545
2976
|
}
|
|
@@ -3658,6 +3089,15 @@
|
|
|
3658
3089
|
out[2] = a2[2];
|
|
3659
3090
|
return out;
|
|
3660
3091
|
}
|
|
3092
|
+
function vec4_transformMat2(out, a2, m) {
|
|
3093
|
+
const x = a2[0];
|
|
3094
|
+
const y = a2[1];
|
|
3095
|
+
out[0] = m[0] * x + m[2] * y;
|
|
3096
|
+
out[1] = m[1] * x + m[3] * y;
|
|
3097
|
+
out[2] = a2[2];
|
|
3098
|
+
out[3] = a2[3];
|
|
3099
|
+
return out;
|
|
3100
|
+
}
|
|
3661
3101
|
function vec4_transformMat3(out, a2, m) {
|
|
3662
3102
|
const x = a2[0];
|
|
3663
3103
|
const y = a2[1];
|
|
@@ -3831,46 +3271,178 @@
|
|
|
3831
3271
|
}
|
|
3832
3272
|
});
|
|
3833
3273
|
|
|
3834
|
-
// ../../node_modules/@math.gl/core/dist/esm/classes/vector3.js
|
|
3835
|
-
var ORIGIN,
|
|
3836
|
-
var init_vector3 = __esm({
|
|
3837
|
-
"../../node_modules/@math.gl/core/dist/esm/classes/vector3.js"() {
|
|
3274
|
+
// ../../node_modules/@math.gl/core/dist/esm/classes/vector3.js
|
|
3275
|
+
var ORIGIN, ZERO, Vector3;
|
|
3276
|
+
var init_vector3 = __esm({
|
|
3277
|
+
"../../node_modules/@math.gl/core/dist/esm/classes/vector3.js"() {
|
|
3278
|
+
init_vector();
|
|
3279
|
+
init_common();
|
|
3280
|
+
init_validators();
|
|
3281
|
+
init_vec3();
|
|
3282
|
+
init_gl_matrix_extras();
|
|
3283
|
+
ORIGIN = [0, 0, 0];
|
|
3284
|
+
Vector3 = class extends Vector {
|
|
3285
|
+
static get ZERO() {
|
|
3286
|
+
if (!ZERO) {
|
|
3287
|
+
ZERO = new Vector3(0, 0, 0);
|
|
3288
|
+
Object.freeze(ZERO);
|
|
3289
|
+
}
|
|
3290
|
+
return ZERO;
|
|
3291
|
+
}
|
|
3292
|
+
constructor(x = 0, y = 0, z = 0) {
|
|
3293
|
+
super(-0, -0, -0);
|
|
3294
|
+
if (arguments.length === 1 && isArray(x)) {
|
|
3295
|
+
this.copy(x);
|
|
3296
|
+
} else {
|
|
3297
|
+
if (config.debug) {
|
|
3298
|
+
checkNumber(x);
|
|
3299
|
+
checkNumber(y);
|
|
3300
|
+
checkNumber(z);
|
|
3301
|
+
}
|
|
3302
|
+
this[0] = x;
|
|
3303
|
+
this[1] = y;
|
|
3304
|
+
this[2] = z;
|
|
3305
|
+
}
|
|
3306
|
+
}
|
|
3307
|
+
set(x, y, z) {
|
|
3308
|
+
this[0] = x;
|
|
3309
|
+
this[1] = y;
|
|
3310
|
+
this[2] = z;
|
|
3311
|
+
return this.check();
|
|
3312
|
+
}
|
|
3313
|
+
copy(array) {
|
|
3314
|
+
this[0] = array[0];
|
|
3315
|
+
this[1] = array[1];
|
|
3316
|
+
this[2] = array[2];
|
|
3317
|
+
return this.check();
|
|
3318
|
+
}
|
|
3319
|
+
fromObject(object) {
|
|
3320
|
+
if (config.debug) {
|
|
3321
|
+
checkNumber(object.x);
|
|
3322
|
+
checkNumber(object.y);
|
|
3323
|
+
checkNumber(object.z);
|
|
3324
|
+
}
|
|
3325
|
+
this[0] = object.x;
|
|
3326
|
+
this[1] = object.y;
|
|
3327
|
+
this[2] = object.z;
|
|
3328
|
+
return this.check();
|
|
3329
|
+
}
|
|
3330
|
+
toObject(object) {
|
|
3331
|
+
object.x = this[0];
|
|
3332
|
+
object.y = this[1];
|
|
3333
|
+
object.z = this[2];
|
|
3334
|
+
return object;
|
|
3335
|
+
}
|
|
3336
|
+
get ELEMENTS() {
|
|
3337
|
+
return 3;
|
|
3338
|
+
}
|
|
3339
|
+
get z() {
|
|
3340
|
+
return this[2];
|
|
3341
|
+
}
|
|
3342
|
+
set z(value) {
|
|
3343
|
+
this[2] = checkNumber(value);
|
|
3344
|
+
}
|
|
3345
|
+
angle(vector) {
|
|
3346
|
+
return angle(this, vector);
|
|
3347
|
+
}
|
|
3348
|
+
cross(vector) {
|
|
3349
|
+
cross(this, this, vector);
|
|
3350
|
+
return this.check();
|
|
3351
|
+
}
|
|
3352
|
+
rotateX({
|
|
3353
|
+
radians: radians2,
|
|
3354
|
+
origin = ORIGIN
|
|
3355
|
+
}) {
|
|
3356
|
+
rotateX(this, this, origin, radians2);
|
|
3357
|
+
return this.check();
|
|
3358
|
+
}
|
|
3359
|
+
rotateY({
|
|
3360
|
+
radians: radians2,
|
|
3361
|
+
origin = ORIGIN
|
|
3362
|
+
}) {
|
|
3363
|
+
rotateY(this, this, origin, radians2);
|
|
3364
|
+
return this.check();
|
|
3365
|
+
}
|
|
3366
|
+
rotateZ({
|
|
3367
|
+
radians: radians2,
|
|
3368
|
+
origin = ORIGIN
|
|
3369
|
+
}) {
|
|
3370
|
+
rotateZ(this, this, origin, radians2);
|
|
3371
|
+
return this.check();
|
|
3372
|
+
}
|
|
3373
|
+
transform(matrix4) {
|
|
3374
|
+
return this.transformAsPoint(matrix4);
|
|
3375
|
+
}
|
|
3376
|
+
transformAsPoint(matrix4) {
|
|
3377
|
+
transformMat42(this, this, matrix4);
|
|
3378
|
+
return this.check();
|
|
3379
|
+
}
|
|
3380
|
+
transformAsVector(matrix4) {
|
|
3381
|
+
vec3_transformMat4AsVector(this, this, matrix4);
|
|
3382
|
+
return this.check();
|
|
3383
|
+
}
|
|
3384
|
+
transformByMatrix3(matrix3) {
|
|
3385
|
+
transformMat32(this, this, matrix3);
|
|
3386
|
+
return this.check();
|
|
3387
|
+
}
|
|
3388
|
+
transformByMatrix2(matrix2) {
|
|
3389
|
+
vec3_transformMat2(this, this, matrix2);
|
|
3390
|
+
return this.check();
|
|
3391
|
+
}
|
|
3392
|
+
transformByQuaternion(quaternion) {
|
|
3393
|
+
transformQuat(this, this, quaternion);
|
|
3394
|
+
return this.check();
|
|
3395
|
+
}
|
|
3396
|
+
};
|
|
3397
|
+
}
|
|
3398
|
+
});
|
|
3399
|
+
|
|
3400
|
+
// ../../node_modules/@math.gl/core/dist/esm/classes/vector4.js
|
|
3401
|
+
var ZERO2, Vector4;
|
|
3402
|
+
var init_vector4 = __esm({
|
|
3403
|
+
"../../node_modules/@math.gl/core/dist/esm/classes/vector4.js"() {
|
|
3838
3404
|
init_vector();
|
|
3839
3405
|
init_common();
|
|
3840
3406
|
init_validators();
|
|
3841
3407
|
init_vec3();
|
|
3842
3408
|
init_gl_matrix_extras();
|
|
3843
|
-
|
|
3844
|
-
constants = {};
|
|
3845
|
-
Vector3 = class extends Vector {
|
|
3409
|
+
Vector4 = class extends Vector {
|
|
3846
3410
|
static get ZERO() {
|
|
3847
|
-
|
|
3411
|
+
if (!ZERO2) {
|
|
3412
|
+
ZERO2 = new Vector4(0, 0, 0, 0);
|
|
3413
|
+
Object.freeze(ZERO2);
|
|
3414
|
+
}
|
|
3415
|
+
return ZERO2;
|
|
3848
3416
|
}
|
|
3849
|
-
constructor(x = 0, y = 0, z = 0) {
|
|
3850
|
-
super(-0, -0, -0);
|
|
3851
|
-
if (arguments.length === 1
|
|
3417
|
+
constructor(x = 0, y = 0, z = 0, w = 0) {
|
|
3418
|
+
super(-0, -0, -0, -0);
|
|
3419
|
+
if (isArray(x) && arguments.length === 1) {
|
|
3852
3420
|
this.copy(x);
|
|
3853
3421
|
} else {
|
|
3854
3422
|
if (config.debug) {
|
|
3855
3423
|
checkNumber(x);
|
|
3856
3424
|
checkNumber(y);
|
|
3857
3425
|
checkNumber(z);
|
|
3426
|
+
checkNumber(w);
|
|
3858
3427
|
}
|
|
3859
3428
|
this[0] = x;
|
|
3860
3429
|
this[1] = y;
|
|
3861
3430
|
this[2] = z;
|
|
3431
|
+
this[3] = w;
|
|
3862
3432
|
}
|
|
3863
3433
|
}
|
|
3864
|
-
set(x, y, z) {
|
|
3434
|
+
set(x, y, z, w) {
|
|
3865
3435
|
this[0] = x;
|
|
3866
3436
|
this[1] = y;
|
|
3867
3437
|
this[2] = z;
|
|
3438
|
+
this[3] = w;
|
|
3868
3439
|
return this.check();
|
|
3869
3440
|
}
|
|
3870
3441
|
copy(array) {
|
|
3871
3442
|
this[0] = array[0];
|
|
3872
3443
|
this[1] = array[1];
|
|
3873
3444
|
this[2] = array[2];
|
|
3445
|
+
this[3] = array[3];
|
|
3874
3446
|
return this.check();
|
|
3875
3447
|
}
|
|
3876
3448
|
fromObject(object) {
|
|
@@ -3878,20 +3450,23 @@
|
|
|
3878
3450
|
checkNumber(object.x);
|
|
3879
3451
|
checkNumber(object.y);
|
|
3880
3452
|
checkNumber(object.z);
|
|
3453
|
+
checkNumber(object.w);
|
|
3881
3454
|
}
|
|
3882
3455
|
this[0] = object.x;
|
|
3883
3456
|
this[1] = object.y;
|
|
3884
3457
|
this[2] = object.z;
|
|
3885
|
-
|
|
3458
|
+
this[3] = object.w;
|
|
3459
|
+
return this;
|
|
3886
3460
|
}
|
|
3887
3461
|
toObject(object) {
|
|
3888
3462
|
object.x = this[0];
|
|
3889
3463
|
object.y = this[1];
|
|
3890
3464
|
object.z = this[2];
|
|
3465
|
+
object.w = this[3];
|
|
3891
3466
|
return object;
|
|
3892
3467
|
}
|
|
3893
3468
|
get ELEMENTS() {
|
|
3894
|
-
return
|
|
3469
|
+
return 4;
|
|
3895
3470
|
}
|
|
3896
3471
|
get z() {
|
|
3897
3472
|
return this[2];
|
|
@@ -3899,57 +3474,32 @@
|
|
|
3899
3474
|
set z(value) {
|
|
3900
3475
|
this[2] = checkNumber(value);
|
|
3901
3476
|
}
|
|
3902
|
-
|
|
3903
|
-
return
|
|
3904
|
-
}
|
|
3905
|
-
cross(vector) {
|
|
3906
|
-
cross(this, this, vector);
|
|
3907
|
-
return this.check();
|
|
3908
|
-
}
|
|
3909
|
-
rotateX({
|
|
3910
|
-
radians: radians2,
|
|
3911
|
-
origin = ORIGIN
|
|
3912
|
-
}) {
|
|
3913
|
-
rotateX(this, this, origin, radians2);
|
|
3914
|
-
return this.check();
|
|
3915
|
-
}
|
|
3916
|
-
rotateY({
|
|
3917
|
-
radians: radians2,
|
|
3918
|
-
origin = ORIGIN
|
|
3919
|
-
}) {
|
|
3920
|
-
rotateY(this, this, origin, radians2);
|
|
3921
|
-
return this.check();
|
|
3477
|
+
get w() {
|
|
3478
|
+
return this[3];
|
|
3922
3479
|
}
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
origin = ORIGIN
|
|
3926
|
-
}) {
|
|
3927
|
-
rotateZ(this, this, origin, radians2);
|
|
3928
|
-
return this.check();
|
|
3480
|
+
set w(value) {
|
|
3481
|
+
this[3] = checkNumber(value);
|
|
3929
3482
|
}
|
|
3930
3483
|
transform(matrix4) {
|
|
3931
|
-
return this.transformAsPoint(matrix4);
|
|
3932
|
-
}
|
|
3933
|
-
transformAsPoint(matrix4) {
|
|
3934
3484
|
transformMat42(this, this, matrix4);
|
|
3935
3485
|
return this.check();
|
|
3936
3486
|
}
|
|
3937
|
-
transformAsVector(matrix4) {
|
|
3938
|
-
vec3_transformMat4AsVector(this, this, matrix4);
|
|
3939
|
-
return this.check();
|
|
3940
|
-
}
|
|
3941
3487
|
transformByMatrix3(matrix3) {
|
|
3942
|
-
|
|
3488
|
+
vec4_transformMat3(this, this, matrix3);
|
|
3943
3489
|
return this.check();
|
|
3944
3490
|
}
|
|
3945
3491
|
transformByMatrix2(matrix2) {
|
|
3946
|
-
|
|
3492
|
+
vec4_transformMat2(this, this, matrix2);
|
|
3947
3493
|
return this.check();
|
|
3948
3494
|
}
|
|
3949
3495
|
transformByQuaternion(quaternion) {
|
|
3950
3496
|
transformQuat(this, this, quaternion);
|
|
3951
3497
|
return this.check();
|
|
3952
3498
|
}
|
|
3499
|
+
applyMatrix4(m) {
|
|
3500
|
+
m.transform(this, this);
|
|
3501
|
+
return this;
|
|
3502
|
+
}
|
|
3953
3503
|
};
|
|
3954
3504
|
}
|
|
3955
3505
|
});
|
|
@@ -3961,16 +3511,7 @@
|
|
|
3961
3511
|
init_math_array();
|
|
3962
3512
|
init_validators();
|
|
3963
3513
|
init_common();
|
|
3964
|
-
init_assert5();
|
|
3965
3514
|
Matrix = class extends MathArray {
|
|
3966
|
-
get ELEMENTS() {
|
|
3967
|
-
assert5(false);
|
|
3968
|
-
return 0;
|
|
3969
|
-
}
|
|
3970
|
-
get RANK() {
|
|
3971
|
-
assert5(false);
|
|
3972
|
-
return 0;
|
|
3973
|
-
}
|
|
3974
3515
|
toString() {
|
|
3975
3516
|
let string = "[";
|
|
3976
3517
|
if (config.printRowMajor) {
|
|
@@ -4173,7 +3714,21 @@
|
|
|
4173
3714
|
});
|
|
4174
3715
|
|
|
4175
3716
|
// ../../node_modules/@math.gl/core/dist/esm/classes/matrix3.js
|
|
4176
|
-
|
|
3717
|
+
function getZeroMatrix() {
|
|
3718
|
+
if (!ZERO_MATRIX3) {
|
|
3719
|
+
ZERO_MATRIX3 = new Matrix3([0, 0, 0, 0, 0, 0, 0, 0, 0]);
|
|
3720
|
+
Object.freeze(ZERO_MATRIX3);
|
|
3721
|
+
}
|
|
3722
|
+
return ZERO_MATRIX3;
|
|
3723
|
+
}
|
|
3724
|
+
function getIdentityMatrix() {
|
|
3725
|
+
if (!IDENTITY_MATRIX3) {
|
|
3726
|
+
IDENTITY_MATRIX3 = new Matrix3();
|
|
3727
|
+
Object.freeze(IDENTITY_MATRIX3);
|
|
3728
|
+
}
|
|
3729
|
+
return IDENTITY_MATRIX3;
|
|
3730
|
+
}
|
|
3731
|
+
var INDICES, IDENTITY_MATRIX, Matrix3, ZERO_MATRIX3, IDENTITY_MATRIX3;
|
|
4177
3732
|
var init_matrix3 = __esm({
|
|
4178
3733
|
"../../node_modules/@math.gl/core/dist/esm/classes/matrix3.js"() {
|
|
4179
3734
|
init_matrix();
|
|
@@ -4182,28 +3737,24 @@
|
|
|
4182
3737
|
init_mat3();
|
|
4183
3738
|
init_vec2();
|
|
4184
3739
|
init_vec3();
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
});
|
|
4198
|
-
constants2 = {};
|
|
3740
|
+
(function(INDICES3) {
|
|
3741
|
+
INDICES3[INDICES3["COL0ROW0"] = 0] = "COL0ROW0";
|
|
3742
|
+
INDICES3[INDICES3["COL0ROW1"] = 1] = "COL0ROW1";
|
|
3743
|
+
INDICES3[INDICES3["COL0ROW2"] = 2] = "COL0ROW2";
|
|
3744
|
+
INDICES3[INDICES3["COL1ROW0"] = 3] = "COL1ROW0";
|
|
3745
|
+
INDICES3[INDICES3["COL1ROW1"] = 4] = "COL1ROW1";
|
|
3746
|
+
INDICES3[INDICES3["COL1ROW2"] = 5] = "COL1ROW2";
|
|
3747
|
+
INDICES3[INDICES3["COL2ROW0"] = 6] = "COL2ROW0";
|
|
3748
|
+
INDICES3[INDICES3["COL2ROW1"] = 7] = "COL2ROW1";
|
|
3749
|
+
INDICES3[INDICES3["COL2ROW2"] = 8] = "COL2ROW2";
|
|
3750
|
+
})(INDICES || (INDICES = {}));
|
|
3751
|
+
IDENTITY_MATRIX = Object.freeze([1, 0, 0, 0, 1, 0, 0, 0, 1]);
|
|
4199
3752
|
Matrix3 = class extends Matrix {
|
|
4200
3753
|
static get IDENTITY() {
|
|
4201
|
-
|
|
4202
|
-
return constants2.IDENTITY;
|
|
3754
|
+
return getIdentityMatrix();
|
|
4203
3755
|
}
|
|
4204
3756
|
static get ZERO() {
|
|
4205
|
-
|
|
4206
|
-
return constants2.ZERO;
|
|
3757
|
+
return getZeroMatrix();
|
|
4207
3758
|
}
|
|
4208
3759
|
get ELEMENTS() {
|
|
4209
3760
|
return 9;
|
|
@@ -4214,10 +3765,12 @@
|
|
|
4214
3765
|
get INDICES() {
|
|
4215
3766
|
return INDICES;
|
|
4216
3767
|
}
|
|
4217
|
-
constructor(array) {
|
|
3768
|
+
constructor(array, ...args) {
|
|
4218
3769
|
super(-0, -0, -0, -0, -0, -0, -0, -0, -0);
|
|
4219
3770
|
if (arguments.length === 1 && Array.isArray(array)) {
|
|
4220
3771
|
this.copy(array);
|
|
3772
|
+
} else if (args.length > 0) {
|
|
3773
|
+
this.copy([array, ...args]);
|
|
4221
3774
|
} else {
|
|
4222
3775
|
this.identity();
|
|
4223
3776
|
}
|
|
@@ -4234,6 +3787,16 @@
|
|
|
4234
3787
|
this[8] = array[8];
|
|
4235
3788
|
return this.check();
|
|
4236
3789
|
}
|
|
3790
|
+
identity() {
|
|
3791
|
+
return this.copy(IDENTITY_MATRIX);
|
|
3792
|
+
}
|
|
3793
|
+
fromObject(object) {
|
|
3794
|
+
return this.check();
|
|
3795
|
+
}
|
|
3796
|
+
fromQuaternion(q) {
|
|
3797
|
+
fromQuat(this, q);
|
|
3798
|
+
return this.check();
|
|
3799
|
+
}
|
|
4237
3800
|
set(m00, m10, m20, m01, m11, m21, m02, m12, m22) {
|
|
4238
3801
|
this[0] = m00;
|
|
4239
3802
|
this[1] = m10;
|
|
@@ -4261,13 +3824,6 @@
|
|
|
4261
3824
|
determinant() {
|
|
4262
3825
|
return determinant(this);
|
|
4263
3826
|
}
|
|
4264
|
-
identity() {
|
|
4265
|
-
return this.copy(IDENTITY);
|
|
4266
|
-
}
|
|
4267
|
-
fromQuaternion(q) {
|
|
4268
|
-
fromQuat(this, q);
|
|
4269
|
-
return this.check();
|
|
4270
|
-
}
|
|
4271
3827
|
transpose() {
|
|
4272
3828
|
transpose(this, this);
|
|
4273
3829
|
return this.check();
|
|
@@ -4292,7 +3848,7 @@
|
|
|
4292
3848
|
if (Array.isArray(factor)) {
|
|
4293
3849
|
scale(this, this, factor);
|
|
4294
3850
|
} else {
|
|
4295
|
-
scale(this, this, [factor, factor
|
|
3851
|
+
scale(this, this, [factor, factor]);
|
|
4296
3852
|
}
|
|
4297
3853
|
return this.check();
|
|
4298
3854
|
}
|
|
@@ -4301,32 +3857,30 @@
|
|
|
4301
3857
|
return this.check();
|
|
4302
3858
|
}
|
|
4303
3859
|
transform(vector, result) {
|
|
3860
|
+
let out;
|
|
4304
3861
|
switch (vector.length) {
|
|
4305
3862
|
case 2:
|
|
4306
|
-
|
|
3863
|
+
out = transformMat3(result || [-0, -0], vector, this);
|
|
4307
3864
|
break;
|
|
4308
3865
|
case 3:
|
|
4309
|
-
|
|
3866
|
+
out = transformMat32(result || [-0, -0, -0], vector, this);
|
|
4310
3867
|
break;
|
|
4311
3868
|
case 4:
|
|
4312
|
-
|
|
3869
|
+
out = vec4_transformMat3(result || [-0, -0, -0, -0], vector, this);
|
|
4313
3870
|
break;
|
|
4314
3871
|
default:
|
|
4315
3872
|
throw new Error("Illegal vector");
|
|
4316
3873
|
}
|
|
4317
|
-
checkVector(
|
|
4318
|
-
return
|
|
3874
|
+
checkVector(out, vector.length);
|
|
3875
|
+
return out;
|
|
4319
3876
|
}
|
|
4320
3877
|
transformVector(vector, result) {
|
|
4321
|
-
deprecated("Matrix3.transformVector");
|
|
4322
3878
|
return this.transform(vector, result);
|
|
4323
3879
|
}
|
|
4324
3880
|
transformVector2(vector, result) {
|
|
4325
|
-
deprecated("Matrix3.transformVector");
|
|
4326
3881
|
return this.transform(vector, result);
|
|
4327
3882
|
}
|
|
4328
3883
|
transformVector3(vector, result) {
|
|
4329
|
-
deprecated("Matrix3.transformVector");
|
|
4330
3884
|
return this.transform(vector, result);
|
|
4331
3885
|
}
|
|
4332
3886
|
};
|
|
@@ -4770,7 +4324,7 @@
|
|
|
4770
4324
|
out[15] = 0;
|
|
4771
4325
|
return out;
|
|
4772
4326
|
}
|
|
4773
|
-
function
|
|
4327
|
+
function perspectiveNO(out, fovy, aspect, near, far) {
|
|
4774
4328
|
var f2 = 1 / Math.tan(fovy / 2), nf;
|
|
4775
4329
|
out[0] = f2 / aspect;
|
|
4776
4330
|
out[1] = 0;
|
|
@@ -4796,7 +4350,7 @@
|
|
|
4796
4350
|
}
|
|
4797
4351
|
return out;
|
|
4798
4352
|
}
|
|
4799
|
-
function
|
|
4353
|
+
function orthoNO(out, left, right, bottom, top, near, far) {
|
|
4800
4354
|
var lr = 1 / (left - right);
|
|
4801
4355
|
var bt = 1 / (bottom - top);
|
|
4802
4356
|
var nf = 1 / (near - far);
|
|
@@ -4885,9 +4439,12 @@
|
|
|
4885
4439
|
out[15] = 1;
|
|
4886
4440
|
return out;
|
|
4887
4441
|
}
|
|
4442
|
+
var perspective, ortho;
|
|
4888
4443
|
var init_mat4 = __esm({
|
|
4889
4444
|
"../../node_modules/gl-matrix/esm/mat4.js"() {
|
|
4890
4445
|
init_common2();
|
|
4446
|
+
perspective = perspectiveNO;
|
|
4447
|
+
ortho = orthoNO;
|
|
4891
4448
|
}
|
|
4892
4449
|
});
|
|
4893
4450
|
|
|
@@ -5017,48 +4574,90 @@
|
|
|
5017
4574
|
});
|
|
5018
4575
|
|
|
5019
4576
|
// ../../node_modules/@math.gl/core/dist/esm/classes/matrix4.js
|
|
5020
|
-
|
|
4577
|
+
function getZeroMatrix2() {
|
|
4578
|
+
if (!ZERO3) {
|
|
4579
|
+
ZERO3 = new Matrix4([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
|
|
4580
|
+
Object.freeze(ZERO3);
|
|
4581
|
+
}
|
|
4582
|
+
return ZERO3;
|
|
4583
|
+
}
|
|
4584
|
+
function getIdentityMatrix2() {
|
|
4585
|
+
if (!IDENTITY) {
|
|
4586
|
+
IDENTITY = new Matrix4();
|
|
4587
|
+
Object.freeze(IDENTITY);
|
|
4588
|
+
}
|
|
4589
|
+
return IDENTITY;
|
|
4590
|
+
}
|
|
4591
|
+
function checkRadians(possiblyDegrees) {
|
|
4592
|
+
if (possiblyDegrees > Math.PI * 2) {
|
|
4593
|
+
throw Error("expected radians");
|
|
4594
|
+
}
|
|
4595
|
+
}
|
|
4596
|
+
function computeInfinitePerspectiveOffCenter(result, left, right, bottom, top, near) {
|
|
4597
|
+
const column0Row0 = 2 * near / (right - left);
|
|
4598
|
+
const column1Row1 = 2 * near / (top - bottom);
|
|
4599
|
+
const column2Row0 = (right + left) / (right - left);
|
|
4600
|
+
const column2Row1 = (top + bottom) / (top - bottom);
|
|
4601
|
+
const column2Row2 = -1;
|
|
4602
|
+
const column2Row3 = -1;
|
|
4603
|
+
const column3Row2 = -2 * near;
|
|
4604
|
+
result[0] = column0Row0;
|
|
4605
|
+
result[1] = 0;
|
|
4606
|
+
result[2] = 0;
|
|
4607
|
+
result[3] = 0;
|
|
4608
|
+
result[4] = 0;
|
|
4609
|
+
result[5] = column1Row1;
|
|
4610
|
+
result[6] = 0;
|
|
4611
|
+
result[7] = 0;
|
|
4612
|
+
result[8] = column2Row0;
|
|
4613
|
+
result[9] = column2Row1;
|
|
4614
|
+
result[10] = column2Row2;
|
|
4615
|
+
result[11] = column2Row3;
|
|
4616
|
+
result[12] = 0;
|
|
4617
|
+
result[13] = 0;
|
|
4618
|
+
result[14] = column3Row2;
|
|
4619
|
+
result[15] = 0;
|
|
4620
|
+
return result;
|
|
4621
|
+
}
|
|
4622
|
+
var INDICES2, DEFAULT_FOVY, DEFAULT_ASPECT, DEFAULT_NEAR, DEFAULT_FAR, IDENTITY_MATRIX2, Matrix4, ZERO3, IDENTITY;
|
|
5021
4623
|
var init_matrix4 = __esm({
|
|
5022
4624
|
"../../node_modules/@math.gl/core/dist/esm/classes/matrix4.js"() {
|
|
5023
|
-
init_validators();
|
|
5024
4625
|
init_matrix();
|
|
4626
|
+
init_validators();
|
|
5025
4627
|
init_gl_matrix_extras();
|
|
5026
4628
|
init_mat4();
|
|
5027
4629
|
init_vec2();
|
|
5028
4630
|
init_vec3();
|
|
5029
4631
|
init_vec4();
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
4632
|
+
(function(INDICES3) {
|
|
4633
|
+
INDICES3[INDICES3["COL0ROW0"] = 0] = "COL0ROW0";
|
|
4634
|
+
INDICES3[INDICES3["COL0ROW1"] = 1] = "COL0ROW1";
|
|
4635
|
+
INDICES3[INDICES3["COL0ROW2"] = 2] = "COL0ROW2";
|
|
4636
|
+
INDICES3[INDICES3["COL0ROW3"] = 3] = "COL0ROW3";
|
|
4637
|
+
INDICES3[INDICES3["COL1ROW0"] = 4] = "COL1ROW0";
|
|
4638
|
+
INDICES3[INDICES3["COL1ROW1"] = 5] = "COL1ROW1";
|
|
4639
|
+
INDICES3[INDICES3["COL1ROW2"] = 6] = "COL1ROW2";
|
|
4640
|
+
INDICES3[INDICES3["COL1ROW3"] = 7] = "COL1ROW3";
|
|
4641
|
+
INDICES3[INDICES3["COL2ROW0"] = 8] = "COL2ROW0";
|
|
4642
|
+
INDICES3[INDICES3["COL2ROW1"] = 9] = "COL2ROW1";
|
|
4643
|
+
INDICES3[INDICES3["COL2ROW2"] = 10] = "COL2ROW2";
|
|
4644
|
+
INDICES3[INDICES3["COL2ROW3"] = 11] = "COL2ROW3";
|
|
4645
|
+
INDICES3[INDICES3["COL3ROW0"] = 12] = "COL3ROW0";
|
|
4646
|
+
INDICES3[INDICES3["COL3ROW1"] = 13] = "COL3ROW1";
|
|
4647
|
+
INDICES3[INDICES3["COL3ROW2"] = 14] = "COL3ROW2";
|
|
4648
|
+
INDICES3[INDICES3["COL3ROW3"] = 15] = "COL3ROW3";
|
|
4649
|
+
})(INDICES2 || (INDICES2 = {}));
|
|
4650
|
+
DEFAULT_FOVY = 45 * Math.PI / 180;
|
|
4651
|
+
DEFAULT_ASPECT = 1;
|
|
4652
|
+
DEFAULT_NEAR = 0.1;
|
|
4653
|
+
DEFAULT_FAR = 500;
|
|
4654
|
+
IDENTITY_MATRIX2 = Object.freeze([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);
|
|
5051
4655
|
Matrix4 = class extends Matrix {
|
|
5052
4656
|
static get IDENTITY() {
|
|
5053
|
-
|
|
5054
|
-
return constants3.IDENTITY;
|
|
4657
|
+
return getIdentityMatrix2();
|
|
5055
4658
|
}
|
|
5056
4659
|
static get ZERO() {
|
|
5057
|
-
|
|
5058
|
-
return constants3.ZERO;
|
|
5059
|
-
}
|
|
5060
|
-
get INDICES() {
|
|
5061
|
-
return INDICES2;
|
|
4660
|
+
return getZeroMatrix2();
|
|
5062
4661
|
}
|
|
5063
4662
|
get ELEMENTS() {
|
|
5064
4663
|
return 16;
|
|
@@ -5066,6 +4665,9 @@
|
|
|
5066
4665
|
get RANK() {
|
|
5067
4666
|
return 4;
|
|
5068
4667
|
}
|
|
4668
|
+
get INDICES() {
|
|
4669
|
+
return INDICES2;
|
|
4670
|
+
}
|
|
5069
4671
|
constructor(array) {
|
|
5070
4672
|
super(-0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0);
|
|
5071
4673
|
if (arguments.length === 1 && Array.isArray(array)) {
|
|
@@ -5151,91 +4753,65 @@
|
|
|
5151
4753
|
return result;
|
|
5152
4754
|
}
|
|
5153
4755
|
identity() {
|
|
5154
|
-
return this.copy(
|
|
4756
|
+
return this.copy(IDENTITY_MATRIX2);
|
|
5155
4757
|
}
|
|
5156
|
-
|
|
5157
|
-
fromQuat2(this, q);
|
|
4758
|
+
fromObject(object) {
|
|
5158
4759
|
return this.check();
|
|
5159
4760
|
}
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
4761
|
+
fromQuaternion(quaternion) {
|
|
4762
|
+
fromQuat2(this, quaternion);
|
|
4763
|
+
return this.check();
|
|
4764
|
+
}
|
|
4765
|
+
frustum(view) {
|
|
4766
|
+
const {
|
|
4767
|
+
left,
|
|
4768
|
+
right,
|
|
4769
|
+
bottom,
|
|
4770
|
+
top,
|
|
4771
|
+
near = DEFAULT_NEAR,
|
|
4772
|
+
far = DEFAULT_FAR
|
|
4773
|
+
} = view;
|
|
5168
4774
|
if (far === Infinity) {
|
|
5169
|
-
|
|
4775
|
+
computeInfinitePerspectiveOffCenter(this, left, right, bottom, top, near);
|
|
5170
4776
|
} else {
|
|
5171
4777
|
frustum(this, left, right, bottom, top, near, far);
|
|
5172
4778
|
}
|
|
5173
4779
|
return this.check();
|
|
5174
4780
|
}
|
|
5175
|
-
|
|
5176
|
-
const
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
const column2Row3 = -1;
|
|
5182
|
-
const column3Row2 = -2 * near;
|
|
5183
|
-
result[0] = column0Row0;
|
|
5184
|
-
result[1] = 0;
|
|
5185
|
-
result[2] = 0;
|
|
5186
|
-
result[3] = 0;
|
|
5187
|
-
result[4] = 0;
|
|
5188
|
-
result[5] = column1Row1;
|
|
5189
|
-
result[6] = 0;
|
|
5190
|
-
result[7] = 0;
|
|
5191
|
-
result[8] = column2Row0;
|
|
5192
|
-
result[9] = column2Row1;
|
|
5193
|
-
result[10] = column2Row2;
|
|
5194
|
-
result[11] = column2Row3;
|
|
5195
|
-
result[12] = 0;
|
|
5196
|
-
result[13] = 0;
|
|
5197
|
-
result[14] = column3Row2;
|
|
5198
|
-
result[15] = 0;
|
|
5199
|
-
return result;
|
|
5200
|
-
}
|
|
5201
|
-
lookAt(eye, center, up) {
|
|
5202
|
-
if (arguments.length === 1) {
|
|
5203
|
-
({
|
|
5204
|
-
eye,
|
|
5205
|
-
center,
|
|
5206
|
-
up
|
|
5207
|
-
} = eye);
|
|
5208
|
-
}
|
|
5209
|
-
center = center || [0, 0, 0];
|
|
5210
|
-
up = up || [0, 1, 0];
|
|
4781
|
+
lookAt(view) {
|
|
4782
|
+
const {
|
|
4783
|
+
eye,
|
|
4784
|
+
center = [0, 0, 0],
|
|
4785
|
+
up = [0, 1, 0]
|
|
4786
|
+
} = view;
|
|
5211
4787
|
lookAt(this, eye, center, up);
|
|
5212
4788
|
return this.check();
|
|
5213
4789
|
}
|
|
5214
|
-
ortho({
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
4790
|
+
ortho(view) {
|
|
4791
|
+
const {
|
|
4792
|
+
left,
|
|
4793
|
+
right,
|
|
4794
|
+
bottom,
|
|
4795
|
+
top,
|
|
4796
|
+
near = DEFAULT_NEAR,
|
|
4797
|
+
far = DEFAULT_FAR
|
|
4798
|
+
} = view;
|
|
5222
4799
|
ortho(this, left, right, bottom, top, near, far);
|
|
5223
4800
|
return this.check();
|
|
5224
4801
|
}
|
|
5225
|
-
orthographic({
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
}
|
|
4802
|
+
orthographic(view) {
|
|
4803
|
+
const {
|
|
4804
|
+
fovy = DEFAULT_FOVY,
|
|
4805
|
+
aspect = DEFAULT_ASPECT,
|
|
4806
|
+
focalDistance = 1,
|
|
4807
|
+
near = DEFAULT_NEAR,
|
|
4808
|
+
far = DEFAULT_FAR
|
|
4809
|
+
} = view;
|
|
4810
|
+
checkRadians(fovy);
|
|
5235
4811
|
const halfY = fovy / 2;
|
|
5236
4812
|
const top = focalDistance * Math.tan(halfY);
|
|
5237
4813
|
const right = top * aspect;
|
|
5238
|
-
return
|
|
4814
|
+
return this.ortho({
|
|
5239
4815
|
left: -right,
|
|
5240
4816
|
right,
|
|
5241
4817
|
bottom: -top,
|
|
@@ -5244,17 +4820,14 @@
|
|
|
5244
4820
|
far
|
|
5245
4821
|
});
|
|
5246
4822
|
}
|
|
5247
|
-
perspective({
|
|
5248
|
-
|
|
5249
|
-
|
|
5250
|
-
|
|
5251
|
-
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
fovy
|
|
5255
|
-
if (fovy > Math.PI * 2) {
|
|
5256
|
-
throw Error("radians");
|
|
5257
|
-
}
|
|
4823
|
+
perspective(view) {
|
|
4824
|
+
const {
|
|
4825
|
+
fovy = 45 * Math.PI / 180,
|
|
4826
|
+
aspect = 1,
|
|
4827
|
+
near = 0.1,
|
|
4828
|
+
far = 500
|
|
4829
|
+
} = view;
|
|
4830
|
+
checkRadians(fovy);
|
|
5258
4831
|
perspective(this, fovy, aspect, near, far);
|
|
5259
4832
|
return this.check();
|
|
5260
4833
|
}
|
|
@@ -5273,8 +4846,10 @@
|
|
|
5273
4846
|
result[2] = this[14];
|
|
5274
4847
|
return result;
|
|
5275
4848
|
}
|
|
5276
|
-
getRotation(result
|
|
5277
|
-
|
|
4849
|
+
getRotation(result, scaleResult) {
|
|
4850
|
+
result = result || [-0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0];
|
|
4851
|
+
scaleResult = scaleResult || [-0, -0, -0];
|
|
4852
|
+
const scale5 = this.getScale(scaleResult);
|
|
5278
4853
|
const inverseScale0 = 1 / scale5[0];
|
|
5279
4854
|
const inverseScale1 = 1 / scale5[1];
|
|
5280
4855
|
const inverseScale2 = 1 / scale5[2];
|
|
@@ -5296,8 +4871,10 @@
|
|
|
5296
4871
|
result[15] = 1;
|
|
5297
4872
|
return result;
|
|
5298
4873
|
}
|
|
5299
|
-
getRotationMatrix3(result
|
|
5300
|
-
|
|
4874
|
+
getRotationMatrix3(result, scaleResult) {
|
|
4875
|
+
result = result || [-0, -0, -0, -0, -0, -0, -0, -0, -0];
|
|
4876
|
+
scaleResult = scaleResult || [-0, -0, -0];
|
|
4877
|
+
const scale5 = this.getScale(scaleResult);
|
|
5301
4878
|
const inverseScale0 = 1 / scale5[0];
|
|
5302
4879
|
const inverseScale1 = 1 / scale5[1];
|
|
5303
4880
|
const inverseScale2 = 1 / scale5[2];
|
|
@@ -5340,23 +4917,19 @@
|
|
|
5340
4917
|
rotateZ2(this, this, radians2);
|
|
5341
4918
|
return this.check();
|
|
5342
4919
|
}
|
|
5343
|
-
rotateXYZ(
|
|
5344
|
-
return this.rotateX(
|
|
4920
|
+
rotateXYZ(angleXYZ) {
|
|
4921
|
+
return this.rotateX(angleXYZ[0]).rotateY(angleXYZ[1]).rotateZ(angleXYZ[2]);
|
|
5345
4922
|
}
|
|
5346
4923
|
rotateAxis(radians2, axis) {
|
|
5347
4924
|
rotate2(this, this, radians2, axis);
|
|
5348
4925
|
return this.check();
|
|
5349
4926
|
}
|
|
5350
4927
|
scale(factor) {
|
|
5351
|
-
|
|
5352
|
-
scale2(this, this, factor);
|
|
5353
|
-
} else {
|
|
5354
|
-
scale2(this, this, [factor, factor, factor]);
|
|
5355
|
-
}
|
|
4928
|
+
scale2(this, this, Array.isArray(factor) ? factor : [factor, factor, factor]);
|
|
5356
4929
|
return this.check();
|
|
5357
4930
|
}
|
|
5358
|
-
translate(
|
|
5359
|
-
translate2(this, this,
|
|
4931
|
+
translate(vector) {
|
|
4932
|
+
translate2(this, this, vector);
|
|
5360
4933
|
return this.check();
|
|
5361
4934
|
}
|
|
5362
4935
|
transform(vector, result) {
|
|
@@ -5371,51 +4944,50 @@
|
|
|
5371
4944
|
const {
|
|
5372
4945
|
length: length4
|
|
5373
4946
|
} = vector;
|
|
4947
|
+
let out;
|
|
5374
4948
|
switch (length4) {
|
|
5375
4949
|
case 2:
|
|
5376
|
-
|
|
4950
|
+
out = transformMat4(result || [-0, -0], vector, this);
|
|
5377
4951
|
break;
|
|
5378
4952
|
case 3:
|
|
5379
|
-
|
|
4953
|
+
out = transformMat42(result || [-0, -0, -0], vector, this);
|
|
5380
4954
|
break;
|
|
5381
4955
|
default:
|
|
5382
4956
|
throw new Error("Illegal vector");
|
|
5383
4957
|
}
|
|
5384
|
-
checkVector(
|
|
5385
|
-
return
|
|
4958
|
+
checkVector(out, vector.length);
|
|
4959
|
+
return out;
|
|
5386
4960
|
}
|
|
5387
4961
|
transformAsVector(vector, result) {
|
|
4962
|
+
let out;
|
|
5388
4963
|
switch (vector.length) {
|
|
5389
4964
|
case 2:
|
|
5390
|
-
|
|
4965
|
+
out = vec2_transformMat4AsVector(result || [-0, -0], vector, this);
|
|
5391
4966
|
break;
|
|
5392
4967
|
case 3:
|
|
5393
|
-
|
|
4968
|
+
out = vec3_transformMat4AsVector(result || [-0, -0, -0], vector, this);
|
|
5394
4969
|
break;
|
|
5395
4970
|
default:
|
|
5396
4971
|
throw new Error("Illegal vector");
|
|
5397
4972
|
}
|
|
5398
|
-
checkVector(
|
|
5399
|
-
return
|
|
5400
|
-
}
|
|
5401
|
-
makeRotationX(radians2) {
|
|
5402
|
-
return this.identity().rotateX(radians2);
|
|
5403
|
-
}
|
|
5404
|
-
makeTranslation(x, y, z) {
|
|
5405
|
-
return this.identity().translate([x, y, z]);
|
|
4973
|
+
checkVector(out, vector.length);
|
|
4974
|
+
return out;
|
|
5406
4975
|
}
|
|
5407
4976
|
transformPoint(vector, result) {
|
|
5408
|
-
deprecated("Matrix4.transformPoint", "3.0");
|
|
5409
4977
|
return this.transformAsPoint(vector, result);
|
|
5410
4978
|
}
|
|
5411
4979
|
transformVector(vector, result) {
|
|
5412
|
-
deprecated("Matrix4.transformVector", "3.0");
|
|
5413
4980
|
return this.transformAsPoint(vector, result);
|
|
5414
4981
|
}
|
|
5415
4982
|
transformDirection(vector, result) {
|
|
5416
|
-
deprecated("Matrix4.transformDirection", "3.0");
|
|
5417
4983
|
return this.transformAsVector(vector, result);
|
|
5418
4984
|
}
|
|
4985
|
+
makeRotationX(radians2) {
|
|
4986
|
+
return this.identity().rotateX(radians2);
|
|
4987
|
+
}
|
|
4988
|
+
makeTranslation(x, y, z) {
|
|
4989
|
+
return this.identity().translate([x, y, z]);
|
|
4990
|
+
}
|
|
5419
4991
|
};
|
|
5420
4992
|
}
|
|
5421
4993
|
});
|
|
@@ -5642,7 +5214,7 @@
|
|
|
5642
5214
|
"../../node_modules/@math.gl/core/dist/esm/classes/quaternion.js"() {
|
|
5643
5215
|
init_math_array();
|
|
5644
5216
|
init_validators();
|
|
5645
|
-
|
|
5217
|
+
init_vector4();
|
|
5646
5218
|
init_quat();
|
|
5647
5219
|
init_vec4();
|
|
5648
5220
|
IDENTITY_QUATERNION = [0, 0, 0, 1];
|
|
@@ -5669,18 +5241,25 @@
|
|
|
5669
5241
|
this[3] = w;
|
|
5670
5242
|
return this.check();
|
|
5671
5243
|
}
|
|
5672
|
-
|
|
5673
|
-
|
|
5244
|
+
fromObject(object) {
|
|
5245
|
+
this[0] = object.x;
|
|
5246
|
+
this[1] = object.y;
|
|
5247
|
+
this[2] = object.z;
|
|
5248
|
+
this[3] = object.w;
|
|
5674
5249
|
return this.check();
|
|
5675
5250
|
}
|
|
5676
|
-
|
|
5677
|
-
|
|
5251
|
+
fromMatrix3(m) {
|
|
5252
|
+
fromMat3(this, m);
|
|
5678
5253
|
return this.check();
|
|
5679
5254
|
}
|
|
5680
5255
|
fromAxisRotation(axis, rad) {
|
|
5681
5256
|
setAxisAngle(this, axis, rad);
|
|
5682
5257
|
return this.check();
|
|
5683
5258
|
}
|
|
5259
|
+
identity() {
|
|
5260
|
+
identity2(this);
|
|
5261
|
+
return this.check();
|
|
5262
|
+
}
|
|
5684
5263
|
setAxisAngle(axis, rad) {
|
|
5685
5264
|
return this.fromAxisRotation(axis, rad);
|
|
5686
5265
|
}
|
|
@@ -5717,20 +5296,14 @@
|
|
|
5717
5296
|
lengthSquared() {
|
|
5718
5297
|
return squaredLength2(this);
|
|
5719
5298
|
}
|
|
5720
|
-
dot(a2
|
|
5721
|
-
if (b !== void 0) {
|
|
5722
|
-
throw new Error("Quaternion.dot only takes one argument");
|
|
5723
|
-
}
|
|
5299
|
+
dot(a2) {
|
|
5724
5300
|
return dot3(this, a2);
|
|
5725
5301
|
}
|
|
5726
5302
|
rotationTo(vectorA, vectorB) {
|
|
5727
5303
|
rotationTo(this, vectorA, vectorB);
|
|
5728
5304
|
return this.check();
|
|
5729
5305
|
}
|
|
5730
|
-
add(a2
|
|
5731
|
-
if (b !== void 0) {
|
|
5732
|
-
throw new Error("Quaternion.add only takes one argument");
|
|
5733
|
-
}
|
|
5306
|
+
add(a2) {
|
|
5734
5307
|
add2(this, this, a2);
|
|
5735
5308
|
return this.check();
|
|
5736
5309
|
}
|
|
@@ -5747,16 +5320,17 @@
|
|
|
5747
5320
|
return this.check();
|
|
5748
5321
|
}
|
|
5749
5322
|
lerp(a2, b, t2) {
|
|
5323
|
+
if (t2 === void 0) {
|
|
5324
|
+
return this.lerp(this, a2, b);
|
|
5325
|
+
}
|
|
5750
5326
|
lerp2(this, a2, b, t2);
|
|
5751
5327
|
return this.check();
|
|
5752
5328
|
}
|
|
5753
|
-
multiplyRight(a2
|
|
5754
|
-
assert5(!b);
|
|
5329
|
+
multiplyRight(a2) {
|
|
5755
5330
|
multiply3(this, this, a2);
|
|
5756
5331
|
return this.check();
|
|
5757
5332
|
}
|
|
5758
|
-
multiplyLeft(a2
|
|
5759
|
-
assert5(!b);
|
|
5333
|
+
multiplyLeft(a2) {
|
|
5760
5334
|
multiply3(this, a2, this);
|
|
5761
5335
|
return this.check();
|
|
5762
5336
|
}
|
|
@@ -5788,25 +5362,32 @@
|
|
|
5788
5362
|
scale4(this, this, b);
|
|
5789
5363
|
return this.check();
|
|
5790
5364
|
}
|
|
5791
|
-
slerp(
|
|
5365
|
+
slerp(arg0, arg1, arg2) {
|
|
5366
|
+
let start;
|
|
5367
|
+
let target;
|
|
5368
|
+
let ratio;
|
|
5792
5369
|
switch (arguments.length) {
|
|
5793
5370
|
case 1:
|
|
5794
5371
|
({
|
|
5795
5372
|
start = IDENTITY_QUATERNION,
|
|
5796
5373
|
target,
|
|
5797
5374
|
ratio
|
|
5798
|
-
} =
|
|
5375
|
+
} = arg0);
|
|
5799
5376
|
break;
|
|
5800
5377
|
case 2:
|
|
5801
|
-
[target, ratio] = arguments;
|
|
5802
5378
|
start = this;
|
|
5379
|
+
target = arg0;
|
|
5380
|
+
ratio = arg1;
|
|
5803
5381
|
break;
|
|
5804
5382
|
default:
|
|
5383
|
+
start = arg0;
|
|
5384
|
+
target = arg1;
|
|
5385
|
+
ratio = arg2;
|
|
5805
5386
|
}
|
|
5806
5387
|
slerp(this, start, target, ratio);
|
|
5807
5388
|
return this.check();
|
|
5808
5389
|
}
|
|
5809
|
-
transformVector4(vector, result =
|
|
5390
|
+
transformVector4(vector, result = new Vector4()) {
|
|
5810
5391
|
transformQuat2(result, vector, this);
|
|
5811
5392
|
return checkVector(result, 4);
|
|
5812
5393
|
}
|
|
@@ -5816,11 +5397,11 @@
|
|
|
5816
5397
|
setFromAxisAngle(axis, rad) {
|
|
5817
5398
|
return this.setAxisAngle(axis, rad);
|
|
5818
5399
|
}
|
|
5819
|
-
premultiply(a2
|
|
5820
|
-
return this.multiplyLeft(a2
|
|
5400
|
+
premultiply(a2) {
|
|
5401
|
+
return this.multiplyLeft(a2);
|
|
5821
5402
|
}
|
|
5822
|
-
multiply(a2
|
|
5823
|
-
return this.multiplyRight(a2
|
|
5403
|
+
multiply(a2) {
|
|
5404
|
+
return this.multiplyRight(a2);
|
|
5824
5405
|
}
|
|
5825
5406
|
};
|
|
5826
5407
|
}
|
|
@@ -5860,26 +5441,15 @@
|
|
|
5860
5441
|
});
|
|
5861
5442
|
|
|
5862
5443
|
// ../../node_modules/@math.gl/core/dist/esm/index.js
|
|
5863
|
-
var globals5, global_5;
|
|
5864
5444
|
var init_esm5 = __esm({
|
|
5865
5445
|
"../../node_modules/@math.gl/core/dist/esm/index.js"() {
|
|
5866
|
-
init_common();
|
|
5867
5446
|
init_vector3();
|
|
5868
5447
|
init_matrix3();
|
|
5869
5448
|
init_matrix4();
|
|
5870
5449
|
init_quaternion();
|
|
5871
|
-
init_common();
|
|
5872
5450
|
init_math_utils();
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
self: typeof self !== "undefined" && self,
|
|
5876
|
-
window: typeof window !== "undefined" && window,
|
|
5877
|
-
global: typeof global !== "undefined" && global
|
|
5878
|
-
};
|
|
5879
|
-
global_5 = globals5.global || globals5.self || globals5.window;
|
|
5880
|
-
global_5.mathgl = {
|
|
5881
|
-
config
|
|
5882
|
-
};
|
|
5451
|
+
init_assert4();
|
|
5452
|
+
init_common();
|
|
5883
5453
|
}
|
|
5884
5454
|
});
|
|
5885
5455
|
|
|
@@ -5902,65 +5472,67 @@
|
|
|
5902
5472
|
});
|
|
5903
5473
|
|
|
5904
5474
|
// ../../node_modules/@math.gl/geospatial/dist/esm/type-utils.js
|
|
5905
|
-
function
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
result[
|
|
5912
|
-
result[1] = map3(cartographic.latitude);
|
|
5475
|
+
function identity3(x) {
|
|
5476
|
+
return x;
|
|
5477
|
+
}
|
|
5478
|
+
function fromCartographic(cartographic, result = [], map2 = identity3) {
|
|
5479
|
+
if ("longitude" in cartographic) {
|
|
5480
|
+
result[0] = map2(cartographic.longitude);
|
|
5481
|
+
result[1] = map2(cartographic.latitude);
|
|
5913
5482
|
result[2] = cartographic.height;
|
|
5914
|
-
} else {
|
|
5915
|
-
result[0] =
|
|
5916
|
-
result[1] =
|
|
5483
|
+
} else if ("x" in cartographic) {
|
|
5484
|
+
result[0] = map2(cartographic.x);
|
|
5485
|
+
result[1] = map2(cartographic.y);
|
|
5917
5486
|
result[2] = cartographic.z;
|
|
5487
|
+
} else {
|
|
5488
|
+
result[0] = map2(cartographic[0]);
|
|
5489
|
+
result[1] = map2(cartographic[1]);
|
|
5490
|
+
result[2] = cartographic[2];
|
|
5918
5491
|
}
|
|
5919
5492
|
return result;
|
|
5920
5493
|
}
|
|
5921
|
-
function fromCartographicToRadians(cartographic, vector =
|
|
5922
|
-
return fromCartographic(cartographic, vector, config._cartographicRadians ?
|
|
5494
|
+
function fromCartographicToRadians(cartographic, vector = []) {
|
|
5495
|
+
return fromCartographic(cartographic, vector, config._cartographicRadians ? identity3 : toRadians);
|
|
5923
5496
|
}
|
|
5924
|
-
function toCartographic(vector, cartographic,
|
|
5925
|
-
if (
|
|
5926
|
-
cartographic
|
|
5927
|
-
cartographic
|
|
5928
|
-
cartographic[2] = vector[2];
|
|
5929
|
-
} else if ("longitude" in cartographic) {
|
|
5930
|
-
cartographic.longitude = map3(vector[0]);
|
|
5931
|
-
cartographic.latitude = map3(vector[1]);
|
|
5497
|
+
function toCartographic(vector, cartographic, map2 = identity3) {
|
|
5498
|
+
if ("longitude" in cartographic) {
|
|
5499
|
+
cartographic.longitude = map2(vector[0]);
|
|
5500
|
+
cartographic.latitude = map2(vector[1]);
|
|
5932
5501
|
cartographic.height = vector[2];
|
|
5933
|
-
} else {
|
|
5934
|
-
cartographic.x =
|
|
5935
|
-
cartographic.y =
|
|
5502
|
+
} else if ("x" in cartographic) {
|
|
5503
|
+
cartographic.x = map2(vector[0]);
|
|
5504
|
+
cartographic.y = map2(vector[1]);
|
|
5936
5505
|
cartographic.z = vector[2];
|
|
5506
|
+
} else {
|
|
5507
|
+
cartographic[0] = map2(vector[0]);
|
|
5508
|
+
cartographic[1] = map2(vector[1]);
|
|
5509
|
+
cartographic[2] = vector[2];
|
|
5937
5510
|
}
|
|
5938
5511
|
return cartographic;
|
|
5939
5512
|
}
|
|
5940
5513
|
function toCartographicFromRadians(vector, cartographic) {
|
|
5941
|
-
return toCartographic(vector, cartographic, config._cartographicRadians ?
|
|
5514
|
+
return toCartographic(vector, cartographic, config._cartographicRadians ? identity3 : toDegrees);
|
|
5942
5515
|
}
|
|
5943
|
-
var
|
|
5516
|
+
var scratchVector;
|
|
5944
5517
|
var init_type_utils = __esm({
|
|
5945
5518
|
"../../node_modules/@math.gl/geospatial/dist/esm/type-utils.js"() {
|
|
5946
5519
|
init_esm5();
|
|
5947
5520
|
init_constants();
|
|
5948
|
-
noop3 = (x) => x;
|
|
5949
5521
|
scratchVector = new Vector3();
|
|
5950
5522
|
}
|
|
5951
5523
|
});
|
|
5952
5524
|
|
|
5953
5525
|
// ../../node_modules/@math.gl/geospatial/dist/esm/ellipsoid/helpers/scale-to-geodetic-surface.js
|
|
5954
|
-
function scaleToGeodeticSurface(cartesian, ellipsoid, result =
|
|
5526
|
+
function scaleToGeodeticSurface(cartesian, ellipsoid, result = []) {
|
|
5955
5527
|
const {
|
|
5956
5528
|
oneOverRadii,
|
|
5957
5529
|
oneOverRadiiSquared,
|
|
5958
5530
|
centerToleranceSquared
|
|
5959
5531
|
} = ellipsoid;
|
|
5960
5532
|
scratchVector2.from(cartesian);
|
|
5961
|
-
const positionX =
|
|
5962
|
-
const positionY =
|
|
5963
|
-
const positionZ =
|
|
5533
|
+
const positionX = scratchVector2.x;
|
|
5534
|
+
const positionY = scratchVector2.y;
|
|
5535
|
+
const positionZ = scratchVector2.z;
|
|
5964
5536
|
const oneOverRadiiX = oneOverRadii.x;
|
|
5965
5537
|
const oneOverRadiiY = oneOverRadii.y;
|
|
5966
5538
|
const oneOverRadiiZ = oneOverRadii.z;
|
|
@@ -5982,7 +5554,7 @@
|
|
|
5982
5554
|
const oneOverRadiiSquaredZ = oneOverRadiiSquared.z;
|
|
5983
5555
|
const gradient = scaleToGeodeticSurfaceGradient;
|
|
5984
5556
|
gradient.set(intersection.x * oneOverRadiiSquaredX * 2, intersection.y * oneOverRadiiSquaredY * 2, intersection.z * oneOverRadiiSquaredZ * 2);
|
|
5985
|
-
let lambda = (1 - ratio) *
|
|
5557
|
+
let lambda = (1 - ratio) * scratchVector2.len() / (0.5 * gradient.len());
|
|
5986
5558
|
let correction = 0;
|
|
5987
5559
|
let xMultiplier;
|
|
5988
5560
|
let yMultiplier;
|
|
@@ -6019,7 +5591,7 @@
|
|
|
6019
5591
|
// ../../node_modules/@math.gl/geospatial/dist/esm/ellipsoid/helpers/ellipsoid-transform.js
|
|
6020
5592
|
function localFrameToFixedFrame(ellipsoid, firstAxis, secondAxis, thirdAxis, cartesianOrigin, result) {
|
|
6021
5593
|
const thirdAxisInferred = VECTOR_PRODUCT_LOCAL_FRAME[firstAxis] && VECTOR_PRODUCT_LOCAL_FRAME[firstAxis][secondAxis];
|
|
6022
|
-
|
|
5594
|
+
assert4(thirdAxisInferred && (!thirdAxis || thirdAxis === thirdAxisInferred));
|
|
6023
5595
|
let firstAxisVector;
|
|
6024
5596
|
let secondAxisVector;
|
|
6025
5597
|
let thirdAxisVector;
|
|
@@ -6145,9 +5717,10 @@
|
|
|
6145
5717
|
});
|
|
6146
5718
|
|
|
6147
5719
|
// ../../node_modules/@math.gl/geospatial/dist/esm/ellipsoid/ellipsoid.js
|
|
6148
|
-
var scratchVector4, scratchNormal, scratchK, scratchPosition, scratchHeight, scratchCartesian,
|
|
5720
|
+
var scratchVector4, scratchNormal, scratchK, scratchPosition, scratchHeight, scratchCartesian, Ellipsoid;
|
|
6149
5721
|
var init_ellipsoid = __esm({
|
|
6150
5722
|
"../../node_modules/@math.gl/geospatial/dist/esm/ellipsoid/ellipsoid.js"() {
|
|
5723
|
+
init_defineProperty();
|
|
6151
5724
|
init_esm5();
|
|
6152
5725
|
init_vec3();
|
|
6153
5726
|
init_constants();
|
|
@@ -6161,14 +5734,19 @@
|
|
|
6161
5734
|
scratchHeight = new Vector3();
|
|
6162
5735
|
scratchCartesian = new Vector3();
|
|
6163
5736
|
Ellipsoid = class {
|
|
6164
|
-
static get WGS84() {
|
|
6165
|
-
wgs84 = wgs84 || new Ellipsoid(WGS84_RADIUS_X, WGS84_RADIUS_Y, WGS84_RADIUS_Z);
|
|
6166
|
-
return wgs84;
|
|
6167
|
-
}
|
|
6168
5737
|
constructor(x = 0, y = 0, z = 0) {
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
5738
|
+
_defineProperty(this, "radii", void 0);
|
|
5739
|
+
_defineProperty(this, "radiiSquared", void 0);
|
|
5740
|
+
_defineProperty(this, "radiiToTheFourth", void 0);
|
|
5741
|
+
_defineProperty(this, "oneOverRadii", void 0);
|
|
5742
|
+
_defineProperty(this, "oneOverRadiiSquared", void 0);
|
|
5743
|
+
_defineProperty(this, "minimumRadius", void 0);
|
|
5744
|
+
_defineProperty(this, "maximumRadius", void 0);
|
|
5745
|
+
_defineProperty(this, "centerToleranceSquared", math_utils_default.EPSILON1);
|
|
5746
|
+
_defineProperty(this, "squaredXOverSquaredZ", void 0);
|
|
5747
|
+
assert4(x >= 0);
|
|
5748
|
+
assert4(y >= 0);
|
|
5749
|
+
assert4(z >= 0);
|
|
6172
5750
|
this.radii = new Vector3(x, y, z);
|
|
6173
5751
|
this.radiiSquared = new Vector3(x * x, y * y, z * z);
|
|
6174
5752
|
this.radiiToTheFourth = new Vector3(x * x * x * x, y * y * y * y, z * z * z * z);
|
|
@@ -6176,7 +5754,6 @@
|
|
|
6176
5754
|
this.oneOverRadiiSquared = new Vector3(x === 0 ? 0 : 1 / (x * x), y === 0 ? 0 : 1 / (y * y), z === 0 ? 0 : 1 / (z * z));
|
|
6177
5755
|
this.minimumRadius = Math.min(x, y, z);
|
|
6178
5756
|
this.maximumRadius = Math.max(x, y, z);
|
|
6179
|
-
this.centerToleranceSquared = math_utils_default.EPSILON1;
|
|
6180
5757
|
if (this.radiiSquared.z !== 0) {
|
|
6181
5758
|
this.squaredXOverSquaredZ = this.radiiSquared.x / this.radiiSquared.z;
|
|
6182
5759
|
}
|
|
@@ -6253,8 +5830,8 @@
|
|
|
6253
5830
|
return scratchPosition.from(position).scale(this.radii).to(result);
|
|
6254
5831
|
}
|
|
6255
5832
|
getSurfaceNormalIntersectionWithZAxis(position, buffer = 0, result = [0, 0, 0]) {
|
|
6256
|
-
|
|
6257
|
-
|
|
5833
|
+
assert4(equals(this.radii.x, this.radii.y, math_utils_default.EPSILON15));
|
|
5834
|
+
assert4(this.radii.z > 0);
|
|
6258
5835
|
scratchPosition.from(position);
|
|
6259
5836
|
const z = scratchPosition.z * (1 - this.squaredXOverSquaredZ);
|
|
6260
5837
|
if (Math.abs(z) >= this.radii.z - buffer) {
|
|
@@ -6263,6 +5840,7 @@
|
|
|
6263
5840
|
return scratchPosition.set(0, 0, z).to(result);
|
|
6264
5841
|
}
|
|
6265
5842
|
};
|
|
5843
|
+
_defineProperty(Ellipsoid, "WGS84", new Ellipsoid(WGS84_RADIUS_X, WGS84_RADIUS_Y, WGS84_RADIUS_Z));
|
|
6266
5844
|
}
|
|
6267
5845
|
});
|
|
6268
5846
|
|
|
@@ -6760,12 +6338,12 @@
|
|
|
6760
6338
|
});
|
|
6761
6339
|
|
|
6762
6340
|
// ../schema/src/lib/utils/assert.ts
|
|
6763
|
-
function
|
|
6341
|
+
function assert5(condition, message) {
|
|
6764
6342
|
if (!condition) {
|
|
6765
6343
|
throw new Error(message || "loader assertion failed.");
|
|
6766
6344
|
}
|
|
6767
6345
|
}
|
|
6768
|
-
var
|
|
6346
|
+
var init_assert5 = __esm({
|
|
6769
6347
|
"../schema/src/lib/utils/assert.ts"() {
|
|
6770
6348
|
}
|
|
6771
6349
|
});
|
|
@@ -6786,10 +6364,10 @@
|
|
|
6786
6364
|
var Schema;
|
|
6787
6365
|
var init_schema = __esm({
|
|
6788
6366
|
"../schema/src/lib/schema/impl/schema.ts"() {
|
|
6789
|
-
|
|
6367
|
+
init_assert5();
|
|
6790
6368
|
Schema = class {
|
|
6791
6369
|
constructor(fields, metadata) {
|
|
6792
|
-
|
|
6370
|
+
assert5(Array.isArray(fields));
|
|
6793
6371
|
checkNames(fields);
|
|
6794
6372
|
this.fields = fields;
|
|
6795
6373
|
this.metadata = metadata || new Map();
|
|
@@ -7803,8 +7381,8 @@
|
|
|
7803
7381
|
options.wasmBinary = wasmBinary;
|
|
7804
7382
|
}
|
|
7805
7383
|
return new Promise((resolve) => {
|
|
7806
|
-
BasisModule(options).then((
|
|
7807
|
-
const { BasisFile, initializeBasis } =
|
|
7384
|
+
BasisModule(options).then((module) => {
|
|
7385
|
+
const { BasisFile, initializeBasis } = module;
|
|
7808
7386
|
initializeBasis();
|
|
7809
7387
|
resolve({ BasisFile });
|
|
7810
7388
|
});
|
|
@@ -7834,8 +7412,8 @@
|
|
|
7834
7412
|
options.wasmBinary = wasmBinary;
|
|
7835
7413
|
}
|
|
7836
7414
|
return new Promise((resolve) => {
|
|
7837
|
-
BasisEncoderModule(options).then((
|
|
7838
|
-
const { BasisFile, KTX2File, initializeBasis, BasisEncoder } =
|
|
7415
|
+
BasisEncoderModule(options).then((module) => {
|
|
7416
|
+
const { BasisFile, KTX2File, initializeBasis, BasisEncoder } = module;
|
|
7839
7417
|
initializeBasis();
|
|
7840
7418
|
resolve({ BasisFile, KTX2File, BasisEncoder });
|
|
7841
7419
|
});
|
|
@@ -8856,10 +8434,10 @@
|
|
|
8856
8434
|
});
|
|
8857
8435
|
|
|
8858
8436
|
// ../../node_modules/@luma.gl/constants/dist/esm/index.js
|
|
8859
|
-
var
|
|
8437
|
+
var esm_default2;
|
|
8860
8438
|
var init_esm7 = __esm({
|
|
8861
8439
|
"../../node_modules/@luma.gl/constants/dist/esm/index.js"() {
|
|
8862
|
-
|
|
8440
|
+
esm_default2 = {
|
|
8863
8441
|
DEPTH_BUFFER_BIT: 256,
|
|
8864
8442
|
STENCIL_BUFFER_BIT: 1024,
|
|
8865
8443
|
COLOR_BUFFER_BIT: 16384,
|
|
@@ -9520,11 +9098,11 @@
|
|
|
9520
9098
|
init_esm7();
|
|
9521
9099
|
init_types();
|
|
9522
9100
|
GL_TYPE_MAP = {
|
|
9523
|
-
UInt8:
|
|
9524
|
-
UInt16:
|
|
9525
|
-
Float32:
|
|
9526
|
-
UInt32:
|
|
9527
|
-
UInt64:
|
|
9101
|
+
UInt8: esm_default2.UNSIGNED_BYTE,
|
|
9102
|
+
UInt16: esm_default2.UNSIGNED_INT,
|
|
9103
|
+
Float32: esm_default2.FLOAT,
|
|
9104
|
+
UInt32: esm_default2.UNSIGNED_INT,
|
|
9105
|
+
UInt64: esm_default2.DOUBLE
|
|
9528
9106
|
};
|
|
9529
9107
|
STRING_ATTRIBUTE_TYPE = "String";
|
|
9530
9108
|
OBJECT_ID_ATTRIBUTE_TYPE = "Oid32";
|
|
@@ -10209,11 +9787,11 @@
|
|
|
10209
9787
|
var INTERSECTION;
|
|
10210
9788
|
var init_constants3 = __esm({
|
|
10211
9789
|
"../../node_modules/@math.gl/culling/dist/esm/constants.js"() {
|
|
10212
|
-
INTERSECTION =
|
|
9790
|
+
INTERSECTION = {
|
|
10213
9791
|
OUTSIDE: -1,
|
|
10214
9792
|
INTERSECTING: 0,
|
|
10215
9793
|
INSIDE: 1
|
|
10216
|
-
}
|
|
9794
|
+
};
|
|
10217
9795
|
}
|
|
10218
9796
|
});
|
|
10219
9797
|
|
|
@@ -10221,6 +9799,7 @@
|
|
|
10221
9799
|
var scratchVector6, scratchNormal2;
|
|
10222
9800
|
var init_axis_aligned_bounding_box = __esm({
|
|
10223
9801
|
"../../node_modules/@math.gl/culling/dist/esm/lib/bounding-volumes/axis-aligned-bounding-box.js"() {
|
|
9802
|
+
init_defineProperty();
|
|
10224
9803
|
init_esm5();
|
|
10225
9804
|
init_constants3();
|
|
10226
9805
|
scratchVector6 = new Vector3();
|
|
@@ -10232,6 +9811,7 @@
|
|
|
10232
9811
|
var scratchVector7, scratchVector23, BoundingSphere;
|
|
10233
9812
|
var init_bounding_sphere = __esm({
|
|
10234
9813
|
"../../node_modules/@math.gl/culling/dist/esm/lib/bounding-volumes/bounding-sphere.js"() {
|
|
9814
|
+
init_defineProperty();
|
|
10235
9815
|
init_esm5();
|
|
10236
9816
|
init_mat4();
|
|
10237
9817
|
init_constants3();
|
|
@@ -10239,6 +9819,8 @@
|
|
|
10239
9819
|
scratchVector23 = new Vector3();
|
|
10240
9820
|
BoundingSphere = class {
|
|
10241
9821
|
constructor(center = [0, 0, 0], radius = 0) {
|
|
9822
|
+
_defineProperty(this, "center", void 0);
|
|
9823
|
+
_defineProperty(this, "radius", void 0);
|
|
10242
9824
|
this.radius = -0;
|
|
10243
9825
|
this.center = new Vector3();
|
|
10244
9826
|
this.fromCenterRadius(center, radius);
|
|
@@ -10280,8 +9862,8 @@
|
|
|
10280
9862
|
return this;
|
|
10281
9863
|
}
|
|
10282
9864
|
expand(point) {
|
|
10283
|
-
|
|
10284
|
-
const radius =
|
|
9865
|
+
const scratchPoint = scratchVector7.from(point);
|
|
9866
|
+
const radius = scratchPoint.subtract(this.center).magnitude();
|
|
10285
9867
|
if (radius > this.radius) {
|
|
10286
9868
|
this.radius = radius;
|
|
10287
9869
|
}
|
|
@@ -10294,12 +9876,13 @@
|
|
|
10294
9876
|
return this;
|
|
10295
9877
|
}
|
|
10296
9878
|
distanceSquaredTo(point) {
|
|
10297
|
-
|
|
10298
|
-
|
|
10299
|
-
return delta.lengthSquared() - this.radius * this.radius;
|
|
9879
|
+
const d = this.distanceTo(point);
|
|
9880
|
+
return d * d;
|
|
10300
9881
|
}
|
|
10301
9882
|
distanceTo(point) {
|
|
10302
|
-
|
|
9883
|
+
const scratchPoint = scratchVector7.from(point);
|
|
9884
|
+
const delta = scratchPoint.subtract(this.center);
|
|
9885
|
+
return Math.max(0, delta.len() - this.radius);
|
|
10303
9886
|
}
|
|
10304
9887
|
intersectPlane(plane) {
|
|
10305
9888
|
const center = this.center;
|
|
@@ -10322,6 +9905,7 @@
|
|
|
10322
9905
|
var scratchVector32, scratchOffset, scratchVectorU, scratchVectorV, scratchVectorW, scratchCorner, scratchToCenter, MATRIX3, OrientedBoundingBox;
|
|
10323
9906
|
var init_oriented_bounding_box = __esm({
|
|
10324
9907
|
"../../node_modules/@math.gl/culling/dist/esm/lib/bounding-volumes/oriented-bounding-box.js"() {
|
|
9908
|
+
init_defineProperty();
|
|
10325
9909
|
init_esm5();
|
|
10326
9910
|
init_bounding_sphere();
|
|
10327
9911
|
init_constants3();
|
|
@@ -10345,6 +9929,8 @@
|
|
|
10345
9929
|
};
|
|
10346
9930
|
OrientedBoundingBox = class {
|
|
10347
9931
|
constructor(center = [0, 0, 0], halfAxes = [0, 0, 0, 0, 0, 0, 0, 0, 0]) {
|
|
9932
|
+
_defineProperty(this, "center", void 0);
|
|
9933
|
+
_defineProperty(this, "halfAxes", void 0);
|
|
10348
9934
|
this.center = new Vector3().from(center);
|
|
10349
9935
|
this.halfAxes = new Matrix3(halfAxes);
|
|
10350
9936
|
}
|
|
@@ -10516,17 +10102,20 @@
|
|
|
10516
10102
|
var scratchPosition2, scratchNormal3, Plane;
|
|
10517
10103
|
var init_plane = __esm({
|
|
10518
10104
|
"../../node_modules/@math.gl/culling/dist/esm/lib/plane.js"() {
|
|
10105
|
+
init_defineProperty();
|
|
10519
10106
|
init_esm5();
|
|
10520
10107
|
scratchPosition2 = new Vector3();
|
|
10521
10108
|
scratchNormal3 = new Vector3();
|
|
10522
10109
|
Plane = class {
|
|
10523
10110
|
constructor(normal = [0, 0, 1], distance = 0) {
|
|
10111
|
+
_defineProperty(this, "normal", void 0);
|
|
10112
|
+
_defineProperty(this, "distance", void 0);
|
|
10524
10113
|
this.normal = new Vector3();
|
|
10525
10114
|
this.distance = -0;
|
|
10526
10115
|
this.fromNormalDistance(normal, distance);
|
|
10527
10116
|
}
|
|
10528
10117
|
fromNormalDistance(normal, distance) {
|
|
10529
|
-
|
|
10118
|
+
assert4(Number.isFinite(distance));
|
|
10530
10119
|
this.normal.from(normal).normalize();
|
|
10531
10120
|
this.distance = distance;
|
|
10532
10121
|
return this;
|
|
@@ -10540,11 +10129,11 @@
|
|
|
10540
10129
|
}
|
|
10541
10130
|
fromCoefficients(a2, b, c2, d) {
|
|
10542
10131
|
this.normal.set(a2, b, c2);
|
|
10543
|
-
|
|
10132
|
+
assert4(equals(this.normal.len(), 1));
|
|
10544
10133
|
this.distance = d;
|
|
10545
10134
|
return this;
|
|
10546
10135
|
}
|
|
10547
|
-
clone(
|
|
10136
|
+
clone() {
|
|
10548
10137
|
return new Plane(this.normal, this.distance);
|
|
10549
10138
|
}
|
|
10550
10139
|
equals(right) {
|
|
@@ -10569,9 +10158,10 @@
|
|
|
10569
10158
|
});
|
|
10570
10159
|
|
|
10571
10160
|
// ../../node_modules/@math.gl/culling/dist/esm/lib/culling-volume.js
|
|
10572
|
-
var faces, scratchPlaneCenter, scratchPlaneNormal, scratchPlane;
|
|
10161
|
+
var faces, scratchPlaneCenter, scratchPlaneNormal, scratchPlane, CullingVolume;
|
|
10573
10162
|
var init_culling_volume = __esm({
|
|
10574
10163
|
"../../node_modules/@math.gl/culling/dist/esm/lib/culling-volume.js"() {
|
|
10164
|
+
init_defineProperty();
|
|
10575
10165
|
init_esm5();
|
|
10576
10166
|
init_constants3();
|
|
10577
10167
|
init_plane();
|
|
@@ -10579,6 +10169,77 @@
|
|
|
10579
10169
|
scratchPlaneCenter = new Vector3();
|
|
10580
10170
|
scratchPlaneNormal = new Vector3();
|
|
10581
10171
|
scratchPlane = new Plane(new Vector3(1, 0, 0), 0);
|
|
10172
|
+
CullingVolume = class {
|
|
10173
|
+
constructor(planes = []) {
|
|
10174
|
+
_defineProperty(this, "planes", void 0);
|
|
10175
|
+
this.planes = planes;
|
|
10176
|
+
}
|
|
10177
|
+
fromBoundingSphere(boundingSphere) {
|
|
10178
|
+
this.planes.length = 2 * faces.length;
|
|
10179
|
+
const center = boundingSphere.center;
|
|
10180
|
+
const radius = boundingSphere.radius;
|
|
10181
|
+
let planeIndex = 0;
|
|
10182
|
+
for (const faceNormal of faces) {
|
|
10183
|
+
let plane0 = this.planes[planeIndex];
|
|
10184
|
+
let plane1 = this.planes[planeIndex + 1];
|
|
10185
|
+
if (!plane0) {
|
|
10186
|
+
plane0 = this.planes[planeIndex] = new Plane();
|
|
10187
|
+
}
|
|
10188
|
+
if (!plane1) {
|
|
10189
|
+
plane1 = this.planes[planeIndex + 1] = new Plane();
|
|
10190
|
+
}
|
|
10191
|
+
const plane0Center = scratchPlaneCenter.copy(faceNormal).scale(-radius).add(center);
|
|
10192
|
+
const plane0Distance = -faceNormal.dot(plane0Center);
|
|
10193
|
+
plane0.fromPointNormal(plane0Center, faceNormal);
|
|
10194
|
+
const plane1Center = scratchPlaneCenter.copy(faceNormal).scale(radius).add(center);
|
|
10195
|
+
const negatedFaceNormal = scratchPlaneNormal.copy(faceNormal).negate();
|
|
10196
|
+
const plane1Distance = -negatedFaceNormal.dot(plane1Center);
|
|
10197
|
+
plane1.fromPointNormal(plane1Center, negatedFaceNormal);
|
|
10198
|
+
planeIndex += 2;
|
|
10199
|
+
}
|
|
10200
|
+
return this;
|
|
10201
|
+
}
|
|
10202
|
+
computeVisibility(boundingVolume) {
|
|
10203
|
+
let intersect = INTERSECTION.INSIDE;
|
|
10204
|
+
for (const plane of this.planes) {
|
|
10205
|
+
const result = boundingVolume.intersectPlane(plane);
|
|
10206
|
+
switch (result) {
|
|
10207
|
+
case INTERSECTION.OUTSIDE:
|
|
10208
|
+
return INTERSECTION.OUTSIDE;
|
|
10209
|
+
case INTERSECTION.INTERSECTING:
|
|
10210
|
+
intersect = INTERSECTION.INTERSECTING;
|
|
10211
|
+
break;
|
|
10212
|
+
default:
|
|
10213
|
+
}
|
|
10214
|
+
}
|
|
10215
|
+
return intersect;
|
|
10216
|
+
}
|
|
10217
|
+
computeVisibilityWithPlaneMask(boundingVolume, parentPlaneMask) {
|
|
10218
|
+
assert4(Number.isFinite(parentPlaneMask), "parentPlaneMask is required.");
|
|
10219
|
+
if (parentPlaneMask === CullingVolume.MASK_OUTSIDE || parentPlaneMask === CullingVolume.MASK_INSIDE) {
|
|
10220
|
+
return parentPlaneMask;
|
|
10221
|
+
}
|
|
10222
|
+
let mask = CullingVolume.MASK_INSIDE;
|
|
10223
|
+
const planes = this.planes;
|
|
10224
|
+
for (let k = 0; k < this.planes.length; ++k) {
|
|
10225
|
+
const flag = k < 31 ? 1 << k : 0;
|
|
10226
|
+
if (k < 31 && (parentPlaneMask & flag) === 0) {
|
|
10227
|
+
continue;
|
|
10228
|
+
}
|
|
10229
|
+
const plane = planes[k];
|
|
10230
|
+
const result = boundingVolume.intersectPlane(plane);
|
|
10231
|
+
if (result === INTERSECTION.OUTSIDE) {
|
|
10232
|
+
return CullingVolume.MASK_OUTSIDE;
|
|
10233
|
+
} else if (result === INTERSECTION.INTERSECTING) {
|
|
10234
|
+
mask |= flag;
|
|
10235
|
+
}
|
|
10236
|
+
}
|
|
10237
|
+
return mask;
|
|
10238
|
+
}
|
|
10239
|
+
};
|
|
10240
|
+
_defineProperty(CullingVolume, "MASK_OUTSIDE", 4294967295);
|
|
10241
|
+
_defineProperty(CullingVolume, "MASK_INSIDE", 0);
|
|
10242
|
+
_defineProperty(CullingVolume, "MASK_INDETERMINATE", 2147483647);
|
|
10582
10243
|
}
|
|
10583
10244
|
});
|
|
10584
10245
|
|
|
@@ -10586,6 +10247,7 @@
|
|
|
10586
10247
|
var scratchPlaneUpVector, scratchPlaneRightVector, scratchPlaneNearCenter, scratchPlaneFarCenter, scratchPlaneNormal2;
|
|
10587
10248
|
var init_perspective_off_center_frustum = __esm({
|
|
10588
10249
|
"../../node_modules/@math.gl/culling/dist/esm/lib/perspective-off-center-frustum.js"() {
|
|
10250
|
+
init_defineProperty();
|
|
10589
10251
|
init_esm5();
|
|
10590
10252
|
init_culling_volume();
|
|
10591
10253
|
init_plane();
|
|
@@ -10600,6 +10262,7 @@
|
|
|
10600
10262
|
// ../../node_modules/@math.gl/culling/dist/esm/lib/perspective-frustum.js
|
|
10601
10263
|
var init_perspective_frustum = __esm({
|
|
10602
10264
|
"../../node_modules/@math.gl/culling/dist/esm/lib/perspective-frustum.js"() {
|
|
10265
|
+
init_defineProperty();
|
|
10603
10266
|
init_perspective_off_center_frustum();
|
|
10604
10267
|
}
|
|
10605
10268
|
});
|
|
@@ -10674,8 +10337,6 @@
|
|
|
10674
10337
|
init_bounding_sphere_from_points();
|
|
10675
10338
|
init_bounding_box_from_points();
|
|
10676
10339
|
init_compute_eigen_decomposition();
|
|
10677
|
-
init_constants3();
|
|
10678
|
-
init_constants3();
|
|
10679
10340
|
}
|
|
10680
10341
|
});
|
|
10681
10342
|
|
|
@@ -11149,35 +10810,67 @@
|
|
|
11149
10810
|
async function parseWebscene(data) {
|
|
11150
10811
|
const layer0 = JSON.parse(new TextDecoder().decode(data));
|
|
11151
10812
|
const { operationalLayers } = layer0;
|
|
10813
|
+
const { layers, unsupportedLayers } = await parseOperationalLayers(operationalLayers, true);
|
|
10814
|
+
if (!layers.length) {
|
|
10815
|
+
throw new Error(NO_AVAILABLE_SUPPORTED_LAYERS_ERROR);
|
|
10816
|
+
}
|
|
11152
10817
|
return {
|
|
11153
10818
|
header: layer0,
|
|
11154
|
-
layers
|
|
10819
|
+
layers,
|
|
10820
|
+
unsupportedLayers
|
|
11155
10821
|
};
|
|
11156
10822
|
}
|
|
11157
|
-
function parseOperationalLayers(layersList) {
|
|
11158
|
-
|
|
10823
|
+
async function parseOperationalLayers(layersList, needToCheckCRS) {
|
|
10824
|
+
const layers = [];
|
|
10825
|
+
let unsupportedLayers = [];
|
|
11159
10826
|
for (let index = 0; index < layersList.length; index++) {
|
|
11160
10827
|
const layer = layersList[index];
|
|
11161
|
-
|
|
10828
|
+
const isLayerSupported = SUPPORTED_LAYERS_TYPES.includes(layer.layerType);
|
|
10829
|
+
if (isLayerSupported) {
|
|
10830
|
+
if (needToCheckCRS && layer.layerType !== GROUP_LAYER) {
|
|
10831
|
+
await checkSupportedIndexCRS(layer);
|
|
10832
|
+
needToCheckCRS = false;
|
|
10833
|
+
}
|
|
11162
10834
|
layers.push(layer);
|
|
10835
|
+
} else {
|
|
10836
|
+
unsupportedLayers.push(layer);
|
|
11163
10837
|
}
|
|
11164
10838
|
if (layer.layers?.length) {
|
|
11165
|
-
|
|
10839
|
+
const { layers: childLayers, unsupportedLayers: childUnsupportedLayers } = await parseOperationalLayers(layer.layers, needToCheckCRS);
|
|
10840
|
+
layer.layers = childLayers;
|
|
10841
|
+
unsupportedLayers = [...unsupportedLayers, ...childUnsupportedLayers];
|
|
11166
10842
|
}
|
|
11167
10843
|
}
|
|
11168
|
-
return layers;
|
|
10844
|
+
return { layers, unsupportedLayers };
|
|
10845
|
+
}
|
|
10846
|
+
async function checkSupportedIndexCRS(layer) {
|
|
10847
|
+
try {
|
|
10848
|
+
const layerJson = await load(layer.url, JSONLoader);
|
|
10849
|
+
const wkid = layerJson?.spatialReference?.wkid;
|
|
10850
|
+
if (wkid !== SUPPORTED_WKID) {
|
|
10851
|
+
throw new Error(NOT_SUPPORTED_CRS_ERROR);
|
|
10852
|
+
}
|
|
10853
|
+
} catch (error) {
|
|
10854
|
+
throw error;
|
|
10855
|
+
}
|
|
11169
10856
|
}
|
|
11170
|
-
var ARCGIS_SCENE_SERVER_LAYER_TYPE, BUILDING_SCENE_LAYER, INTEGRATED_MESH_LAYER, SUPPORTED_LAYERS_TYPES;
|
|
10857
|
+
var SUPPORTED_WKID, ARCGIS_SCENE_SERVER_LAYER_TYPE, BUILDING_SCENE_LAYER, INTEGRATED_MESH_LAYER, GROUP_LAYER, SUPPORTED_LAYERS_TYPES, NO_AVAILABLE_SUPPORTED_LAYERS_ERROR, NOT_SUPPORTED_CRS_ERROR;
|
|
11171
10858
|
var init_parse_arcgis_webscene = __esm({
|
|
11172
10859
|
"src/lib/parsers/parse-arcgis-webscene.ts"() {
|
|
10860
|
+
init_src3();
|
|
10861
|
+
SUPPORTED_WKID = 4326;
|
|
11173
10862
|
ARCGIS_SCENE_SERVER_LAYER_TYPE = "ArcGISSceneServiceLayer";
|
|
11174
10863
|
BUILDING_SCENE_LAYER = "BuildingSceneLayer";
|
|
11175
10864
|
INTEGRATED_MESH_LAYER = "IntegratedMeshLayer";
|
|
10865
|
+
GROUP_LAYER = "GroupLayer";
|
|
11176
10866
|
SUPPORTED_LAYERS_TYPES = [
|
|
11177
10867
|
ARCGIS_SCENE_SERVER_LAYER_TYPE,
|
|
11178
10868
|
INTEGRATED_MESH_LAYER,
|
|
11179
|
-
BUILDING_SCENE_LAYER
|
|
10869
|
+
BUILDING_SCENE_LAYER,
|
|
10870
|
+
GROUP_LAYER
|
|
11180
10871
|
];
|
|
10872
|
+
NO_AVAILABLE_SUPPORTED_LAYERS_ERROR = "NO_AVAILABLE_SUPPORTED_LAYERS_ERROR";
|
|
10873
|
+
NOT_SUPPORTED_CRS_ERROR = "NOT_SUPPORTED_CRS_ERROR";
|
|
11181
10874
|
}
|
|
11182
10875
|
});
|
|
11183
10876
|
|
|
@@ -11227,10 +10920,10 @@
|
|
|
11227
10920
|
|
|
11228
10921
|
// src/bundle.ts
|
|
11229
10922
|
var require_bundle = __commonJS({
|
|
11230
|
-
"src/bundle.ts"(exports,
|
|
10923
|
+
"src/bundle.ts"(exports, module) {
|
|
11231
10924
|
var moduleExports = (init_src9(), src_exports);
|
|
11232
10925
|
globalThis.loaders = globalThis.loaders || {};
|
|
11233
|
-
|
|
10926
|
+
module.exports = Object.assign(globalThis.loaders, moduleExports);
|
|
11234
10927
|
}
|
|
11235
10928
|
});
|
|
11236
10929
|
require_bundle();
|