@loaders.gl/3d-tiles 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 +924 -1372
- package/dist/es5/bundle.js +0 -1
- package/dist/es5/bundle.js.map +1 -1
- package/dist/es5/cesium-ion-loader.js +7 -26
- package/dist/es5/cesium-ion-loader.js.map +1 -1
- package/dist/es5/index.js +14 -23
- package/dist/es5/index.js.map +1 -1
- package/dist/es5/lib/classes/helpers/tile-3d-accessor-utils.js +1 -5
- package/dist/es5/lib/classes/helpers/tile-3d-accessor-utils.js.map +1 -1
- package/dist/es5/lib/classes/tile-3d-batch-table-hierarchy.js +1 -40
- package/dist/es5/lib/classes/tile-3d-batch-table-hierarchy.js.map +1 -1
- package/dist/es5/lib/classes/tile-3d-batch-table.js +12 -59
- package/dist/es5/lib/classes/tile-3d-batch-table.js.map +1 -1
- package/dist/es5/lib/classes/tile-3d-feature-table.js +4 -23
- package/dist/es5/lib/classes/tile-3d-feature-table.js.map +1 -1
- package/dist/es5/lib/constants.js +3 -1
- package/dist/es5/lib/constants.js.map +1 -1
- package/dist/es5/lib/encoders/encode-3d-tile-batched-model.js +7 -16
- package/dist/es5/lib/encoders/encode-3d-tile-batched-model.js.map +1 -1
- package/dist/es5/lib/encoders/encode-3d-tile-composite.js +2 -11
- package/dist/es5/lib/encoders/encode-3d-tile-composite.js.map +1 -1
- package/dist/es5/lib/encoders/encode-3d-tile-instanced-model.js +10 -17
- package/dist/es5/lib/encoders/encode-3d-tile-instanced-model.js.map +1 -1
- package/dist/es5/lib/encoders/encode-3d-tile-point-cloud.js +8 -16
- package/dist/es5/lib/encoders/encode-3d-tile-point-cloud.js.map +1 -1
- package/dist/es5/lib/encoders/encode-3d-tile.js +0 -12
- package/dist/es5/lib/encoders/encode-3d-tile.js.map +1 -1
- package/dist/es5/lib/encoders/helpers/encode-3d-tile-header.js +6 -9
- package/dist/es5/lib/encoders/helpers/encode-3d-tile-header.js.map +1 -1
- package/dist/es5/lib/ion/ion.js +5 -46
- package/dist/es5/lib/ion/ion.js.map +1 -1
- package/dist/es5/lib/parsers/helpers/normalize-3d-tile-colors.js +2 -11
- package/dist/es5/lib/parsers/helpers/normalize-3d-tile-colors.js.map +1 -1
- package/dist/es5/lib/parsers/helpers/normalize-3d-tile-normals.js +0 -8
- package/dist/es5/lib/parsers/helpers/normalize-3d-tile-normals.js.map +1 -1
- package/dist/es5/lib/parsers/helpers/normalize-3d-tile-positions.js +0 -5
- package/dist/es5/lib/parsers/helpers/normalize-3d-tile-positions.js.map +1 -1
- package/dist/es5/lib/parsers/helpers/parse-3d-implicit-tiles.js +17 -51
- package/dist/es5/lib/parsers/helpers/parse-3d-implicit-tiles.js.map +1 -1
- package/dist/es5/lib/parsers/helpers/parse-3d-tile-gltf-view.js +6 -25
- package/dist/es5/lib/parsers/helpers/parse-3d-tile-gltf-view.js.map +1 -1
- package/dist/es5/lib/parsers/helpers/parse-3d-tile-header.js +1 -1
- package/dist/es5/lib/parsers/helpers/parse-3d-tile-header.js.map +1 -1
- package/dist/es5/lib/parsers/helpers/parse-3d-tile-subtree.js +0 -38
- package/dist/es5/lib/parsers/helpers/parse-3d-tile-subtree.js.map +1 -1
- package/dist/es5/lib/parsers/helpers/parse-3d-tile-tables.js +6 -14
- package/dist/es5/lib/parsers/helpers/parse-3d-tile-tables.js.map +1 -1
- package/dist/es5/lib/parsers/helpers/parse-utils.js +1 -3
- package/dist/es5/lib/parsers/helpers/parse-utils.js.map +1 -1
- package/dist/es5/lib/parsers/parse-3d-tile-batched-model.js +0 -16
- package/dist/es5/lib/parsers/parse-3d-tile-batched-model.js.map +1 -1
- package/dist/es5/lib/parsers/parse-3d-tile-composite.js +1 -11
- package/dist/es5/lib/parsers/parse-3d-tile-composite.js.map +1 -1
- package/dist/es5/lib/parsers/parse-3d-tile-gltf.js +0 -8
- package/dist/es5/lib/parsers/parse-3d-tile-gltf.js.map +1 -1
- package/dist/es5/lib/parsers/parse-3d-tile-header.js +2 -70
- package/dist/es5/lib/parsers/parse-3d-tile-header.js.map +1 -1
- package/dist/es5/lib/parsers/parse-3d-tile-instanced-model.js +5 -41
- package/dist/es5/lib/parsers/parse-3d-tile-instanced-model.js.map +1 -1
- package/dist/es5/lib/parsers/parse-3d-tile-point-cloud.js +4 -71
- package/dist/es5/lib/parsers/parse-3d-tile-point-cloud.js.map +1 -1
- package/dist/es5/lib/parsers/parse-3d-tile.js +5 -28
- package/dist/es5/lib/parsers/parse-3d-tile.js.map +1 -1
- package/dist/es5/lib/utils/version.js +1 -1
- package/dist/es5/lib/utils/version.js.map +1 -1
- package/dist/es5/tile-3d-subtree-loader.js +0 -4
- package/dist/es5/tile-3d-subtree-loader.js.map +1 -1
- package/dist/es5/tile-3d-writer.js +0 -6
- package/dist/es5/tile-3d-writer.js.map +1 -1
- package/dist/es5/tiles-3d-loader.js +0 -29
- package/dist/es5/tiles-3d-loader.js.map +1 -1
- package/dist/es5/types.js.map +1 -1
- package/dist/esm/bundle.js +1 -1
- package/dist/esm/bundle.js.map +1 -1
- package/dist/esm/cesium-ion-loader.js +9 -7
- package/dist/esm/cesium-ion-loader.js.map +1 -1
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/classes/helpers/tile-3d-accessor-utils.js +1 -0
- package/dist/esm/lib/classes/helpers/tile-3d-accessor-utils.js.map +1 -1
- package/dist/esm/lib/classes/tile-3d-batch-table-hierarchy.js +3 -40
- package/dist/esm/lib/classes/tile-3d-batch-table-hierarchy.js.map +1 -1
- package/dist/esm/lib/classes/tile-3d-batch-table.js +7 -67
- package/dist/esm/lib/classes/tile-3d-batch-table.js.map +1 -1
- package/dist/esm/lib/classes/tile-3d-feature-table.js +5 -26
- package/dist/esm/lib/classes/tile-3d-feature-table.js.map +1 -1
- package/dist/esm/lib/constants.js +3 -0
- package/dist/esm/lib/constants.js.map +1 -1
- package/dist/esm/lib/encoders/encode-3d-tile-batched-model.js +5 -3
- package/dist/esm/lib/encoders/encode-3d-tile-batched-model.js.map +1 -1
- package/dist/esm/lib/encoders/encode-3d-tile-composite.js +2 -2
- package/dist/esm/lib/encoders/encode-3d-tile-composite.js.map +1 -1
- package/dist/esm/lib/encoders/encode-3d-tile-instanced-model.js +5 -1
- package/dist/esm/lib/encoders/encode-3d-tile-instanced-model.js.map +1 -1
- package/dist/esm/lib/encoders/encode-3d-tile-point-cloud.js +4 -1
- package/dist/esm/lib/encoders/encode-3d-tile-point-cloud.js.map +1 -1
- package/dist/esm/lib/encoders/encode-3d-tile.js +2 -6
- package/dist/esm/lib/encoders/encode-3d-tile.js.map +1 -1
- package/dist/esm/lib/encoders/helpers/encode-3d-tile-header.js +3 -3
- package/dist/esm/lib/encoders/helpers/encode-3d-tile-header.js.map +1 -1
- package/dist/esm/lib/ion/ion.js +10 -8
- package/dist/esm/lib/ion/ion.js.map +1 -1
- package/dist/esm/lib/parsers/helpers/normalize-3d-tile-colors.js +1 -6
- package/dist/esm/lib/parsers/helpers/normalize-3d-tile-colors.js.map +1 -1
- package/dist/esm/lib/parsers/helpers/normalize-3d-tile-normals.js +0 -4
- package/dist/esm/lib/parsers/helpers/normalize-3d-tile-normals.js.map +1 -1
- package/dist/esm/lib/parsers/helpers/normalize-3d-tile-positions.js +1 -2
- package/dist/esm/lib/parsers/helpers/normalize-3d-tile-positions.js.map +1 -1
- package/dist/esm/lib/parsers/helpers/parse-3d-implicit-tiles.js +2 -16
- package/dist/esm/lib/parsers/helpers/parse-3d-implicit-tiles.js.map +1 -1
- package/dist/esm/lib/parsers/helpers/parse-3d-tile-gltf-view.js +6 -9
- package/dist/esm/lib/parsers/helpers/parse-3d-tile-gltf-view.js.map +1 -1
- package/dist/esm/lib/parsers/helpers/parse-3d-tile-header.js +5 -2
- package/dist/esm/lib/parsers/helpers/parse-3d-tile-header.js.map +1 -1
- package/dist/esm/lib/parsers/helpers/parse-3d-tile-subtree.js +1 -13
- package/dist/esm/lib/parsers/helpers/parse-3d-tile-subtree.js.map +1 -1
- package/dist/esm/lib/parsers/helpers/parse-3d-tile-tables.js +4 -7
- package/dist/esm/lib/parsers/helpers/parse-3d-tile-tables.js.map +1 -1
- package/dist/esm/lib/parsers/helpers/parse-utils.js +6 -1
- package/dist/esm/lib/parsers/helpers/parse-utils.js.map +1 -1
- package/dist/esm/lib/parsers/parse-3d-tile-batched-model.js +3 -4
- package/dist/esm/lib/parsers/parse-3d-tile-batched-model.js.map +1 -1
- package/dist/esm/lib/parsers/parse-3d-tile-composite.js +5 -1
- package/dist/esm/lib/parsers/parse-3d-tile-composite.js.map +1 -1
- package/dist/esm/lib/parsers/parse-3d-tile-gltf.js.map +1 -1
- package/dist/esm/lib/parsers/parse-3d-tile-header.js +3 -26
- package/dist/esm/lib/parsers/parse-3d-tile-header.js.map +1 -1
- package/dist/esm/lib/parsers/parse-3d-tile-instanced-model.js +7 -25
- package/dist/esm/lib/parsers/parse-3d-tile-instanced-model.js.map +1 -1
- package/dist/esm/lib/parsers/parse-3d-tile-point-cloud.js +9 -37
- package/dist/esm/lib/parsers/parse-3d-tile-point-cloud.js.map +1 -1
- package/dist/esm/lib/parsers/parse-3d-tile.js +8 -6
- package/dist/esm/lib/parsers/parse-3d-tile.js.map +1 -1
- package/dist/esm/lib/utils/version.js +2 -1
- package/dist/esm/lib/utils/version.js.map +1 -1
- package/dist/esm/tile-3d-subtree-loader.js +1 -0
- package/dist/esm/tile-3d-subtree-loader.js.map +1 -1
- package/dist/esm/tile-3d-writer.js +1 -1
- package/dist/esm/tile-3d-writer.js.map +1 -1
- package/dist/esm/tiles-3d-loader.js +1 -8
- package/dist/esm/tiles-3d-loader.js.map +1 -1
- package/dist/esm/types.js.map +1 -1
- package/dist/lib/classes/helpers/tile-3d-accessor-utils.d.ts +1 -1
- package/dist/lib/classes/tile-3d-batch-table.d.ts +1 -1
- package/package.json +7 -7
package/dist/dist.min.js
CHANGED
|
@@ -17,16 +17,16 @@
|
|
|
17
17
|
for (var name10 in all)
|
|
18
18
|
__defProp(target, name10, { get: all[name10], 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
|
|
@@ -941,6 +941,37 @@
|
|
|
941
941
|
}
|
|
942
942
|
});
|
|
943
943
|
|
|
944
|
+
// ../../node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js
|
|
945
|
+
var init_hi_res_timestamp = __esm({
|
|
946
|
+
"../../node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js"() {
|
|
947
|
+
}
|
|
948
|
+
});
|
|
949
|
+
|
|
950
|
+
// ../../node_modules/@probe.gl/stats/dist/esm/lib/stat.js
|
|
951
|
+
var init_stat = __esm({
|
|
952
|
+
"../../node_modules/@probe.gl/stats/dist/esm/lib/stat.js"() {
|
|
953
|
+
init_defineProperty();
|
|
954
|
+
init_hi_res_timestamp();
|
|
955
|
+
}
|
|
956
|
+
});
|
|
957
|
+
|
|
958
|
+
// ../../node_modules/@probe.gl/stats/dist/esm/lib/stats.js
|
|
959
|
+
var init_stats = __esm({
|
|
960
|
+
"../../node_modules/@probe.gl/stats/dist/esm/lib/stats.js"() {
|
|
961
|
+
init_defineProperty();
|
|
962
|
+
init_stat();
|
|
963
|
+
}
|
|
964
|
+
});
|
|
965
|
+
|
|
966
|
+
// ../../node_modules/@probe.gl/stats/dist/esm/index.js
|
|
967
|
+
var init_esm = __esm({
|
|
968
|
+
"../../node_modules/@probe.gl/stats/dist/esm/index.js"() {
|
|
969
|
+
init_stats();
|
|
970
|
+
init_stat();
|
|
971
|
+
init_hi_res_timestamp();
|
|
972
|
+
}
|
|
973
|
+
});
|
|
974
|
+
|
|
944
975
|
// ../loader-utils/src/lib/path-utils/file-aliases.ts
|
|
945
976
|
function resolvePath(filename2) {
|
|
946
977
|
for (const alias in fileAliases) {
|
|
@@ -1024,11 +1055,8 @@
|
|
|
1024
1055
|
});
|
|
1025
1056
|
|
|
1026
1057
|
// ../../node_modules/@math.gl/core/dist/esm/lib/common.js
|
|
1027
|
-
function round(value) {
|
|
1028
|
-
return Math.round(value / config.EPSILON) * config.EPSILON;
|
|
1029
|
-
}
|
|
1030
1058
|
function formatValue(value, {
|
|
1031
|
-
precision = config.precision
|
|
1059
|
+
precision = config.precision
|
|
1032
1060
|
} = {}) {
|
|
1033
1061
|
value = round(value);
|
|
1034
1062
|
return "".concat(parseFloat(value.toPrecision(precision)));
|
|
@@ -1036,19 +1064,6 @@
|
|
|
1036
1064
|
function isArray(value) {
|
|
1037
1065
|
return Array.isArray(value) || ArrayBuffer.isView(value) && !(value instanceof DataView);
|
|
1038
1066
|
}
|
|
1039
|
-
function duplicateArray(array) {
|
|
1040
|
-
return array.clone ? array.clone() : new Array(array.length);
|
|
1041
|
-
}
|
|
1042
|
-
function map(value, func, result) {
|
|
1043
|
-
if (isArray(value)) {
|
|
1044
|
-
result = result || duplicateArray(value);
|
|
1045
|
-
for (let i2 = 0; i2 < result.length && i2 < value.length; ++i2) {
|
|
1046
|
-
result[i2] = func(value[i2], i2, result);
|
|
1047
|
-
}
|
|
1048
|
-
return result;
|
|
1049
|
-
}
|
|
1050
|
-
return func(value);
|
|
1051
|
-
}
|
|
1052
1067
|
function toRadians(degrees2) {
|
|
1053
1068
|
return radians(degrees2);
|
|
1054
1069
|
}
|
|
@@ -1090,7 +1105,7 @@
|
|
|
1090
1105
|
if (b && b.equals) {
|
|
1091
1106
|
return b.equals(a2);
|
|
1092
1107
|
}
|
|
1093
|
-
if (
|
|
1108
|
+
if (typeof a2 === "number" && typeof b === "number") {
|
|
1094
1109
|
return Math.abs(a2 - b) <= config.EPSILON * Math.max(1, Math.abs(a2), Math.abs(b));
|
|
1095
1110
|
}
|
|
1096
1111
|
return false;
|
|
@@ -1098,18 +1113,36 @@
|
|
|
1098
1113
|
config.EPSILON = oldEpsilon;
|
|
1099
1114
|
}
|
|
1100
1115
|
}
|
|
1116
|
+
function round(value) {
|
|
1117
|
+
return Math.round(value / config.EPSILON) * config.EPSILON;
|
|
1118
|
+
}
|
|
1119
|
+
function duplicateArray(array) {
|
|
1120
|
+
return array.clone ? array.clone() : new Array(array.length);
|
|
1121
|
+
}
|
|
1122
|
+
function map(value, func, result) {
|
|
1123
|
+
if (isArray(value)) {
|
|
1124
|
+
const array = value;
|
|
1125
|
+
result = result || duplicateArray(array);
|
|
1126
|
+
for (let i2 = 0; i2 < result.length && i2 < array.length; ++i2) {
|
|
1127
|
+
result[i2] = func(value[i2], i2, result);
|
|
1128
|
+
}
|
|
1129
|
+
return result;
|
|
1130
|
+
}
|
|
1131
|
+
return func(value);
|
|
1132
|
+
}
|
|
1101
1133
|
var RADIANS_TO_DEGREES, DEGREES_TO_RADIANS, config;
|
|
1102
1134
|
var init_common = __esm({
|
|
1103
1135
|
"../../node_modules/@math.gl/core/dist/esm/lib/common.js"() {
|
|
1104
1136
|
RADIANS_TO_DEGREES = 1 / Math.PI * 180;
|
|
1105
1137
|
DEGREES_TO_RADIANS = 1 / 180 * Math.PI;
|
|
1106
|
-
config = {
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1138
|
+
config = {
|
|
1139
|
+
EPSILON: 1e-12,
|
|
1140
|
+
debug: false,
|
|
1141
|
+
precision: 4,
|
|
1142
|
+
printTypes: false,
|
|
1143
|
+
printDegrees: false,
|
|
1144
|
+
printRowMajor: true
|
|
1145
|
+
};
|
|
1113
1146
|
}
|
|
1114
1147
|
});
|
|
1115
1148
|
|
|
@@ -1139,24 +1172,25 @@
|
|
|
1139
1172
|
var init_math_array = __esm({
|
|
1140
1173
|
"../../node_modules/@math.gl/core/dist/esm/classes/base/math-array.js"() {
|
|
1141
1174
|
init_common();
|
|
1142
|
-
init_assert3();
|
|
1143
1175
|
MathArray = class extends _extendableBuiltin(Array) {
|
|
1144
|
-
get ELEMENTS() {
|
|
1145
|
-
assert4(false);
|
|
1146
|
-
return 0;
|
|
1147
|
-
}
|
|
1148
1176
|
clone() {
|
|
1149
1177
|
return new this.constructor().copy(this);
|
|
1150
1178
|
}
|
|
1151
|
-
from(arrayOrObject) {
|
|
1152
|
-
return Array.isArray(arrayOrObject) ? this.copy(arrayOrObject) : this.fromObject(arrayOrObject);
|
|
1153
|
-
}
|
|
1154
1179
|
fromArray(array, offset = 0) {
|
|
1155
1180
|
for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
|
|
1156
1181
|
this[i2] = array[i2 + offset];
|
|
1157
1182
|
}
|
|
1158
1183
|
return this.check();
|
|
1159
1184
|
}
|
|
1185
|
+
toArray(targetArray = [], offset = 0) {
|
|
1186
|
+
for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
|
|
1187
|
+
targetArray[offset + i2] = this[i2];
|
|
1188
|
+
}
|
|
1189
|
+
return targetArray;
|
|
1190
|
+
}
|
|
1191
|
+
from(arrayOrObject) {
|
|
1192
|
+
return Array.isArray(arrayOrObject) ? this.copy(arrayOrObject) : this.fromObject(arrayOrObject);
|
|
1193
|
+
}
|
|
1160
1194
|
to(arrayOrObject) {
|
|
1161
1195
|
if (arrayOrObject === this) {
|
|
1162
1196
|
return this;
|
|
@@ -1166,12 +1200,6 @@
|
|
|
1166
1200
|
toTarget(target) {
|
|
1167
1201
|
return target ? this.to(target) : this;
|
|
1168
1202
|
}
|
|
1169
|
-
toArray(array = [], offset = 0) {
|
|
1170
|
-
for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
|
|
1171
|
-
array[offset + i2] = this[i2];
|
|
1172
|
-
}
|
|
1173
|
-
return array;
|
|
1174
|
-
}
|
|
1175
1203
|
toFloat32Array() {
|
|
1176
1204
|
return new Float32Array(this);
|
|
1177
1205
|
}
|
|
@@ -1215,9 +1243,7 @@
|
|
|
1215
1243
|
}
|
|
1216
1244
|
lerp(a2, b, t2) {
|
|
1217
1245
|
if (t2 === void 0) {
|
|
1218
|
-
|
|
1219
|
-
b = a2;
|
|
1220
|
-
a2 = this;
|
|
1246
|
+
return this.lerp(this, a2, b);
|
|
1221
1247
|
}
|
|
1222
1248
|
for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
|
|
1223
1249
|
const ai = a2[i2];
|
|
@@ -1260,14 +1286,36 @@
|
|
|
1260
1286
|
return this.check();
|
|
1261
1287
|
}
|
|
1262
1288
|
scale(scale5) {
|
|
1263
|
-
if (
|
|
1264
|
-
|
|
1289
|
+
if (typeof scale5 === "number") {
|
|
1290
|
+
for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
|
|
1291
|
+
this[i2] *= scale5;
|
|
1292
|
+
}
|
|
1293
|
+
} else {
|
|
1294
|
+
for (let i2 = 0; i2 < this.ELEMENTS && i2 < scale5.length; ++i2) {
|
|
1295
|
+
this[i2] *= scale5[i2];
|
|
1296
|
+
}
|
|
1265
1297
|
}
|
|
1298
|
+
return this.check();
|
|
1299
|
+
}
|
|
1300
|
+
multiplyByScalar(scalar) {
|
|
1266
1301
|
for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
|
|
1267
|
-
this[i2] *=
|
|
1302
|
+
this[i2] *= scalar;
|
|
1268
1303
|
}
|
|
1269
1304
|
return this.check();
|
|
1270
1305
|
}
|
|
1306
|
+
check() {
|
|
1307
|
+
if (config.debug && !this.validate()) {
|
|
1308
|
+
throw new Error("math.gl: ".concat(this.constructor.name, " some fields set to invalid numbers'"));
|
|
1309
|
+
}
|
|
1310
|
+
return this;
|
|
1311
|
+
}
|
|
1312
|
+
validate() {
|
|
1313
|
+
let valid = this.length === this.ELEMENTS;
|
|
1314
|
+
for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
|
|
1315
|
+
valid = valid && Number.isFinite(this[i2]);
|
|
1316
|
+
}
|
|
1317
|
+
return valid;
|
|
1318
|
+
}
|
|
1271
1319
|
sub(a2) {
|
|
1272
1320
|
return this.subtract(a2);
|
|
1273
1321
|
}
|
|
@@ -1293,7 +1341,7 @@
|
|
|
1293
1341
|
return this.check();
|
|
1294
1342
|
}
|
|
1295
1343
|
divideScalar(a2) {
|
|
1296
|
-
return this.
|
|
1344
|
+
return this.multiplyByScalar(1 / a2);
|
|
1297
1345
|
}
|
|
1298
1346
|
clampScalar(min, max) {
|
|
1299
1347
|
for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
|
|
@@ -1301,25 +1349,9 @@
|
|
|
1301
1349
|
}
|
|
1302
1350
|
return this.check();
|
|
1303
1351
|
}
|
|
1304
|
-
multiplyByScalar(scalar) {
|
|
1305
|
-
return this.scale(scalar);
|
|
1306
|
-
}
|
|
1307
1352
|
get elements() {
|
|
1308
1353
|
return this;
|
|
1309
1354
|
}
|
|
1310
|
-
check() {
|
|
1311
|
-
if (config.debug && !this.validate()) {
|
|
1312
|
-
throw new Error("math.gl: ".concat(this.constructor.name, " some fields set to invalid numbers'"));
|
|
1313
|
-
}
|
|
1314
|
-
return this;
|
|
1315
|
-
}
|
|
1316
|
-
validate() {
|
|
1317
|
-
let valid = this.length === this.ELEMENTS;
|
|
1318
|
-
for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
|
|
1319
|
-
valid = valid && Number.isFinite(this[i2]);
|
|
1320
|
-
}
|
|
1321
|
-
return valid;
|
|
1322
|
-
}
|
|
1323
1355
|
};
|
|
1324
1356
|
}
|
|
1325
1357
|
});
|
|
@@ -1348,17 +1380,9 @@
|
|
|
1348
1380
|
}
|
|
1349
1381
|
return v;
|
|
1350
1382
|
}
|
|
1351
|
-
function deprecated(method, version) {
|
|
1352
|
-
if (!map2[method]) {
|
|
1353
|
-
map2[method] = true;
|
|
1354
|
-
console.warn("".concat(method, " has been removed in version ").concat(version, ", see upgrade guide for more information"));
|
|
1355
|
-
}
|
|
1356
|
-
}
|
|
1357
|
-
var map2;
|
|
1358
1383
|
var init_validators = __esm({
|
|
1359
1384
|
"../../node_modules/@math.gl/core/dist/esm/lib/validators.js"() {
|
|
1360
1385
|
init_common();
|
|
1361
|
-
map2 = {};
|
|
1362
1386
|
}
|
|
1363
1387
|
});
|
|
1364
1388
|
|
|
@@ -1370,14 +1394,6 @@
|
|
|
1370
1394
|
init_validators();
|
|
1371
1395
|
init_assert3();
|
|
1372
1396
|
Vector = class extends MathArray {
|
|
1373
|
-
get ELEMENTS() {
|
|
1374
|
-
assert4(false);
|
|
1375
|
-
return 0;
|
|
1376
|
-
}
|
|
1377
|
-
copy(vector) {
|
|
1378
|
-
assert4(false);
|
|
1379
|
-
return this;
|
|
1380
|
-
}
|
|
1381
1397
|
get x() {
|
|
1382
1398
|
return this[0];
|
|
1383
1399
|
}
|
|
@@ -1594,6 +1610,15 @@
|
|
|
1594
1610
|
out[2] = a2[2];
|
|
1595
1611
|
return out;
|
|
1596
1612
|
}
|
|
1613
|
+
function vec4_transformMat2(out, a2, m) {
|
|
1614
|
+
const x = a2[0];
|
|
1615
|
+
const y = a2[1];
|
|
1616
|
+
out[0] = m[0] * x + m[2] * y;
|
|
1617
|
+
out[1] = m[1] * x + m[3] * y;
|
|
1618
|
+
out[2] = a2[2];
|
|
1619
|
+
out[3] = a2[3];
|
|
1620
|
+
return out;
|
|
1621
|
+
}
|
|
1597
1622
|
function vec4_transformMat3(out, a2, m) {
|
|
1598
1623
|
const x = a2[0];
|
|
1599
1624
|
const y = a2[1];
|
|
@@ -1851,7 +1876,7 @@
|
|
|
1851
1876
|
});
|
|
1852
1877
|
|
|
1853
1878
|
// ../../node_modules/@math.gl/core/dist/esm/classes/vector3.js
|
|
1854
|
-
var ORIGIN,
|
|
1879
|
+
var ORIGIN, ZERO, Vector3;
|
|
1855
1880
|
var init_vector3 = __esm({
|
|
1856
1881
|
"../../node_modules/@math.gl/core/dist/esm/classes/vector3.js"() {
|
|
1857
1882
|
init_vector();
|
|
@@ -1860,10 +1885,13 @@
|
|
|
1860
1885
|
init_vec3();
|
|
1861
1886
|
init_gl_matrix_extras();
|
|
1862
1887
|
ORIGIN = [0, 0, 0];
|
|
1863
|
-
constants = {};
|
|
1864
1888
|
Vector3 = class extends Vector {
|
|
1865
1889
|
static get ZERO() {
|
|
1866
|
-
|
|
1890
|
+
if (!ZERO) {
|
|
1891
|
+
ZERO = new Vector3(0, 0, 0);
|
|
1892
|
+
Object.freeze(ZERO);
|
|
1893
|
+
}
|
|
1894
|
+
return ZERO;
|
|
1867
1895
|
}
|
|
1868
1896
|
constructor(x = 0, y = 0, z = 0) {
|
|
1869
1897
|
super(-0, -0, -0);
|
|
@@ -1973,6 +2001,113 @@
|
|
|
1973
2001
|
}
|
|
1974
2002
|
});
|
|
1975
2003
|
|
|
2004
|
+
// ../../node_modules/@math.gl/core/dist/esm/classes/vector4.js
|
|
2005
|
+
var ZERO2, Vector4;
|
|
2006
|
+
var init_vector4 = __esm({
|
|
2007
|
+
"../../node_modules/@math.gl/core/dist/esm/classes/vector4.js"() {
|
|
2008
|
+
init_vector();
|
|
2009
|
+
init_common();
|
|
2010
|
+
init_validators();
|
|
2011
|
+
init_vec3();
|
|
2012
|
+
init_gl_matrix_extras();
|
|
2013
|
+
Vector4 = class extends Vector {
|
|
2014
|
+
static get ZERO() {
|
|
2015
|
+
if (!ZERO2) {
|
|
2016
|
+
ZERO2 = new Vector4(0, 0, 0, 0);
|
|
2017
|
+
Object.freeze(ZERO2);
|
|
2018
|
+
}
|
|
2019
|
+
return ZERO2;
|
|
2020
|
+
}
|
|
2021
|
+
constructor(x = 0, y = 0, z = 0, w = 0) {
|
|
2022
|
+
super(-0, -0, -0, -0);
|
|
2023
|
+
if (isArray(x) && arguments.length === 1) {
|
|
2024
|
+
this.copy(x);
|
|
2025
|
+
} else {
|
|
2026
|
+
if (config.debug) {
|
|
2027
|
+
checkNumber(x);
|
|
2028
|
+
checkNumber(y);
|
|
2029
|
+
checkNumber(z);
|
|
2030
|
+
checkNumber(w);
|
|
2031
|
+
}
|
|
2032
|
+
this[0] = x;
|
|
2033
|
+
this[1] = y;
|
|
2034
|
+
this[2] = z;
|
|
2035
|
+
this[3] = w;
|
|
2036
|
+
}
|
|
2037
|
+
}
|
|
2038
|
+
set(x, y, z, w) {
|
|
2039
|
+
this[0] = x;
|
|
2040
|
+
this[1] = y;
|
|
2041
|
+
this[2] = z;
|
|
2042
|
+
this[3] = w;
|
|
2043
|
+
return this.check();
|
|
2044
|
+
}
|
|
2045
|
+
copy(array) {
|
|
2046
|
+
this[0] = array[0];
|
|
2047
|
+
this[1] = array[1];
|
|
2048
|
+
this[2] = array[2];
|
|
2049
|
+
this[3] = array[3];
|
|
2050
|
+
return this.check();
|
|
2051
|
+
}
|
|
2052
|
+
fromObject(object) {
|
|
2053
|
+
if (config.debug) {
|
|
2054
|
+
checkNumber(object.x);
|
|
2055
|
+
checkNumber(object.y);
|
|
2056
|
+
checkNumber(object.z);
|
|
2057
|
+
checkNumber(object.w);
|
|
2058
|
+
}
|
|
2059
|
+
this[0] = object.x;
|
|
2060
|
+
this[1] = object.y;
|
|
2061
|
+
this[2] = object.z;
|
|
2062
|
+
this[3] = object.w;
|
|
2063
|
+
return this;
|
|
2064
|
+
}
|
|
2065
|
+
toObject(object) {
|
|
2066
|
+
object.x = this[0];
|
|
2067
|
+
object.y = this[1];
|
|
2068
|
+
object.z = this[2];
|
|
2069
|
+
object.w = this[3];
|
|
2070
|
+
return object;
|
|
2071
|
+
}
|
|
2072
|
+
get ELEMENTS() {
|
|
2073
|
+
return 4;
|
|
2074
|
+
}
|
|
2075
|
+
get z() {
|
|
2076
|
+
return this[2];
|
|
2077
|
+
}
|
|
2078
|
+
set z(value) {
|
|
2079
|
+
this[2] = checkNumber(value);
|
|
2080
|
+
}
|
|
2081
|
+
get w() {
|
|
2082
|
+
return this[3];
|
|
2083
|
+
}
|
|
2084
|
+
set w(value) {
|
|
2085
|
+
this[3] = checkNumber(value);
|
|
2086
|
+
}
|
|
2087
|
+
transform(matrix4) {
|
|
2088
|
+
transformMat42(this, this, matrix4);
|
|
2089
|
+
return this.check();
|
|
2090
|
+
}
|
|
2091
|
+
transformByMatrix3(matrix3) {
|
|
2092
|
+
vec4_transformMat3(this, this, matrix3);
|
|
2093
|
+
return this.check();
|
|
2094
|
+
}
|
|
2095
|
+
transformByMatrix2(matrix2) {
|
|
2096
|
+
vec4_transformMat2(this, this, matrix2);
|
|
2097
|
+
return this.check();
|
|
2098
|
+
}
|
|
2099
|
+
transformByQuaternion(quaternion) {
|
|
2100
|
+
transformQuat(this, this, quaternion);
|
|
2101
|
+
return this.check();
|
|
2102
|
+
}
|
|
2103
|
+
applyMatrix4(m) {
|
|
2104
|
+
m.transform(this, this);
|
|
2105
|
+
return this;
|
|
2106
|
+
}
|
|
2107
|
+
};
|
|
2108
|
+
}
|
|
2109
|
+
});
|
|
2110
|
+
|
|
1976
2111
|
// ../../node_modules/@math.gl/core/dist/esm/classes/base/matrix.js
|
|
1977
2112
|
var Matrix;
|
|
1978
2113
|
var init_matrix = __esm({
|
|
@@ -1980,16 +2115,7 @@
|
|
|
1980
2115
|
init_math_array();
|
|
1981
2116
|
init_validators();
|
|
1982
2117
|
init_common();
|
|
1983
|
-
init_assert3();
|
|
1984
2118
|
Matrix = class extends MathArray {
|
|
1985
|
-
get ELEMENTS() {
|
|
1986
|
-
assert4(false);
|
|
1987
|
-
return 0;
|
|
1988
|
-
}
|
|
1989
|
-
get RANK() {
|
|
1990
|
-
assert4(false);
|
|
1991
|
-
return 0;
|
|
1992
|
-
}
|
|
1993
2119
|
toString() {
|
|
1994
2120
|
let string = "[";
|
|
1995
2121
|
if (config.printRowMajor) {
|
|
@@ -2192,7 +2318,21 @@
|
|
|
2192
2318
|
});
|
|
2193
2319
|
|
|
2194
2320
|
// ../../node_modules/@math.gl/core/dist/esm/classes/matrix3.js
|
|
2195
|
-
|
|
2321
|
+
function getZeroMatrix() {
|
|
2322
|
+
if (!ZERO_MATRIX3) {
|
|
2323
|
+
ZERO_MATRIX3 = new Matrix3([0, 0, 0, 0, 0, 0, 0, 0, 0]);
|
|
2324
|
+
Object.freeze(ZERO_MATRIX3);
|
|
2325
|
+
}
|
|
2326
|
+
return ZERO_MATRIX3;
|
|
2327
|
+
}
|
|
2328
|
+
function getIdentityMatrix() {
|
|
2329
|
+
if (!IDENTITY_MATRIX3) {
|
|
2330
|
+
IDENTITY_MATRIX3 = new Matrix3();
|
|
2331
|
+
Object.freeze(IDENTITY_MATRIX3);
|
|
2332
|
+
}
|
|
2333
|
+
return IDENTITY_MATRIX3;
|
|
2334
|
+
}
|
|
2335
|
+
var INDICES, IDENTITY_MATRIX, Matrix3, ZERO_MATRIX3, IDENTITY_MATRIX3;
|
|
2196
2336
|
var init_matrix3 = __esm({
|
|
2197
2337
|
"../../node_modules/@math.gl/core/dist/esm/classes/matrix3.js"() {
|
|
2198
2338
|
init_matrix();
|
|
@@ -2201,28 +2341,24 @@
|
|
|
2201
2341
|
init_mat3();
|
|
2202
2342
|
init_vec2();
|
|
2203
2343
|
init_vec3();
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
});
|
|
2217
|
-
constants2 = {};
|
|
2344
|
+
(function(INDICES3) {
|
|
2345
|
+
INDICES3[INDICES3["COL0ROW0"] = 0] = "COL0ROW0";
|
|
2346
|
+
INDICES3[INDICES3["COL0ROW1"] = 1] = "COL0ROW1";
|
|
2347
|
+
INDICES3[INDICES3["COL0ROW2"] = 2] = "COL0ROW2";
|
|
2348
|
+
INDICES3[INDICES3["COL1ROW0"] = 3] = "COL1ROW0";
|
|
2349
|
+
INDICES3[INDICES3["COL1ROW1"] = 4] = "COL1ROW1";
|
|
2350
|
+
INDICES3[INDICES3["COL1ROW2"] = 5] = "COL1ROW2";
|
|
2351
|
+
INDICES3[INDICES3["COL2ROW0"] = 6] = "COL2ROW0";
|
|
2352
|
+
INDICES3[INDICES3["COL2ROW1"] = 7] = "COL2ROW1";
|
|
2353
|
+
INDICES3[INDICES3["COL2ROW2"] = 8] = "COL2ROW2";
|
|
2354
|
+
})(INDICES || (INDICES = {}));
|
|
2355
|
+
IDENTITY_MATRIX = Object.freeze([1, 0, 0, 0, 1, 0, 0, 0, 1]);
|
|
2218
2356
|
Matrix3 = class extends Matrix {
|
|
2219
2357
|
static get IDENTITY() {
|
|
2220
|
-
|
|
2221
|
-
return constants2.IDENTITY;
|
|
2358
|
+
return getIdentityMatrix();
|
|
2222
2359
|
}
|
|
2223
2360
|
static get ZERO() {
|
|
2224
|
-
|
|
2225
|
-
return constants2.ZERO;
|
|
2361
|
+
return getZeroMatrix();
|
|
2226
2362
|
}
|
|
2227
2363
|
get ELEMENTS() {
|
|
2228
2364
|
return 9;
|
|
@@ -2233,10 +2369,12 @@
|
|
|
2233
2369
|
get INDICES() {
|
|
2234
2370
|
return INDICES;
|
|
2235
2371
|
}
|
|
2236
|
-
constructor(array) {
|
|
2372
|
+
constructor(array, ...args) {
|
|
2237
2373
|
super(-0, -0, -0, -0, -0, -0, -0, -0, -0);
|
|
2238
2374
|
if (arguments.length === 1 && Array.isArray(array)) {
|
|
2239
2375
|
this.copy(array);
|
|
2376
|
+
} else if (args.length > 0) {
|
|
2377
|
+
this.copy([array, ...args]);
|
|
2240
2378
|
} else {
|
|
2241
2379
|
this.identity();
|
|
2242
2380
|
}
|
|
@@ -2253,6 +2391,16 @@
|
|
|
2253
2391
|
this[8] = array[8];
|
|
2254
2392
|
return this.check();
|
|
2255
2393
|
}
|
|
2394
|
+
identity() {
|
|
2395
|
+
return this.copy(IDENTITY_MATRIX);
|
|
2396
|
+
}
|
|
2397
|
+
fromObject(object) {
|
|
2398
|
+
return this.check();
|
|
2399
|
+
}
|
|
2400
|
+
fromQuaternion(q) {
|
|
2401
|
+
fromQuat(this, q);
|
|
2402
|
+
return this.check();
|
|
2403
|
+
}
|
|
2256
2404
|
set(m00, m10, m20, m01, m11, m21, m02, m12, m22) {
|
|
2257
2405
|
this[0] = m00;
|
|
2258
2406
|
this[1] = m10;
|
|
@@ -2280,13 +2428,6 @@
|
|
|
2280
2428
|
determinant() {
|
|
2281
2429
|
return determinant(this);
|
|
2282
2430
|
}
|
|
2283
|
-
identity() {
|
|
2284
|
-
return this.copy(IDENTITY);
|
|
2285
|
-
}
|
|
2286
|
-
fromQuaternion(q) {
|
|
2287
|
-
fromQuat(this, q);
|
|
2288
|
-
return this.check();
|
|
2289
|
-
}
|
|
2290
2431
|
transpose() {
|
|
2291
2432
|
transpose(this, this);
|
|
2292
2433
|
return this.check();
|
|
@@ -2311,7 +2452,7 @@
|
|
|
2311
2452
|
if (Array.isArray(factor)) {
|
|
2312
2453
|
scale(this, this, factor);
|
|
2313
2454
|
} else {
|
|
2314
|
-
scale(this, this, [factor, factor
|
|
2455
|
+
scale(this, this, [factor, factor]);
|
|
2315
2456
|
}
|
|
2316
2457
|
return this.check();
|
|
2317
2458
|
}
|
|
@@ -2320,32 +2461,30 @@
|
|
|
2320
2461
|
return this.check();
|
|
2321
2462
|
}
|
|
2322
2463
|
transform(vector, result) {
|
|
2464
|
+
let out;
|
|
2323
2465
|
switch (vector.length) {
|
|
2324
2466
|
case 2:
|
|
2325
|
-
|
|
2467
|
+
out = transformMat3(result || [-0, -0], vector, this);
|
|
2326
2468
|
break;
|
|
2327
2469
|
case 3:
|
|
2328
|
-
|
|
2470
|
+
out = transformMat32(result || [-0, -0, -0], vector, this);
|
|
2329
2471
|
break;
|
|
2330
2472
|
case 4:
|
|
2331
|
-
|
|
2473
|
+
out = vec4_transformMat3(result || [-0, -0, -0, -0], vector, this);
|
|
2332
2474
|
break;
|
|
2333
2475
|
default:
|
|
2334
2476
|
throw new Error("Illegal vector");
|
|
2335
2477
|
}
|
|
2336
|
-
checkVector(
|
|
2337
|
-
return
|
|
2478
|
+
checkVector(out, vector.length);
|
|
2479
|
+
return out;
|
|
2338
2480
|
}
|
|
2339
2481
|
transformVector(vector, result) {
|
|
2340
|
-
deprecated("Matrix3.transformVector");
|
|
2341
2482
|
return this.transform(vector, result);
|
|
2342
2483
|
}
|
|
2343
2484
|
transformVector2(vector, result) {
|
|
2344
|
-
deprecated("Matrix3.transformVector");
|
|
2345
2485
|
return this.transform(vector, result);
|
|
2346
2486
|
}
|
|
2347
2487
|
transformVector3(vector, result) {
|
|
2348
|
-
deprecated("Matrix3.transformVector");
|
|
2349
2488
|
return this.transform(vector, result);
|
|
2350
2489
|
}
|
|
2351
2490
|
};
|
|
@@ -2774,7 +2913,7 @@
|
|
|
2774
2913
|
out[15] = 0;
|
|
2775
2914
|
return out;
|
|
2776
2915
|
}
|
|
2777
|
-
function
|
|
2916
|
+
function perspectiveNO(out, fovy, aspect, near, far) {
|
|
2778
2917
|
var f2 = 1 / Math.tan(fovy / 2), nf;
|
|
2779
2918
|
out[0] = f2 / aspect;
|
|
2780
2919
|
out[1] = 0;
|
|
@@ -2800,7 +2939,7 @@
|
|
|
2800
2939
|
}
|
|
2801
2940
|
return out;
|
|
2802
2941
|
}
|
|
2803
|
-
function
|
|
2942
|
+
function orthoNO(out, left, right, bottom, top, near, far) {
|
|
2804
2943
|
var lr = 1 / (left - right);
|
|
2805
2944
|
var bt = 1 / (bottom - top);
|
|
2806
2945
|
var nf = 1 / (near - far);
|
|
@@ -2889,9 +3028,12 @@
|
|
|
2889
3028
|
out[15] = 1;
|
|
2890
3029
|
return out;
|
|
2891
3030
|
}
|
|
3031
|
+
var perspective, ortho;
|
|
2892
3032
|
var init_mat4 = __esm({
|
|
2893
3033
|
"../../node_modules/gl-matrix/esm/mat4.js"() {
|
|
2894
3034
|
init_common2();
|
|
3035
|
+
perspective = perspectiveNO;
|
|
3036
|
+
ortho = orthoNO;
|
|
2895
3037
|
}
|
|
2896
3038
|
});
|
|
2897
3039
|
|
|
@@ -3021,48 +3163,90 @@
|
|
|
3021
3163
|
});
|
|
3022
3164
|
|
|
3023
3165
|
// ../../node_modules/@math.gl/core/dist/esm/classes/matrix4.js
|
|
3024
|
-
|
|
3166
|
+
function getZeroMatrix2() {
|
|
3167
|
+
if (!ZERO3) {
|
|
3168
|
+
ZERO3 = new Matrix4([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
|
|
3169
|
+
Object.freeze(ZERO3);
|
|
3170
|
+
}
|
|
3171
|
+
return ZERO3;
|
|
3172
|
+
}
|
|
3173
|
+
function getIdentityMatrix2() {
|
|
3174
|
+
if (!IDENTITY) {
|
|
3175
|
+
IDENTITY = new Matrix4();
|
|
3176
|
+
Object.freeze(IDENTITY);
|
|
3177
|
+
}
|
|
3178
|
+
return IDENTITY;
|
|
3179
|
+
}
|
|
3180
|
+
function checkRadians(possiblyDegrees) {
|
|
3181
|
+
if (possiblyDegrees > Math.PI * 2) {
|
|
3182
|
+
throw Error("expected radians");
|
|
3183
|
+
}
|
|
3184
|
+
}
|
|
3185
|
+
function computeInfinitePerspectiveOffCenter(result, left, right, bottom, top, near) {
|
|
3186
|
+
const column0Row0 = 2 * near / (right - left);
|
|
3187
|
+
const column1Row1 = 2 * near / (top - bottom);
|
|
3188
|
+
const column2Row0 = (right + left) / (right - left);
|
|
3189
|
+
const column2Row1 = (top + bottom) / (top - bottom);
|
|
3190
|
+
const column2Row2 = -1;
|
|
3191
|
+
const column2Row3 = -1;
|
|
3192
|
+
const column3Row2 = -2 * near;
|
|
3193
|
+
result[0] = column0Row0;
|
|
3194
|
+
result[1] = 0;
|
|
3195
|
+
result[2] = 0;
|
|
3196
|
+
result[3] = 0;
|
|
3197
|
+
result[4] = 0;
|
|
3198
|
+
result[5] = column1Row1;
|
|
3199
|
+
result[6] = 0;
|
|
3200
|
+
result[7] = 0;
|
|
3201
|
+
result[8] = column2Row0;
|
|
3202
|
+
result[9] = column2Row1;
|
|
3203
|
+
result[10] = column2Row2;
|
|
3204
|
+
result[11] = column2Row3;
|
|
3205
|
+
result[12] = 0;
|
|
3206
|
+
result[13] = 0;
|
|
3207
|
+
result[14] = column3Row2;
|
|
3208
|
+
result[15] = 0;
|
|
3209
|
+
return result;
|
|
3210
|
+
}
|
|
3211
|
+
var INDICES2, DEFAULT_FOVY, DEFAULT_ASPECT, DEFAULT_NEAR, DEFAULT_FAR, IDENTITY_MATRIX2, Matrix4, ZERO3, IDENTITY;
|
|
3025
3212
|
var init_matrix4 = __esm({
|
|
3026
3213
|
"../../node_modules/@math.gl/core/dist/esm/classes/matrix4.js"() {
|
|
3027
|
-
init_validators();
|
|
3028
3214
|
init_matrix();
|
|
3215
|
+
init_validators();
|
|
3029
3216
|
init_gl_matrix_extras();
|
|
3030
3217
|
init_mat4();
|
|
3031
3218
|
init_vec2();
|
|
3032
3219
|
init_vec3();
|
|
3033
3220
|
init_vec4();
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3221
|
+
(function(INDICES3) {
|
|
3222
|
+
INDICES3[INDICES3["COL0ROW0"] = 0] = "COL0ROW0";
|
|
3223
|
+
INDICES3[INDICES3["COL0ROW1"] = 1] = "COL0ROW1";
|
|
3224
|
+
INDICES3[INDICES3["COL0ROW2"] = 2] = "COL0ROW2";
|
|
3225
|
+
INDICES3[INDICES3["COL0ROW3"] = 3] = "COL0ROW3";
|
|
3226
|
+
INDICES3[INDICES3["COL1ROW0"] = 4] = "COL1ROW0";
|
|
3227
|
+
INDICES3[INDICES3["COL1ROW1"] = 5] = "COL1ROW1";
|
|
3228
|
+
INDICES3[INDICES3["COL1ROW2"] = 6] = "COL1ROW2";
|
|
3229
|
+
INDICES3[INDICES3["COL1ROW3"] = 7] = "COL1ROW3";
|
|
3230
|
+
INDICES3[INDICES3["COL2ROW0"] = 8] = "COL2ROW0";
|
|
3231
|
+
INDICES3[INDICES3["COL2ROW1"] = 9] = "COL2ROW1";
|
|
3232
|
+
INDICES3[INDICES3["COL2ROW2"] = 10] = "COL2ROW2";
|
|
3233
|
+
INDICES3[INDICES3["COL2ROW3"] = 11] = "COL2ROW3";
|
|
3234
|
+
INDICES3[INDICES3["COL3ROW0"] = 12] = "COL3ROW0";
|
|
3235
|
+
INDICES3[INDICES3["COL3ROW1"] = 13] = "COL3ROW1";
|
|
3236
|
+
INDICES3[INDICES3["COL3ROW2"] = 14] = "COL3ROW2";
|
|
3237
|
+
INDICES3[INDICES3["COL3ROW3"] = 15] = "COL3ROW3";
|
|
3238
|
+
})(INDICES2 || (INDICES2 = {}));
|
|
3239
|
+
DEFAULT_FOVY = 45 * Math.PI / 180;
|
|
3240
|
+
DEFAULT_ASPECT = 1;
|
|
3241
|
+
DEFAULT_NEAR = 0.1;
|
|
3242
|
+
DEFAULT_FAR = 500;
|
|
3243
|
+
IDENTITY_MATRIX2 = Object.freeze([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);
|
|
3055
3244
|
Matrix4 = class extends Matrix {
|
|
3056
3245
|
static get IDENTITY() {
|
|
3057
|
-
|
|
3058
|
-
return constants3.IDENTITY;
|
|
3246
|
+
return getIdentityMatrix2();
|
|
3059
3247
|
}
|
|
3060
3248
|
static get ZERO() {
|
|
3061
|
-
|
|
3062
|
-
return constants3.ZERO;
|
|
3063
|
-
}
|
|
3064
|
-
get INDICES() {
|
|
3065
|
-
return INDICES2;
|
|
3249
|
+
return getZeroMatrix2();
|
|
3066
3250
|
}
|
|
3067
3251
|
get ELEMENTS() {
|
|
3068
3252
|
return 16;
|
|
@@ -3070,6 +3254,9 @@
|
|
|
3070
3254
|
get RANK() {
|
|
3071
3255
|
return 4;
|
|
3072
3256
|
}
|
|
3257
|
+
get INDICES() {
|
|
3258
|
+
return INDICES2;
|
|
3259
|
+
}
|
|
3073
3260
|
constructor(array) {
|
|
3074
3261
|
super(-0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0);
|
|
3075
3262
|
if (arguments.length === 1 && Array.isArray(array)) {
|
|
@@ -3155,91 +3342,65 @@
|
|
|
3155
3342
|
return result;
|
|
3156
3343
|
}
|
|
3157
3344
|
identity() {
|
|
3158
|
-
return this.copy(
|
|
3345
|
+
return this.copy(IDENTITY_MATRIX2);
|
|
3159
3346
|
}
|
|
3160
|
-
|
|
3161
|
-
fromQuat2(this, q);
|
|
3347
|
+
fromObject(object) {
|
|
3162
3348
|
return this.check();
|
|
3163
3349
|
}
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3350
|
+
fromQuaternion(quaternion) {
|
|
3351
|
+
fromQuat2(this, quaternion);
|
|
3352
|
+
return this.check();
|
|
3353
|
+
}
|
|
3354
|
+
frustum(view) {
|
|
3355
|
+
const {
|
|
3356
|
+
left,
|
|
3357
|
+
right,
|
|
3358
|
+
bottom,
|
|
3359
|
+
top,
|
|
3360
|
+
near = DEFAULT_NEAR,
|
|
3361
|
+
far = DEFAULT_FAR
|
|
3362
|
+
} = view;
|
|
3363
|
+
if (far === Infinity) {
|
|
3364
|
+
computeInfinitePerspectiveOffCenter(this, left, right, bottom, top, near);
|
|
3365
|
+
} else {
|
|
3175
3366
|
frustum(this, left, right, bottom, top, near, far);
|
|
3176
3367
|
}
|
|
3177
3368
|
return this.check();
|
|
3178
3369
|
}
|
|
3179
|
-
|
|
3180
|
-
const
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
const column2Row3 = -1;
|
|
3186
|
-
const column3Row2 = -2 * near;
|
|
3187
|
-
result[0] = column0Row0;
|
|
3188
|
-
result[1] = 0;
|
|
3189
|
-
result[2] = 0;
|
|
3190
|
-
result[3] = 0;
|
|
3191
|
-
result[4] = 0;
|
|
3192
|
-
result[5] = column1Row1;
|
|
3193
|
-
result[6] = 0;
|
|
3194
|
-
result[7] = 0;
|
|
3195
|
-
result[8] = column2Row0;
|
|
3196
|
-
result[9] = column2Row1;
|
|
3197
|
-
result[10] = column2Row2;
|
|
3198
|
-
result[11] = column2Row3;
|
|
3199
|
-
result[12] = 0;
|
|
3200
|
-
result[13] = 0;
|
|
3201
|
-
result[14] = column3Row2;
|
|
3202
|
-
result[15] = 0;
|
|
3203
|
-
return result;
|
|
3204
|
-
}
|
|
3205
|
-
lookAt(eye, center, up) {
|
|
3206
|
-
if (arguments.length === 1) {
|
|
3207
|
-
({
|
|
3208
|
-
eye,
|
|
3209
|
-
center,
|
|
3210
|
-
up
|
|
3211
|
-
} = eye);
|
|
3212
|
-
}
|
|
3213
|
-
center = center || [0, 0, 0];
|
|
3214
|
-
up = up || [0, 1, 0];
|
|
3370
|
+
lookAt(view) {
|
|
3371
|
+
const {
|
|
3372
|
+
eye,
|
|
3373
|
+
center = [0, 0, 0],
|
|
3374
|
+
up = [0, 1, 0]
|
|
3375
|
+
} = view;
|
|
3215
3376
|
lookAt(this, eye, center, up);
|
|
3216
3377
|
return this.check();
|
|
3217
3378
|
}
|
|
3218
|
-
ortho({
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3379
|
+
ortho(view) {
|
|
3380
|
+
const {
|
|
3381
|
+
left,
|
|
3382
|
+
right,
|
|
3383
|
+
bottom,
|
|
3384
|
+
top,
|
|
3385
|
+
near = DEFAULT_NEAR,
|
|
3386
|
+
far = DEFAULT_FAR
|
|
3387
|
+
} = view;
|
|
3226
3388
|
ortho(this, left, right, bottom, top, near, far);
|
|
3227
3389
|
return this.check();
|
|
3228
3390
|
}
|
|
3229
|
-
orthographic({
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
}
|
|
3391
|
+
orthographic(view) {
|
|
3392
|
+
const {
|
|
3393
|
+
fovy = DEFAULT_FOVY,
|
|
3394
|
+
aspect = DEFAULT_ASPECT,
|
|
3395
|
+
focalDistance = 1,
|
|
3396
|
+
near = DEFAULT_NEAR,
|
|
3397
|
+
far = DEFAULT_FAR
|
|
3398
|
+
} = view;
|
|
3399
|
+
checkRadians(fovy);
|
|
3239
3400
|
const halfY = fovy / 2;
|
|
3240
3401
|
const top = focalDistance * Math.tan(halfY);
|
|
3241
3402
|
const right = top * aspect;
|
|
3242
|
-
return
|
|
3403
|
+
return this.ortho({
|
|
3243
3404
|
left: -right,
|
|
3244
3405
|
right,
|
|
3245
3406
|
bottom: -top,
|
|
@@ -3248,17 +3409,14 @@
|
|
|
3248
3409
|
far
|
|
3249
3410
|
});
|
|
3250
3411
|
}
|
|
3251
|
-
perspective({
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
fovy
|
|
3259
|
-
if (fovy > Math.PI * 2) {
|
|
3260
|
-
throw Error("radians");
|
|
3261
|
-
}
|
|
3412
|
+
perspective(view) {
|
|
3413
|
+
const {
|
|
3414
|
+
fovy = 45 * Math.PI / 180,
|
|
3415
|
+
aspect = 1,
|
|
3416
|
+
near = 0.1,
|
|
3417
|
+
far = 500
|
|
3418
|
+
} = view;
|
|
3419
|
+
checkRadians(fovy);
|
|
3262
3420
|
perspective(this, fovy, aspect, near, far);
|
|
3263
3421
|
return this.check();
|
|
3264
3422
|
}
|
|
@@ -3277,8 +3435,10 @@
|
|
|
3277
3435
|
result[2] = this[14];
|
|
3278
3436
|
return result;
|
|
3279
3437
|
}
|
|
3280
|
-
getRotation(result
|
|
3281
|
-
|
|
3438
|
+
getRotation(result, scaleResult) {
|
|
3439
|
+
result = result || [-0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0];
|
|
3440
|
+
scaleResult = scaleResult || [-0, -0, -0];
|
|
3441
|
+
const scale5 = this.getScale(scaleResult);
|
|
3282
3442
|
const inverseScale0 = 1 / scale5[0];
|
|
3283
3443
|
const inverseScale1 = 1 / scale5[1];
|
|
3284
3444
|
const inverseScale2 = 1 / scale5[2];
|
|
@@ -3300,8 +3460,10 @@
|
|
|
3300
3460
|
result[15] = 1;
|
|
3301
3461
|
return result;
|
|
3302
3462
|
}
|
|
3303
|
-
getRotationMatrix3(result
|
|
3304
|
-
|
|
3463
|
+
getRotationMatrix3(result, scaleResult) {
|
|
3464
|
+
result = result || [-0, -0, -0, -0, -0, -0, -0, -0, -0];
|
|
3465
|
+
scaleResult = scaleResult || [-0, -0, -0];
|
|
3466
|
+
const scale5 = this.getScale(scaleResult);
|
|
3305
3467
|
const inverseScale0 = 1 / scale5[0];
|
|
3306
3468
|
const inverseScale1 = 1 / scale5[1];
|
|
3307
3469
|
const inverseScale2 = 1 / scale5[2];
|
|
@@ -3344,23 +3506,19 @@
|
|
|
3344
3506
|
rotateZ2(this, this, radians2);
|
|
3345
3507
|
return this.check();
|
|
3346
3508
|
}
|
|
3347
|
-
rotateXYZ(
|
|
3348
|
-
return this.rotateX(
|
|
3509
|
+
rotateXYZ(angleXYZ) {
|
|
3510
|
+
return this.rotateX(angleXYZ[0]).rotateY(angleXYZ[1]).rotateZ(angleXYZ[2]);
|
|
3349
3511
|
}
|
|
3350
3512
|
rotateAxis(radians2, axis) {
|
|
3351
3513
|
rotate2(this, this, radians2, axis);
|
|
3352
3514
|
return this.check();
|
|
3353
3515
|
}
|
|
3354
3516
|
scale(factor) {
|
|
3355
|
-
|
|
3356
|
-
scale2(this, this, factor);
|
|
3357
|
-
} else {
|
|
3358
|
-
scale2(this, this, [factor, factor, factor]);
|
|
3359
|
-
}
|
|
3517
|
+
scale2(this, this, Array.isArray(factor) ? factor : [factor, factor, factor]);
|
|
3360
3518
|
return this.check();
|
|
3361
3519
|
}
|
|
3362
|
-
translate(
|
|
3363
|
-
translate2(this, this,
|
|
3520
|
+
translate(vector) {
|
|
3521
|
+
translate2(this, this, vector);
|
|
3364
3522
|
return this.check();
|
|
3365
3523
|
}
|
|
3366
3524
|
transform(vector, result) {
|
|
@@ -3375,51 +3533,50 @@
|
|
|
3375
3533
|
const {
|
|
3376
3534
|
length: length4
|
|
3377
3535
|
} = vector;
|
|
3536
|
+
let out;
|
|
3378
3537
|
switch (length4) {
|
|
3379
3538
|
case 2:
|
|
3380
|
-
|
|
3539
|
+
out = transformMat4(result || [-0, -0], vector, this);
|
|
3381
3540
|
break;
|
|
3382
3541
|
case 3:
|
|
3383
|
-
|
|
3542
|
+
out = transformMat42(result || [-0, -0, -0], vector, this);
|
|
3384
3543
|
break;
|
|
3385
3544
|
default:
|
|
3386
3545
|
throw new Error("Illegal vector");
|
|
3387
3546
|
}
|
|
3388
|
-
checkVector(
|
|
3389
|
-
return
|
|
3547
|
+
checkVector(out, vector.length);
|
|
3548
|
+
return out;
|
|
3390
3549
|
}
|
|
3391
3550
|
transformAsVector(vector, result) {
|
|
3551
|
+
let out;
|
|
3392
3552
|
switch (vector.length) {
|
|
3393
3553
|
case 2:
|
|
3394
|
-
|
|
3554
|
+
out = vec2_transformMat4AsVector(result || [-0, -0], vector, this);
|
|
3395
3555
|
break;
|
|
3396
3556
|
case 3:
|
|
3397
|
-
|
|
3557
|
+
out = vec3_transformMat4AsVector(result || [-0, -0, -0], vector, this);
|
|
3398
3558
|
break;
|
|
3399
3559
|
default:
|
|
3400
3560
|
throw new Error("Illegal vector");
|
|
3401
3561
|
}
|
|
3402
|
-
checkVector(
|
|
3403
|
-
return
|
|
3404
|
-
}
|
|
3405
|
-
makeRotationX(radians2) {
|
|
3406
|
-
return this.identity().rotateX(radians2);
|
|
3407
|
-
}
|
|
3408
|
-
makeTranslation(x, y, z) {
|
|
3409
|
-
return this.identity().translate([x, y, z]);
|
|
3562
|
+
checkVector(out, vector.length);
|
|
3563
|
+
return out;
|
|
3410
3564
|
}
|
|
3411
3565
|
transformPoint(vector, result) {
|
|
3412
|
-
deprecated("Matrix4.transformPoint", "3.0");
|
|
3413
3566
|
return this.transformAsPoint(vector, result);
|
|
3414
3567
|
}
|
|
3415
3568
|
transformVector(vector, result) {
|
|
3416
|
-
deprecated("Matrix4.transformVector", "3.0");
|
|
3417
3569
|
return this.transformAsPoint(vector, result);
|
|
3418
3570
|
}
|
|
3419
3571
|
transformDirection(vector, result) {
|
|
3420
|
-
deprecated("Matrix4.transformDirection", "3.0");
|
|
3421
3572
|
return this.transformAsVector(vector, result);
|
|
3422
3573
|
}
|
|
3574
|
+
makeRotationX(radians2) {
|
|
3575
|
+
return this.identity().rotateX(radians2);
|
|
3576
|
+
}
|
|
3577
|
+
makeTranslation(x, y, z) {
|
|
3578
|
+
return this.identity().translate([x, y, z]);
|
|
3579
|
+
}
|
|
3423
3580
|
};
|
|
3424
3581
|
}
|
|
3425
3582
|
});
|
|
@@ -3646,7 +3803,7 @@
|
|
|
3646
3803
|
"../../node_modules/@math.gl/core/dist/esm/classes/quaternion.js"() {
|
|
3647
3804
|
init_math_array();
|
|
3648
3805
|
init_validators();
|
|
3649
|
-
|
|
3806
|
+
init_vector4();
|
|
3650
3807
|
init_quat();
|
|
3651
3808
|
init_vec4();
|
|
3652
3809
|
IDENTITY_QUATERNION = [0, 0, 0, 1];
|
|
@@ -3673,18 +3830,25 @@
|
|
|
3673
3830
|
this[3] = w;
|
|
3674
3831
|
return this.check();
|
|
3675
3832
|
}
|
|
3676
|
-
|
|
3677
|
-
|
|
3833
|
+
fromObject(object) {
|
|
3834
|
+
this[0] = object.x;
|
|
3835
|
+
this[1] = object.y;
|
|
3836
|
+
this[2] = object.z;
|
|
3837
|
+
this[3] = object.w;
|
|
3678
3838
|
return this.check();
|
|
3679
3839
|
}
|
|
3680
|
-
|
|
3681
|
-
|
|
3840
|
+
fromMatrix3(m) {
|
|
3841
|
+
fromMat3(this, m);
|
|
3682
3842
|
return this.check();
|
|
3683
3843
|
}
|
|
3684
3844
|
fromAxisRotation(axis, rad) {
|
|
3685
3845
|
setAxisAngle(this, axis, rad);
|
|
3686
3846
|
return this.check();
|
|
3687
3847
|
}
|
|
3848
|
+
identity() {
|
|
3849
|
+
identity2(this);
|
|
3850
|
+
return this.check();
|
|
3851
|
+
}
|
|
3688
3852
|
setAxisAngle(axis, rad) {
|
|
3689
3853
|
return this.fromAxisRotation(axis, rad);
|
|
3690
3854
|
}
|
|
@@ -3721,20 +3885,14 @@
|
|
|
3721
3885
|
lengthSquared() {
|
|
3722
3886
|
return squaredLength2(this);
|
|
3723
3887
|
}
|
|
3724
|
-
dot(a2
|
|
3725
|
-
if (b !== void 0) {
|
|
3726
|
-
throw new Error("Quaternion.dot only takes one argument");
|
|
3727
|
-
}
|
|
3888
|
+
dot(a2) {
|
|
3728
3889
|
return dot3(this, a2);
|
|
3729
3890
|
}
|
|
3730
3891
|
rotationTo(vectorA, vectorB) {
|
|
3731
3892
|
rotationTo(this, vectorA, vectorB);
|
|
3732
3893
|
return this.check();
|
|
3733
3894
|
}
|
|
3734
|
-
add(a2
|
|
3735
|
-
if (b !== void 0) {
|
|
3736
|
-
throw new Error("Quaternion.add only takes one argument");
|
|
3737
|
-
}
|
|
3895
|
+
add(a2) {
|
|
3738
3896
|
add2(this, this, a2);
|
|
3739
3897
|
return this.check();
|
|
3740
3898
|
}
|
|
@@ -3751,16 +3909,17 @@
|
|
|
3751
3909
|
return this.check();
|
|
3752
3910
|
}
|
|
3753
3911
|
lerp(a2, b, t2) {
|
|
3912
|
+
if (t2 === void 0) {
|
|
3913
|
+
return this.lerp(this, a2, b);
|
|
3914
|
+
}
|
|
3754
3915
|
lerp2(this, a2, b, t2);
|
|
3755
3916
|
return this.check();
|
|
3756
3917
|
}
|
|
3757
|
-
multiplyRight(a2
|
|
3758
|
-
assert4(!b);
|
|
3918
|
+
multiplyRight(a2) {
|
|
3759
3919
|
multiply3(this, this, a2);
|
|
3760
3920
|
return this.check();
|
|
3761
3921
|
}
|
|
3762
|
-
multiplyLeft(a2
|
|
3763
|
-
assert4(!b);
|
|
3922
|
+
multiplyLeft(a2) {
|
|
3764
3923
|
multiply3(this, a2, this);
|
|
3765
3924
|
return this.check();
|
|
3766
3925
|
}
|
|
@@ -3792,25 +3951,32 @@
|
|
|
3792
3951
|
scale4(this, this, b);
|
|
3793
3952
|
return this.check();
|
|
3794
3953
|
}
|
|
3795
|
-
slerp(
|
|
3954
|
+
slerp(arg0, arg1, arg2) {
|
|
3955
|
+
let start;
|
|
3956
|
+
let target;
|
|
3957
|
+
let ratio;
|
|
3796
3958
|
switch (arguments.length) {
|
|
3797
3959
|
case 1:
|
|
3798
3960
|
({
|
|
3799
3961
|
start = IDENTITY_QUATERNION,
|
|
3800
3962
|
target,
|
|
3801
3963
|
ratio
|
|
3802
|
-
} =
|
|
3964
|
+
} = arg0);
|
|
3803
3965
|
break;
|
|
3804
3966
|
case 2:
|
|
3805
|
-
[target, ratio] = arguments;
|
|
3806
3967
|
start = this;
|
|
3968
|
+
target = arg0;
|
|
3969
|
+
ratio = arg1;
|
|
3807
3970
|
break;
|
|
3808
3971
|
default:
|
|
3972
|
+
start = arg0;
|
|
3973
|
+
target = arg1;
|
|
3974
|
+
ratio = arg2;
|
|
3809
3975
|
}
|
|
3810
3976
|
slerp(this, start, target, ratio);
|
|
3811
3977
|
return this.check();
|
|
3812
3978
|
}
|
|
3813
|
-
transformVector4(vector, result =
|
|
3979
|
+
transformVector4(vector, result = new Vector4()) {
|
|
3814
3980
|
transformQuat2(result, vector, this);
|
|
3815
3981
|
return checkVector(result, 4);
|
|
3816
3982
|
}
|
|
@@ -3820,11 +3986,11 @@
|
|
|
3820
3986
|
setFromAxisAngle(axis, rad) {
|
|
3821
3987
|
return this.setAxisAngle(axis, rad);
|
|
3822
3988
|
}
|
|
3823
|
-
premultiply(a2
|
|
3824
|
-
return this.multiplyLeft(a2
|
|
3989
|
+
premultiply(a2) {
|
|
3990
|
+
return this.multiplyLeft(a2);
|
|
3825
3991
|
}
|
|
3826
|
-
multiply(a2
|
|
3827
|
-
return this.multiplyRight(a2
|
|
3992
|
+
multiply(a2) {
|
|
3993
|
+
return this.multiplyRight(a2);
|
|
3828
3994
|
}
|
|
3829
3995
|
};
|
|
3830
3996
|
}
|
|
@@ -3864,27 +4030,16 @@
|
|
|
3864
4030
|
});
|
|
3865
4031
|
|
|
3866
4032
|
// ../../node_modules/@math.gl/core/dist/esm/index.js
|
|
3867
|
-
var
|
|
3868
|
-
var init_esm = __esm({
|
|
4033
|
+
var init_esm2 = __esm({
|
|
3869
4034
|
"../../node_modules/@math.gl/core/dist/esm/index.js"() {
|
|
3870
|
-
init_common();
|
|
3871
4035
|
init_vector2();
|
|
3872
4036
|
init_vector3();
|
|
3873
4037
|
init_matrix3();
|
|
3874
4038
|
init_matrix4();
|
|
3875
4039
|
init_quaternion();
|
|
3876
|
-
init_common();
|
|
3877
4040
|
init_math_utils();
|
|
3878
4041
|
init_assert3();
|
|
3879
|
-
|
|
3880
|
-
self: typeof self !== "undefined" && self,
|
|
3881
|
-
window: typeof window !== "undefined" && window,
|
|
3882
|
-
global: typeof global !== "undefined" && global
|
|
3883
|
-
};
|
|
3884
|
-
global_3 = globals3.global || globals3.self || globals3.window;
|
|
3885
|
-
global_3.mathgl = {
|
|
3886
|
-
config
|
|
3887
|
-
};
|
|
4042
|
+
init_common();
|
|
3888
4043
|
}
|
|
3889
4044
|
});
|
|
3890
4045
|
|
|
@@ -3907,65 +4062,67 @@
|
|
|
3907
4062
|
});
|
|
3908
4063
|
|
|
3909
4064
|
// ../../node_modules/@math.gl/geospatial/dist/esm/type-utils.js
|
|
3910
|
-
function
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
result[
|
|
3917
|
-
result[1] = map3(cartographic.latitude);
|
|
4065
|
+
function identity3(x) {
|
|
4066
|
+
return x;
|
|
4067
|
+
}
|
|
4068
|
+
function fromCartographic(cartographic, result = [], map2 = identity3) {
|
|
4069
|
+
if ("longitude" in cartographic) {
|
|
4070
|
+
result[0] = map2(cartographic.longitude);
|
|
4071
|
+
result[1] = map2(cartographic.latitude);
|
|
3918
4072
|
result[2] = cartographic.height;
|
|
3919
|
-
} else {
|
|
3920
|
-
result[0] =
|
|
3921
|
-
result[1] =
|
|
4073
|
+
} else if ("x" in cartographic) {
|
|
4074
|
+
result[0] = map2(cartographic.x);
|
|
4075
|
+
result[1] = map2(cartographic.y);
|
|
3922
4076
|
result[2] = cartographic.z;
|
|
4077
|
+
} else {
|
|
4078
|
+
result[0] = map2(cartographic[0]);
|
|
4079
|
+
result[1] = map2(cartographic[1]);
|
|
4080
|
+
result[2] = cartographic[2];
|
|
3923
4081
|
}
|
|
3924
4082
|
return result;
|
|
3925
4083
|
}
|
|
3926
|
-
function fromCartographicToRadians(cartographic, vector =
|
|
3927
|
-
return fromCartographic(cartographic, vector, config._cartographicRadians ?
|
|
4084
|
+
function fromCartographicToRadians(cartographic, vector = []) {
|
|
4085
|
+
return fromCartographic(cartographic, vector, config._cartographicRadians ? identity3 : toRadians);
|
|
3928
4086
|
}
|
|
3929
|
-
function toCartographic(vector, cartographic,
|
|
3930
|
-
if (
|
|
3931
|
-
cartographic
|
|
3932
|
-
cartographic
|
|
3933
|
-
cartographic[2] = vector[2];
|
|
3934
|
-
} else if ("longitude" in cartographic) {
|
|
3935
|
-
cartographic.longitude = map3(vector[0]);
|
|
3936
|
-
cartographic.latitude = map3(vector[1]);
|
|
4087
|
+
function toCartographic(vector, cartographic, map2 = identity3) {
|
|
4088
|
+
if ("longitude" in cartographic) {
|
|
4089
|
+
cartographic.longitude = map2(vector[0]);
|
|
4090
|
+
cartographic.latitude = map2(vector[1]);
|
|
3937
4091
|
cartographic.height = vector[2];
|
|
3938
|
-
} else {
|
|
3939
|
-
cartographic.x =
|
|
3940
|
-
cartographic.y =
|
|
4092
|
+
} else if ("x" in cartographic) {
|
|
4093
|
+
cartographic.x = map2(vector[0]);
|
|
4094
|
+
cartographic.y = map2(vector[1]);
|
|
3941
4095
|
cartographic.z = vector[2];
|
|
4096
|
+
} else {
|
|
4097
|
+
cartographic[0] = map2(vector[0]);
|
|
4098
|
+
cartographic[1] = map2(vector[1]);
|
|
4099
|
+
cartographic[2] = vector[2];
|
|
3942
4100
|
}
|
|
3943
4101
|
return cartographic;
|
|
3944
4102
|
}
|
|
3945
4103
|
function toCartographicFromRadians(vector, cartographic) {
|
|
3946
|
-
return toCartographic(vector, cartographic, config._cartographicRadians ?
|
|
4104
|
+
return toCartographic(vector, cartographic, config._cartographicRadians ? identity3 : toDegrees);
|
|
3947
4105
|
}
|
|
3948
|
-
var
|
|
4106
|
+
var scratchVector;
|
|
3949
4107
|
var init_type_utils = __esm({
|
|
3950
4108
|
"../../node_modules/@math.gl/geospatial/dist/esm/type-utils.js"() {
|
|
3951
|
-
|
|
4109
|
+
init_esm2();
|
|
3952
4110
|
init_constants();
|
|
3953
|
-
noop = (x) => x;
|
|
3954
4111
|
scratchVector = new Vector3();
|
|
3955
4112
|
}
|
|
3956
4113
|
});
|
|
3957
4114
|
|
|
3958
4115
|
// ../../node_modules/@math.gl/geospatial/dist/esm/ellipsoid/helpers/scale-to-geodetic-surface.js
|
|
3959
|
-
function scaleToGeodeticSurface(cartesian, ellipsoid, result =
|
|
4116
|
+
function scaleToGeodeticSurface(cartesian, ellipsoid, result = []) {
|
|
3960
4117
|
const {
|
|
3961
4118
|
oneOverRadii,
|
|
3962
4119
|
oneOverRadiiSquared,
|
|
3963
4120
|
centerToleranceSquared
|
|
3964
4121
|
} = ellipsoid;
|
|
3965
4122
|
scratchVector2.from(cartesian);
|
|
3966
|
-
const positionX =
|
|
3967
|
-
const positionY =
|
|
3968
|
-
const positionZ =
|
|
4123
|
+
const positionX = scratchVector2.x;
|
|
4124
|
+
const positionY = scratchVector2.y;
|
|
4125
|
+
const positionZ = scratchVector2.z;
|
|
3969
4126
|
const oneOverRadiiX = oneOverRadii.x;
|
|
3970
4127
|
const oneOverRadiiY = oneOverRadii.y;
|
|
3971
4128
|
const oneOverRadiiZ = oneOverRadii.z;
|
|
@@ -3987,7 +4144,7 @@
|
|
|
3987
4144
|
const oneOverRadiiSquaredZ = oneOverRadiiSquared.z;
|
|
3988
4145
|
const gradient = scaleToGeodeticSurfaceGradient;
|
|
3989
4146
|
gradient.set(intersection.x * oneOverRadiiSquaredX * 2, intersection.y * oneOverRadiiSquaredY * 2, intersection.z * oneOverRadiiSquaredZ * 2);
|
|
3990
|
-
let lambda = (1 - ratio) *
|
|
4147
|
+
let lambda = (1 - ratio) * scratchVector2.len() / (0.5 * gradient.len());
|
|
3991
4148
|
let correction = 0;
|
|
3992
4149
|
let xMultiplier;
|
|
3993
4150
|
let yMultiplier;
|
|
@@ -4014,7 +4171,7 @@
|
|
|
4014
4171
|
var scratchVector2, scaleToGeodeticSurfaceIntersection, scaleToGeodeticSurfaceGradient;
|
|
4015
4172
|
var init_scale_to_geodetic_surface = __esm({
|
|
4016
4173
|
"../../node_modules/@math.gl/geospatial/dist/esm/ellipsoid/helpers/scale-to-geodetic-surface.js"() {
|
|
4017
|
-
|
|
4174
|
+
init_esm2();
|
|
4018
4175
|
scratchVector2 = new Vector3();
|
|
4019
4176
|
scaleToGeodeticSurfaceIntersection = new Vector3();
|
|
4020
4177
|
scaleToGeodeticSurfaceGradient = new Vector3();
|
|
@@ -4086,7 +4243,7 @@
|
|
|
4086
4243
|
var EPSILON14, scratchOrigin, VECTOR_PRODUCT_LOCAL_FRAME, degeneratePositionLocalFrame, scratchAxisVectors, scratchVector1, scratchVector22, scratchVector3;
|
|
4087
4244
|
var init_ellipsoid_transform = __esm({
|
|
4088
4245
|
"../../node_modules/@math.gl/geospatial/dist/esm/ellipsoid/helpers/ellipsoid-transform.js"() {
|
|
4089
|
-
|
|
4246
|
+
init_esm2();
|
|
4090
4247
|
EPSILON14 = 1e-14;
|
|
4091
4248
|
scratchOrigin = new Vector3();
|
|
4092
4249
|
VECTOR_PRODUCT_LOCAL_FRAME = {
|
|
@@ -4150,10 +4307,11 @@
|
|
|
4150
4307
|
});
|
|
4151
4308
|
|
|
4152
4309
|
// ../../node_modules/@math.gl/geospatial/dist/esm/ellipsoid/ellipsoid.js
|
|
4153
|
-
var scratchVector4, scratchNormal, scratchK, scratchPosition, scratchHeight, scratchCartesian,
|
|
4310
|
+
var scratchVector4, scratchNormal, scratchK, scratchPosition, scratchHeight, scratchCartesian, Ellipsoid;
|
|
4154
4311
|
var init_ellipsoid = __esm({
|
|
4155
4312
|
"../../node_modules/@math.gl/geospatial/dist/esm/ellipsoid/ellipsoid.js"() {
|
|
4156
|
-
|
|
4313
|
+
init_defineProperty();
|
|
4314
|
+
init_esm2();
|
|
4157
4315
|
init_vec3();
|
|
4158
4316
|
init_constants();
|
|
4159
4317
|
init_type_utils();
|
|
@@ -4166,11 +4324,16 @@
|
|
|
4166
4324
|
scratchHeight = new Vector3();
|
|
4167
4325
|
scratchCartesian = new Vector3();
|
|
4168
4326
|
Ellipsoid = class {
|
|
4169
|
-
static get WGS84() {
|
|
4170
|
-
wgs84 = wgs84 || new Ellipsoid(WGS84_RADIUS_X, WGS84_RADIUS_Y, WGS84_RADIUS_Z);
|
|
4171
|
-
return wgs84;
|
|
4172
|
-
}
|
|
4173
4327
|
constructor(x = 0, y = 0, z = 0) {
|
|
4328
|
+
_defineProperty(this, "radii", void 0);
|
|
4329
|
+
_defineProperty(this, "radiiSquared", void 0);
|
|
4330
|
+
_defineProperty(this, "radiiToTheFourth", void 0);
|
|
4331
|
+
_defineProperty(this, "oneOverRadii", void 0);
|
|
4332
|
+
_defineProperty(this, "oneOverRadiiSquared", void 0);
|
|
4333
|
+
_defineProperty(this, "minimumRadius", void 0);
|
|
4334
|
+
_defineProperty(this, "maximumRadius", void 0);
|
|
4335
|
+
_defineProperty(this, "centerToleranceSquared", math_utils_default.EPSILON1);
|
|
4336
|
+
_defineProperty(this, "squaredXOverSquaredZ", void 0);
|
|
4174
4337
|
assert4(x >= 0);
|
|
4175
4338
|
assert4(y >= 0);
|
|
4176
4339
|
assert4(z >= 0);
|
|
@@ -4181,7 +4344,6 @@
|
|
|
4181
4344
|
this.oneOverRadiiSquared = new Vector3(x === 0 ? 0 : 1 / (x * x), y === 0 ? 0 : 1 / (y * y), z === 0 ? 0 : 1 / (z * z));
|
|
4182
4345
|
this.minimumRadius = Math.min(x, y, z);
|
|
4183
4346
|
this.maximumRadius = Math.max(x, y, z);
|
|
4184
|
-
this.centerToleranceSquared = math_utils_default.EPSILON1;
|
|
4185
4347
|
if (this.radiiSquared.z !== 0) {
|
|
4186
4348
|
this.squaredXOverSquaredZ = this.radiiSquared.x / this.radiiSquared.z;
|
|
4187
4349
|
}
|
|
@@ -4268,11 +4430,12 @@
|
|
|
4268
4430
|
return scratchPosition.set(0, 0, z).to(result);
|
|
4269
4431
|
}
|
|
4270
4432
|
};
|
|
4433
|
+
_defineProperty(Ellipsoid, "WGS84", new Ellipsoid(WGS84_RADIUS_X, WGS84_RADIUS_Y, WGS84_RADIUS_Z));
|
|
4271
4434
|
}
|
|
4272
4435
|
});
|
|
4273
4436
|
|
|
4274
4437
|
// ../../node_modules/@math.gl/geospatial/dist/esm/index.js
|
|
4275
|
-
var
|
|
4438
|
+
var init_esm3 = __esm({
|
|
4276
4439
|
"../../node_modules/@math.gl/geospatial/dist/esm/index.js"() {
|
|
4277
4440
|
init_ellipsoid();
|
|
4278
4441
|
init_type_utils();
|
|
@@ -4477,7 +4640,7 @@
|
|
|
4477
4640
|
}
|
|
4478
4641
|
});
|
|
4479
4642
|
|
|
4480
|
-
// ../../node_modules
|
|
4643
|
+
// ../../node_modules/@probe.gl/env/dist/esm/lib/is-electron.js
|
|
4481
4644
|
function isElectron(mockUserAgent) {
|
|
4482
4645
|
if (typeof window !== "undefined" && typeof window.process === "object" && window.process.type === "renderer") {
|
|
4483
4646
|
return true;
|
|
@@ -4493,52 +4656,59 @@
|
|
|
4493
4656
|
return false;
|
|
4494
4657
|
}
|
|
4495
4658
|
var init_is_electron = __esm({
|
|
4496
|
-
"../../node_modules
|
|
4659
|
+
"../../node_modules/@probe.gl/env/dist/esm/lib/is-electron.js"() {
|
|
4497
4660
|
}
|
|
4498
4661
|
});
|
|
4499
4662
|
|
|
4500
|
-
// ../../node_modules
|
|
4663
|
+
// ../../node_modules/@probe.gl/env/dist/esm/lib/is-browser.js
|
|
4501
4664
|
function isBrowser3() {
|
|
4502
4665
|
const isNode = typeof process === "object" && String(process) === "[object process]" && !process.browser;
|
|
4503
4666
|
return !isNode || isElectron();
|
|
4504
4667
|
}
|
|
4505
4668
|
var init_is_browser = __esm({
|
|
4506
|
-
"../../node_modules
|
|
4669
|
+
"../../node_modules/@probe.gl/env/dist/esm/lib/is-browser.js"() {
|
|
4507
4670
|
init_is_electron();
|
|
4508
4671
|
}
|
|
4509
4672
|
});
|
|
4510
4673
|
|
|
4511
|
-
// ../../node_modules
|
|
4512
|
-
var
|
|
4674
|
+
// ../../node_modules/@probe.gl/env/dist/esm/lib/globals.js
|
|
4675
|
+
var globals3, self_3, window_3, document_3, process_;
|
|
4513
4676
|
var init_globals3 = __esm({
|
|
4514
|
-
"../../node_modules
|
|
4515
|
-
|
|
4677
|
+
"../../node_modules/@probe.gl/env/dist/esm/lib/globals.js"() {
|
|
4678
|
+
globals3 = {
|
|
4516
4679
|
self: typeof self !== "undefined" && self,
|
|
4517
4680
|
window: typeof window !== "undefined" && window,
|
|
4518
4681
|
global: typeof global !== "undefined" && global,
|
|
4519
4682
|
document: typeof document !== "undefined" && document,
|
|
4520
4683
|
process: typeof process === "object" && process
|
|
4521
4684
|
};
|
|
4522
|
-
self_3 =
|
|
4523
|
-
window_3 =
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
process_ = globals4.process || {};
|
|
4685
|
+
self_3 = globals3.self || globals3.window || globals3.global;
|
|
4686
|
+
window_3 = globals3.window || globals3.self || globals3.global;
|
|
4687
|
+
document_3 = globals3.document || {};
|
|
4688
|
+
process_ = globals3.process || {};
|
|
4527
4689
|
}
|
|
4528
4690
|
});
|
|
4529
4691
|
|
|
4530
|
-
// ../../node_modules
|
|
4692
|
+
// ../../node_modules/@probe.gl/env/dist/esm/utils/globals.js
|
|
4531
4693
|
var VERSION3, isBrowser4;
|
|
4532
4694
|
var init_globals4 = __esm({
|
|
4533
|
-
"../../node_modules
|
|
4695
|
+
"../../node_modules/@probe.gl/env/dist/esm/utils/globals.js"() {
|
|
4534
4696
|
init_is_browser();
|
|
4535
|
-
init_globals3();
|
|
4536
4697
|
VERSION3 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "untranspiled source";
|
|
4537
4698
|
isBrowser4 = isBrowser3();
|
|
4538
4699
|
}
|
|
4539
4700
|
});
|
|
4540
4701
|
|
|
4541
|
-
// ../../node_modules
|
|
4702
|
+
// ../../node_modules/@probe.gl/env/dist/esm/index.js
|
|
4703
|
+
var init_esm4 = __esm({
|
|
4704
|
+
"../../node_modules/@probe.gl/env/dist/esm/index.js"() {
|
|
4705
|
+
init_globals4();
|
|
4706
|
+
init_globals3();
|
|
4707
|
+
init_is_browser();
|
|
4708
|
+
}
|
|
4709
|
+
});
|
|
4710
|
+
|
|
4711
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/local-storage.js
|
|
4542
4712
|
function getStorage(type) {
|
|
4543
4713
|
try {
|
|
4544
4714
|
const storage = window[type];
|
|
@@ -4552,9 +4722,15 @@
|
|
|
4552
4722
|
}
|
|
4553
4723
|
var LocalStorage;
|
|
4554
4724
|
var init_local_storage = __esm({
|
|
4555
|
-
"../../node_modules
|
|
4725
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/local-storage.js"() {
|
|
4726
|
+
init_defineProperty();
|
|
4556
4727
|
LocalStorage = class {
|
|
4557
|
-
constructor(id
|
|
4728
|
+
constructor(id) {
|
|
4729
|
+
let defaultSettings = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
4730
|
+
let type = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "sessionStorage";
|
|
4731
|
+
_defineProperty(this, "storage", void 0);
|
|
4732
|
+
_defineProperty(this, "id", void 0);
|
|
4733
|
+
_defineProperty(this, "config", {});
|
|
4558
4734
|
this.storage = getStorage(type);
|
|
4559
4735
|
this.id = id;
|
|
4560
4736
|
this.config = {};
|
|
@@ -4589,7 +4765,7 @@
|
|
|
4589
4765
|
}
|
|
4590
4766
|
});
|
|
4591
4767
|
|
|
4592
|
-
// ../../node_modules
|
|
4768
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/formatters.js
|
|
4593
4769
|
function formatTime(ms) {
|
|
4594
4770
|
let formatted;
|
|
4595
4771
|
if (ms < 10) {
|
|
@@ -4603,11 +4779,13 @@
|
|
|
4603
4779
|
}
|
|
4604
4780
|
return formatted;
|
|
4605
4781
|
}
|
|
4606
|
-
function leftPad(string
|
|
4782
|
+
function leftPad(string) {
|
|
4783
|
+
let length4 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 8;
|
|
4607
4784
|
const padLength = Math.max(length4 - string.length, 0);
|
|
4608
4785
|
return "".concat(" ".repeat(padLength)).concat(string);
|
|
4609
4786
|
}
|
|
4610
|
-
function formatImage(image, message, scale5
|
|
4787
|
+
function formatImage(image, message, scale5) {
|
|
4788
|
+
let maxWidth = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 600;
|
|
4611
4789
|
const imageUrl = image.src.replace(/\(/g, "%28").replace(/\)/g, "%29");
|
|
4612
4790
|
if (image.width > maxWidth) {
|
|
4613
4791
|
scale5 = Math.min(scale5, maxWidth / image.width);
|
|
@@ -4618,16 +4796,16 @@
|
|
|
4618
4796
|
return ["".concat(message, " %c+"), style];
|
|
4619
4797
|
}
|
|
4620
4798
|
var init_formatters = __esm({
|
|
4621
|
-
"../../node_modules
|
|
4799
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/formatters.js"() {
|
|
4622
4800
|
}
|
|
4623
4801
|
});
|
|
4624
4802
|
|
|
4625
|
-
// ../../node_modules
|
|
4803
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/color.js
|
|
4626
4804
|
function getColor(color) {
|
|
4627
4805
|
return typeof color === "string" ? COLOR[color.toUpperCase()] || COLOR.WHITE : color;
|
|
4628
4806
|
}
|
|
4629
4807
|
function addColor(string, color, background) {
|
|
4630
|
-
if (!
|
|
4808
|
+
if (!isBrowser3 && typeof string === "string") {
|
|
4631
4809
|
if (color) {
|
|
4632
4810
|
color = getColor(color);
|
|
4633
4811
|
string = "[".concat(color, "m").concat(string, "[39m");
|
|
@@ -4641,31 +4819,32 @@
|
|
|
4641
4819
|
}
|
|
4642
4820
|
var COLOR;
|
|
4643
4821
|
var init_color = __esm({
|
|
4644
|
-
"../../node_modules
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
BLACK
|
|
4648
|
-
RED
|
|
4649
|
-
GREEN
|
|
4650
|
-
YELLOW
|
|
4651
|
-
BLUE
|
|
4652
|
-
MAGENTA
|
|
4653
|
-
CYAN
|
|
4654
|
-
WHITE
|
|
4655
|
-
BRIGHT_BLACK
|
|
4656
|
-
BRIGHT_RED
|
|
4657
|
-
BRIGHT_GREEN
|
|
4658
|
-
BRIGHT_YELLOW
|
|
4659
|
-
BRIGHT_BLUE
|
|
4660
|
-
BRIGHT_MAGENTA
|
|
4661
|
-
BRIGHT_CYAN
|
|
4662
|
-
BRIGHT_WHITE
|
|
4663
|
-
};
|
|
4664
|
-
}
|
|
4665
|
-
});
|
|
4666
|
-
|
|
4667
|
-
// ../../node_modules
|
|
4668
|
-
function autobind(obj
|
|
4822
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/color.js"() {
|
|
4823
|
+
init_esm4();
|
|
4824
|
+
(function(COLOR2) {
|
|
4825
|
+
COLOR2[COLOR2["BLACK"] = 30] = "BLACK";
|
|
4826
|
+
COLOR2[COLOR2["RED"] = 31] = "RED";
|
|
4827
|
+
COLOR2[COLOR2["GREEN"] = 32] = "GREEN";
|
|
4828
|
+
COLOR2[COLOR2["YELLOW"] = 33] = "YELLOW";
|
|
4829
|
+
COLOR2[COLOR2["BLUE"] = 34] = "BLUE";
|
|
4830
|
+
COLOR2[COLOR2["MAGENTA"] = 35] = "MAGENTA";
|
|
4831
|
+
COLOR2[COLOR2["CYAN"] = 36] = "CYAN";
|
|
4832
|
+
COLOR2[COLOR2["WHITE"] = 37] = "WHITE";
|
|
4833
|
+
COLOR2[COLOR2["BRIGHT_BLACK"] = 90] = "BRIGHT_BLACK";
|
|
4834
|
+
COLOR2[COLOR2["BRIGHT_RED"] = 91] = "BRIGHT_RED";
|
|
4835
|
+
COLOR2[COLOR2["BRIGHT_GREEN"] = 92] = "BRIGHT_GREEN";
|
|
4836
|
+
COLOR2[COLOR2["BRIGHT_YELLOW"] = 93] = "BRIGHT_YELLOW";
|
|
4837
|
+
COLOR2[COLOR2["BRIGHT_BLUE"] = 94] = "BRIGHT_BLUE";
|
|
4838
|
+
COLOR2[COLOR2["BRIGHT_MAGENTA"] = 95] = "BRIGHT_MAGENTA";
|
|
4839
|
+
COLOR2[COLOR2["BRIGHT_CYAN"] = 96] = "BRIGHT_CYAN";
|
|
4840
|
+
COLOR2[COLOR2["BRIGHT_WHITE"] = 97] = "BRIGHT_WHITE";
|
|
4841
|
+
})(COLOR || (COLOR = {}));
|
|
4842
|
+
}
|
|
4843
|
+
});
|
|
4844
|
+
|
|
4845
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/autobind.js
|
|
4846
|
+
function autobind(obj) {
|
|
4847
|
+
let predefined = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ["constructor"];
|
|
4669
4848
|
const proto = Object.getPrototypeOf(obj);
|
|
4670
4849
|
const propNames = Object.getOwnPropertyNames(proto);
|
|
4671
4850
|
for (const key of propNames) {
|
|
@@ -4677,50 +4856,50 @@
|
|
|
4677
4856
|
}
|
|
4678
4857
|
}
|
|
4679
4858
|
var init_autobind = __esm({
|
|
4680
|
-
"../../node_modules
|
|
4859
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/autobind.js"() {
|
|
4681
4860
|
}
|
|
4682
4861
|
});
|
|
4683
4862
|
|
|
4684
|
-
// ../../node_modules
|
|
4863
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/assert.js
|
|
4685
4864
|
function assert5(condition, message) {
|
|
4686
4865
|
if (!condition) {
|
|
4687
4866
|
throw new Error(message || "Assertion failed");
|
|
4688
4867
|
}
|
|
4689
4868
|
}
|
|
4690
4869
|
var init_assert4 = __esm({
|
|
4691
|
-
"../../node_modules
|
|
4870
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/assert.js"() {
|
|
4692
4871
|
}
|
|
4693
4872
|
});
|
|
4694
4873
|
|
|
4695
|
-
// ../../node_modules
|
|
4696
|
-
function
|
|
4874
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/hi-res-timestamp.js
|
|
4875
|
+
function getHiResTimestamp2() {
|
|
4697
4876
|
let timestamp;
|
|
4698
|
-
if (
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4877
|
+
if (isBrowser3 && "performance" in window_3) {
|
|
4878
|
+
var _window$performance, _window$performance$n;
|
|
4879
|
+
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);
|
|
4880
|
+
} else if ("hrtime" in process_) {
|
|
4881
|
+
var _process$hrtime;
|
|
4882
|
+
const timeParts = process_ === null || process_ === void 0 ? void 0 : (_process$hrtime = process_.hrtime) === null || _process$hrtime === void 0 ? void 0 : _process$hrtime.call(process_);
|
|
4702
4883
|
timestamp = timeParts[0] * 1e3 + timeParts[1] / 1e6;
|
|
4703
4884
|
} else {
|
|
4704
4885
|
timestamp = Date.now();
|
|
4705
4886
|
}
|
|
4706
4887
|
return timestamp;
|
|
4707
4888
|
}
|
|
4708
|
-
var
|
|
4709
|
-
"../../node_modules
|
|
4710
|
-
|
|
4889
|
+
var init_hi_res_timestamp2 = __esm({
|
|
4890
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/hi-res-timestamp.js"() {
|
|
4891
|
+
init_esm4();
|
|
4711
4892
|
}
|
|
4712
4893
|
});
|
|
4713
4894
|
|
|
4714
|
-
//
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
function getTableHeader(table) {
|
|
4718
|
-
for (const key in table) {
|
|
4719
|
-
for (const title in table[key]) {
|
|
4720
|
-
return title || "untitled";
|
|
4721
|
-
}
|
|
4895
|
+
// (disabled):../../node_modules/@probe.gl/log/dist/esm/node/node-asciify-image
|
|
4896
|
+
var init_node_asciify_image = __esm({
|
|
4897
|
+
"(disabled):../../node_modules/@probe.gl/log/dist/esm/node/node-asciify-image"() {
|
|
4722
4898
|
}
|
|
4723
|
-
|
|
4899
|
+
});
|
|
4900
|
+
|
|
4901
|
+
// ../../node_modules/@probe.gl/log/dist/esm/log.js
|
|
4902
|
+
function noop() {
|
|
4724
4903
|
}
|
|
4725
4904
|
function normalizeLogLevel(logLevel) {
|
|
4726
4905
|
if (!logLevel) {
|
|
@@ -4749,7 +4928,6 @@
|
|
|
4749
4928
|
const args = opts.args ? Array.from(opts.args) : [];
|
|
4750
4929
|
while (args.length && args.shift() !== message) {
|
|
4751
4930
|
}
|
|
4752
|
-
opts.args = args;
|
|
4753
4931
|
switch (typeof logLevel) {
|
|
4754
4932
|
case "string":
|
|
4755
4933
|
case "function":
|
|
@@ -4768,7 +4946,9 @@
|
|
|
4768
4946
|
}
|
|
4769
4947
|
const messageType = typeof opts.message;
|
|
4770
4948
|
assert5(messageType === "string" || messageType === "object");
|
|
4771
|
-
return Object.assign(opts,
|
|
4949
|
+
return Object.assign(opts, {
|
|
4950
|
+
args
|
|
4951
|
+
}, opts.opts);
|
|
4772
4952
|
}
|
|
4773
4953
|
function decorateMessage(id, message, opts) {
|
|
4774
4954
|
if (typeof message === "string") {
|
|
@@ -4778,29 +4958,25 @@
|
|
|
4778
4958
|
}
|
|
4779
4959
|
return message;
|
|
4780
4960
|
}
|
|
4781
|
-
function logImageInNode({
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
fit: "box",
|
|
4794
|
-
width: "".concat(Math.round(80 * scale5), "%")
|
|
4795
|
-
}).then((data) => console.log(data));
|
|
4796
|
-
}
|
|
4797
|
-
return noop2;
|
|
4961
|
+
function logImageInNode(_ref2) {
|
|
4962
|
+
let {
|
|
4963
|
+
image,
|
|
4964
|
+
message = "",
|
|
4965
|
+
scale: scale5 = 1
|
|
4966
|
+
} = _ref2;
|
|
4967
|
+
asciify.nodeAsciifyImage({
|
|
4968
|
+
image,
|
|
4969
|
+
message,
|
|
4970
|
+
scale: scale5
|
|
4971
|
+
});
|
|
4972
|
+
return noop;
|
|
4798
4973
|
}
|
|
4799
|
-
function logImageInBrowser({
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4974
|
+
function logImageInBrowser(_ref3) {
|
|
4975
|
+
let {
|
|
4976
|
+
image,
|
|
4977
|
+
message = "",
|
|
4978
|
+
scale: scale5 = 1
|
|
4979
|
+
} = _ref3;
|
|
4804
4980
|
if (typeof image === "string") {
|
|
4805
4981
|
const img = new Image();
|
|
4806
4982
|
img.onload = () => {
|
|
@@ -4808,33 +4984,43 @@
|
|
|
4808
4984
|
console.log(...args);
|
|
4809
4985
|
};
|
|
4810
4986
|
img.src = image;
|
|
4811
|
-
return
|
|
4987
|
+
return noop;
|
|
4812
4988
|
}
|
|
4813
4989
|
const element = image.nodeName || "";
|
|
4814
4990
|
if (element.toLowerCase() === "img") {
|
|
4815
4991
|
console.log(...formatImage(image, message, scale5));
|
|
4816
|
-
return
|
|
4992
|
+
return noop;
|
|
4817
4993
|
}
|
|
4818
4994
|
if (element.toLowerCase() === "canvas") {
|
|
4819
4995
|
const img = new Image();
|
|
4820
4996
|
img.onload = () => console.log(...formatImage(img, message, scale5));
|
|
4821
4997
|
img.src = image.toDataURL();
|
|
4822
|
-
return
|
|
4998
|
+
return noop;
|
|
4999
|
+
}
|
|
5000
|
+
return noop;
|
|
5001
|
+
}
|
|
5002
|
+
function getTableHeader(table) {
|
|
5003
|
+
for (const key in table) {
|
|
5004
|
+
for (const title in table[key]) {
|
|
5005
|
+
return title || "untitled";
|
|
5006
|
+
}
|
|
4823
5007
|
}
|
|
4824
|
-
return
|
|
5008
|
+
return "empty";
|
|
4825
5009
|
}
|
|
4826
5010
|
var originalConsole, DEFAULT_SETTINGS, cache, ONCE, Log;
|
|
4827
5011
|
var init_log = __esm({
|
|
4828
|
-
"../../node_modules
|
|
4829
|
-
|
|
5012
|
+
"../../node_modules/@probe.gl/log/dist/esm/log.js"() {
|
|
5013
|
+
init_defineProperty();
|
|
5014
|
+
init_esm4();
|
|
4830
5015
|
init_local_storage();
|
|
4831
5016
|
init_formatters();
|
|
4832
5017
|
init_color();
|
|
4833
5018
|
init_autobind();
|
|
4834
5019
|
init_assert4();
|
|
4835
|
-
|
|
5020
|
+
init_hi_res_timestamp2();
|
|
5021
|
+
init_node_asciify_image();
|
|
4836
5022
|
originalConsole = {
|
|
4837
|
-
debug:
|
|
5023
|
+
debug: isBrowser3 ? console.debug || console.log : console.log,
|
|
4838
5024
|
log: console.log,
|
|
4839
5025
|
info: console.info,
|
|
4840
5026
|
warn: console.warn,
|
|
@@ -4849,16 +5035,20 @@
|
|
|
4849
5035
|
once: true
|
|
4850
5036
|
};
|
|
4851
5037
|
Log = class {
|
|
4852
|
-
constructor({
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
5038
|
+
constructor() {
|
|
5039
|
+
let {
|
|
5040
|
+
id
|
|
5041
|
+
} = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
|
|
5042
|
+
id: ""
|
|
5043
|
+
};
|
|
5044
|
+
_defineProperty(this, "id", void 0);
|
|
5045
|
+
_defineProperty(this, "VERSION", VERSION3);
|
|
5046
|
+
_defineProperty(this, "_startTs", getHiResTimestamp2());
|
|
5047
|
+
_defineProperty(this, "_deltaTs", getHiResTimestamp2());
|
|
5048
|
+
_defineProperty(this, "_storage", void 0);
|
|
5049
|
+
_defineProperty(this, "userData", {});
|
|
5050
|
+
_defineProperty(this, "LOG_THROTTLE_TIMEOUT", 0);
|
|
4857
5051
|
this.id = id;
|
|
4858
|
-
this.VERSION = VERSION3;
|
|
4859
|
-
this._startTs = getHiResTimestamp();
|
|
4860
|
-
this._deltaTs = getHiResTimestamp();
|
|
4861
|
-
this.LOG_THROTTLE_TIMEOUT = 0;
|
|
4862
5052
|
this._storage = new LocalStorage("__probe-".concat(this.id, "__"), DEFAULT_SETTINGS);
|
|
4863
5053
|
this.userData = {};
|
|
4864
5054
|
this.timeStamp("".concat(this.id, " started"));
|
|
@@ -4878,10 +5068,10 @@
|
|
|
4878
5068
|
return this._storage.config.level;
|
|
4879
5069
|
}
|
|
4880
5070
|
getTotal() {
|
|
4881
|
-
return Number((
|
|
5071
|
+
return Number((getHiResTimestamp2() - this._startTs).toPrecision(10));
|
|
4882
5072
|
}
|
|
4883
5073
|
getDelta() {
|
|
4884
|
-
return Number((
|
|
5074
|
+
return Number((getHiResTimestamp2() - this._deltaTs).toPrecision(10));
|
|
4885
5075
|
}
|
|
4886
5076
|
set priority(newPriority) {
|
|
4887
5077
|
this.level = newPriority;
|
|
@@ -4892,7 +5082,8 @@
|
|
|
4892
5082
|
getPriority() {
|
|
4893
5083
|
return this.level;
|
|
4894
5084
|
}
|
|
4895
|
-
enable(
|
|
5085
|
+
enable() {
|
|
5086
|
+
let enabled = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
|
|
4896
5087
|
this._storage.updateConfiguration({
|
|
4897
5088
|
enabled
|
|
4898
5089
|
});
|
|
@@ -4904,6 +5095,21 @@
|
|
|
4904
5095
|
});
|
|
4905
5096
|
return this;
|
|
4906
5097
|
}
|
|
5098
|
+
get(setting) {
|
|
5099
|
+
return this._storage.config[setting];
|
|
5100
|
+
}
|
|
5101
|
+
set(setting, value) {
|
|
5102
|
+
this._storage.updateConfiguration({
|
|
5103
|
+
[setting]: value
|
|
5104
|
+
});
|
|
5105
|
+
}
|
|
5106
|
+
settings() {
|
|
5107
|
+
if (console.table) {
|
|
5108
|
+
console.table(this._storage.config);
|
|
5109
|
+
} else {
|
|
5110
|
+
console.log(this._storage.config);
|
|
5111
|
+
}
|
|
5112
|
+
}
|
|
4907
5113
|
assert(condition, message) {
|
|
4908
5114
|
assert5(condition, message);
|
|
4909
5115
|
}
|
|
@@ -4932,27 +5138,31 @@
|
|
|
4932
5138
|
return this._getLogFunction(logLevel, message, console.info, arguments);
|
|
4933
5139
|
}
|
|
4934
5140
|
once(logLevel, message) {
|
|
5141
|
+
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
5142
|
+
args[_key - 2] = arguments[_key];
|
|
5143
|
+
}
|
|
4935
5144
|
return this._getLogFunction(logLevel, message, originalConsole.debug || originalConsole.info, arguments, ONCE);
|
|
4936
5145
|
}
|
|
4937
5146
|
table(logLevel, table, columns) {
|
|
4938
5147
|
if (table) {
|
|
4939
|
-
return this._getLogFunction(logLevel, table, console.table ||
|
|
5148
|
+
return this._getLogFunction(logLevel, table, console.table || noop, columns && [columns], {
|
|
4940
5149
|
tag: getTableHeader(table)
|
|
4941
5150
|
});
|
|
4942
5151
|
}
|
|
4943
|
-
return
|
|
5152
|
+
return noop;
|
|
4944
5153
|
}
|
|
4945
|
-
image({
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
5154
|
+
image(_ref) {
|
|
5155
|
+
let {
|
|
5156
|
+
logLevel,
|
|
5157
|
+
priority,
|
|
5158
|
+
image,
|
|
5159
|
+
message = "",
|
|
5160
|
+
scale: scale5 = 1
|
|
5161
|
+
} = _ref;
|
|
4952
5162
|
if (!this._shouldLog(logLevel || priority)) {
|
|
4953
|
-
return
|
|
5163
|
+
return noop;
|
|
4954
5164
|
}
|
|
4955
|
-
return
|
|
5165
|
+
return isBrowser3 ? logImageInBrowser({
|
|
4956
5166
|
image,
|
|
4957
5167
|
message,
|
|
4958
5168
|
scale: scale5
|
|
@@ -4962,21 +5172,6 @@
|
|
|
4962
5172
|
scale: scale5
|
|
4963
5173
|
});
|
|
4964
5174
|
}
|
|
4965
|
-
settings() {
|
|
4966
|
-
if (console.table) {
|
|
4967
|
-
console.table(this._storage.config);
|
|
4968
|
-
} else {
|
|
4969
|
-
console.log(this._storage.config);
|
|
4970
|
-
}
|
|
4971
|
-
}
|
|
4972
|
-
get(setting) {
|
|
4973
|
-
return this._storage.config[setting];
|
|
4974
|
-
}
|
|
4975
|
-
set(setting, value) {
|
|
4976
|
-
this._storage.updateConfiguration({
|
|
4977
|
-
[setting]: value
|
|
4978
|
-
});
|
|
4979
|
-
}
|
|
4980
5175
|
time(logLevel, message) {
|
|
4981
5176
|
return this._getLogFunction(logLevel, message, console.time ? console.time : console.info);
|
|
4982
5177
|
}
|
|
@@ -4984,12 +5179,13 @@
|
|
|
4984
5179
|
return this._getLogFunction(logLevel, message, console.timeEnd ? console.timeEnd : console.info);
|
|
4985
5180
|
}
|
|
4986
5181
|
timeStamp(logLevel, message) {
|
|
4987
|
-
return this._getLogFunction(logLevel, message, console.timeStamp ||
|
|
5182
|
+
return this._getLogFunction(logLevel, message, console.timeStamp || noop);
|
|
4988
5183
|
}
|
|
4989
|
-
group(logLevel, message
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
5184
|
+
group(logLevel, message) {
|
|
5185
|
+
let opts = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
|
|
5186
|
+
collapsed: false
|
|
5187
|
+
};
|
|
5188
|
+
const options = normalizeArguments({
|
|
4993
5189
|
logLevel,
|
|
4994
5190
|
message,
|
|
4995
5191
|
opts
|
|
@@ -4997,16 +5193,17 @@
|
|
|
4997
5193
|
const {
|
|
4998
5194
|
collapsed
|
|
4999
5195
|
} = opts;
|
|
5000
|
-
|
|
5001
|
-
return this._getLogFunction(
|
|
5196
|
+
options.method = (collapsed ? console.groupCollapsed : console.group) || console.info;
|
|
5197
|
+
return this._getLogFunction(options);
|
|
5002
5198
|
}
|
|
5003
|
-
groupCollapsed(logLevel, message
|
|
5199
|
+
groupCollapsed(logLevel, message) {
|
|
5200
|
+
let opts = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
5004
5201
|
return this.group(logLevel, message, Object.assign({}, opts, {
|
|
5005
5202
|
collapsed: true
|
|
5006
5203
|
}));
|
|
5007
5204
|
}
|
|
5008
5205
|
groupEnd(logLevel) {
|
|
5009
|
-
return this._getLogFunction(logLevel, "", console.groupEnd ||
|
|
5206
|
+
return this._getLogFunction(logLevel, "", console.groupEnd || noop);
|
|
5010
5207
|
}
|
|
5011
5208
|
withGroup(logLevel, message, func) {
|
|
5012
5209
|
this.group(logLevel, message)();
|
|
@@ -5024,7 +5221,7 @@
|
|
|
5024
5221
|
_shouldLog(logLevel) {
|
|
5025
5222
|
return this.isEnabled() && this.getLevel() >= normalizeLogLevel(logLevel);
|
|
5026
5223
|
}
|
|
5027
|
-
_getLogFunction(logLevel, message, method, args
|
|
5224
|
+
_getLogFunction(logLevel, message, method, args, opts) {
|
|
5028
5225
|
if (this._shouldLog(logLevel)) {
|
|
5029
5226
|
opts = normalizeArguments({
|
|
5030
5227
|
logLevel,
|
|
@@ -5036,72 +5233,50 @@
|
|
|
5036
5233
|
assert5(method);
|
|
5037
5234
|
opts.total = this.getTotal();
|
|
5038
5235
|
opts.delta = this.getDelta();
|
|
5039
|
-
this._deltaTs =
|
|
5236
|
+
this._deltaTs = getHiResTimestamp2();
|
|
5040
5237
|
const tag = opts.tag || opts.message;
|
|
5041
5238
|
if (opts.once) {
|
|
5042
5239
|
if (!cache[tag]) {
|
|
5043
|
-
cache[tag] =
|
|
5240
|
+
cache[tag] = getHiResTimestamp2();
|
|
5044
5241
|
} else {
|
|
5045
|
-
return
|
|
5242
|
+
return noop;
|
|
5046
5243
|
}
|
|
5047
5244
|
}
|
|
5048
5245
|
message = decorateMessage(this.id, opts.message, opts);
|
|
5049
5246
|
return method.bind(console, message, ...opts.args);
|
|
5050
5247
|
}
|
|
5051
|
-
return
|
|
5248
|
+
return noop;
|
|
5052
5249
|
}
|
|
5053
5250
|
};
|
|
5054
|
-
Log
|
|
5251
|
+
_defineProperty(Log, "VERSION", VERSION3);
|
|
5055
5252
|
}
|
|
5056
5253
|
});
|
|
5057
5254
|
|
|
5058
|
-
// ../../node_modules
|
|
5059
|
-
var init_hi_res_timestamp2 = __esm({
|
|
5060
|
-
"../../node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js"() {
|
|
5061
|
-
}
|
|
5062
|
-
});
|
|
5063
|
-
|
|
5064
|
-
// ../../node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/lib/stat.js
|
|
5065
|
-
var init_stat = __esm({
|
|
5066
|
-
"../../node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/lib/stat.js"() {
|
|
5067
|
-
init_hi_res_timestamp2();
|
|
5068
|
-
}
|
|
5069
|
-
});
|
|
5070
|
-
|
|
5071
|
-
// ../../node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/lib/stats.js
|
|
5072
|
-
var init_stats = __esm({
|
|
5073
|
-
"../../node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/lib/stats.js"() {
|
|
5074
|
-
init_stat();
|
|
5075
|
-
}
|
|
5076
|
-
});
|
|
5077
|
-
|
|
5078
|
-
// ../../node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/index.js
|
|
5079
|
-
var init_esm3 = __esm({
|
|
5080
|
-
"../../node_modules/probe.gl/node_modules/@probe.gl/stats/dist/esm/index.js"() {
|
|
5081
|
-
init_stats();
|
|
5082
|
-
init_stat();
|
|
5083
|
-
init_hi_res_timestamp2();
|
|
5084
|
-
}
|
|
5085
|
-
});
|
|
5086
|
-
|
|
5087
|
-
// ../../node_modules/probe.gl/dist/esm/index.js
|
|
5255
|
+
// ../../node_modules/@probe.gl/log/dist/esm/index.js
|
|
5088
5256
|
var esm_default;
|
|
5089
|
-
var
|
|
5090
|
-
"../../node_modules
|
|
5257
|
+
var init_esm5 = __esm({
|
|
5258
|
+
"../../node_modules/@probe.gl/log/dist/esm/index.js"() {
|
|
5091
5259
|
init_log();
|
|
5092
5260
|
init_log();
|
|
5093
|
-
init_esm3();
|
|
5094
5261
|
esm_default = new Log({
|
|
5095
|
-
id: "probe.gl"
|
|
5262
|
+
id: "@probe.gl/log"
|
|
5096
5263
|
});
|
|
5097
5264
|
}
|
|
5098
5265
|
});
|
|
5099
5266
|
|
|
5267
|
+
// ../../node_modules/probe.gl/dist/esm/index.js
|
|
5268
|
+
var init_esm6 = __esm({
|
|
5269
|
+
"../../node_modules/probe.gl/dist/esm/index.js"() {
|
|
5270
|
+
init_esm5();
|
|
5271
|
+
init_esm();
|
|
5272
|
+
}
|
|
5273
|
+
});
|
|
5274
|
+
|
|
5100
5275
|
// ../core/src/lib/loader-utils/loggers.ts
|
|
5101
5276
|
var probeLog, NullLog, ConsoleLog;
|
|
5102
5277
|
var init_loggers = __esm({
|
|
5103
5278
|
"../core/src/lib/loader-utils/loggers.ts"() {
|
|
5104
|
-
|
|
5279
|
+
init_esm6();
|
|
5105
5280
|
probeLog = new Log({ id: "loaders.gl" });
|
|
5106
5281
|
NullLog = class {
|
|
5107
5282
|
log() {
|
|
@@ -5206,784 +5381,161 @@
|
|
|
5206
5381
|
return fetchOptions.fetch;
|
|
5207
5382
|
}
|
|
5208
5383
|
if (isObject(fetchOptions.fetch)) {
|
|
5209
|
-
return (url) => fetchFile(url, fetchOptions);
|
|
5210
|
-
}
|
|
5211
|
-
if (context?.fetch) {
|
|
5212
|
-
return context?.fetch;
|
|
5213
|
-
}
|
|
5214
|
-
return fetchFile;
|
|
5215
|
-
}
|
|
5216
|
-
function validateOptions(options, loaders) {
|
|
5217
|
-
validateOptionsObject(options, null, DEFAULT_LOADER_OPTIONS, REMOVED_LOADER_OPTIONS, loaders);
|
|
5218
|
-
for (const loader of loaders) {
|
|
5219
|
-
const idOptions = options && options[loader.id] || {};
|
|
5220
|
-
const loaderOptions = loader.options && loader.options[loader.id] || {};
|
|
5221
|
-
const deprecatedOptions = loader.deprecatedOptions && loader.deprecatedOptions[loader.id] || {};
|
|
5222
|
-
validateOptionsObject(idOptions, loader.id, loaderOptions, deprecatedOptions, loaders);
|
|
5223
|
-
}
|
|
5224
|
-
}
|
|
5225
|
-
function validateOptionsObject(options, id, defaultOptions, deprecatedOptions, loaders) {
|
|
5226
|
-
const loaderName = id || "Top level";
|
|
5227
|
-
const prefix = id ? `${id}.` : "";
|
|
5228
|
-
for (const key in options) {
|
|
5229
|
-
const isSubOptions = !id && isObject(options[key]);
|
|
5230
|
-
const isBaseUriOption = key === "baseUri" && !id;
|
|
5231
|
-
const isWorkerUrlOption = key === "workerUrl" && id;
|
|
5232
|
-
if (!(key in defaultOptions) && !isBaseUriOption && !isWorkerUrlOption) {
|
|
5233
|
-
if (key in deprecatedOptions) {
|
|
5234
|
-
probeLog.warn(`${loaderName} loader option '${prefix}${key}' no longer supported, use '${deprecatedOptions[key]}'`)();
|
|
5235
|
-
} else if (!isSubOptions) {
|
|
5236
|
-
const suggestion = findSimilarOption(key, loaders);
|
|
5237
|
-
probeLog.warn(`${loaderName} loader option '${prefix}${key}' not recognized. ${suggestion}`)();
|
|
5238
|
-
}
|
|
5239
|
-
}
|
|
5240
|
-
}
|
|
5241
|
-
}
|
|
5242
|
-
function findSimilarOption(optionKey, loaders) {
|
|
5243
|
-
const lowerCaseOptionKey = optionKey.toLowerCase();
|
|
5244
|
-
let bestSuggestion = "";
|
|
5245
|
-
for (const loader of loaders) {
|
|
5246
|
-
for (const key in loader.options) {
|
|
5247
|
-
if (optionKey === key) {
|
|
5248
|
-
return `Did you mean '${loader.id}.${key}'?`;
|
|
5249
|
-
}
|
|
5250
|
-
const lowerCaseKey = key.toLowerCase();
|
|
5251
|
-
const isPartialMatch = lowerCaseOptionKey.startsWith(lowerCaseKey) || lowerCaseKey.startsWith(lowerCaseOptionKey);
|
|
5252
|
-
if (isPartialMatch) {
|
|
5253
|
-
bestSuggestion = bestSuggestion || `Did you mean '${loader.id}.${key}'?`;
|
|
5254
|
-
}
|
|
5255
|
-
}
|
|
5256
|
-
}
|
|
5257
|
-
return bestSuggestion;
|
|
5258
|
-
}
|
|
5259
|
-
function normalizeOptionsInternal(loader, options, url) {
|
|
5260
|
-
const loaderDefaultOptions = loader.options || {};
|
|
5261
|
-
const mergedOptions = { ...loaderDefaultOptions };
|
|
5262
|
-
addUrlOptions(mergedOptions, url);
|
|
5263
|
-
if (mergedOptions.log === null) {
|
|
5264
|
-
mergedOptions.log = new NullLog();
|
|
5265
|
-
}
|
|
5266
|
-
mergeNestedFields(mergedOptions, getGlobalLoaderOptions());
|
|
5267
|
-
mergeNestedFields(mergedOptions, options);
|
|
5268
|
-
return mergedOptions;
|
|
5269
|
-
}
|
|
5270
|
-
function mergeNestedFields(mergedOptions, options) {
|
|
5271
|
-
for (const key in options) {
|
|
5272
|
-
if (key in options) {
|
|
5273
|
-
const value = options[key];
|
|
5274
|
-
if (isPureObject(value) && isPureObject(mergedOptions[key])) {
|
|
5275
|
-
mergedOptions[key] = {
|
|
5276
|
-
...mergedOptions[key],
|
|
5277
|
-
...options[key]
|
|
5278
|
-
};
|
|
5279
|
-
} else {
|
|
5280
|
-
mergedOptions[key] = options[key];
|
|
5281
|
-
}
|
|
5282
|
-
}
|
|
5283
|
-
}
|
|
5284
|
-
}
|
|
5285
|
-
function addUrlOptions(options, url) {
|
|
5286
|
-
if (url && !("baseUri" in options)) {
|
|
5287
|
-
options.baseUri = url;
|
|
5288
|
-
}
|
|
5289
|
-
}
|
|
5290
|
-
var getGlobalLoaderOptions;
|
|
5291
|
-
var init_option_utils = __esm({
|
|
5292
|
-
"../core/src/lib/loader-utils/option-utils.ts"() {
|
|
5293
|
-
init_is_type();
|
|
5294
|
-
init_fetch_file();
|
|
5295
|
-
init_loggers();
|
|
5296
|
-
init_option_defaults();
|
|
5297
|
-
getGlobalLoaderOptions = () => {
|
|
5298
|
-
const state = getGlobalLoaderState();
|
|
5299
|
-
state.globalOptions = state.globalOptions || { ...DEFAULT_LOADER_OPTIONS };
|
|
5300
|
-
return state.globalOptions;
|
|
5301
|
-
};
|
|
5302
|
-
}
|
|
5303
|
-
});
|
|
5304
|
-
|
|
5305
|
-
// ../core/src/lib/loader-utils/normalize-loader.ts
|
|
5306
|
-
function isLoaderObject(loader) {
|
|
5307
|
-
if (!loader) {
|
|
5308
|
-
return false;
|
|
5309
|
-
}
|
|
5310
|
-
if (Array.isArray(loader)) {
|
|
5311
|
-
loader = loader[0];
|
|
5312
|
-
}
|
|
5313
|
-
const hasExtensions = Array.isArray(loader?.extensions);
|
|
5314
|
-
return hasExtensions;
|
|
5315
|
-
}
|
|
5316
|
-
function normalizeLoader(loader) {
|
|
5317
|
-
assert2(loader, "null loader");
|
|
5318
|
-
assert2(isLoaderObject(loader), "invalid loader");
|
|
5319
|
-
let options;
|
|
5320
|
-
if (Array.isArray(loader)) {
|
|
5321
|
-
options = loader[1];
|
|
5322
|
-
loader = loader[0];
|
|
5323
|
-
loader = {
|
|
5324
|
-
...loader,
|
|
5325
|
-
options: { ...loader.options, ...options }
|
|
5326
|
-
};
|
|
5327
|
-
}
|
|
5328
|
-
if (loader?.parseTextSync || loader?.parseText) {
|
|
5329
|
-
loader.text = true;
|
|
5330
|
-
}
|
|
5331
|
-
if (!loader.text) {
|
|
5332
|
-
loader.binary = true;
|
|
5333
|
-
}
|
|
5334
|
-
return loader;
|
|
5335
|
-
}
|
|
5336
|
-
var init_normalize_loader = __esm({
|
|
5337
|
-
"../core/src/lib/loader-utils/normalize-loader.ts"() {
|
|
5338
|
-
init_src2();
|
|
5339
|
-
}
|
|
5340
|
-
});
|
|
5341
|
-
|
|
5342
|
-
// ../core/src/lib/api/register-loaders.ts
|
|
5343
|
-
function getRegisteredLoaders() {
|
|
5344
|
-
return getGlobalLoaderRegistry();
|
|
5345
|
-
}
|
|
5346
|
-
var getGlobalLoaderRegistry;
|
|
5347
|
-
var init_register_loaders = __esm({
|
|
5348
|
-
"../core/src/lib/api/register-loaders.ts"() {
|
|
5349
|
-
init_option_utils();
|
|
5350
|
-
getGlobalLoaderRegistry = () => {
|
|
5351
|
-
const state = getGlobalLoaderState();
|
|
5352
|
-
state.loaderRegistry = state.loaderRegistry || [];
|
|
5353
|
-
return state.loaderRegistry;
|
|
5354
|
-
};
|
|
5355
|
-
}
|
|
5356
|
-
});
|
|
5357
|
-
|
|
5358
|
-
// ../../node_modules/@probe.gl/env/dist/esm/lib/is-electron.js
|
|
5359
|
-
function isElectron2(mockUserAgent) {
|
|
5360
|
-
if (typeof window !== "undefined" && typeof window.process === "object" && window.process.type === "renderer") {
|
|
5361
|
-
return true;
|
|
5362
|
-
}
|
|
5363
|
-
if (typeof process !== "undefined" && typeof process.versions === "object" && Boolean(process.versions.electron)) {
|
|
5364
|
-
return true;
|
|
5365
|
-
}
|
|
5366
|
-
const realUserAgent = typeof navigator === "object" && typeof navigator.userAgent === "string" && navigator.userAgent;
|
|
5367
|
-
const userAgent = mockUserAgent || realUserAgent;
|
|
5368
|
-
if (userAgent && userAgent.indexOf("Electron") >= 0) {
|
|
5369
|
-
return true;
|
|
5370
|
-
}
|
|
5371
|
-
return false;
|
|
5372
|
-
}
|
|
5373
|
-
var init_is_electron2 = __esm({
|
|
5374
|
-
"../../node_modules/@probe.gl/env/dist/esm/lib/is-electron.js"() {
|
|
5375
|
-
}
|
|
5376
|
-
});
|
|
5377
|
-
|
|
5378
|
-
// ../../node_modules/@probe.gl/env/dist/esm/lib/is-browser.js
|
|
5379
|
-
function isBrowser5() {
|
|
5380
|
-
const isNode = typeof process === "object" && String(process) === "[object process]" && !process.browser;
|
|
5381
|
-
return !isNode || isElectron2();
|
|
5382
|
-
}
|
|
5383
|
-
var init_is_browser2 = __esm({
|
|
5384
|
-
"../../node_modules/@probe.gl/env/dist/esm/lib/is-browser.js"() {
|
|
5385
|
-
init_is_electron2();
|
|
5386
|
-
}
|
|
5387
|
-
});
|
|
5388
|
-
|
|
5389
|
-
// ../../node_modules/@probe.gl/env/dist/esm/lib/globals.js
|
|
5390
|
-
var globals5, self_4, window_4, document_4, process_2;
|
|
5391
|
-
var init_globals5 = __esm({
|
|
5392
|
-
"../../node_modules/@probe.gl/env/dist/esm/lib/globals.js"() {
|
|
5393
|
-
globals5 = {
|
|
5394
|
-
self: typeof self !== "undefined" && self,
|
|
5395
|
-
window: typeof window !== "undefined" && window,
|
|
5396
|
-
global: typeof global !== "undefined" && global,
|
|
5397
|
-
document: typeof document !== "undefined" && document,
|
|
5398
|
-
process: typeof process === "object" && process
|
|
5399
|
-
};
|
|
5400
|
-
self_4 = globals5.self || globals5.window || globals5.global;
|
|
5401
|
-
window_4 = globals5.window || globals5.self || globals5.global;
|
|
5402
|
-
document_4 = globals5.document || {};
|
|
5403
|
-
process_2 = globals5.process || {};
|
|
5404
|
-
}
|
|
5405
|
-
});
|
|
5406
|
-
|
|
5407
|
-
// ../../node_modules/@probe.gl/env/dist/esm/utils/globals.js
|
|
5408
|
-
var VERSION4, isBrowser6;
|
|
5409
|
-
var init_globals6 = __esm({
|
|
5410
|
-
"../../node_modules/@probe.gl/env/dist/esm/utils/globals.js"() {
|
|
5411
|
-
init_is_browser2();
|
|
5412
|
-
VERSION4 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "untranspiled source";
|
|
5413
|
-
isBrowser6 = isBrowser5();
|
|
5414
|
-
}
|
|
5415
|
-
});
|
|
5416
|
-
|
|
5417
|
-
// ../../node_modules/@probe.gl/env/dist/esm/index.js
|
|
5418
|
-
var init_esm5 = __esm({
|
|
5419
|
-
"../../node_modules/@probe.gl/env/dist/esm/index.js"() {
|
|
5420
|
-
init_globals6();
|
|
5421
|
-
init_globals5();
|
|
5422
|
-
init_is_browser2();
|
|
5423
|
-
}
|
|
5424
|
-
});
|
|
5425
|
-
|
|
5426
|
-
// ../../node_modules/@probe.gl/log/dist/esm/utils/local-storage.js
|
|
5427
|
-
function getStorage2(type) {
|
|
5428
|
-
try {
|
|
5429
|
-
const storage = window[type];
|
|
5430
|
-
const x = "__storage_test__";
|
|
5431
|
-
storage.setItem(x, x);
|
|
5432
|
-
storage.removeItem(x);
|
|
5433
|
-
return storage;
|
|
5434
|
-
} catch (e) {
|
|
5435
|
-
return null;
|
|
5436
|
-
}
|
|
5437
|
-
}
|
|
5438
|
-
var LocalStorage2;
|
|
5439
|
-
var init_local_storage2 = __esm({
|
|
5440
|
-
"../../node_modules/@probe.gl/log/dist/esm/utils/local-storage.js"() {
|
|
5441
|
-
init_defineProperty();
|
|
5442
|
-
LocalStorage2 = class {
|
|
5443
|
-
constructor(id) {
|
|
5444
|
-
let defaultSettings = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
5445
|
-
let type = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "sessionStorage";
|
|
5446
|
-
_defineProperty(this, "storage", void 0);
|
|
5447
|
-
_defineProperty(this, "id", void 0);
|
|
5448
|
-
_defineProperty(this, "config", {});
|
|
5449
|
-
this.storage = getStorage2(type);
|
|
5450
|
-
this.id = id;
|
|
5451
|
-
this.config = {};
|
|
5452
|
-
Object.assign(this.config, defaultSettings);
|
|
5453
|
-
this._loadConfiguration();
|
|
5454
|
-
}
|
|
5455
|
-
getConfiguration() {
|
|
5456
|
-
return this.config;
|
|
5457
|
-
}
|
|
5458
|
-
setConfiguration(configuration) {
|
|
5459
|
-
this.config = {};
|
|
5460
|
-
return this.updateConfiguration(configuration);
|
|
5461
|
-
}
|
|
5462
|
-
updateConfiguration(configuration) {
|
|
5463
|
-
Object.assign(this.config, configuration);
|
|
5464
|
-
if (this.storage) {
|
|
5465
|
-
const serialized = JSON.stringify(this.config);
|
|
5466
|
-
this.storage.setItem(this.id, serialized);
|
|
5467
|
-
}
|
|
5468
|
-
return this;
|
|
5469
|
-
}
|
|
5470
|
-
_loadConfiguration() {
|
|
5471
|
-
let configuration = {};
|
|
5472
|
-
if (this.storage) {
|
|
5473
|
-
const serializedConfiguration = this.storage.getItem(this.id);
|
|
5474
|
-
configuration = serializedConfiguration ? JSON.parse(serializedConfiguration) : {};
|
|
5475
|
-
}
|
|
5476
|
-
Object.assign(this.config, configuration);
|
|
5477
|
-
return this;
|
|
5478
|
-
}
|
|
5479
|
-
};
|
|
5480
|
-
}
|
|
5481
|
-
});
|
|
5482
|
-
|
|
5483
|
-
// ../../node_modules/@probe.gl/log/dist/esm/utils/formatters.js
|
|
5484
|
-
function formatTime2(ms) {
|
|
5485
|
-
let formatted;
|
|
5486
|
-
if (ms < 10) {
|
|
5487
|
-
formatted = "".concat(ms.toFixed(2), "ms");
|
|
5488
|
-
} else if (ms < 100) {
|
|
5489
|
-
formatted = "".concat(ms.toFixed(1), "ms");
|
|
5490
|
-
} else if (ms < 1e3) {
|
|
5491
|
-
formatted = "".concat(ms.toFixed(0), "ms");
|
|
5492
|
-
} else {
|
|
5493
|
-
formatted = "".concat((ms / 1e3).toFixed(2), "s");
|
|
5494
|
-
}
|
|
5495
|
-
return formatted;
|
|
5496
|
-
}
|
|
5497
|
-
function leftPad2(string) {
|
|
5498
|
-
let length4 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 8;
|
|
5499
|
-
const padLength = Math.max(length4 - string.length, 0);
|
|
5500
|
-
return "".concat(" ".repeat(padLength)).concat(string);
|
|
5501
|
-
}
|
|
5502
|
-
function formatImage2(image, message, scale5) {
|
|
5503
|
-
let maxWidth = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 600;
|
|
5504
|
-
const imageUrl = image.src.replace(/\(/g, "%28").replace(/\)/g, "%29");
|
|
5505
|
-
if (image.width > maxWidth) {
|
|
5506
|
-
scale5 = Math.min(scale5, maxWidth / image.width);
|
|
5507
|
-
}
|
|
5508
|
-
const width = image.width * scale5;
|
|
5509
|
-
const height = image.height * scale5;
|
|
5510
|
-
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("");
|
|
5511
|
-
return ["".concat(message, " %c+"), style];
|
|
5512
|
-
}
|
|
5513
|
-
var init_formatters2 = __esm({
|
|
5514
|
-
"../../node_modules/@probe.gl/log/dist/esm/utils/formatters.js"() {
|
|
5515
|
-
}
|
|
5516
|
-
});
|
|
5517
|
-
|
|
5518
|
-
// ../../node_modules/@probe.gl/log/dist/esm/utils/color.js
|
|
5519
|
-
function getColor2(color) {
|
|
5520
|
-
return typeof color === "string" ? COLOR2[color.toUpperCase()] || COLOR2.WHITE : color;
|
|
5521
|
-
}
|
|
5522
|
-
function addColor2(string, color, background) {
|
|
5523
|
-
if (!isBrowser5 && typeof string === "string") {
|
|
5524
|
-
if (color) {
|
|
5525
|
-
color = getColor2(color);
|
|
5526
|
-
string = "[".concat(color, "m").concat(string, "[39m");
|
|
5527
|
-
}
|
|
5528
|
-
if (background) {
|
|
5529
|
-
color = getColor2(background);
|
|
5530
|
-
string = "[".concat(background + 10, "m").concat(string, "[49m");
|
|
5531
|
-
}
|
|
5532
|
-
}
|
|
5533
|
-
return string;
|
|
5534
|
-
}
|
|
5535
|
-
var COLOR2;
|
|
5536
|
-
var init_color2 = __esm({
|
|
5537
|
-
"../../node_modules/@probe.gl/log/dist/esm/utils/color.js"() {
|
|
5538
|
-
init_esm5();
|
|
5539
|
-
(function(COLOR3) {
|
|
5540
|
-
COLOR3[COLOR3["BLACK"] = 30] = "BLACK";
|
|
5541
|
-
COLOR3[COLOR3["RED"] = 31] = "RED";
|
|
5542
|
-
COLOR3[COLOR3["GREEN"] = 32] = "GREEN";
|
|
5543
|
-
COLOR3[COLOR3["YELLOW"] = 33] = "YELLOW";
|
|
5544
|
-
COLOR3[COLOR3["BLUE"] = 34] = "BLUE";
|
|
5545
|
-
COLOR3[COLOR3["MAGENTA"] = 35] = "MAGENTA";
|
|
5546
|
-
COLOR3[COLOR3["CYAN"] = 36] = "CYAN";
|
|
5547
|
-
COLOR3[COLOR3["WHITE"] = 37] = "WHITE";
|
|
5548
|
-
COLOR3[COLOR3["BRIGHT_BLACK"] = 90] = "BRIGHT_BLACK";
|
|
5549
|
-
COLOR3[COLOR3["BRIGHT_RED"] = 91] = "BRIGHT_RED";
|
|
5550
|
-
COLOR3[COLOR3["BRIGHT_GREEN"] = 92] = "BRIGHT_GREEN";
|
|
5551
|
-
COLOR3[COLOR3["BRIGHT_YELLOW"] = 93] = "BRIGHT_YELLOW";
|
|
5552
|
-
COLOR3[COLOR3["BRIGHT_BLUE"] = 94] = "BRIGHT_BLUE";
|
|
5553
|
-
COLOR3[COLOR3["BRIGHT_MAGENTA"] = 95] = "BRIGHT_MAGENTA";
|
|
5554
|
-
COLOR3[COLOR3["BRIGHT_CYAN"] = 96] = "BRIGHT_CYAN";
|
|
5555
|
-
COLOR3[COLOR3["BRIGHT_WHITE"] = 97] = "BRIGHT_WHITE";
|
|
5556
|
-
})(COLOR2 || (COLOR2 = {}));
|
|
5557
|
-
}
|
|
5558
|
-
});
|
|
5559
|
-
|
|
5560
|
-
// ../../node_modules/@probe.gl/log/dist/esm/utils/autobind.js
|
|
5561
|
-
function autobind2(obj) {
|
|
5562
|
-
let predefined = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ["constructor"];
|
|
5563
|
-
const proto = Object.getPrototypeOf(obj);
|
|
5564
|
-
const propNames = Object.getOwnPropertyNames(proto);
|
|
5565
|
-
for (const key of propNames) {
|
|
5566
|
-
if (typeof obj[key] === "function") {
|
|
5567
|
-
if (!predefined.find((name10) => key === name10)) {
|
|
5568
|
-
obj[key] = obj[key].bind(obj);
|
|
5569
|
-
}
|
|
5570
|
-
}
|
|
5571
|
-
}
|
|
5572
|
-
}
|
|
5573
|
-
var init_autobind2 = __esm({
|
|
5574
|
-
"../../node_modules/@probe.gl/log/dist/esm/utils/autobind.js"() {
|
|
5575
|
-
}
|
|
5576
|
-
});
|
|
5577
|
-
|
|
5578
|
-
// ../../node_modules/@probe.gl/log/dist/esm/utils/assert.js
|
|
5579
|
-
function assert6(condition, message) {
|
|
5580
|
-
if (!condition) {
|
|
5581
|
-
throw new Error(message || "Assertion failed");
|
|
5582
|
-
}
|
|
5583
|
-
}
|
|
5584
|
-
var init_assert5 = __esm({
|
|
5585
|
-
"../../node_modules/@probe.gl/log/dist/esm/utils/assert.js"() {
|
|
5586
|
-
}
|
|
5587
|
-
});
|
|
5588
|
-
|
|
5589
|
-
// ../../node_modules/@probe.gl/log/dist/esm/utils/hi-res-timestamp.js
|
|
5590
|
-
function getHiResTimestamp3() {
|
|
5591
|
-
let timestamp;
|
|
5592
|
-
if (isBrowser5 && "performance" in window_4) {
|
|
5593
|
-
var _window$performance, _window$performance$n;
|
|
5594
|
-
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);
|
|
5595
|
-
} else if ("hrtime" in process_2) {
|
|
5596
|
-
var _process$hrtime;
|
|
5597
|
-
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);
|
|
5598
|
-
timestamp = timeParts[0] * 1e3 + timeParts[1] / 1e6;
|
|
5599
|
-
} else {
|
|
5600
|
-
timestamp = Date.now();
|
|
5601
|
-
}
|
|
5602
|
-
return timestamp;
|
|
5603
|
-
}
|
|
5604
|
-
var init_hi_res_timestamp3 = __esm({
|
|
5605
|
-
"../../node_modules/@probe.gl/log/dist/esm/utils/hi-res-timestamp.js"() {
|
|
5606
|
-
init_esm5();
|
|
5607
|
-
}
|
|
5608
|
-
});
|
|
5609
|
-
|
|
5610
|
-
// ../../node_modules/@probe.gl/log/dist/esm/log.js
|
|
5611
|
-
function noop3() {
|
|
5612
|
-
}
|
|
5613
|
-
function normalizeLogLevel2(logLevel) {
|
|
5614
|
-
if (!logLevel) {
|
|
5615
|
-
return 0;
|
|
5616
|
-
}
|
|
5617
|
-
let resolvedLevel;
|
|
5618
|
-
switch (typeof logLevel) {
|
|
5619
|
-
case "number":
|
|
5620
|
-
resolvedLevel = logLevel;
|
|
5621
|
-
break;
|
|
5622
|
-
case "object":
|
|
5623
|
-
resolvedLevel = logLevel.logLevel || logLevel.priority || 0;
|
|
5624
|
-
break;
|
|
5625
|
-
default:
|
|
5626
|
-
return 0;
|
|
5627
|
-
}
|
|
5628
|
-
assert6(Number.isFinite(resolvedLevel) && resolvedLevel >= 0);
|
|
5629
|
-
return resolvedLevel;
|
|
5630
|
-
}
|
|
5631
|
-
function normalizeArguments2(opts) {
|
|
5632
|
-
const {
|
|
5633
|
-
logLevel,
|
|
5634
|
-
message
|
|
5635
|
-
} = opts;
|
|
5636
|
-
opts.logLevel = normalizeLogLevel2(logLevel);
|
|
5637
|
-
const args = opts.args ? Array.from(opts.args) : [];
|
|
5638
|
-
while (args.length && args.shift() !== message) {
|
|
5639
|
-
}
|
|
5640
|
-
switch (typeof logLevel) {
|
|
5641
|
-
case "string":
|
|
5642
|
-
case "function":
|
|
5643
|
-
if (message !== void 0) {
|
|
5644
|
-
args.unshift(message);
|
|
5645
|
-
}
|
|
5646
|
-
opts.message = logLevel;
|
|
5647
|
-
break;
|
|
5648
|
-
case "object":
|
|
5649
|
-
Object.assign(opts, logLevel);
|
|
5650
|
-
break;
|
|
5651
|
-
default:
|
|
5652
|
-
}
|
|
5653
|
-
if (typeof opts.message === "function") {
|
|
5654
|
-
opts.message = opts.message();
|
|
5655
|
-
}
|
|
5656
|
-
const messageType = typeof opts.message;
|
|
5657
|
-
assert6(messageType === "string" || messageType === "object");
|
|
5658
|
-
return Object.assign(opts, {
|
|
5659
|
-
args
|
|
5660
|
-
}, opts.opts);
|
|
5661
|
-
}
|
|
5662
|
-
function decorateMessage2(id, message, opts) {
|
|
5663
|
-
if (typeof message === "string") {
|
|
5664
|
-
const time = opts.time ? leftPad2(formatTime2(opts.total)) : "";
|
|
5665
|
-
message = opts.time ? "".concat(id, ": ").concat(time, " ").concat(message) : "".concat(id, ": ").concat(message);
|
|
5666
|
-
message = addColor2(message, opts.color, opts.background);
|
|
5667
|
-
}
|
|
5668
|
-
return message;
|
|
5669
|
-
}
|
|
5670
|
-
function logImageInNode2(_ref2) {
|
|
5671
|
-
let {
|
|
5672
|
-
image,
|
|
5673
|
-
message = "",
|
|
5674
|
-
scale: scale5 = 1
|
|
5675
|
-
} = _ref2;
|
|
5676
|
-
let asciify = null;
|
|
5677
|
-
try {
|
|
5678
|
-
asciify = module.require("asciify-image");
|
|
5679
|
-
} catch (error) {
|
|
5680
|
-
}
|
|
5681
|
-
if (asciify) {
|
|
5682
|
-
return () => asciify(image, {
|
|
5683
|
-
fit: "box",
|
|
5684
|
-
width: "".concat(Math.round(80 * scale5), "%")
|
|
5685
|
-
}).then((data) => console.log(data));
|
|
5686
|
-
}
|
|
5687
|
-
return noop3;
|
|
5688
|
-
}
|
|
5689
|
-
function logImageInBrowser2(_ref3) {
|
|
5690
|
-
let {
|
|
5691
|
-
image,
|
|
5692
|
-
message = "",
|
|
5693
|
-
scale: scale5 = 1
|
|
5694
|
-
} = _ref3;
|
|
5695
|
-
if (typeof image === "string") {
|
|
5696
|
-
const img = new Image();
|
|
5697
|
-
img.onload = () => {
|
|
5698
|
-
const args = formatImage2(img, message, scale5);
|
|
5699
|
-
console.log(...args);
|
|
5700
|
-
};
|
|
5701
|
-
img.src = image;
|
|
5702
|
-
return noop3;
|
|
5703
|
-
}
|
|
5704
|
-
const element = image.nodeName || "";
|
|
5705
|
-
if (element.toLowerCase() === "img") {
|
|
5706
|
-
console.log(...formatImage2(image, message, scale5));
|
|
5707
|
-
return noop3;
|
|
5708
|
-
}
|
|
5709
|
-
if (element.toLowerCase() === "canvas") {
|
|
5710
|
-
const img = new Image();
|
|
5711
|
-
img.onload = () => console.log(...formatImage2(img, message, scale5));
|
|
5712
|
-
img.src = image.toDataURL();
|
|
5713
|
-
return noop3;
|
|
5714
|
-
}
|
|
5715
|
-
return noop3;
|
|
5716
|
-
}
|
|
5717
|
-
function getTableHeader2(table) {
|
|
5718
|
-
for (const key in table) {
|
|
5719
|
-
for (const title in table[key]) {
|
|
5720
|
-
return title || "untitled";
|
|
5721
|
-
}
|
|
5722
|
-
}
|
|
5723
|
-
return "empty";
|
|
5724
|
-
}
|
|
5725
|
-
var originalConsole2, DEFAULT_SETTINGS2, cache2, ONCE2, Log2;
|
|
5726
|
-
var init_log2 = __esm({
|
|
5727
|
-
"../../node_modules/@probe.gl/log/dist/esm/log.js"() {
|
|
5728
|
-
init_defineProperty();
|
|
5729
|
-
init_esm5();
|
|
5730
|
-
init_local_storage2();
|
|
5731
|
-
init_formatters2();
|
|
5732
|
-
init_color2();
|
|
5733
|
-
init_autobind2();
|
|
5734
|
-
init_assert5();
|
|
5735
|
-
init_hi_res_timestamp3();
|
|
5736
|
-
originalConsole2 = {
|
|
5737
|
-
debug: isBrowser5 ? console.debug || console.log : console.log,
|
|
5738
|
-
log: console.log,
|
|
5739
|
-
info: console.info,
|
|
5740
|
-
warn: console.warn,
|
|
5741
|
-
error: console.error
|
|
5742
|
-
};
|
|
5743
|
-
DEFAULT_SETTINGS2 = {
|
|
5744
|
-
enabled: true,
|
|
5745
|
-
level: 0
|
|
5746
|
-
};
|
|
5747
|
-
cache2 = {};
|
|
5748
|
-
ONCE2 = {
|
|
5749
|
-
once: true
|
|
5750
|
-
};
|
|
5751
|
-
Log2 = class {
|
|
5752
|
-
constructor() {
|
|
5753
|
-
let {
|
|
5754
|
-
id
|
|
5755
|
-
} = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
|
|
5756
|
-
id: ""
|
|
5757
|
-
};
|
|
5758
|
-
_defineProperty(this, "id", void 0);
|
|
5759
|
-
_defineProperty(this, "VERSION", VERSION4);
|
|
5760
|
-
_defineProperty(this, "_startTs", getHiResTimestamp3());
|
|
5761
|
-
_defineProperty(this, "_deltaTs", getHiResTimestamp3());
|
|
5762
|
-
_defineProperty(this, "_storage", void 0);
|
|
5763
|
-
_defineProperty(this, "userData", {});
|
|
5764
|
-
_defineProperty(this, "LOG_THROTTLE_TIMEOUT", 0);
|
|
5765
|
-
this.id = id;
|
|
5766
|
-
this._storage = new LocalStorage2("__probe-".concat(this.id, "__"), DEFAULT_SETTINGS2);
|
|
5767
|
-
this.userData = {};
|
|
5768
|
-
this.timeStamp("".concat(this.id, " started"));
|
|
5769
|
-
autobind2(this);
|
|
5770
|
-
Object.seal(this);
|
|
5771
|
-
}
|
|
5772
|
-
set level(newLevel) {
|
|
5773
|
-
this.setLevel(newLevel);
|
|
5774
|
-
}
|
|
5775
|
-
get level() {
|
|
5776
|
-
return this.getLevel();
|
|
5777
|
-
}
|
|
5778
|
-
isEnabled() {
|
|
5779
|
-
return this._storage.config.enabled;
|
|
5780
|
-
}
|
|
5781
|
-
getLevel() {
|
|
5782
|
-
return this._storage.config.level;
|
|
5783
|
-
}
|
|
5784
|
-
getTotal() {
|
|
5785
|
-
return Number((getHiResTimestamp3() - this._startTs).toPrecision(10));
|
|
5786
|
-
}
|
|
5787
|
-
getDelta() {
|
|
5788
|
-
return Number((getHiResTimestamp3() - this._deltaTs).toPrecision(10));
|
|
5789
|
-
}
|
|
5790
|
-
set priority(newPriority) {
|
|
5791
|
-
this.level = newPriority;
|
|
5792
|
-
}
|
|
5793
|
-
get priority() {
|
|
5794
|
-
return this.level;
|
|
5795
|
-
}
|
|
5796
|
-
getPriority() {
|
|
5797
|
-
return this.level;
|
|
5798
|
-
}
|
|
5799
|
-
enable() {
|
|
5800
|
-
let enabled = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
|
|
5801
|
-
this._storage.updateConfiguration({
|
|
5802
|
-
enabled
|
|
5803
|
-
});
|
|
5804
|
-
return this;
|
|
5805
|
-
}
|
|
5806
|
-
setLevel(level) {
|
|
5807
|
-
this._storage.updateConfiguration({
|
|
5808
|
-
level
|
|
5809
|
-
});
|
|
5810
|
-
return this;
|
|
5811
|
-
}
|
|
5812
|
-
get(setting) {
|
|
5813
|
-
return this._storage.config[setting];
|
|
5814
|
-
}
|
|
5815
|
-
set(setting, value) {
|
|
5816
|
-
this._storage.updateConfiguration({
|
|
5817
|
-
[setting]: value
|
|
5818
|
-
});
|
|
5819
|
-
}
|
|
5820
|
-
settings() {
|
|
5821
|
-
if (console.table) {
|
|
5822
|
-
console.table(this._storage.config);
|
|
5823
|
-
} else {
|
|
5824
|
-
console.log(this._storage.config);
|
|
5825
|
-
}
|
|
5826
|
-
}
|
|
5827
|
-
assert(condition, message) {
|
|
5828
|
-
assert6(condition, message);
|
|
5829
|
-
}
|
|
5830
|
-
warn(message) {
|
|
5831
|
-
return this._getLogFunction(0, message, originalConsole2.warn, arguments, ONCE2);
|
|
5832
|
-
}
|
|
5833
|
-
error(message) {
|
|
5834
|
-
return this._getLogFunction(0, message, originalConsole2.error, arguments);
|
|
5835
|
-
}
|
|
5836
|
-
deprecated(oldUsage, newUsage) {
|
|
5837
|
-
return this.warn("`".concat(oldUsage, "` is deprecated and will be removed in a later version. Use `").concat(newUsage, "` instead"));
|
|
5838
|
-
}
|
|
5839
|
-
removed(oldUsage, newUsage) {
|
|
5840
|
-
return this.error("`".concat(oldUsage, "` has been removed. Use `").concat(newUsage, "` instead"));
|
|
5841
|
-
}
|
|
5842
|
-
probe(logLevel, message) {
|
|
5843
|
-
return this._getLogFunction(logLevel, message, originalConsole2.log, arguments, {
|
|
5844
|
-
time: true,
|
|
5845
|
-
once: true
|
|
5846
|
-
});
|
|
5847
|
-
}
|
|
5848
|
-
log(logLevel, message) {
|
|
5849
|
-
return this._getLogFunction(logLevel, message, originalConsole2.debug, arguments);
|
|
5850
|
-
}
|
|
5851
|
-
info(logLevel, message) {
|
|
5852
|
-
return this._getLogFunction(logLevel, message, console.info, arguments);
|
|
5853
|
-
}
|
|
5854
|
-
once(logLevel, message) {
|
|
5855
|
-
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
5856
|
-
args[_key - 2] = arguments[_key];
|
|
5857
|
-
}
|
|
5858
|
-
return this._getLogFunction(logLevel, message, originalConsole2.debug || originalConsole2.info, arguments, ONCE2);
|
|
5859
|
-
}
|
|
5860
|
-
table(logLevel, table, columns) {
|
|
5861
|
-
if (table) {
|
|
5862
|
-
return this._getLogFunction(logLevel, table, console.table || noop3, columns && [columns], {
|
|
5863
|
-
tag: getTableHeader2(table)
|
|
5864
|
-
});
|
|
5865
|
-
}
|
|
5866
|
-
return noop3;
|
|
5867
|
-
}
|
|
5868
|
-
image(_ref) {
|
|
5869
|
-
let {
|
|
5870
|
-
logLevel,
|
|
5871
|
-
priority,
|
|
5872
|
-
image,
|
|
5873
|
-
message = "",
|
|
5874
|
-
scale: scale5 = 1
|
|
5875
|
-
} = _ref;
|
|
5876
|
-
if (!this._shouldLog(logLevel || priority)) {
|
|
5877
|
-
return noop3;
|
|
5878
|
-
}
|
|
5879
|
-
return isBrowser5 ? logImageInBrowser2({
|
|
5880
|
-
image,
|
|
5881
|
-
message,
|
|
5882
|
-
scale: scale5
|
|
5883
|
-
}) : logImageInNode2({
|
|
5884
|
-
image,
|
|
5885
|
-
message,
|
|
5886
|
-
scale: scale5
|
|
5887
|
-
});
|
|
5888
|
-
}
|
|
5889
|
-
time(logLevel, message) {
|
|
5890
|
-
return this._getLogFunction(logLevel, message, console.time ? console.time : console.info);
|
|
5384
|
+
return (url) => fetchFile(url, fetchOptions);
|
|
5385
|
+
}
|
|
5386
|
+
if (context?.fetch) {
|
|
5387
|
+
return context?.fetch;
|
|
5388
|
+
}
|
|
5389
|
+
return fetchFile;
|
|
5390
|
+
}
|
|
5391
|
+
function validateOptions(options, loaders) {
|
|
5392
|
+
validateOptionsObject(options, null, DEFAULT_LOADER_OPTIONS, REMOVED_LOADER_OPTIONS, loaders);
|
|
5393
|
+
for (const loader of loaders) {
|
|
5394
|
+
const idOptions = options && options[loader.id] || {};
|
|
5395
|
+
const loaderOptions = loader.options && loader.options[loader.id] || {};
|
|
5396
|
+
const deprecatedOptions = loader.deprecatedOptions && loader.deprecatedOptions[loader.id] || {};
|
|
5397
|
+
validateOptionsObject(idOptions, loader.id, loaderOptions, deprecatedOptions, loaders);
|
|
5398
|
+
}
|
|
5399
|
+
}
|
|
5400
|
+
function validateOptionsObject(options, id, defaultOptions, deprecatedOptions, loaders) {
|
|
5401
|
+
const loaderName = id || "Top level";
|
|
5402
|
+
const prefix = id ? `${id}.` : "";
|
|
5403
|
+
for (const key in options) {
|
|
5404
|
+
const isSubOptions = !id && isObject(options[key]);
|
|
5405
|
+
const isBaseUriOption = key === "baseUri" && !id;
|
|
5406
|
+
const isWorkerUrlOption = key === "workerUrl" && id;
|
|
5407
|
+
if (!(key in defaultOptions) && !isBaseUriOption && !isWorkerUrlOption) {
|
|
5408
|
+
if (key in deprecatedOptions) {
|
|
5409
|
+
probeLog.warn(`${loaderName} loader option '${prefix}${key}' no longer supported, use '${deprecatedOptions[key]}'`)();
|
|
5410
|
+
} else if (!isSubOptions) {
|
|
5411
|
+
const suggestion = findSimilarOption(key, loaders);
|
|
5412
|
+
probeLog.warn(`${loaderName} loader option '${prefix}${key}' not recognized. ${suggestion}`)();
|
|
5891
5413
|
}
|
|
5892
|
-
|
|
5893
|
-
|
|
5414
|
+
}
|
|
5415
|
+
}
|
|
5416
|
+
}
|
|
5417
|
+
function findSimilarOption(optionKey, loaders) {
|
|
5418
|
+
const lowerCaseOptionKey = optionKey.toLowerCase();
|
|
5419
|
+
let bestSuggestion = "";
|
|
5420
|
+
for (const loader of loaders) {
|
|
5421
|
+
for (const key in loader.options) {
|
|
5422
|
+
if (optionKey === key) {
|
|
5423
|
+
return `Did you mean '${loader.id}.${key}'?`;
|
|
5894
5424
|
}
|
|
5895
|
-
|
|
5896
|
-
|
|
5425
|
+
const lowerCaseKey = key.toLowerCase();
|
|
5426
|
+
const isPartialMatch = lowerCaseOptionKey.startsWith(lowerCaseKey) || lowerCaseKey.startsWith(lowerCaseOptionKey);
|
|
5427
|
+
if (isPartialMatch) {
|
|
5428
|
+
bestSuggestion = bestSuggestion || `Did you mean '${loader.id}.${key}'?`;
|
|
5897
5429
|
}
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5430
|
+
}
|
|
5431
|
+
}
|
|
5432
|
+
return bestSuggestion;
|
|
5433
|
+
}
|
|
5434
|
+
function normalizeOptionsInternal(loader, options, url) {
|
|
5435
|
+
const loaderDefaultOptions = loader.options || {};
|
|
5436
|
+
const mergedOptions = { ...loaderDefaultOptions };
|
|
5437
|
+
addUrlOptions(mergedOptions, url);
|
|
5438
|
+
if (mergedOptions.log === null) {
|
|
5439
|
+
mergedOptions.log = new NullLog();
|
|
5440
|
+
}
|
|
5441
|
+
mergeNestedFields(mergedOptions, getGlobalLoaderOptions());
|
|
5442
|
+
mergeNestedFields(mergedOptions, options);
|
|
5443
|
+
return mergedOptions;
|
|
5444
|
+
}
|
|
5445
|
+
function mergeNestedFields(mergedOptions, options) {
|
|
5446
|
+
for (const key in options) {
|
|
5447
|
+
if (key in options) {
|
|
5448
|
+
const value = options[key];
|
|
5449
|
+
if (isPureObject(value) && isPureObject(mergedOptions[key])) {
|
|
5450
|
+
mergedOptions[key] = {
|
|
5451
|
+
...mergedOptions[key],
|
|
5452
|
+
...options[key]
|
|
5901
5453
|
};
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
message,
|
|
5905
|
-
opts
|
|
5906
|
-
});
|
|
5907
|
-
const {
|
|
5908
|
-
collapsed
|
|
5909
|
-
} = opts;
|
|
5910
|
-
options.method = (collapsed ? console.groupCollapsed : console.group) || console.info;
|
|
5911
|
-
return this._getLogFunction(options);
|
|
5912
|
-
}
|
|
5913
|
-
groupCollapsed(logLevel, message) {
|
|
5914
|
-
let opts = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
5915
|
-
return this.group(logLevel, message, Object.assign({}, opts, {
|
|
5916
|
-
collapsed: true
|
|
5917
|
-
}));
|
|
5918
|
-
}
|
|
5919
|
-
groupEnd(logLevel) {
|
|
5920
|
-
return this._getLogFunction(logLevel, "", console.groupEnd || noop3);
|
|
5921
|
-
}
|
|
5922
|
-
withGroup(logLevel, message, func) {
|
|
5923
|
-
this.group(logLevel, message)();
|
|
5924
|
-
try {
|
|
5925
|
-
func();
|
|
5926
|
-
} finally {
|
|
5927
|
-
this.groupEnd(logLevel)();
|
|
5928
|
-
}
|
|
5929
|
-
}
|
|
5930
|
-
trace() {
|
|
5931
|
-
if (console.trace) {
|
|
5932
|
-
console.trace();
|
|
5933
|
-
}
|
|
5934
|
-
}
|
|
5935
|
-
_shouldLog(logLevel) {
|
|
5936
|
-
return this.isEnabled() && this.getLevel() >= normalizeLogLevel2(logLevel);
|
|
5937
|
-
}
|
|
5938
|
-
_getLogFunction(logLevel, message, method, args, opts) {
|
|
5939
|
-
if (this._shouldLog(logLevel)) {
|
|
5940
|
-
opts = normalizeArguments2({
|
|
5941
|
-
logLevel,
|
|
5942
|
-
message,
|
|
5943
|
-
args,
|
|
5944
|
-
opts
|
|
5945
|
-
});
|
|
5946
|
-
method = method || opts.method;
|
|
5947
|
-
assert6(method);
|
|
5948
|
-
opts.total = this.getTotal();
|
|
5949
|
-
opts.delta = this.getDelta();
|
|
5950
|
-
this._deltaTs = getHiResTimestamp3();
|
|
5951
|
-
const tag = opts.tag || opts.message;
|
|
5952
|
-
if (opts.once) {
|
|
5953
|
-
if (!cache2[tag]) {
|
|
5954
|
-
cache2[tag] = getHiResTimestamp3();
|
|
5955
|
-
} else {
|
|
5956
|
-
return noop3;
|
|
5957
|
-
}
|
|
5958
|
-
}
|
|
5959
|
-
message = decorateMessage2(this.id, opts.message, opts);
|
|
5960
|
-
return method.bind(console, message, ...opts.args);
|
|
5961
|
-
}
|
|
5962
|
-
return noop3;
|
|
5454
|
+
} else {
|
|
5455
|
+
mergedOptions[key] = options[key];
|
|
5963
5456
|
}
|
|
5457
|
+
}
|
|
5458
|
+
}
|
|
5459
|
+
}
|
|
5460
|
+
function addUrlOptions(options, url) {
|
|
5461
|
+
if (url && !("baseUri" in options)) {
|
|
5462
|
+
options.baseUri = url;
|
|
5463
|
+
}
|
|
5464
|
+
}
|
|
5465
|
+
var getGlobalLoaderOptions;
|
|
5466
|
+
var init_option_utils = __esm({
|
|
5467
|
+
"../core/src/lib/loader-utils/option-utils.ts"() {
|
|
5468
|
+
init_is_type();
|
|
5469
|
+
init_fetch_file();
|
|
5470
|
+
init_loggers();
|
|
5471
|
+
init_option_defaults();
|
|
5472
|
+
getGlobalLoaderOptions = () => {
|
|
5473
|
+
const state = getGlobalLoaderState();
|
|
5474
|
+
state.globalOptions = state.globalOptions || { ...DEFAULT_LOADER_OPTIONS };
|
|
5475
|
+
return state.globalOptions;
|
|
5964
5476
|
};
|
|
5965
|
-
_defineProperty(Log2, "VERSION", VERSION4);
|
|
5966
5477
|
}
|
|
5967
5478
|
});
|
|
5968
5479
|
|
|
5969
|
-
//
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5480
|
+
// ../core/src/lib/loader-utils/normalize-loader.ts
|
|
5481
|
+
function isLoaderObject(loader) {
|
|
5482
|
+
if (!loader) {
|
|
5483
|
+
return false;
|
|
5484
|
+
}
|
|
5485
|
+
if (Array.isArray(loader)) {
|
|
5486
|
+
loader = loader[0];
|
|
5487
|
+
}
|
|
5488
|
+
const hasExtensions = Array.isArray(loader?.extensions);
|
|
5489
|
+
return hasExtensions;
|
|
5490
|
+
}
|
|
5491
|
+
function normalizeLoader(loader) {
|
|
5492
|
+
assert2(loader, "null loader");
|
|
5493
|
+
assert2(isLoaderObject(loader), "invalid loader");
|
|
5494
|
+
let options;
|
|
5495
|
+
if (Array.isArray(loader)) {
|
|
5496
|
+
options = loader[1];
|
|
5497
|
+
loader = loader[0];
|
|
5498
|
+
loader = {
|
|
5499
|
+
...loader,
|
|
5500
|
+
options: { ...loader.options, ...options }
|
|
5501
|
+
};
|
|
5502
|
+
}
|
|
5503
|
+
if (loader?.parseTextSync || loader?.parseText) {
|
|
5504
|
+
loader.text = true;
|
|
5505
|
+
}
|
|
5506
|
+
if (!loader.text) {
|
|
5507
|
+
loader.binary = true;
|
|
5508
|
+
}
|
|
5509
|
+
return loader;
|
|
5510
|
+
}
|
|
5511
|
+
var init_normalize_loader = __esm({
|
|
5512
|
+
"../core/src/lib/loader-utils/normalize-loader.ts"() {
|
|
5513
|
+
init_src2();
|
|
5514
|
+
}
|
|
5515
|
+
});
|
|
5516
|
+
|
|
5517
|
+
// ../core/src/lib/api/register-loaders.ts
|
|
5518
|
+
function getRegisteredLoaders() {
|
|
5519
|
+
return getGlobalLoaderRegistry();
|
|
5520
|
+
}
|
|
5521
|
+
var getGlobalLoaderRegistry;
|
|
5522
|
+
var init_register_loaders = __esm({
|
|
5523
|
+
"../core/src/lib/api/register-loaders.ts"() {
|
|
5524
|
+
init_option_utils();
|
|
5525
|
+
getGlobalLoaderRegistry = () => {
|
|
5526
|
+
const state = getGlobalLoaderState();
|
|
5527
|
+
state.loaderRegistry = state.loaderRegistry || [];
|
|
5528
|
+
return state.loaderRegistry;
|
|
5529
|
+
};
|
|
5978
5530
|
}
|
|
5979
5531
|
});
|
|
5980
5532
|
|
|
5981
5533
|
// ../core/src/lib/utils/log.ts
|
|
5982
5534
|
var log;
|
|
5983
|
-
var
|
|
5535
|
+
var init_log2 = __esm({
|
|
5984
5536
|
"../core/src/lib/utils/log.ts"() {
|
|
5985
|
-
|
|
5986
|
-
log = new
|
|
5537
|
+
init_esm5();
|
|
5538
|
+
log = new Log({ id: "loaders.gl" });
|
|
5987
5539
|
}
|
|
5988
5540
|
});
|
|
5989
5541
|
|
|
@@ -6172,7 +5724,7 @@
|
|
|
6172
5724
|
"../core/src/lib/api/select-loader.ts"() {
|
|
6173
5725
|
init_src2();
|
|
6174
5726
|
init_normalize_loader();
|
|
6175
|
-
|
|
5727
|
+
init_log2();
|
|
6176
5728
|
init_resource_utils();
|
|
6177
5729
|
init_register_loaders();
|
|
6178
5730
|
init_is_type();
|
|
@@ -6525,10 +6077,10 @@
|
|
|
6525
6077
|
});
|
|
6526
6078
|
|
|
6527
6079
|
// src/lib/utils/version.ts
|
|
6528
|
-
var
|
|
6080
|
+
var VERSION4;
|
|
6529
6081
|
var init_version2 = __esm({
|
|
6530
6082
|
"src/lib/utils/version.ts"() {
|
|
6531
|
-
|
|
6083
|
+
VERSION4 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
6532
6084
|
}
|
|
6533
6085
|
});
|
|
6534
6086
|
|
|
@@ -6574,10 +6126,10 @@
|
|
|
6574
6126
|
});
|
|
6575
6127
|
|
|
6576
6128
|
// ../draco/src/lib/utils/version.ts
|
|
6577
|
-
var
|
|
6129
|
+
var VERSION5;
|
|
6578
6130
|
var init_version3 = __esm({
|
|
6579
6131
|
"../draco/src/lib/utils/version.ts"() {
|
|
6580
|
-
|
|
6132
|
+
VERSION5 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
6581
6133
|
}
|
|
6582
6134
|
});
|
|
6583
6135
|
|
|
@@ -6600,7 +6152,7 @@
|
|
|
6600
6152
|
id: isBrowser2 ? "draco" : "draco-nodejs",
|
|
6601
6153
|
module: "draco",
|
|
6602
6154
|
shapes: ["mesh"],
|
|
6603
|
-
version:
|
|
6155
|
+
version: VERSION5,
|
|
6604
6156
|
worker: true,
|
|
6605
6157
|
extensions: ["drc"],
|
|
6606
6158
|
mimeTypes: ["application/octet-stream"],
|
|
@@ -6643,12 +6195,12 @@
|
|
|
6643
6195
|
});
|
|
6644
6196
|
|
|
6645
6197
|
// ../schema/src/lib/utils/assert.ts
|
|
6646
|
-
function
|
|
6198
|
+
function assert6(condition, message) {
|
|
6647
6199
|
if (!condition) {
|
|
6648
6200
|
throw new Error(message || "loader assertion failed.");
|
|
6649
6201
|
}
|
|
6650
6202
|
}
|
|
6651
|
-
var
|
|
6203
|
+
var init_assert5 = __esm({
|
|
6652
6204
|
"../schema/src/lib/utils/assert.ts"() {
|
|
6653
6205
|
}
|
|
6654
6206
|
});
|
|
@@ -6669,10 +6221,10 @@
|
|
|
6669
6221
|
var Schema;
|
|
6670
6222
|
var init_schema = __esm({
|
|
6671
6223
|
"../schema/src/lib/schema/impl/schema.ts"() {
|
|
6672
|
-
|
|
6224
|
+
init_assert5();
|
|
6673
6225
|
Schema = class {
|
|
6674
6226
|
constructor(fields, metadata) {
|
|
6675
|
-
|
|
6227
|
+
assert6(Array.isArray(fields));
|
|
6676
6228
|
checkNames(fields);
|
|
6677
6229
|
this.fields = fields;
|
|
6678
6230
|
this.metadata = metadata || new Map();
|
|
@@ -7760,12 +7312,12 @@
|
|
|
7760
7312
|
});
|
|
7761
7313
|
|
|
7762
7314
|
// ../math/src/geometry/utils/assert.ts
|
|
7763
|
-
function
|
|
7315
|
+
function assert7(condition, message) {
|
|
7764
7316
|
if (!condition) {
|
|
7765
7317
|
throw new Error(`math.gl assertion failed. ${message}`);
|
|
7766
7318
|
}
|
|
7767
7319
|
}
|
|
7768
|
-
var
|
|
7320
|
+
var init_assert6 = __esm({
|
|
7769
7321
|
"../math/src/geometry/utils/assert.ts"() {
|
|
7770
7322
|
}
|
|
7771
7323
|
});
|
|
@@ -7793,7 +7345,7 @@
|
|
|
7793
7345
|
return value < 0 ? -1 : 1;
|
|
7794
7346
|
}
|
|
7795
7347
|
function octDecodeInRange(x, y, rangeMax, result) {
|
|
7796
|
-
|
|
7348
|
+
assert7(result);
|
|
7797
7349
|
if (x < 0 || x > rangeMax || y < 0 || y > rangeMax) {
|
|
7798
7350
|
throw new Error(`x and y must be unsigned normalized integers between 0 and ${rangeMax}`);
|
|
7799
7351
|
}
|
|
@@ -7813,8 +7365,8 @@
|
|
|
7813
7365
|
var RIGHT_SHIFT, scratchVector23, scratchVector32, scratchEncodeVector2, octEncodeScratch, uint8ForceArray;
|
|
7814
7366
|
var init_attribute_compression = __esm({
|
|
7815
7367
|
"../math/src/geometry/compression/attribute-compression.ts"() {
|
|
7816
|
-
|
|
7817
|
-
|
|
7368
|
+
init_esm2();
|
|
7369
|
+
init_assert6();
|
|
7818
7370
|
RIGHT_SHIFT = 1 / 256;
|
|
7819
7371
|
scratchVector23 = new Vector2();
|
|
7820
7372
|
scratchVector32 = new Vector3();
|
|
@@ -8626,7 +8178,7 @@
|
|
|
8626
8178
|
var scratchNormal2;
|
|
8627
8179
|
var init_normalize_3d_tile_normals = __esm({
|
|
8628
8180
|
"src/lib/parsers/helpers/normalize-3d-tile-normals.ts"() {
|
|
8629
|
-
|
|
8181
|
+
init_esm2();
|
|
8630
8182
|
init_src7();
|
|
8631
8183
|
scratchNormal2 = new Vector3();
|
|
8632
8184
|
}
|
|
@@ -8658,7 +8210,7 @@
|
|
|
8658
8210
|
}
|
|
8659
8211
|
var init_normalize_3d_tile_positions = __esm({
|
|
8660
8212
|
"src/lib/parsers/helpers/normalize-3d-tile-positions.ts"() {
|
|
8661
|
-
|
|
8213
|
+
init_esm2();
|
|
8662
8214
|
init_src7();
|
|
8663
8215
|
}
|
|
8664
8216
|
});
|
|
@@ -8854,7 +8406,7 @@
|
|
|
8854
8406
|
"src/lib/parsers/parse-3d-tile-point-cloud.ts"() {
|
|
8855
8407
|
init_src6();
|
|
8856
8408
|
init_src7();
|
|
8857
|
-
|
|
8409
|
+
init_esm2();
|
|
8858
8410
|
init_tile_3d_feature_table();
|
|
8859
8411
|
init_tile_3d_batch_table();
|
|
8860
8412
|
init_parse_3d_tile_header();
|
|
@@ -8866,18 +8418,18 @@
|
|
|
8866
8418
|
});
|
|
8867
8419
|
|
|
8868
8420
|
// ../gltf/src/lib/utils/version.ts
|
|
8869
|
-
var
|
|
8421
|
+
var VERSION6;
|
|
8870
8422
|
var init_version4 = __esm({
|
|
8871
8423
|
"../gltf/src/lib/utils/version.ts"() {
|
|
8872
|
-
|
|
8424
|
+
VERSION6 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
8873
8425
|
}
|
|
8874
8426
|
});
|
|
8875
8427
|
|
|
8876
8428
|
// ../textures/src/lib/utils/version.ts
|
|
8877
|
-
var
|
|
8429
|
+
var VERSION7;
|
|
8878
8430
|
var init_version5 = __esm({
|
|
8879
8431
|
"../textures/src/lib/utils/version.ts"() {
|
|
8880
|
-
|
|
8432
|
+
VERSION7 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "beta";
|
|
8881
8433
|
}
|
|
8882
8434
|
});
|
|
8883
8435
|
|
|
@@ -8906,8 +8458,8 @@
|
|
|
8906
8458
|
options.wasmBinary = wasmBinary;
|
|
8907
8459
|
}
|
|
8908
8460
|
return new Promise((resolve) => {
|
|
8909
|
-
BasisModule(options).then((
|
|
8910
|
-
const { BasisFile, initializeBasis } =
|
|
8461
|
+
BasisModule(options).then((module) => {
|
|
8462
|
+
const { BasisFile, initializeBasis } = module;
|
|
8911
8463
|
initializeBasis();
|
|
8912
8464
|
resolve({ BasisFile });
|
|
8913
8465
|
});
|
|
@@ -8937,20 +8489,20 @@
|
|
|
8937
8489
|
options.wasmBinary = wasmBinary;
|
|
8938
8490
|
}
|
|
8939
8491
|
return new Promise((resolve) => {
|
|
8940
|
-
BasisEncoderModule(options).then((
|
|
8941
|
-
const { BasisFile, KTX2File, initializeBasis, BasisEncoder } =
|
|
8492
|
+
BasisEncoderModule(options).then((module) => {
|
|
8493
|
+
const { BasisFile, KTX2File, initializeBasis, BasisEncoder } = module;
|
|
8942
8494
|
initializeBasis();
|
|
8943
8495
|
resolve({ BasisFile, KTX2File, BasisEncoder });
|
|
8944
8496
|
});
|
|
8945
8497
|
});
|
|
8946
8498
|
}
|
|
8947
|
-
var
|
|
8499
|
+
var VERSION8, BASIS_CDN_ENCODER_WASM, BASIS_CDN_ENCODER_JS, loadBasisTranscoderPromise, loadBasisEncoderPromise;
|
|
8948
8500
|
var init_basis_module_loader = __esm({
|
|
8949
8501
|
"../textures/src/lib/parsers/basis-module-loader.ts"() {
|
|
8950
8502
|
init_src();
|
|
8951
|
-
|
|
8952
|
-
BASIS_CDN_ENCODER_WASM = `https://unpkg.com/@loaders.gl/textures@${
|
|
8953
|
-
BASIS_CDN_ENCODER_JS = `https://unpkg.com/@loaders.gl/textures@${
|
|
8503
|
+
VERSION8 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "beta";
|
|
8504
|
+
BASIS_CDN_ENCODER_WASM = `https://unpkg.com/@loaders.gl/textures@${VERSION8}/dist/libs/basis_encoder.wasm`;
|
|
8505
|
+
BASIS_CDN_ENCODER_JS = `https://unpkg.com/@loaders.gl/textures@${VERSION8}/dist/libs/basis_encoder.js`;
|
|
8954
8506
|
}
|
|
8955
8507
|
});
|
|
8956
8508
|
|
|
@@ -9313,7 +8865,7 @@
|
|
|
9313
8865
|
name: "Basis",
|
|
9314
8866
|
id: isBrowser2 ? "basis" : "basis-nodejs",
|
|
9315
8867
|
module: "textures",
|
|
9316
|
-
version:
|
|
8868
|
+
version: VERSION7,
|
|
9317
8869
|
worker: true,
|
|
9318
8870
|
extensions: ["basis", "ktx2"],
|
|
9319
8871
|
mimeTypes: ["application/octet-stream", "image/ktx2"],
|
|
@@ -9336,10 +8888,10 @@
|
|
|
9336
8888
|
});
|
|
9337
8889
|
|
|
9338
8890
|
// ../images/src/lib/utils/version.ts
|
|
9339
|
-
var
|
|
8891
|
+
var VERSION9;
|
|
9340
8892
|
var init_version6 = __esm({
|
|
9341
8893
|
"../images/src/lib/utils/version.ts"() {
|
|
9342
|
-
|
|
8894
|
+
VERSION9 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
9343
8895
|
}
|
|
9344
8896
|
});
|
|
9345
8897
|
|
|
@@ -9734,7 +9286,7 @@
|
|
|
9734
9286
|
id: "image",
|
|
9735
9287
|
module: "images",
|
|
9736
9288
|
name: "Images",
|
|
9737
|
-
version:
|
|
9289
|
+
version: VERSION9,
|
|
9738
9290
|
mimeTypes: MIME_TYPES,
|
|
9739
9291
|
extensions: EXTENSIONS,
|
|
9740
9292
|
parse: parseImage,
|
|
@@ -9803,12 +9355,12 @@
|
|
|
9803
9355
|
});
|
|
9804
9356
|
|
|
9805
9357
|
// ../gltf/src/lib/utils/assert.ts
|
|
9806
|
-
function
|
|
9358
|
+
function assert8(condition, message) {
|
|
9807
9359
|
if (!condition) {
|
|
9808
9360
|
throw new Error(message || "assert failed: gltf");
|
|
9809
9361
|
}
|
|
9810
9362
|
}
|
|
9811
|
-
var
|
|
9363
|
+
var init_assert7 = __esm({
|
|
9812
9364
|
"../gltf/src/lib/utils/assert.ts"() {
|
|
9813
9365
|
}
|
|
9814
9366
|
});
|
|
@@ -9833,16 +9385,16 @@
|
|
|
9833
9385
|
// ../gltf/src/lib/gltf-utils/get-typed-array.ts
|
|
9834
9386
|
function getTypedArrayForBufferView(json, buffers, bufferViewIndex) {
|
|
9835
9387
|
const bufferView = json.bufferViews[bufferViewIndex];
|
|
9836
|
-
|
|
9388
|
+
assert8(bufferView);
|
|
9837
9389
|
const bufferIndex = bufferView.buffer;
|
|
9838
9390
|
const binChunk = buffers[bufferIndex];
|
|
9839
|
-
|
|
9391
|
+
assert8(binChunk);
|
|
9840
9392
|
const byteOffset = (bufferView.byteOffset || 0) + binChunk.byteOffset;
|
|
9841
9393
|
return new Uint8Array(binChunk.arrayBuffer, byteOffset, bufferView.byteLength);
|
|
9842
9394
|
}
|
|
9843
9395
|
var init_get_typed_array = __esm({
|
|
9844
9396
|
"../gltf/src/lib/gltf-utils/get-typed-array.ts"() {
|
|
9845
|
-
|
|
9397
|
+
init_assert7();
|
|
9846
9398
|
}
|
|
9847
9399
|
});
|
|
9848
9400
|
|
|
@@ -9864,13 +9416,13 @@
|
|
|
9864
9416
|
const bytesPerComponent = ATTRIBUTE_COMPONENT_TYPE_TO_BYTE_SIZE[accessor.componentType];
|
|
9865
9417
|
const length4 = accessor.count * components;
|
|
9866
9418
|
const byteLength = accessor.count * components * bytesPerComponent;
|
|
9867
|
-
|
|
9419
|
+
assert8(byteLength >= 0 && byteLength <= bufferView.byteLength);
|
|
9868
9420
|
return { ArrayType, length: length4, byteLength };
|
|
9869
9421
|
}
|
|
9870
9422
|
var TYPES, ARRAY_CONSTRUCTOR_TO_WEBGL_CONSTANT, ARRAY_TO_COMPONENT_TYPE, ATTRIBUTE_TYPE_TO_COMPONENTS, ATTRIBUTE_COMPONENT_TYPE_TO_BYTE_SIZE, ATTRIBUTE_COMPONENT_TYPE_TO_ARRAY;
|
|
9871
9423
|
var init_gltf_utils = __esm({
|
|
9872
9424
|
"../gltf/src/lib/gltf-utils/gltf-utils.ts"() {
|
|
9873
|
-
|
|
9425
|
+
init_assert7();
|
|
9874
9426
|
TYPES = ["SCALAR", "VEC2", "VEC3", "VEC4"];
|
|
9875
9427
|
ARRAY_CONSTRUCTOR_TO_WEBGL_CONSTANT = [
|
|
9876
9428
|
[Int8Array, 5120],
|
|
@@ -9916,7 +9468,7 @@
|
|
|
9916
9468
|
"../gltf/src/lib/api/gltf-scenegraph.ts"() {
|
|
9917
9469
|
init_src8();
|
|
9918
9470
|
init_src2();
|
|
9919
|
-
|
|
9471
|
+
init_assert7();
|
|
9920
9472
|
init_gltf_utils();
|
|
9921
9473
|
DEFAULT_GLTF_JSON = {
|
|
9922
9474
|
asset: {
|
|
@@ -10015,7 +9567,7 @@
|
|
|
10015
9567
|
bufferView = this.getBufferView(bufferView);
|
|
10016
9568
|
const bufferIndex = bufferView.buffer;
|
|
10017
9569
|
const binChunk = this.gltf.buffers[bufferIndex];
|
|
10018
|
-
|
|
9570
|
+
assert8(binChunk);
|
|
10019
9571
|
const byteOffset = (bufferView.byteOffset || 0) + binChunk.byteOffset;
|
|
10020
9572
|
return new Uint8Array(binChunk.arrayBuffer, byteOffset, bufferView.byteLength);
|
|
10021
9573
|
}
|
|
@@ -10062,14 +9614,14 @@
|
|
|
10062
9614
|
return extension;
|
|
10063
9615
|
}
|
|
10064
9616
|
addExtension(extensionName, extensionData = {}) {
|
|
10065
|
-
|
|
9617
|
+
assert8(extensionData);
|
|
10066
9618
|
this.json.extensions = this.json.extensions || {};
|
|
10067
9619
|
this.json.extensions[extensionName] = extensionData;
|
|
10068
9620
|
this.registerUsedExtension(extensionName);
|
|
10069
9621
|
return extensionData;
|
|
10070
9622
|
}
|
|
10071
9623
|
addRequiredExtension(extensionName, extensionData = {}) {
|
|
10072
|
-
|
|
9624
|
+
assert8(extensionData);
|
|
10073
9625
|
this.addExtension(extensionName, extensionData);
|
|
10074
9626
|
this.registerRequiredExtension(extensionName);
|
|
10075
9627
|
return extensionData;
|
|
@@ -10167,7 +9719,7 @@
|
|
|
10167
9719
|
}
|
|
10168
9720
|
addBufferView(buffer) {
|
|
10169
9721
|
const byteLength = buffer.byteLength;
|
|
10170
|
-
|
|
9722
|
+
assert8(Number.isFinite(byteLength));
|
|
10171
9723
|
this.sourceBuffers = this.sourceBuffers || [];
|
|
10172
9724
|
this.sourceBuffers.push(buffer);
|
|
10173
9725
|
const glTFBufferView = {
|
|
@@ -10951,7 +10503,7 @@
|
|
|
10951
10503
|
var EXT_MESHOPT_TRANSFORM, name5, scratchVector5, scratchRotationMatrix, scratchScaleMatrix;
|
|
10952
10504
|
var init_KHR_texture_transform = __esm({
|
|
10953
10505
|
"../gltf/src/lib/extensions/KHR_texture_transform.ts"() {
|
|
10954
|
-
|
|
10506
|
+
init_esm2();
|
|
10955
10507
|
init_gltf_utils();
|
|
10956
10508
|
init_gltf_constants();
|
|
10957
10509
|
init_gltf_scenegraph();
|
|
@@ -10991,7 +10543,7 @@
|
|
|
10991
10543
|
const { json } = gltfScenegraph;
|
|
10992
10544
|
if (json.lights) {
|
|
10993
10545
|
const extension = gltfScenegraph.addExtension(KHR_LIGHTS_PUNCTUAL);
|
|
10994
|
-
|
|
10546
|
+
assert8(!extension.lights);
|
|
10995
10547
|
extension.lights = json.lights;
|
|
10996
10548
|
delete json.lights;
|
|
10997
10549
|
}
|
|
@@ -11006,7 +10558,7 @@
|
|
|
11006
10558
|
var KHR_LIGHTS_PUNCTUAL, name6;
|
|
11007
10559
|
var init_KHR_lights_punctual = __esm({
|
|
11008
10560
|
"../gltf/src/lib/extensions/deprecated/KHR_lights_punctual.ts"() {
|
|
11009
|
-
|
|
10561
|
+
init_assert7();
|
|
11010
10562
|
init_gltf_scenegraph();
|
|
11011
10563
|
KHR_LIGHTS_PUNCTUAL = "KHR_lights_punctual";
|
|
11012
10564
|
name6 = KHR_LIGHTS_PUNCTUAL;
|
|
@@ -11488,7 +11040,7 @@
|
|
|
11488
11040
|
var COMPONENTS2, BYTES2, GL_SAMPLER, SAMPLER_PARAMETER_GLTF_TO_GL, DEFAULT_SAMPLER, GLTFPostProcessor;
|
|
11489
11041
|
var init_post_process_gltf = __esm({
|
|
11490
11042
|
"../gltf/src/lib/api/post-process-gltf.ts"() {
|
|
11491
|
-
|
|
11043
|
+
init_assert7();
|
|
11492
11044
|
init_gltf_utils();
|
|
11493
11045
|
COMPONENTS2 = {
|
|
11494
11046
|
SCALAR: 1,
|
|
@@ -11537,7 +11089,7 @@
|
|
|
11537
11089
|
}
|
|
11538
11090
|
postProcess(gltf, options = {}) {
|
|
11539
11091
|
const { json, buffers = [], images = [], baseUri = "" } = gltf;
|
|
11540
|
-
|
|
11092
|
+
assert8(json);
|
|
11541
11093
|
this.baseUri = baseUri;
|
|
11542
11094
|
this.json = json;
|
|
11543
11095
|
this.buffers = buffers;
|
|
@@ -11941,11 +11493,11 @@
|
|
|
11941
11493
|
} else if (data instanceof ArrayBuffer) {
|
|
11942
11494
|
const glb = {};
|
|
11943
11495
|
byteOffset = parseGLBSync(glb, data, byteOffset, options.glb);
|
|
11944
|
-
|
|
11496
|
+
assert8(glb.type === "glTF", `Invalid GLB magic string ${glb.type}`);
|
|
11945
11497
|
gltf._glb = glb;
|
|
11946
11498
|
gltf.json = glb.json;
|
|
11947
11499
|
} else {
|
|
11948
|
-
|
|
11500
|
+
assert8(false, "GLTF: must be ArrayBuffer or string");
|
|
11949
11501
|
}
|
|
11950
11502
|
const buffers = gltf.json.buffers || [];
|
|
11951
11503
|
gltf.buffers = new Array(buffers.length).fill(null);
|
|
@@ -11966,7 +11518,7 @@
|
|
|
11966
11518
|
const buffer = buffers[i2];
|
|
11967
11519
|
if (buffer.uri) {
|
|
11968
11520
|
const { fetch: fetch2 } = context;
|
|
11969
|
-
|
|
11521
|
+
assert8(fetch2);
|
|
11970
11522
|
const uri = resolveUrl(buffer.uri, options);
|
|
11971
11523
|
const response = await context?.fetch?.(uri);
|
|
11972
11524
|
const arrayBuffer = await response?.arrayBuffer?.();
|
|
@@ -12019,7 +11571,7 @@
|
|
|
12019
11571
|
const array = getTypedArrayForBufferView(gltf.json, gltf.buffers, image.bufferView);
|
|
12020
11572
|
arrayBuffer = sliceArrayBuffer(array.buffer, array.byteOffset, array.byteLength);
|
|
12021
11573
|
}
|
|
12022
|
-
|
|
11574
|
+
assert8(arrayBuffer, "glTF image has no data");
|
|
12023
11575
|
let parsedImage = await parse5(arrayBuffer, [ImageLoader, BasisLoader], { mimeType: image.mimeType, basis: options.basis || { format: selectSupportedBasisFormat() } }, context);
|
|
12024
11576
|
if (parsedImage && parsedImage[0]) {
|
|
12025
11577
|
parsedImage = {
|
|
@@ -12038,7 +11590,7 @@
|
|
|
12038
11590
|
init_src9();
|
|
12039
11591
|
init_src8();
|
|
12040
11592
|
init_src2();
|
|
12041
|
-
|
|
11593
|
+
init_assert7();
|
|
12042
11594
|
init_resolve_url();
|
|
12043
11595
|
init_get_typed_array();
|
|
12044
11596
|
init_gltf_extensions();
|
|
@@ -12065,7 +11617,7 @@
|
|
|
12065
11617
|
name: "glTF",
|
|
12066
11618
|
id: "gltf",
|
|
12067
11619
|
module: "gltf",
|
|
12068
|
-
version:
|
|
11620
|
+
version: VERSION6,
|
|
12069
11621
|
extensions: ["gltf", "glb"],
|
|
12070
11622
|
mimeTypes: ["model/gltf+json", "model/gltf-binary"],
|
|
12071
11623
|
text: true,
|
|
@@ -12335,8 +11887,8 @@
|
|
|
12335
11887
|
}
|
|
12336
11888
|
var init_parse_3d_tile_instanced_model = __esm({
|
|
12337
11889
|
"src/lib/parsers/parse-3d-tile-instanced-model.ts"() {
|
|
12338
|
-
init_esm();
|
|
12339
11890
|
init_esm2();
|
|
11891
|
+
init_esm3();
|
|
12340
11892
|
init_src7();
|
|
12341
11893
|
init_tile_3d_feature_table();
|
|
12342
11894
|
init_tile_3d_batch_table();
|
|
@@ -12493,7 +12045,7 @@
|
|
|
12493
12045
|
id: "3d-tiles-subtree",
|
|
12494
12046
|
name: "3D Tiles Subtree",
|
|
12495
12047
|
module: "3d-tiles",
|
|
12496
|
-
version:
|
|
12048
|
+
version: VERSION4,
|
|
12497
12049
|
extensions: ["subtree"],
|
|
12498
12050
|
mimeTypes: ["application/octet-stream"],
|
|
12499
12051
|
tests: ["subtree"],
|
|
@@ -12882,7 +12434,7 @@
|
|
|
12882
12434
|
id: "3d-tiles",
|
|
12883
12435
|
name: "3D Tiles",
|
|
12884
12436
|
module: "3d-tiles",
|
|
12885
|
-
version:
|
|
12437
|
+
version: VERSION4,
|
|
12886
12438
|
extensions: ["cmpt", "pnts", "b3dm", "i3dm"],
|
|
12887
12439
|
mimeTypes: ["application/octet-stream"],
|
|
12888
12440
|
tests: ["cmpt", "pnts", "b3dm", "i3dm"],
|
|
@@ -13202,7 +12754,7 @@
|
|
|
13202
12754
|
name: "3D Tile",
|
|
13203
12755
|
id: "3d-tiles",
|
|
13204
12756
|
module: "3d-tiles",
|
|
13205
|
-
version:
|
|
12757
|
+
version: VERSION4,
|
|
13206
12758
|
extensions: ["cmpt", "pnts", "b3dm", "i3dm"],
|
|
13207
12759
|
mimeTypes: ["application/octet-stream"],
|
|
13208
12760
|
encodeSync,
|
|
@@ -13241,10 +12793,10 @@
|
|
|
13241
12793
|
|
|
13242
12794
|
// src/bundle.ts
|
|
13243
12795
|
var require_bundle = __commonJS({
|
|
13244
|
-
"src/bundle.ts"(exports,
|
|
12796
|
+
"src/bundle.ts"(exports, module) {
|
|
13245
12797
|
var moduleExports = (init_src11(), src_exports);
|
|
13246
12798
|
globalThis.loaders = globalThis.loaders || {};
|
|
13247
|
-
|
|
12799
|
+
module.exports = Object.assign(globalThis.loaders, moduleExports);
|
|
13248
12800
|
}
|
|
13249
12801
|
});
|
|
13250
12802
|
require_bundle();
|