@loaders.gl/i3s 3.3.2 → 3.4.0-alpha.2
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 +194 -148
- package/dist/es5/arcgis-webscene-loader.js +1 -1
- package/dist/es5/arcgis-webscene-loader.js.map +1 -1
- package/dist/es5/i3s-attribute-loader.js +1 -1
- package/dist/es5/i3s-attribute-loader.js.map +1 -1
- package/dist/es5/i3s-building-scene-layer-loader.js +1 -1
- package/dist/es5/i3s-building-scene-layer-loader.js.map +1 -1
- package/dist/es5/i3s-content-loader.js +1 -1
- package/dist/es5/i3s-content-loader.js.map +1 -1
- package/dist/es5/i3s-loader.js +1 -1
- package/dist/es5/i3s-loader.js.map +1 -1
- package/dist/es5/i3s-node-page-loader.js +1 -1
- package/dist/es5/i3s-node-page-loader.js.map +1 -1
- package/dist/es5/lib/helpers/i3s-nodepages-tiles.js.map +1 -1
- package/dist/es5/lib/parsers/parse-i3s-tile-content.js.map +1 -1
- package/dist/es5/lib/parsers/parse-i3s.js.map +1 -1
- package/dist/es5/types.js.map +1 -1
- package/dist/esm/arcgis-webscene-loader.js +1 -1
- package/dist/esm/arcgis-webscene-loader.js.map +1 -1
- package/dist/esm/i3s-attribute-loader.js +1 -1
- package/dist/esm/i3s-attribute-loader.js.map +1 -1
- package/dist/esm/i3s-building-scene-layer-loader.js +1 -1
- package/dist/esm/i3s-building-scene-layer-loader.js.map +1 -1
- package/dist/esm/i3s-content-loader.js +1 -1
- package/dist/esm/i3s-content-loader.js.map +1 -1
- package/dist/esm/i3s-loader.js +1 -1
- package/dist/esm/i3s-loader.js.map +1 -1
- package/dist/esm/i3s-node-page-loader.js +1 -1
- package/dist/esm/i3s-node-page-loader.js.map +1 -1
- package/dist/esm/lib/helpers/i3s-nodepages-tiles.js.map +1 -1
- package/dist/esm/lib/parsers/parse-i3s-tile-content.js +1 -0
- package/dist/esm/lib/parsers/parse-i3s-tile-content.js.map +1 -1
- package/dist/esm/lib/parsers/parse-i3s.js.map +1 -1
- package/dist/esm/types.js.map +1 -1
- package/dist/i3s-content-nodejs-worker.js +59 -62
- package/dist/i3s-content-nodejs-worker.js.map +3 -3
- package/dist/i3s-content-worker.js +139 -95
- package/dist/lib/helpers/i3s-nodepages-tiles.d.ts.map +1 -1
- package/dist/lib/helpers/i3s-nodepages-tiles.js +5 -1
- package/dist/lib/parsers/parse-i3s-tile-content.d.ts.map +1 -1
- package/dist/lib/parsers/parse-i3s-tile-content.js +2 -0
- package/dist/lib/parsers/parse-i3s.d.ts.map +1 -1
- package/dist/lib/parsers/parse-i3s.js +2 -0
- package/dist/types.d.ts +5 -5
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/lib/helpers/i3s-nodepages-tiles.ts +3 -0
- package/src/lib/parsers/parse-i3s-tile-content.ts +2 -0
- package/src/lib/parsers/parse-i3s.ts +2 -0
- package/src/types.ts +6 -5
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
var nodeVersion = matches && parseFloat(matches[1]) || 0;
|
|
56
56
|
|
|
57
57
|
// ../worker-utils/src/lib/env-utils/version.ts
|
|
58
|
-
var VERSION = true ? "3.
|
|
58
|
+
var VERSION = true ? "3.4.0-alpha.2" : DEFAULT_VERSION;
|
|
59
59
|
if (false) {
|
|
60
60
|
console.error("loaders.gl: The __VERSION__ variable is not injected using babel plugin. Latest unstable workers would be fetched from the CDN.");
|
|
61
61
|
}
|
|
@@ -520,7 +520,7 @@
|
|
|
520
520
|
}
|
|
521
521
|
|
|
522
522
|
// ../worker-utils/src/lib/worker-api/get-worker-url.ts
|
|
523
|
-
var NPM_TAG = "
|
|
523
|
+
var NPM_TAG = "beta";
|
|
524
524
|
function getWorkerURL(worker, options = {}) {
|
|
525
525
|
const workerOptions = options[worker.id] || {};
|
|
526
526
|
const workerFile = `${worker.id}-worker.js`;
|
|
@@ -555,7 +555,7 @@
|
|
|
555
555
|
|
|
556
556
|
// ../worker-utils/src/lib/library-utils/library-utils.ts
|
|
557
557
|
var node = __toModule(require_require_utils());
|
|
558
|
-
var LATEST = "
|
|
558
|
+
var LATEST = "beta";
|
|
559
559
|
var VERSION2 = typeof VERSION !== "undefined" ? VERSION : LATEST;
|
|
560
560
|
var loadLibraryPromises = {};
|
|
561
561
|
async function loadLibrary(libraryUrl, moduleName = null, options = {}) {
|
|
@@ -814,13 +814,18 @@
|
|
|
814
814
|
return filename2;
|
|
815
815
|
}
|
|
816
816
|
|
|
817
|
+
// ../loader-utils/src/lib/node/buffer.browser.ts
|
|
818
|
+
function toArrayBuffer(buffer) {
|
|
819
|
+
return buffer;
|
|
820
|
+
}
|
|
821
|
+
|
|
817
822
|
// ../loader-utils/src/lib/binary-utils/memory-conversion-utils.ts
|
|
818
823
|
function isBuffer(value) {
|
|
819
824
|
return value && typeof value === "object" && value.isBuffer;
|
|
820
825
|
}
|
|
821
826
|
function toArrayBuffer2(data) {
|
|
822
827
|
if (isBuffer(data)) {
|
|
823
|
-
return
|
|
828
|
+
return toArrayBuffer(data);
|
|
824
829
|
}
|
|
825
830
|
if (data instanceof ArrayBuffer) {
|
|
826
831
|
return data;
|
|
@@ -1040,12 +1045,12 @@
|
|
|
1040
1045
|
return await makeResponse(url);
|
|
1041
1046
|
}
|
|
1042
1047
|
|
|
1043
|
-
//
|
|
1048
|
+
// ../core/node_modules/@probe.gl/env/dist/lib/is-electron.js
|
|
1044
1049
|
function isElectron(mockUserAgent) {
|
|
1045
1050
|
if (typeof window !== "undefined" && typeof window.process === "object" && window.process.type === "renderer") {
|
|
1046
1051
|
return true;
|
|
1047
1052
|
}
|
|
1048
|
-
if (typeof process !== "undefined" && typeof process.versions === "object" && Boolean(process.versions
|
|
1053
|
+
if (typeof process !== "undefined" && typeof process.versions === "object" && Boolean(process.versions["electron"])) {
|
|
1049
1054
|
return true;
|
|
1050
1055
|
}
|
|
1051
1056
|
const realUserAgent = typeof navigator === "object" && typeof navigator.userAgent === "string" && navigator.userAgent;
|
|
@@ -1056,30 +1061,25 @@
|
|
|
1056
1061
|
return false;
|
|
1057
1062
|
}
|
|
1058
1063
|
|
|
1059
|
-
//
|
|
1064
|
+
// ../core/node_modules/@probe.gl/env/dist/lib/is-browser.js
|
|
1060
1065
|
function isBrowser3() {
|
|
1061
1066
|
const isNode = typeof process === "object" && String(process) === "[object process]" && !process.browser;
|
|
1062
1067
|
return !isNode || isElectron();
|
|
1063
1068
|
}
|
|
1064
1069
|
|
|
1065
|
-
//
|
|
1066
|
-
var
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
};
|
|
1073
|
-
var self_3 = globals3.self || globals3.window || globals3.global;
|
|
1074
|
-
var window_3 = globals3.window || globals3.self || globals3.global;
|
|
1075
|
-
var document_3 = globals3.document || {};
|
|
1076
|
-
var process_ = globals3.process || {};
|
|
1070
|
+
// ../core/node_modules/@probe.gl/env/dist/lib/globals.js
|
|
1071
|
+
var self2 = globalThis.self || globalThis.window || globalThis.global;
|
|
1072
|
+
var window2 = globalThis.window || globalThis.self || globalThis.global;
|
|
1073
|
+
var document2 = globalThis.document || {};
|
|
1074
|
+
var process2 = globalThis.process || {};
|
|
1075
|
+
var console2 = globalThis.console;
|
|
1076
|
+
var navigator2 = globalThis.navigator || {};
|
|
1077
1077
|
|
|
1078
|
-
//
|
|
1079
|
-
var VERSION3 = true ? "3.
|
|
1078
|
+
// ../core/node_modules/@probe.gl/env/dist/utils/globals.js
|
|
1079
|
+
var VERSION3 = true ? "3.4.0-alpha.2" : "untranspiled source";
|
|
1080
1080
|
var isBrowser4 = isBrowser3();
|
|
1081
1081
|
|
|
1082
|
-
//
|
|
1082
|
+
// ../core/node_modules/@probe.gl/log/dist/utils/local-storage.js
|
|
1083
1083
|
function getStorage(type) {
|
|
1084
1084
|
try {
|
|
1085
1085
|
const storage = window[type];
|
|
@@ -1092,32 +1092,25 @@
|
|
|
1092
1092
|
}
|
|
1093
1093
|
}
|
|
1094
1094
|
var LocalStorage = class {
|
|
1095
|
-
constructor(id) {
|
|
1096
|
-
let defaultSettings = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1095
|
+
constructor(id, defaultConfig) {
|
|
1097
1096
|
let type = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "sessionStorage";
|
|
1098
1097
|
_defineProperty(this, "storage", void 0);
|
|
1099
1098
|
_defineProperty(this, "id", void 0);
|
|
1100
|
-
_defineProperty(this, "config",
|
|
1099
|
+
_defineProperty(this, "config", void 0);
|
|
1101
1100
|
this.storage = getStorage(type);
|
|
1102
1101
|
this.id = id;
|
|
1103
|
-
this.config =
|
|
1104
|
-
Object.assign(this.config, defaultSettings);
|
|
1102
|
+
this.config = defaultConfig;
|
|
1105
1103
|
this._loadConfiguration();
|
|
1106
1104
|
}
|
|
1107
1105
|
getConfiguration() {
|
|
1108
1106
|
return this.config;
|
|
1109
1107
|
}
|
|
1110
1108
|
setConfiguration(configuration) {
|
|
1111
|
-
this.config = {};
|
|
1112
|
-
return this.updateConfiguration(configuration);
|
|
1113
|
-
}
|
|
1114
|
-
updateConfiguration(configuration) {
|
|
1115
1109
|
Object.assign(this.config, configuration);
|
|
1116
1110
|
if (this.storage) {
|
|
1117
1111
|
const serialized = JSON.stringify(this.config);
|
|
1118
1112
|
this.storage.setItem(this.id, serialized);
|
|
1119
1113
|
}
|
|
1120
|
-
return this;
|
|
1121
1114
|
}
|
|
1122
1115
|
_loadConfiguration() {
|
|
1123
1116
|
let configuration = {};
|
|
@@ -1130,7 +1123,7 @@
|
|
|
1130
1123
|
}
|
|
1131
1124
|
};
|
|
1132
1125
|
|
|
1133
|
-
//
|
|
1126
|
+
// ../core/node_modules/@probe.gl/log/dist/utils/formatters.js
|
|
1134
1127
|
function formatTime(ms) {
|
|
1135
1128
|
let formatted;
|
|
1136
1129
|
if (ms < 10) {
|
|
@@ -1161,7 +1154,7 @@
|
|
|
1161
1154
|
return ["".concat(message, " %c+"), style];
|
|
1162
1155
|
}
|
|
1163
1156
|
|
|
1164
|
-
//
|
|
1157
|
+
// ../core/node_modules/@probe.gl/log/dist/utils/color.js
|
|
1165
1158
|
var COLOR;
|
|
1166
1159
|
(function(COLOR2) {
|
|
1167
1160
|
COLOR2[COLOR2["BLACK"] = 30] = "BLACK";
|
|
@@ -1181,53 +1174,60 @@
|
|
|
1181
1174
|
COLOR2[COLOR2["BRIGHT_CYAN"] = 96] = "BRIGHT_CYAN";
|
|
1182
1175
|
COLOR2[COLOR2["BRIGHT_WHITE"] = 97] = "BRIGHT_WHITE";
|
|
1183
1176
|
})(COLOR || (COLOR = {}));
|
|
1177
|
+
var BACKGROUND_INCREMENT = 10;
|
|
1184
1178
|
function getColor(color) {
|
|
1185
|
-
|
|
1179
|
+
if (typeof color !== "string") {
|
|
1180
|
+
return color;
|
|
1181
|
+
}
|
|
1182
|
+
color = color.toUpperCase();
|
|
1183
|
+
return COLOR[color] || COLOR.WHITE;
|
|
1186
1184
|
}
|
|
1187
1185
|
function addColor(string, color, background) {
|
|
1188
1186
|
if (!isBrowser3 && typeof string === "string") {
|
|
1189
1187
|
if (color) {
|
|
1190
|
-
|
|
1191
|
-
string = "[".concat(
|
|
1188
|
+
const colorCode = getColor(color);
|
|
1189
|
+
string = "[".concat(colorCode, "m").concat(string, "[39m");
|
|
1192
1190
|
}
|
|
1193
1191
|
if (background) {
|
|
1194
|
-
|
|
1195
|
-
string = "[".concat(
|
|
1192
|
+
const colorCode = getColor(background);
|
|
1193
|
+
string = "[".concat(colorCode + BACKGROUND_INCREMENT, "m").concat(string, "[49m");
|
|
1196
1194
|
}
|
|
1197
1195
|
}
|
|
1198
1196
|
return string;
|
|
1199
1197
|
}
|
|
1200
1198
|
|
|
1201
|
-
//
|
|
1199
|
+
// ../core/node_modules/@probe.gl/log/dist/utils/autobind.js
|
|
1202
1200
|
function autobind(obj) {
|
|
1203
1201
|
let predefined = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ["constructor"];
|
|
1204
1202
|
const proto = Object.getPrototypeOf(obj);
|
|
1205
1203
|
const propNames = Object.getOwnPropertyNames(proto);
|
|
1204
|
+
const object = obj;
|
|
1206
1205
|
for (const key of propNames) {
|
|
1207
|
-
|
|
1206
|
+
const value = object[key];
|
|
1207
|
+
if (typeof value === "function") {
|
|
1208
1208
|
if (!predefined.find((name) => key === name)) {
|
|
1209
|
-
|
|
1209
|
+
object[key] = value.bind(obj);
|
|
1210
1210
|
}
|
|
1211
1211
|
}
|
|
1212
1212
|
}
|
|
1213
1213
|
}
|
|
1214
1214
|
|
|
1215
|
-
//
|
|
1215
|
+
// ../core/node_modules/@probe.gl/log/dist/utils/assert.js
|
|
1216
1216
|
function assert3(condition, message) {
|
|
1217
1217
|
if (!condition) {
|
|
1218
1218
|
throw new Error(message || "Assertion failed");
|
|
1219
1219
|
}
|
|
1220
1220
|
}
|
|
1221
1221
|
|
|
1222
|
-
//
|
|
1222
|
+
// ../core/node_modules/@probe.gl/log/dist/utils/hi-res-timestamp.js
|
|
1223
1223
|
function getHiResTimestamp() {
|
|
1224
1224
|
let timestamp;
|
|
1225
|
-
if (isBrowser3 &&
|
|
1225
|
+
if (isBrowser3() && window2.performance) {
|
|
1226
1226
|
var _window$performance, _window$performance$n;
|
|
1227
|
-
timestamp =
|
|
1228
|
-
} else if ("hrtime" in
|
|
1227
|
+
timestamp = window2 === null || window2 === void 0 ? void 0 : (_window$performance = window2.performance) === null || _window$performance === void 0 ? void 0 : (_window$performance$n = _window$performance.now) === null || _window$performance$n === void 0 ? void 0 : _window$performance$n.call(_window$performance);
|
|
1228
|
+
} else if ("hrtime" in process2) {
|
|
1229
1229
|
var _process$hrtime;
|
|
1230
|
-
const timeParts =
|
|
1230
|
+
const timeParts = process2 === null || process2 === void 0 ? void 0 : (_process$hrtime = process2.hrtime) === null || _process$hrtime === void 0 ? void 0 : _process$hrtime.call(process2);
|
|
1231
1231
|
timestamp = timeParts[0] * 1e3 + timeParts[1] / 1e6;
|
|
1232
1232
|
} else {
|
|
1233
1233
|
timestamp = Date.now();
|
|
@@ -1235,15 +1235,15 @@
|
|
|
1235
1235
|
return timestamp;
|
|
1236
1236
|
}
|
|
1237
1237
|
|
|
1238
|
-
//
|
|
1238
|
+
// ../core/node_modules/@probe.gl/log/dist/log.js
|
|
1239
1239
|
var originalConsole = {
|
|
1240
|
-
debug: isBrowser3 ? console.debug || console.log : console.log,
|
|
1240
|
+
debug: isBrowser3() ? console.debug || console.log : console.log,
|
|
1241
1241
|
log: console.log,
|
|
1242
1242
|
info: console.info,
|
|
1243
1243
|
warn: console.warn,
|
|
1244
1244
|
error: console.error
|
|
1245
1245
|
};
|
|
1246
|
-
var
|
|
1246
|
+
var DEFAULT_LOG_CONFIGURATION = {
|
|
1247
1247
|
enabled: true,
|
|
1248
1248
|
level: 0
|
|
1249
1249
|
};
|
|
@@ -1268,8 +1268,8 @@
|
|
|
1268
1268
|
_defineProperty(this, "userData", {});
|
|
1269
1269
|
_defineProperty(this, "LOG_THROTTLE_TIMEOUT", 0);
|
|
1270
1270
|
this.id = id;
|
|
1271
|
-
this._storage = new LocalStorage("__probe-".concat(this.id, "__"), DEFAULT_SETTINGS);
|
|
1272
1271
|
this.userData = {};
|
|
1272
|
+
this._storage = new LocalStorage("__probe-".concat(this.id, "__"), DEFAULT_LOG_CONFIGURATION);
|
|
1273
1273
|
this.timeStamp("".concat(this.id, " started"));
|
|
1274
1274
|
autobind(this);
|
|
1275
1275
|
Object.seal(this);
|
|
@@ -1303,13 +1303,13 @@
|
|
|
1303
1303
|
}
|
|
1304
1304
|
enable() {
|
|
1305
1305
|
let enabled = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
|
|
1306
|
-
this._storage.
|
|
1306
|
+
this._storage.setConfiguration({
|
|
1307
1307
|
enabled
|
|
1308
1308
|
});
|
|
1309
1309
|
return this;
|
|
1310
1310
|
}
|
|
1311
1311
|
setLevel(level) {
|
|
1312
|
-
this._storage.
|
|
1312
|
+
this._storage.setConfiguration({
|
|
1313
1313
|
level
|
|
1314
1314
|
});
|
|
1315
1315
|
return this;
|
|
@@ -1318,7 +1318,7 @@
|
|
|
1318
1318
|
return this._storage.config[setting];
|
|
1319
1319
|
}
|
|
1320
1320
|
set(setting, value) {
|
|
1321
|
-
this._storage.
|
|
1321
|
+
this._storage.setConfiguration({
|
|
1322
1322
|
[setting]: value
|
|
1323
1323
|
});
|
|
1324
1324
|
}
|
|
@@ -1357,9 +1357,6 @@
|
|
|
1357
1357
|
return this._getLogFunction(logLevel, message, console.info, arguments);
|
|
1358
1358
|
}
|
|
1359
1359
|
once(logLevel, message) {
|
|
1360
|
-
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
1361
|
-
args[_key - 2] = arguments[_key];
|
|
1362
|
-
}
|
|
1363
1360
|
return this._getLogFunction(logLevel, message, originalConsole.debug || originalConsole.info, arguments, ONCE);
|
|
1364
1361
|
}
|
|
1365
1362
|
table(logLevel, table, columns) {
|
|
@@ -1381,7 +1378,7 @@
|
|
|
1381
1378
|
if (!this._shouldLog(logLevel || priority)) {
|
|
1382
1379
|
return noop;
|
|
1383
1380
|
}
|
|
1384
|
-
return isBrowser3 ? logImageInBrowser({
|
|
1381
|
+
return isBrowser3() ? logImageInBrowser({
|
|
1385
1382
|
image,
|
|
1386
1383
|
message,
|
|
1387
1384
|
scale: scale2
|
|
@@ -1454,7 +1451,7 @@
|
|
|
1454
1451
|
opts.delta = this.getDelta();
|
|
1455
1452
|
this._deltaTs = getHiResTimestamp();
|
|
1456
1453
|
const tag = opts.tag || opts.message;
|
|
1457
|
-
if (opts.once) {
|
|
1454
|
+
if (opts.once && tag) {
|
|
1458
1455
|
if (!cache[tag]) {
|
|
1459
1456
|
cache[tag] = getHiResTimestamp();
|
|
1460
1457
|
} else {
|
|
@@ -1531,11 +1528,7 @@
|
|
|
1531
1528
|
message = "",
|
|
1532
1529
|
scale: scale2 = 1
|
|
1533
1530
|
} = _ref2;
|
|
1534
|
-
|
|
1535
|
-
image,
|
|
1536
|
-
message,
|
|
1537
|
-
scale: scale2
|
|
1538
|
-
});
|
|
1531
|
+
console.warn("removed");
|
|
1539
1532
|
return noop;
|
|
1540
1533
|
}
|
|
1541
1534
|
function logImageInBrowser(_ref3) {
|
|
@@ -1575,8 +1568,8 @@
|
|
|
1575
1568
|
return "empty";
|
|
1576
1569
|
}
|
|
1577
1570
|
|
|
1578
|
-
//
|
|
1579
|
-
var
|
|
1571
|
+
// ../core/node_modules/@probe.gl/log/dist/index.js
|
|
1572
|
+
var dist_default = new Log({
|
|
1580
1573
|
id: "@probe.gl/log"
|
|
1581
1574
|
});
|
|
1582
1575
|
|
|
@@ -1674,20 +1667,6 @@
|
|
|
1674
1667
|
validateOptions(options, loaders);
|
|
1675
1668
|
return normalizeOptionsInternal(loader, options, url);
|
|
1676
1669
|
}
|
|
1677
|
-
function getFetchFunction(options, context) {
|
|
1678
|
-
const globalOptions = getGlobalLoaderOptions();
|
|
1679
|
-
const fetchOptions = options || globalOptions;
|
|
1680
|
-
if (typeof fetchOptions.fetch === "function") {
|
|
1681
|
-
return fetchOptions.fetch;
|
|
1682
|
-
}
|
|
1683
|
-
if (isObject(fetchOptions.fetch)) {
|
|
1684
|
-
return (url) => fetchFile(url, fetchOptions);
|
|
1685
|
-
}
|
|
1686
|
-
if (context?.fetch) {
|
|
1687
|
-
return context?.fetch;
|
|
1688
|
-
}
|
|
1689
|
-
return fetchFile;
|
|
1690
|
-
}
|
|
1691
1670
|
function validateOptions(options, loaders) {
|
|
1692
1671
|
validateOptionsObject(options, null, DEFAULT_LOADER_OPTIONS, REMOVED_LOADER_OPTIONS, loaders);
|
|
1693
1672
|
for (const loader of loaders) {
|
|
@@ -2136,6 +2115,22 @@
|
|
|
2136
2115
|
throw new Error(ERR_DATA);
|
|
2137
2116
|
}
|
|
2138
2117
|
|
|
2118
|
+
// ../core/src/lib/loader-utils/get-fetch-function.ts
|
|
2119
|
+
function getFetchFunction(options, context) {
|
|
2120
|
+
const globalOptions = getGlobalLoaderOptions();
|
|
2121
|
+
const fetchOptions = options || globalOptions;
|
|
2122
|
+
if (typeof fetchOptions.fetch === "function") {
|
|
2123
|
+
return fetchOptions.fetch;
|
|
2124
|
+
}
|
|
2125
|
+
if (isObject(fetchOptions.fetch)) {
|
|
2126
|
+
return (url) => fetchFile(url, fetchOptions);
|
|
2127
|
+
}
|
|
2128
|
+
if (context?.fetch) {
|
|
2129
|
+
return context?.fetch;
|
|
2130
|
+
}
|
|
2131
|
+
return fetchFile;
|
|
2132
|
+
}
|
|
2133
|
+
|
|
2139
2134
|
// ../core/src/lib/loader-utils/loader-context.ts
|
|
2140
2135
|
function getLoaderContext(context, options, previousContext = null) {
|
|
2141
2136
|
if (previousContext) {
|
|
@@ -4415,7 +4410,7 @@
|
|
|
4415
4410
|
_defineProperty(Ellipsoid, "WGS84", new Ellipsoid(WGS84_RADIUS_X, WGS84_RADIUS_Y, WGS84_RADIUS_Z));
|
|
4416
4411
|
|
|
4417
4412
|
// ../images/src/lib/utils/version.ts
|
|
4418
|
-
var VERSION4 = true ? "3.
|
|
4413
|
+
var VERSION4 = true ? "3.4.0-alpha.2" : "latest";
|
|
4419
4414
|
|
|
4420
4415
|
// ../images/src/lib/category-api/image-type.ts
|
|
4421
4416
|
var { _parseImageNode } = globalThis;
|
|
@@ -4584,12 +4579,60 @@
|
|
|
4584
4579
|
return true;
|
|
4585
4580
|
}
|
|
4586
4581
|
|
|
4582
|
+
// ../images/src/lib/category-api/parse-isobmff-binary.ts
|
|
4583
|
+
function getISOBMFFMediaType(buffer) {
|
|
4584
|
+
if (!checkString(buffer, "ftyp", 4)) {
|
|
4585
|
+
return null;
|
|
4586
|
+
}
|
|
4587
|
+
if ((buffer[8] & 96) === 0) {
|
|
4588
|
+
return null;
|
|
4589
|
+
}
|
|
4590
|
+
return decodeMajorBrand(buffer);
|
|
4591
|
+
}
|
|
4592
|
+
function decodeMajorBrand(buffer) {
|
|
4593
|
+
const brandMajor = getUTF8String(buffer, 8, 12).replace("\0", " ").trim();
|
|
4594
|
+
switch (brandMajor) {
|
|
4595
|
+
case "avif":
|
|
4596
|
+
case "avis":
|
|
4597
|
+
return { extension: "avif", mimeType: "image/avif" };
|
|
4598
|
+
default:
|
|
4599
|
+
return null;
|
|
4600
|
+
}
|
|
4601
|
+
}
|
|
4602
|
+
function getUTF8String(array, start, end) {
|
|
4603
|
+
return String.fromCharCode(...array.slice(start, end));
|
|
4604
|
+
}
|
|
4605
|
+
function stringToBytes(string) {
|
|
4606
|
+
return [...string].map((character) => character.charCodeAt(0));
|
|
4607
|
+
}
|
|
4608
|
+
function checkString(buffer, header, offset = 0) {
|
|
4609
|
+
const headerBytes = stringToBytes(header);
|
|
4610
|
+
for (let i2 = 0; i2 < headerBytes.length; ++i2) {
|
|
4611
|
+
if (headerBytes[i2] !== buffer[i2 + offset]) {
|
|
4612
|
+
return false;
|
|
4613
|
+
}
|
|
4614
|
+
}
|
|
4615
|
+
return true;
|
|
4616
|
+
}
|
|
4617
|
+
|
|
4587
4618
|
// ../images/src/lib/category-api/binary-image-api.ts
|
|
4588
4619
|
var BIG_ENDIAN = false;
|
|
4589
4620
|
var LITTLE_ENDIAN = true;
|
|
4590
4621
|
function getBinaryImageMetadata(binaryData) {
|
|
4591
4622
|
const dataView = toDataView(binaryData);
|
|
4592
|
-
return getPngMetadata(dataView) || getJpegMetadata(dataView) || getGifMetadata(dataView) || getBmpMetadata(dataView);
|
|
4623
|
+
return getPngMetadata(dataView) || getJpegMetadata(dataView) || getGifMetadata(dataView) || getBmpMetadata(dataView) || getISOBMFFMetadata(dataView);
|
|
4624
|
+
}
|
|
4625
|
+
function getISOBMFFMetadata(binaryData) {
|
|
4626
|
+
const buffer = new Uint8Array(binaryData instanceof DataView ? binaryData.buffer : binaryData);
|
|
4627
|
+
const mediaType = getISOBMFFMediaType(buffer);
|
|
4628
|
+
if (!mediaType) {
|
|
4629
|
+
return null;
|
|
4630
|
+
}
|
|
4631
|
+
return {
|
|
4632
|
+
mimeType: mediaType.mimeType,
|
|
4633
|
+
width: 0,
|
|
4634
|
+
height: 0
|
|
4635
|
+
};
|
|
4593
4636
|
}
|
|
4594
4637
|
function getPngMetadata(binaryData) {
|
|
4595
4638
|
const dataView = toDataView(binaryData);
|
|
@@ -4734,12 +4777,13 @@
|
|
|
4734
4777
|
}
|
|
4735
4778
|
|
|
4736
4779
|
// ../images/src/image-loader.ts
|
|
4737
|
-
var EXTENSIONS = ["png", "jpg", "jpeg", "gif", "webp", "bmp", "ico", "svg"];
|
|
4780
|
+
var EXTENSIONS = ["png", "jpg", "jpeg", "gif", "webp", "bmp", "ico", "svg", "avif"];
|
|
4738
4781
|
var MIME_TYPES = [
|
|
4739
4782
|
"image/png",
|
|
4740
4783
|
"image/jpeg",
|
|
4741
4784
|
"image/gif",
|
|
4742
4785
|
"image/webp",
|
|
4786
|
+
"image/avif",
|
|
4743
4787
|
"image/bmp",
|
|
4744
4788
|
"image/vnd.microsoft.icon",
|
|
4745
4789
|
"image/svg+xml"
|
|
@@ -4763,7 +4807,7 @@
|
|
|
4763
4807
|
};
|
|
4764
4808
|
|
|
4765
4809
|
// ../draco/src/lib/utils/version.ts
|
|
4766
|
-
var VERSION5 = true ? "3.
|
|
4810
|
+
var VERSION5 = true ? "3.4.0-alpha.2" : "latest";
|
|
4767
4811
|
|
|
4768
4812
|
// ../draco/src/draco-loader.ts
|
|
4769
4813
|
var DEFAULT_DRACO_OPTIONS = {
|
|
@@ -5749,10 +5793,10 @@
|
|
|
5749
5793
|
}
|
|
5750
5794
|
|
|
5751
5795
|
// ../textures/src/lib/utils/version.ts
|
|
5752
|
-
var VERSION6 = true ? "3.
|
|
5796
|
+
var VERSION6 = true ? "3.4.0-alpha.2" : "beta";
|
|
5753
5797
|
|
|
5754
5798
|
// ../textures/src/lib/parsers/basis-module-loader.ts
|
|
5755
|
-
var VERSION7 = true ? "3.
|
|
5799
|
+
var VERSION7 = true ? "3.4.0-alpha.2" : "beta";
|
|
5756
5800
|
var BASIS_CDN_ENCODER_WASM = `https://unpkg.com/@loaders.gl/textures@${VERSION7}/dist/libs/basis_encoder.wasm`;
|
|
5757
5801
|
var BASIS_CDN_ENCODER_JS = `https://unpkg.com/@loaders.gl/textures@${VERSION7}/dist/libs/basis_encoder.js`;
|
|
5758
5802
|
var loadBasisTranscoderPromise;
|
|
@@ -6719,7 +6763,7 @@
|
|
|
6719
6763
|
}
|
|
6720
6764
|
|
|
6721
6765
|
// ../../node_modules/@luma.gl/constants/dist/esm/index.js
|
|
6722
|
-
var
|
|
6766
|
+
var esm_default = {
|
|
6723
6767
|
DEPTH_BUFFER_BIT: 256,
|
|
6724
6768
|
STENCIL_BUFFER_BIT: 1024,
|
|
6725
6769
|
COLOR_BUFFER_BIT: 16384,
|
|
@@ -7354,11 +7398,11 @@
|
|
|
7354
7398
|
}
|
|
7355
7399
|
}
|
|
7356
7400
|
var GL_TYPE_MAP = {
|
|
7357
|
-
UInt8:
|
|
7358
|
-
UInt16:
|
|
7359
|
-
Float32:
|
|
7360
|
-
UInt32:
|
|
7361
|
-
UInt64:
|
|
7401
|
+
UInt8: esm_default.UNSIGNED_BYTE,
|
|
7402
|
+
UInt16: esm_default.UNSIGNED_SHORT,
|
|
7403
|
+
Float32: esm_default.FLOAT,
|
|
7404
|
+
UInt32: esm_default.UNSIGNED_INT,
|
|
7405
|
+
UInt64: esm_default.DOUBLE
|
|
7362
7406
|
};
|
|
7363
7407
|
function sizeOf(dataType) {
|
|
7364
7408
|
switch (dataType) {
|
|
@@ -7450,7 +7494,7 @@
|
|
|
7450
7494
|
}
|
|
7451
7495
|
|
|
7452
7496
|
// src/i3s-attribute-loader.ts
|
|
7453
|
-
var VERSION8 = true ? "3.
|
|
7497
|
+
var VERSION8 = true ? "3.4.0-alpha.2" : "latest";
|
|
7454
7498
|
var I3SAttributeLoader = {
|
|
7455
7499
|
name: "I3S Attribute",
|
|
7456
7500
|
id: "i3s-attribute",
|
|
@@ -7911,7 +7955,7 @@
|
|
|
7911
7955
|
}
|
|
7912
7956
|
|
|
7913
7957
|
// src/i3s-content-loader.ts
|
|
7914
|
-
var VERSION9 = true ? "3.
|
|
7958
|
+
var VERSION9 = true ? "3.4.0-alpha.2" : "beta";
|
|
7915
7959
|
var I3SContentLoader = {
|
|
7916
7960
|
name: "I3S Content (Indexed Scene Layers)",
|
|
7917
7961
|
id: isBrowser2 ? "i3s-content" : "i3s-content-nodejs",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i3s-nodepages-tiles.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/i3s-nodepages-tiles.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EACL,gBAAgB,EAEhB,QAAQ,EACR,UAAU,EAIV,gBAAgB,EAEhB,aAAa,EACd,MAAM,aAAa,CAAC;AAErB;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAiB;IACpC,OAAO,EAAE,gBAAgB,CAAC;IAC1B,SAAS,EAAE,QAAQ,EAAE,CAAM;IAC3B,gBAAgB,EAAE;QAAC,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;QAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAAA;KAAC,EAAE,CAAM;IAClF,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,aAAa,CAAC;IACvB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,iCAAiC,EAAE,CAAC;QAAC,MAAM,EAAE,gBAAgB,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,GAAG,IAAI,CAAC,EAAE,CAAM;IAC5F,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,oBAAoB,CAA4B;IAExD;;;;;OAKG;gBACS,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,aAAa;IAU7D;;;OAGG;IACG,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"i3s-nodepages-tiles.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/i3s-nodepages-tiles.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EACL,gBAAgB,EAEhB,QAAQ,EACR,UAAU,EAIV,gBAAgB,EAEhB,aAAa,EACd,MAAM,aAAa,CAAC;AAErB;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAiB;IACpC,OAAO,EAAE,gBAAgB,CAAC;IAC1B,SAAS,EAAE,QAAQ,EAAE,CAAM;IAC3B,gBAAgB,EAAE;QAAC,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;QAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAAA;KAAC,EAAE,CAAM;IAClF,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,aAAa,CAAC;IACvB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,iCAAiC,EAAE,CAAC;QAAC,MAAM,EAAE,gBAAgB,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,GAAG,IAAI,CAAC,EAAE,CAAM;IAC5F,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,oBAAoB,CAA4B;IAExD;;;;;OAKG;gBACS,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,aAAa;IAU7D;;;OAGG;IACG,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAuBlD;;;OAGG;IAEG,qBAAqB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IA4D/D;;;;;;OAMG;IACH,OAAO,CAAC,aAAa;IA8BrB;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAiBvB;;;;;;;OAOG;IACH,OAAO,CAAC,0BAA0B;IAuBlC;;;;OAIG;IACH,OAAO,CAAC,wCAAwC;IA2BhD;;;OAGG;IACH,OAAO,CAAC,0BAA0B;CAwBnC"}
|
|
@@ -34,7 +34,9 @@ class I3SNodePagesTiles {
|
|
|
34
34
|
async getNodeById(id) {
|
|
35
35
|
const pageIndex = Math.floor(id / this.nodesPerPage);
|
|
36
36
|
if (!this.nodePages[pageIndex] && !this.pendingNodePages[pageIndex]) {
|
|
37
|
-
const nodePageUrl = (0, url_utils_1.getUrlWithToken)(`${this.tileset.url}/nodepages/${pageIndex}`,
|
|
37
|
+
const nodePageUrl = (0, url_utils_1.getUrlWithToken)(`${this.tileset.url}/nodepages/${pageIndex}`,
|
|
38
|
+
// @ts-expect-error this.options is not properly typed
|
|
39
|
+
this.options.i3s?.token);
|
|
38
40
|
this.pendingNodePages[pageIndex] = {
|
|
39
41
|
status: 'Pending',
|
|
40
42
|
promise: (0, core_1.load)(nodePageUrl, i3s_node_page_loader_1.I3SNodePageLoader, this.options)
|
|
@@ -118,6 +120,7 @@ class I3SNodePagesTiles {
|
|
|
118
120
|
const geometryDefinition = this.tileset.geometryDefinitions[meshGeometryData.definition];
|
|
119
121
|
let geometryIndex = -1;
|
|
120
122
|
// Try to find DRACO geometryDefinition of `useDracoGeometry` option is set
|
|
123
|
+
// @ts-expect-error this.options is not properly typed
|
|
121
124
|
if (this.options.i3s && this.options.i3s.useDracoGeometry) {
|
|
122
125
|
geometryIndex = geometryDefinition.geometryBuffers.findIndex((buffer) => buffer.compressedAttributes && buffer.compressedAttributes.encoding === 'draco');
|
|
123
126
|
}
|
|
@@ -215,6 +218,7 @@ class I3SNodePagesTiles {
|
|
|
215
218
|
*/
|
|
216
219
|
getSupportedTextureFormats() {
|
|
217
220
|
const formats = [];
|
|
221
|
+
// @ts-expect-error this.options is not properly typed
|
|
218
222
|
if (!this.options.i3s || this.options.i3s.useCompressedTextures) {
|
|
219
223
|
// I3S 1.7 selection
|
|
220
224
|
const supportedCompressedFormats = (0, textures_1.getSupportedGPUTextureFormats)();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-i3s-tile-content.d.ts","sourceRoot":"","sources":["../../../src/lib/parsers/parse-i3s-tile-content.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,aAAa,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAK3E,OAAO,EAQL,cAAc,EACd,cAAc,EACd,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAyBrB,wBAAsB,mBAAmB,CACvC,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,cAAc,EAC3B,cAAc,EAAE,iBAAiB,EACjC,OAAO,CAAC,EAAE,aAAa,EACvB,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,cAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"parse-i3s-tile-content.d.ts","sourceRoot":"","sources":["../../../src/lib/parsers/parse-i3s-tile-content.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,aAAa,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAK3E,OAAO,EAQL,cAAc,EACd,cAAc,EACd,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAyBrB,wBAAsB,mBAAmB,CACvC,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,cAAc,EAC3B,cAAc,EAAE,iBAAiB,EACjC,OAAO,CAAC,EAAE,aAAa,EACvB,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,cAAc,CAAC,CAyDzB"}
|
|
@@ -38,10 +38,12 @@ async function parseI3STileContent(arrayBuffer, tileOptions, tilesetOptions, opt
|
|
|
38
38
|
texture: null
|
|
39
39
|
};
|
|
40
40
|
if (tileOptions.textureUrl) {
|
|
41
|
+
// @ts-expect-error options is not properly typed
|
|
41
42
|
const url = (0, url_utils_1.getUrlWithToken)(tileOptions.textureUrl, options?.i3s?.token);
|
|
42
43
|
const loader = getLoaderForTextureFormat(tileOptions.textureFormat);
|
|
43
44
|
const response = await fetch(url, options?.fetch);
|
|
44
45
|
const arrayBuffer = await response.arrayBuffer();
|
|
46
|
+
// @ts-expect-error options is not properly typed
|
|
45
47
|
if (options?.i3s.decodeTextures) {
|
|
46
48
|
if (loader === images_1.ImageLoader) {
|
|
47
49
|
const options = { ...tileOptions.textureLoaderOptions, image: { type: 'data' } };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-i3s.d.ts","sourceRoot":"","sources":["../../../src/lib/parsers/parse-i3s.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,gBAAgB,EAChB,aAAa,EAEb,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAC,aAAa,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAE3E,wBAAgB,iBAAiB,CAAC,IAAI,EAAG,mBAAmB,EAAE,OAAO,EAAE,aAAa,GAAG,aAAa,CAyBnG;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAG,kBAAkB,GAAG,aAAa,CAmChF;AAED,wBAAsB,oBAAoB,CAAC,OAAO,EAAG,gBAAgB,EAAE,OAAO,EAAG,aAAa,EAAE,OAAO,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"parse-i3s.d.ts","sourceRoot":"","sources":["../../../src/lib/parsers/parse-i3s.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,gBAAgB,EAChB,aAAa,EAEb,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAC,aAAa,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAE3E,wBAAgB,iBAAiB,CAAC,IAAI,EAAG,mBAAmB,EAAE,OAAO,EAAE,aAAa,GAAG,aAAa,CAyBnG;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAG,kBAAkB,GAAG,aAAa,CAmChF;AAED,wBAAsB,oBAAoB,CAAC,OAAO,EAAG,gBAAgB,EAAE,OAAO,EAAG,aAAa,EAAE,OAAO,EAAE,aAAa,iBA0BrH"}
|
|
@@ -73,11 +73,13 @@ async function normalizeTilesetData(tileset, options, context) {
|
|
|
73
73
|
tileset.root = tileset.nodePagesTile.formTileFromNodePages(0);
|
|
74
74
|
}
|
|
75
75
|
else {
|
|
76
|
+
// @ts-expect-error options is not properly typed
|
|
76
77
|
const rootNodeUrl = (0, url_utils_1.getUrlWithToken)(`${tileset.url}/nodes/root`, options.i3s?.token);
|
|
77
78
|
// eslint-disable-next-line no-use-before-define
|
|
78
79
|
tileset.root = await (0, core_1.load)(rootNodeUrl, tileset.loader, {
|
|
79
80
|
...options,
|
|
80
81
|
i3s: {
|
|
82
|
+
// @ts-expect-error options is not properly typed
|
|
81
83
|
...options.i3s,
|
|
82
84
|
loadContent: false, isTileHeader: true, isTileset: false
|
|
83
85
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -85,11 +85,6 @@ export type I3SParseOptions = {
|
|
|
85
85
|
/** Is 3DNodeIndexDocument json expected in response */
|
|
86
86
|
isTileHeader?: string;
|
|
87
87
|
/** Tile3D instance. This property used only to load tile content */
|
|
88
|
-
/** @deprecated */
|
|
89
|
-
tile?: Tile3D | I3STileOptions;
|
|
90
|
-
/** Tileset3D instance. This property used only to load tile content */
|
|
91
|
-
/** @deprecated */
|
|
92
|
-
tileset?: Tileset3D | I3STilesetOptions;
|
|
93
88
|
/** Tile-specific options */
|
|
94
89
|
_tileOptions?: I3STileOptions;
|
|
95
90
|
/** Tileset-specific options */
|
|
@@ -112,6 +107,11 @@ export type I3SParseOptions = {
|
|
|
112
107
|
minColor: COLOR;
|
|
113
108
|
maxColor: COLOR;
|
|
114
109
|
};
|
|
110
|
+
/** @deprecated */
|
|
111
|
+
tile?: Tile3D | I3STileOptions;
|
|
112
|
+
/** Tileset3D instance. This property used only to load tile content */
|
|
113
|
+
/** @deprecated */
|
|
114
|
+
tileset?: Tileset3D | I3STilesetOptions;
|
|
115
115
|
};
|
|
116
116
|
export type I3STileOptions = {
|
|
117
117
|
isDracoGeometry: boolean;
|