@loaders.gl/tiles-3d 5.0.0-beta.4 → 5.0.0-beta.6
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/README.md +1 -1
- package/dist/3d-tiles/3d-tiles-archive-loader.js +1 -1
- package/dist/3d-tiles/dist.dev.js +941 -621
- package/dist/3d-tiles/dist.min.js +37 -37
- package/dist/3d-tiles/index.cjs +876 -947
- package/dist/3d-tiles/index.cjs.map +3 -3
- package/dist/3d-tiles/lib/parsers/parse-3d-tile-instanced-model.js +5 -1
- package/dist/3d-tiles/lib/parsers/parse-3d-tile-instanced-model.js.map +1 -1
- package/dist/3d-tiles/lib/utils/version.js +1 -1
- package/dist/3d-tiles-archive-writer.cjs +1 -1
- package/dist/cesium-ion-loader-with-parser.cjs +821 -942
- package/dist/cesium-ion-loader-with-parser.cjs.map +3 -3
- package/dist/copc/copc-source-loader.js +2 -2
- package/dist/copc/copc-source-loader.js.map +1 -1
- package/dist/copc/copc-writer.js +1 -1
- package/dist/copc/index.cjs +121 -181
- package/dist/copc/index.cjs.map +3 -3
- package/dist/dist.dev.js +323 -40
- package/dist/dist.min.js +10 -10
- package/dist/i3s/arcgis-webscene-loader.js +1 -1
- package/dist/i3s/dist.dev.js +3173 -712
- package/dist/i3s/dist.min.js +47 -47
- package/dist/i3s/i3s-attribute-loader.js +1 -1
- package/dist/i3s/i3s-building-scene-layer-loader.js +1 -1
- package/dist/i3s/i3s-content-loader.js +1 -1
- package/dist/i3s/i3s-lepcc-loader-types.js +1 -1
- package/dist/i3s/i3s-loader.js +1 -1
- package/dist/i3s/i3s-node-page-loader.js +1 -1
- package/dist/i3s/i3s-slpk-loader.js +1 -1
- package/dist/i3s/i3s-slpk-writer.js +1 -1
- package/dist/i3s/index.cjs +2097 -544
- package/dist/i3s/index.cjs.map +3 -3
- package/dist/i3s-content-worker-node.js +11 -11
- package/dist/i3s-content-worker-node.js.map +4 -4
- package/dist/i3s-content-worker.js +768 -346
- package/dist/i3s-lepcc-worker-node.js +245 -12
- package/dist/i3s-lepcc-worker-node.js.map +4 -4
- package/dist/i3s-lepcc-worker.js +240 -12
- package/dist/i3s-mesh-writer.cjs +1749 -290
- package/dist/i3s-mesh-writer.cjs.map +3 -3
- package/dist/i3s-slpk-writer.cjs +1 -1
- package/dist/index.cjs +98 -4
- package/dist/index.cjs.map +2 -2
- package/dist/point-cloud-tile-source-loader-types.js +1 -1
- package/dist/point-cloud-tile-source-loader.cjs +46 -2
- package/dist/point-cloud-tile-source-loader.cjs.map +2 -2
- package/dist/point-cloud-tile-source.cjs +45 -1
- package/dist/point-cloud-tile-source.cjs.map +1 -1
- package/dist/potree/dist.dev.js +325 -91
- package/dist/potree/dist.min.js +30 -30
- package/dist/potree/index.cjs +115 -176
- package/dist/potree/index.cjs.map +3 -3
- package/dist/potree/potree-bin-loader.js +1 -1
- package/dist/potree/potree-hierarchy-chunk-loader.js +1 -1
- package/dist/potree/potree-loader-types.js +1 -1
- package/dist/potree/potree-source-loader.js +1 -1
- package/dist/potree/potree-writer.js +1 -1
- package/dist/potree/potree2-source.d.ts.map +1 -1
- package/dist/potree/potree2-source.js +3 -13
- package/dist/potree/potree2-source.js.map +1 -1
- package/dist/potree-loader.cjs +1 -1
- package/package.json +13 -13
- package/src/3d-tiles/lib/parsers/parse-3d-tile-instanced-model.ts +4 -1
- package/src/copc/copc-source-loader.ts +1 -1
- package/src/potree/potree2-source.ts +3 -14
package/dist/potree/index.cjs
CHANGED
|
@@ -5183,7 +5183,7 @@ function getSourceLoaderOptions(options) {
|
|
|
5183
5183
|
if (options == null ? void 0 : options.core) {
|
|
5184
5184
|
loadOptions.core = { ...options.core };
|
|
5185
5185
|
const parserCore = loadOptions.core;
|
|
5186
|
-
for (const key of ["type", "attributions", "loaders", "onError", "loadOptions"]) {
|
|
5186
|
+
for (const key of ["type", "name", "attributions", "loaders", "onError", "loadOptions"]) {
|
|
5187
5187
|
delete parserCore[key];
|
|
5188
5188
|
}
|
|
5189
5189
|
if (Object.keys(parserCore).length === 0) {
|
|
@@ -5218,6 +5218,44 @@ function unavailableCoreApiMethod(methodName) {
|
|
|
5218
5218
|
);
|
|
5219
5219
|
};
|
|
5220
5220
|
}
|
|
5221
|
+
function getDataSourceName(data, options) {
|
|
5222
|
+
var _a, _b, _c;
|
|
5223
|
+
const explicitName = (_a = options.core) == null ? void 0 : _a.name;
|
|
5224
|
+
if (explicitName !== void 0) {
|
|
5225
|
+
if (typeof explicitName !== "string" || !explicitName.trim())
|
|
5226
|
+
throw new Error("Data source name must be a non-empty string.");
|
|
5227
|
+
return explicitName;
|
|
5228
|
+
}
|
|
5229
|
+
if (data && typeof data === "object") {
|
|
5230
|
+
const named = data;
|
|
5231
|
+
if (typeof named.name === "string" && named.name.trim())
|
|
5232
|
+
return data instanceof Blob ? removeFileExtension(named.name) : named.name;
|
|
5233
|
+
const metadata = (_b = named.schema) == null ? void 0 : _b.metadata;
|
|
5234
|
+
const embeddedName = metadata instanceof Map ? metadata.get("name") : metadata == null ? void 0 : metadata.name;
|
|
5235
|
+
if (typeof embeddedName === "string" && embeddedName.trim()) return embeddedName;
|
|
5236
|
+
}
|
|
5237
|
+
if (typeof data === "string") {
|
|
5238
|
+
try {
|
|
5239
|
+
const url = new URL(data.replace(/\\/g, "/"), "https://source.invalid/");
|
|
5240
|
+
if (!["data:", "blob:"].includes(url.protocol)) {
|
|
5241
|
+
let basename = url.pathname.split("/").filter(Boolean).pop();
|
|
5242
|
+
if (basename) {
|
|
5243
|
+
try {
|
|
5244
|
+
basename = decodeURIComponent(basename);
|
|
5245
|
+
} catch {
|
|
5246
|
+
}
|
|
5247
|
+
return removeFileExtension(basename);
|
|
5248
|
+
}
|
|
5249
|
+
}
|
|
5250
|
+
} catch {
|
|
5251
|
+
}
|
|
5252
|
+
}
|
|
5253
|
+
return ((_c = options.core) == null ? void 0 : _c.type) && options.core.type !== "auto" ? options.core.type : "source";
|
|
5254
|
+
}
|
|
5255
|
+
function removeFileExtension(name) {
|
|
5256
|
+
const extension = name.lastIndexOf(".");
|
|
5257
|
+
return extension > 0 ? name.slice(0, extension) : name;
|
|
5258
|
+
}
|
|
5221
5259
|
var UNAVAILABLE_CORE_API, DataSource;
|
|
5222
5260
|
var init_data_source = __esm({
|
|
5223
5261
|
"../core/src/loader-utils/lib/sources/data-source.ts"() {
|
|
@@ -5249,6 +5287,8 @@ var init_data_source = __esm({
|
|
|
5249
5287
|
options;
|
|
5250
5288
|
data;
|
|
5251
5289
|
url;
|
|
5290
|
+
/** Stable query-visible name, resolved without fetching source data. */
|
|
5291
|
+
name;
|
|
5252
5292
|
/** Shared parser options derived from the source options, excluding source-only core controls. */
|
|
5253
5293
|
loadOptions;
|
|
5254
5294
|
/** A resolved fetch function extracted from the shared core options. */
|
|
@@ -5265,6 +5305,7 @@ var init_data_source = __esm({
|
|
|
5265
5305
|
);
|
|
5266
5306
|
this.data = data;
|
|
5267
5307
|
this.url = typeof data === "string" ? resolvePath(data) : "";
|
|
5308
|
+
this.name = getDataSourceName(data, this.options);
|
|
5268
5309
|
const loadOptions = resolveAuthenticationOptions(getSourceLoaderOptions(this.options));
|
|
5269
5310
|
this.loadOptions = loadOptions;
|
|
5270
5311
|
const fetch2 = getFetchFunction(loadOptions);
|
|
@@ -5273,6 +5314,9 @@ var init_data_source = __esm({
|
|
|
5273
5314
|
this.fetch = fetch2;
|
|
5274
5315
|
}
|
|
5275
5316
|
setProps(options) {
|
|
5317
|
+
var _a;
|
|
5318
|
+
if (((_a = options.core) == null ? void 0 : _a.name) !== void 0 && options.core.name !== this.name)
|
|
5319
|
+
throw new Error("Data source names are fixed at creation.");
|
|
5276
5320
|
const mergedOptions = mergeOptions(this.options, options);
|
|
5277
5321
|
const loadOptions = resolveAuthenticationOptions(getSourceLoaderOptions(mergedOptions));
|
|
5278
5322
|
this.options = mergedOptions;
|
|
@@ -5615,6 +5659,60 @@ var init_point_cloud_query = __esm({
|
|
|
5615
5659
|
}
|
|
5616
5660
|
});
|
|
5617
5661
|
|
|
5662
|
+
// ../core/src/loader-utils/lib/files/read-range-response.ts
|
|
5663
|
+
async function readRangeResponse(response, offset, length, signal) {
|
|
5664
|
+
var _a, _b, _c;
|
|
5665
|
+
if (typeof offset === "number" && (!Number.isSafeInteger(offset) || offset < 0) || typeof offset === "bigint" && offset < 0n || !Number.isSafeInteger(length) || length <= 0) {
|
|
5666
|
+
await ((_a = response.body) == null ? void 0 : _a.cancel().catch(() => {
|
|
5667
|
+
}));
|
|
5668
|
+
throw new RangeError("Invalid HTTP byte range");
|
|
5669
|
+
}
|
|
5670
|
+
const start = BigInt(offset);
|
|
5671
|
+
const end = start + BigInt(length) - 1n;
|
|
5672
|
+
const value = response.headers.get("Content-Range");
|
|
5673
|
+
const match = value === null ? null : /^bytes (\d+)-(\d+)\/(\d+|\*)$/.exec(value);
|
|
5674
|
+
if (response.status !== 206 || value !== null && (!match || BigInt(match[1]) !== start || BigInt(match[2]) !== end || match[3] !== "*" && BigInt(match[3]) <= end)) {
|
|
5675
|
+
await ((_b = response.body) == null ? void 0 : _b.cancel().catch(() => {
|
|
5676
|
+
}));
|
|
5677
|
+
throw new Error("HTTP range requires 206 and matching Content-Range when visible");
|
|
5678
|
+
}
|
|
5679
|
+
const reader = (_c = response.body) == null ? void 0 : _c.getReader();
|
|
5680
|
+
if (!reader) throw new Error("HTTP range response has no body");
|
|
5681
|
+
let received = 0;
|
|
5682
|
+
const abort = () => {
|
|
5683
|
+
void reader.cancel(signal == null ? void 0 : signal.reason).catch(() => {
|
|
5684
|
+
});
|
|
5685
|
+
};
|
|
5686
|
+
signal == null ? void 0 : signal.addEventListener("abort", abort, { once: true });
|
|
5687
|
+
try {
|
|
5688
|
+
signal == null ? void 0 : signal.throwIfAborted();
|
|
5689
|
+
const bytes = new Uint8Array(length);
|
|
5690
|
+
for (; ; ) {
|
|
5691
|
+
const chunk = await reader.read();
|
|
5692
|
+
signal == null ? void 0 : signal.throwIfAborted();
|
|
5693
|
+
if (chunk.done) break;
|
|
5694
|
+
if (received + chunk.value.byteLength > length)
|
|
5695
|
+
throw new Error("HTTP range body exceeds requested length");
|
|
5696
|
+
bytes.set(chunk.value, received);
|
|
5697
|
+
received += chunk.value.byteLength;
|
|
5698
|
+
}
|
|
5699
|
+
if (received !== length) throw new Error("HTTP range body has truncated length");
|
|
5700
|
+
return bytes;
|
|
5701
|
+
} catch (error) {
|
|
5702
|
+
await reader.cancel(error).catch(() => {
|
|
5703
|
+
});
|
|
5704
|
+
throw error;
|
|
5705
|
+
} finally {
|
|
5706
|
+
signal == null ? void 0 : signal.removeEventListener("abort", abort);
|
|
5707
|
+
reader.releaseLock();
|
|
5708
|
+
}
|
|
5709
|
+
}
|
|
5710
|
+
var init_read_range_response = __esm({
|
|
5711
|
+
"../core/src/loader-utils/lib/files/read-range-response.ts"() {
|
|
5712
|
+
"use strict";
|
|
5713
|
+
}
|
|
5714
|
+
});
|
|
5715
|
+
|
|
5618
5716
|
// ../core/src/loader-utils/index.ts
|
|
5619
5717
|
var init_loader_utils = __esm({
|
|
5620
5718
|
"../core/src/loader-utils/index.ts"() {
|
|
@@ -5628,6 +5726,7 @@ var init_loader_utils = __esm({
|
|
|
5628
5726
|
init_columnar_predicate();
|
|
5629
5727
|
init_scan_query_metadata();
|
|
5630
5728
|
init_point_cloud_query();
|
|
5729
|
+
init_read_range_response();
|
|
5631
5730
|
}
|
|
5632
5731
|
});
|
|
5633
5732
|
|
|
@@ -6220,7 +6319,7 @@ var init_potree_loader_types2 = __esm({
|
|
|
6220
6319
|
"dist/potree/potree-loader-types.js"() {
|
|
6221
6320
|
"use strict";
|
|
6222
6321
|
init_potree_format();
|
|
6223
|
-
VERSION3 = true ? "5.0.0-beta.
|
|
6322
|
+
VERSION3 = true ? "5.0.0-beta.6" : "latest";
|
|
6224
6323
|
PotreeLoader2 = {
|
|
6225
6324
|
...PotreeFormat,
|
|
6226
6325
|
dataType: null,
|
|
@@ -6387,7 +6486,7 @@ var init_potree_hierarchy_chunk_loader = __esm({
|
|
|
6387
6486
|
"dist/potree/potree-hierarchy-chunk-loader.js"() {
|
|
6388
6487
|
"use strict";
|
|
6389
6488
|
init_potree_format();
|
|
6390
|
-
VERSION4 = true ? "5.0.0-beta.
|
|
6489
|
+
VERSION4 = true ? "5.0.0-beta.6" : "latest";
|
|
6391
6490
|
PotreeHierarchyChunkLoader = {
|
|
6392
6491
|
...PotreeHierarchyChunkFormat,
|
|
6393
6492
|
dataType: null,
|
|
@@ -7908,7 +8007,7 @@ var init_potree_bin_loader = __esm({
|
|
|
7908
8007
|
"dist/potree/potree-bin-loader.js"() {
|
|
7909
8008
|
"use strict";
|
|
7910
8009
|
init_potree_format();
|
|
7911
|
-
VERSION5 = true ? "5.0.0-beta.
|
|
8010
|
+
VERSION5 = true ? "5.0.0-beta.6" : "latest";
|
|
7912
8011
|
PotreeBinLoader = {
|
|
7913
8012
|
...PotreeBinFormat,
|
|
7914
8013
|
dataType: null,
|
|
@@ -8177,109 +8276,7 @@ var init_las_loader_shared = __esm({
|
|
|
8177
8276
|
}
|
|
8178
8277
|
});
|
|
8179
8278
|
|
|
8180
|
-
// ../core/src/
|
|
8181
|
-
function splitArrowBuffers(input, options = {}) {
|
|
8182
|
-
const context = { ...options, copies: /* @__PURE__ */ new WeakMap() };
|
|
8183
|
-
if (isArrowTable(input)) {
|
|
8184
|
-
return splitArrowTableBuffersInternal(input, context);
|
|
8185
|
-
}
|
|
8186
|
-
if (isArrowRecordBatch(input)) {
|
|
8187
|
-
return splitArrowRecordBatchBuffers(input, context);
|
|
8188
|
-
}
|
|
8189
|
-
if (isArrowVector(input)) {
|
|
8190
|
-
return splitArrowVectorBuffers(input, context);
|
|
8191
|
-
}
|
|
8192
|
-
return splitArrowDataBuffers(input, context);
|
|
8193
|
-
}
|
|
8194
|
-
function isArrowTable(input) {
|
|
8195
|
-
return "batches" in input;
|
|
8196
|
-
}
|
|
8197
|
-
function isArrowRecordBatch(input) {
|
|
8198
|
-
return "schema" in input && "data" in input && !Array.isArray(input.data);
|
|
8199
|
-
}
|
|
8200
|
-
function isArrowVector(input) {
|
|
8201
|
-
return "data" in input && Array.isArray(input.data);
|
|
8202
|
-
}
|
|
8203
|
-
function splitArrowTableBuffersInternal(table, options) {
|
|
8204
|
-
const recordBatches = table.batches.map(
|
|
8205
|
-
(recordBatch) => splitArrowRecordBatchBuffers(recordBatch, options)
|
|
8206
|
-
);
|
|
8207
|
-
return new arrow7.Table(table.schema, recordBatches);
|
|
8208
|
-
}
|
|
8209
|
-
function splitArrowRecordBatchBuffers(recordBatch, options) {
|
|
8210
|
-
return new arrow7.RecordBatch(
|
|
8211
|
-
recordBatch.schema,
|
|
8212
|
-
splitArrowDataBuffers(recordBatch.data, options)
|
|
8213
|
-
);
|
|
8214
|
-
}
|
|
8215
|
-
function splitArrowDataBuffers(data, options) {
|
|
8216
|
-
const children = data.children.map((childData) => splitArrowDataBuffers(childData, options));
|
|
8217
|
-
const dictionary = data.dictionary ? splitArrowVectorBuffers(data.dictionary, options) : void 0;
|
|
8218
|
-
const buffers = {
|
|
8219
|
-
[arrow7.BufferType.OFFSET]: splitArrowBuffer(data.buffers[arrow7.BufferType.OFFSET], options),
|
|
8220
|
-
[arrow7.BufferType.DATA]: splitArrowBuffer(data.buffers[arrow7.BufferType.DATA], options),
|
|
8221
|
-
[arrow7.BufferType.VALIDITY]: splitArrowBuffer(data.buffers[arrow7.BufferType.VALIDITY], options),
|
|
8222
|
-
[arrow7.BufferType.TYPE]: splitArrowBuffer(data.buffers[arrow7.BufferType.TYPE], options)
|
|
8223
|
-
};
|
|
8224
|
-
return new arrow7.Data(
|
|
8225
|
-
data.type,
|
|
8226
|
-
data.offset,
|
|
8227
|
-
data.length,
|
|
8228
|
-
// @ts-expect-error _nullCount is protected. Reuse it to preserve lazy null-count state.
|
|
8229
|
-
data._nullCount,
|
|
8230
|
-
buffers,
|
|
8231
|
-
children,
|
|
8232
|
-
dictionary
|
|
8233
|
-
);
|
|
8234
|
-
}
|
|
8235
|
-
function splitArrowVectorBuffers(vector, options) {
|
|
8236
|
-
return new arrow7.Vector(vector.data.map((data) => splitArrowDataBuffers(data, options)));
|
|
8237
|
-
}
|
|
8238
|
-
function splitArrowBuffer(array, options) {
|
|
8239
|
-
if (!isArrowTypedArray(array)) {
|
|
8240
|
-
return array;
|
|
8241
|
-
}
|
|
8242
|
-
if (options.copy === "none") {
|
|
8243
|
-
return array;
|
|
8244
|
-
}
|
|
8245
|
-
if (options.copy !== "all" && array.byteOffset === 0 && array.byteLength === array.buffer.byteLength) {
|
|
8246
|
-
return array;
|
|
8247
|
-
}
|
|
8248
|
-
let copy = options.copies.get(array);
|
|
8249
|
-
if (!copy) {
|
|
8250
|
-
copy = array.slice();
|
|
8251
|
-
options.copies.set(array, copy);
|
|
8252
|
-
}
|
|
8253
|
-
return copy;
|
|
8254
|
-
}
|
|
8255
|
-
function isArrowTypedArray(value) {
|
|
8256
|
-
return ArrayBuffer.isView(value) && !(value instanceof DataView);
|
|
8257
|
-
}
|
|
8258
|
-
var arrow7;
|
|
8259
|
-
var init_split_arrow_buffers = __esm({
|
|
8260
|
-
"../core/src/schema-utils/lib/arrow/split-arrow-buffers.ts"() {
|
|
8261
|
-
"use strict";
|
|
8262
|
-
arrow7 = __toESM(require("apache-arrow"), 1);
|
|
8263
|
-
}
|
|
8264
|
-
});
|
|
8265
|
-
|
|
8266
|
-
// ../core/src/schema-utils/lib/arrow/arrow-table-transport.ts
|
|
8267
|
-
function dehydrateArrowTable(table, options) {
|
|
8268
|
-
const splitTable = splitArrowBuffers(table, options);
|
|
8269
|
-
return {
|
|
8270
|
-
shape: "arrow-table",
|
|
8271
|
-
transport: "arrow-js",
|
|
8272
|
-
schema: serializeArrowSchema(splitTable.schema),
|
|
8273
|
-
batches: splitTable.batches.map((recordBatch) => dehydrateArrowRecordBatch(recordBatch))
|
|
8274
|
-
};
|
|
8275
|
-
}
|
|
8276
|
-
function hydrateArrowTable(table) {
|
|
8277
|
-
const schema = deserializeArrowSchema(table.schema);
|
|
8278
|
-
const recordBatches = table.batches.map(
|
|
8279
|
-
(recordBatch) => new arrow8.RecordBatch(schema, hydrateArrowData(recordBatch.data))
|
|
8280
|
-
);
|
|
8281
|
-
return new arrow8.Table(schema, recordBatches);
|
|
8282
|
-
}
|
|
8279
|
+
// ../core/src/arrow-worker-transport.ts
|
|
8283
8280
|
function serializeArrowWorkerTable(result) {
|
|
8284
8281
|
if (!isArrowTableWrapper(result)) {
|
|
8285
8282
|
throw new Error("Workers require Arrow table output");
|
|
@@ -8287,14 +8284,14 @@ function serializeArrowWorkerTable(result) {
|
|
|
8287
8284
|
const { data, ...metadata } = result;
|
|
8288
8285
|
return {
|
|
8289
8286
|
...structuredClone(metadata),
|
|
8290
|
-
data: dehydrateArrowTable(data, { copy: "all" })
|
|
8287
|
+
data: (0, import_arrow.dehydrateArrowTable)(data, { copy: "all" })
|
|
8291
8288
|
};
|
|
8292
8289
|
}
|
|
8293
8290
|
function deserializeArrowWorkerTable(result) {
|
|
8294
8291
|
if (!isDehydratedArrowTableWrapper(result)) {
|
|
8295
8292
|
throw new Error("Workers require Arrow column transport");
|
|
8296
8293
|
}
|
|
8297
|
-
return { ...result, data: hydrateArrowTable(result.data) };
|
|
8294
|
+
return { ...result, data: (0, import_arrow.hydrateArrowTable)(result.data) };
|
|
8298
8295
|
}
|
|
8299
8296
|
function isArrowTableWrapper(value) {
|
|
8300
8297
|
const table = value;
|
|
@@ -8308,61 +8305,11 @@ function isDehydratedArrowTableWrapper(value) {
|
|
|
8308
8305
|
table && table.shape === "arrow-table" && table.data && table.data.transport === "arrow-js" && Array.isArray(table.data.batches)
|
|
8309
8306
|
);
|
|
8310
8307
|
}
|
|
8311
|
-
|
|
8312
|
-
|
|
8313
|
-
|
|
8314
|
-
function dehydrateArrowData(data) {
|
|
8315
|
-
return {
|
|
8316
|
-
type: serializeArrowType(data.type),
|
|
8317
|
-
offset: data.offset,
|
|
8318
|
-
length: data.length,
|
|
8319
|
-
// @ts-expect-error _nullCount is protected. Preserve the Arrow lazy null-count state.
|
|
8320
|
-
nullCount: data._nullCount,
|
|
8321
|
-
buffers: {
|
|
8322
|
-
[arrow8.BufferType.OFFSET]: data.buffers[arrow8.BufferType.OFFSET],
|
|
8323
|
-
[arrow8.BufferType.DATA]: data.buffers[arrow8.BufferType.DATA],
|
|
8324
|
-
[arrow8.BufferType.VALIDITY]: data.buffers[arrow8.BufferType.VALIDITY],
|
|
8325
|
-
[arrow8.BufferType.TYPE]: data.buffers[arrow8.BufferType.TYPE]
|
|
8326
|
-
},
|
|
8327
|
-
children: data.children.map((childData) => dehydrateArrowData(childData)),
|
|
8328
|
-
dictionary: data.dictionary ? dehydrateArrowVector(data.dictionary) : void 0
|
|
8329
|
-
};
|
|
8330
|
-
}
|
|
8331
|
-
function dehydrateArrowVector(vector) {
|
|
8332
|
-
return { data: vector.data.map((data) => dehydrateArrowData(data)) };
|
|
8333
|
-
}
|
|
8334
|
-
function hydrateArrowData(data) {
|
|
8335
|
-
const children = data.children.map((childData) => hydrateArrowData(childData));
|
|
8336
|
-
const dictionary = data.dictionary ? hydrateArrowVector(data.dictionary) : void 0;
|
|
8337
|
-
return new arrow8.Data(
|
|
8338
|
-
deserializeArrowType(data.type),
|
|
8339
|
-
data.offset,
|
|
8340
|
-
data.length,
|
|
8341
|
-
data.nullCount,
|
|
8342
|
-
data.buffers,
|
|
8343
|
-
children,
|
|
8344
|
-
dictionary
|
|
8345
|
-
);
|
|
8346
|
-
}
|
|
8347
|
-
function hydrateArrowVector(vector) {
|
|
8348
|
-
return new arrow8.Vector(vector.data.map((data) => hydrateArrowData(data)));
|
|
8349
|
-
}
|
|
8350
|
-
var arrow8;
|
|
8351
|
-
var init_arrow_table_transport = __esm({
|
|
8352
|
-
"../core/src/schema-utils/lib/arrow/arrow-table-transport.ts"() {
|
|
8308
|
+
var import_arrow;
|
|
8309
|
+
var init_arrow_worker_transport = __esm({
|
|
8310
|
+
"../core/src/arrow-worker-transport.ts"() {
|
|
8353
8311
|
"use strict";
|
|
8354
|
-
|
|
8355
|
-
init_convert_arrow_schema();
|
|
8356
|
-
init_split_arrow_buffers();
|
|
8357
|
-
}
|
|
8358
|
-
});
|
|
8359
|
-
|
|
8360
|
-
// ../core/src/schema-utils/arrow-transport.ts
|
|
8361
|
-
var init_arrow_transport = __esm({
|
|
8362
|
-
"../core/src/schema-utils/arrow-transport.ts"() {
|
|
8363
|
-
"use strict";
|
|
8364
|
-
init_arrow_table_transport();
|
|
8365
|
-
init_split_arrow_buffers();
|
|
8312
|
+
import_arrow = require("@math.gl/arrow");
|
|
8366
8313
|
}
|
|
8367
8314
|
});
|
|
8368
8315
|
|
|
@@ -11230,7 +11177,7 @@ var init_las_loader = __esm({
|
|
|
11230
11177
|
"use strict";
|
|
11231
11178
|
init_schema_utils();
|
|
11232
11179
|
init_las_loader_shared();
|
|
11233
|
-
|
|
11180
|
+
init_arrow_worker_transport();
|
|
11234
11181
|
init_parse_las();
|
|
11235
11182
|
LASLoaderWithParser = {
|
|
11236
11183
|
...LAS_LOADER_METADATA,
|
|
@@ -11636,7 +11583,6 @@ var init_potree2_source = __esm({
|
|
|
11636
11583
|
}
|
|
11637
11584
|
/** Reads a validated 64-bit range; servers must honor Range with an exact Content-Range. */
|
|
11638
11585
|
async readRange(name, offset, size, limit) {
|
|
11639
|
-
var _a;
|
|
11640
11586
|
if (offset < 0n || size <= 0n || size > BigInt(limit) || offset + size > BigInt(Number.MAX_SAFE_INTEGER))
|
|
11641
11587
|
throw new Error("Invalid or oversized Potree byte range");
|
|
11642
11588
|
const end = offset + size - 1n;
|
|
@@ -11645,15 +11591,8 @@ var init_potree2_source = __esm({
|
|
|
11645
11591
|
headers: { Range: `bytes=${offset}-${end}` }
|
|
11646
11592
|
});
|
|
11647
11593
|
this.signal.throwIfAborted();
|
|
11648
|
-
const
|
|
11649
|
-
const
|
|
11650
|
-
if (response.status !== 206 || !contentRange || total !== "*" && (!total || !/^[0-9]+$/.test(total) || BigInt(total) <= end) || !new RegExp(`^bytes ${offset}-${end}/(?:[0-9]+|\\*)$`).test(contentRange)) {
|
|
11651
|
-
await ((_a = response.body) == null ? void 0 : _a.cancel());
|
|
11652
|
-
throw new Error("Potree server must honor the requested byte range");
|
|
11653
|
-
}
|
|
11654
|
-
const data = await this.readResponse(response, Number(size));
|
|
11655
|
-
if (data.byteLength !== Number(size))
|
|
11656
|
-
throw new Error("Truncated Potree byte range");
|
|
11594
|
+
const bytes = await readRangeResponse(response, offset, Number(size), this.signal);
|
|
11595
|
+
const data = bytes.buffer;
|
|
11657
11596
|
return data;
|
|
11658
11597
|
}
|
|
11659
11598
|
/** Collects an incrementally bounded response and cancels on overflow or cancellation. */
|
|
@@ -12840,7 +12779,7 @@ function inferPotreeColumnRole(name) {
|
|
|
12840
12779
|
|
|
12841
12780
|
// dist/potree/potree-source-loader.js
|
|
12842
12781
|
init_potree_format();
|
|
12843
|
-
var VERSION7 = true ? "5.0.0-beta.
|
|
12782
|
+
var VERSION7 = true ? "5.0.0-beta.6" : "latest";
|
|
12844
12783
|
var PotreeSourceLoader = {
|
|
12845
12784
|
...PotreeBinFormat,
|
|
12846
12785
|
dataType: null,
|
|
@@ -12867,7 +12806,7 @@ var PotreeSourceLoader = {
|
|
|
12867
12806
|
|
|
12868
12807
|
// dist/potree/potree-writer.js
|
|
12869
12808
|
init_schema_utils();
|
|
12870
|
-
var VERSION8 = true ? "5.0.0-beta.
|
|
12809
|
+
var VERSION8 = true ? "5.0.0-beta.6" : "latest";
|
|
12871
12810
|
var PotreeWriter = {
|
|
12872
12811
|
name: "Potree metadata",
|
|
12873
12812
|
id: "potree",
|