@loaders.gl/potree 4.4.0-alpha.18 → 4.4.0-alpha.19
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.dev.js +18 -1
- package/dist/dist.min.js +5 -5
- package/dist/index.cjs +2 -2
- package/dist/potree-hierarchy-chunk-loader.js +1 -1
- package/dist/potree-loader.js +1 -1
- package/package.json +5 -5
package/dist/dist.dev.js
CHANGED
|
@@ -268,7 +268,7 @@ var __exports__ = (() => {
|
|
|
268
268
|
}
|
|
269
269
|
this.data = data;
|
|
270
270
|
this.url = typeof data === "string" ? resolvePath(data) : "";
|
|
271
|
-
this.loadOptions =
|
|
271
|
+
this.loadOptions = normalizeDirectLoaderOptions(this.options.core?.loadOptions);
|
|
272
272
|
this.fetch = getFetchFunction(this.loadOptions);
|
|
273
273
|
}
|
|
274
274
|
setProps(options) {
|
|
@@ -311,6 +311,23 @@ var __exports__ = (() => {
|
|
|
311
311
|
}
|
|
312
312
|
return (url) => fetch(url);
|
|
313
313
|
}
|
|
314
|
+
function normalizeDirectLoaderOptions(options) {
|
|
315
|
+
const loadOptions = { ...options };
|
|
316
|
+
if (options?.core) {
|
|
317
|
+
loadOptions.core = { ...options.core };
|
|
318
|
+
}
|
|
319
|
+
const topLevelBaseUri = typeof loadOptions.baseUri === "string" ? loadOptions.baseUri : void 0;
|
|
320
|
+
const topLevelBaseUrl = typeof loadOptions.baseUrl === "string" ? loadOptions.baseUrl : void 0;
|
|
321
|
+
if (topLevelBaseUri !== void 0 || topLevelBaseUrl !== void 0) {
|
|
322
|
+
loadOptions.core ||= {};
|
|
323
|
+
if (loadOptions.core.baseUrl === void 0) {
|
|
324
|
+
loadOptions.core.baseUrl = topLevelBaseUrl ?? topLevelBaseUri;
|
|
325
|
+
}
|
|
326
|
+
delete loadOptions.baseUri;
|
|
327
|
+
delete loadOptions.baseUrl;
|
|
328
|
+
}
|
|
329
|
+
return loadOptions;
|
|
330
|
+
}
|
|
314
331
|
|
|
315
332
|
// ../las/src/las-format.ts
|
|
316
333
|
var LASFormat = {
|