@loaders.gl/tiles-3d 5.0.0-beta.2 → 5.0.0-beta.5
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 +1393 -962
- package/dist/3d-tiles/dist.min.js +37 -37
- package/dist/3d-tiles/index.cjs +989 -987
- package/dist/3d-tiles/index.cjs.map +3 -3
- package/dist/3d-tiles/lib/classes/tile-3d-batch-table.d.ts.map +1 -1
- package/dist/3d-tiles/lib/classes/tile-3d-batch-table.js +12 -8
- package/dist/3d-tiles/lib/classes/tile-3d-batch-table.js.map +1 -1
- 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 +983 -981
- 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 +365 -170
- package/dist/copc/index.cjs.map +3 -3
- package/dist/dist.dev.js +231 -38
- package/dist/dist.min.js +10 -10
- package/dist/i3s/arcgis-webscene-loader.js +1 -1
- package/dist/i3s/dist.dev.js +6591 -1184
- package/dist/i3s/dist.min.js +55 -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 +4763 -1136
- 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 +1148 -391
- package/dist/i3s-lepcc-worker-node.js +609 -44
- package/dist/i3s-lepcc-worker-node.js.map +4 -4
- package/dist/i3s-lepcc-worker.js +575 -40
- package/dist/i3s-mesh-writer.cjs +8880 -5253
- package/dist/i3s-mesh-writer.cjs.map +3 -3
- package/dist/i3s-slpk-writer.cjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/point-cloud-tile-source-loader-types.js +1 -1
- package/dist/point-cloud-tile-source-loader.cjs +1 -1
- package/dist/potree/dist.dev.js +310 -110
- package/dist/potree/dist.min.js +31 -31
- package/dist/potree/index.cjs +19 -166
- 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-loader.cjs +1 -1
- package/package.json +13 -13
- package/src/3d-tiles/lib/classes/tile-3d-batch-table.ts +12 -8
- package/src/3d-tiles/lib/parsers/parse-3d-tile-instanced-model.ts +4 -1
- package/src/copc/copc-source-loader.ts +1 -1
package/dist/potree/index.cjs
CHANGED
|
@@ -6220,7 +6220,7 @@ var init_potree_loader_types2 = __esm({
|
|
|
6220
6220
|
"dist/potree/potree-loader-types.js"() {
|
|
6221
6221
|
"use strict";
|
|
6222
6222
|
init_potree_format();
|
|
6223
|
-
VERSION3 = true ? "5.0.0-beta.
|
|
6223
|
+
VERSION3 = true ? "5.0.0-beta.5" : "latest";
|
|
6224
6224
|
PotreeLoader2 = {
|
|
6225
6225
|
...PotreeFormat,
|
|
6226
6226
|
dataType: null,
|
|
@@ -6387,7 +6387,7 @@ var init_potree_hierarchy_chunk_loader = __esm({
|
|
|
6387
6387
|
"dist/potree/potree-hierarchy-chunk-loader.js"() {
|
|
6388
6388
|
"use strict";
|
|
6389
6389
|
init_potree_format();
|
|
6390
|
-
VERSION4 = true ? "5.0.0-beta.
|
|
6390
|
+
VERSION4 = true ? "5.0.0-beta.5" : "latest";
|
|
6391
6391
|
PotreeHierarchyChunkLoader = {
|
|
6392
6392
|
...PotreeHierarchyChunkFormat,
|
|
6393
6393
|
dataType: null,
|
|
@@ -7908,7 +7908,7 @@ var init_potree_bin_loader = __esm({
|
|
|
7908
7908
|
"dist/potree/potree-bin-loader.js"() {
|
|
7909
7909
|
"use strict";
|
|
7910
7910
|
init_potree_format();
|
|
7911
|
-
VERSION5 = true ? "5.0.0-beta.
|
|
7911
|
+
VERSION5 = true ? "5.0.0-beta.5" : "latest";
|
|
7912
7912
|
PotreeBinLoader = {
|
|
7913
7913
|
...PotreeBinFormat,
|
|
7914
7914
|
dataType: null,
|
|
@@ -8032,7 +8032,12 @@ function createLASTypedExtraBytesAttributes(pointCount, descriptors, extraByteCo
|
|
|
8032
8032
|
return attributes;
|
|
8033
8033
|
}
|
|
8034
8034
|
function readLASString(bytes, offset, length) {
|
|
8035
|
-
|
|
8035
|
+
const decoded = new TextDecoder().decode(bytes.subarray(offset, offset + length));
|
|
8036
|
+
let end = decoded.length;
|
|
8037
|
+
while (end > 0 && decoded[end - 1] === "\0") {
|
|
8038
|
+
end--;
|
|
8039
|
+
}
|
|
8040
|
+
return decoded.slice(0, end).trim();
|
|
8036
8041
|
}
|
|
8037
8042
|
function sanitizeExtraBytesName(name) {
|
|
8038
8043
|
return name.trim().replace(/[^A-Za-z0-9_]+/g, "_");
|
|
@@ -8172,109 +8177,7 @@ var init_las_loader_shared = __esm({
|
|
|
8172
8177
|
}
|
|
8173
8178
|
});
|
|
8174
8179
|
|
|
8175
|
-
// ../core/src/
|
|
8176
|
-
function splitArrowBuffers(input, options = {}) {
|
|
8177
|
-
const context = { ...options, copies: /* @__PURE__ */ new WeakMap() };
|
|
8178
|
-
if (isArrowTable(input)) {
|
|
8179
|
-
return splitArrowTableBuffersInternal(input, context);
|
|
8180
|
-
}
|
|
8181
|
-
if (isArrowRecordBatch(input)) {
|
|
8182
|
-
return splitArrowRecordBatchBuffers(input, context);
|
|
8183
|
-
}
|
|
8184
|
-
if (isArrowVector(input)) {
|
|
8185
|
-
return splitArrowVectorBuffers(input, context);
|
|
8186
|
-
}
|
|
8187
|
-
return splitArrowDataBuffers(input, context);
|
|
8188
|
-
}
|
|
8189
|
-
function isArrowTable(input) {
|
|
8190
|
-
return "batches" in input;
|
|
8191
|
-
}
|
|
8192
|
-
function isArrowRecordBatch(input) {
|
|
8193
|
-
return "schema" in input && "data" in input && !Array.isArray(input.data);
|
|
8194
|
-
}
|
|
8195
|
-
function isArrowVector(input) {
|
|
8196
|
-
return "data" in input && Array.isArray(input.data);
|
|
8197
|
-
}
|
|
8198
|
-
function splitArrowTableBuffersInternal(table, options) {
|
|
8199
|
-
const recordBatches = table.batches.map(
|
|
8200
|
-
(recordBatch) => splitArrowRecordBatchBuffers(recordBatch, options)
|
|
8201
|
-
);
|
|
8202
|
-
return new arrow7.Table(table.schema, recordBatches);
|
|
8203
|
-
}
|
|
8204
|
-
function splitArrowRecordBatchBuffers(recordBatch, options) {
|
|
8205
|
-
return new arrow7.RecordBatch(
|
|
8206
|
-
recordBatch.schema,
|
|
8207
|
-
splitArrowDataBuffers(recordBatch.data, options)
|
|
8208
|
-
);
|
|
8209
|
-
}
|
|
8210
|
-
function splitArrowDataBuffers(data, options) {
|
|
8211
|
-
const children = data.children.map((childData) => splitArrowDataBuffers(childData, options));
|
|
8212
|
-
const dictionary = data.dictionary ? splitArrowVectorBuffers(data.dictionary, options) : void 0;
|
|
8213
|
-
const buffers = {
|
|
8214
|
-
[arrow7.BufferType.OFFSET]: splitArrowBuffer(data.buffers[arrow7.BufferType.OFFSET], options),
|
|
8215
|
-
[arrow7.BufferType.DATA]: splitArrowBuffer(data.buffers[arrow7.BufferType.DATA], options),
|
|
8216
|
-
[arrow7.BufferType.VALIDITY]: splitArrowBuffer(data.buffers[arrow7.BufferType.VALIDITY], options),
|
|
8217
|
-
[arrow7.BufferType.TYPE]: splitArrowBuffer(data.buffers[arrow7.BufferType.TYPE], options)
|
|
8218
|
-
};
|
|
8219
|
-
return new arrow7.Data(
|
|
8220
|
-
data.type,
|
|
8221
|
-
data.offset,
|
|
8222
|
-
data.length,
|
|
8223
|
-
// @ts-expect-error _nullCount is protected. Reuse it to preserve lazy null-count state.
|
|
8224
|
-
data._nullCount,
|
|
8225
|
-
buffers,
|
|
8226
|
-
children,
|
|
8227
|
-
dictionary
|
|
8228
|
-
);
|
|
8229
|
-
}
|
|
8230
|
-
function splitArrowVectorBuffers(vector, options) {
|
|
8231
|
-
return new arrow7.Vector(vector.data.map((data) => splitArrowDataBuffers(data, options)));
|
|
8232
|
-
}
|
|
8233
|
-
function splitArrowBuffer(array, options) {
|
|
8234
|
-
if (!isArrowTypedArray(array)) {
|
|
8235
|
-
return array;
|
|
8236
|
-
}
|
|
8237
|
-
if (options.copy === "none") {
|
|
8238
|
-
return array;
|
|
8239
|
-
}
|
|
8240
|
-
if (options.copy !== "all" && array.byteOffset === 0 && array.byteLength === array.buffer.byteLength) {
|
|
8241
|
-
return array;
|
|
8242
|
-
}
|
|
8243
|
-
let copy = options.copies.get(array);
|
|
8244
|
-
if (!copy) {
|
|
8245
|
-
copy = array.slice();
|
|
8246
|
-
options.copies.set(array, copy);
|
|
8247
|
-
}
|
|
8248
|
-
return copy;
|
|
8249
|
-
}
|
|
8250
|
-
function isArrowTypedArray(value) {
|
|
8251
|
-
return ArrayBuffer.isView(value) && !(value instanceof DataView);
|
|
8252
|
-
}
|
|
8253
|
-
var arrow7;
|
|
8254
|
-
var init_split_arrow_buffers = __esm({
|
|
8255
|
-
"../core/src/schema-utils/lib/arrow/split-arrow-buffers.ts"() {
|
|
8256
|
-
"use strict";
|
|
8257
|
-
arrow7 = __toESM(require("apache-arrow"), 1);
|
|
8258
|
-
}
|
|
8259
|
-
});
|
|
8260
|
-
|
|
8261
|
-
// ../core/src/schema-utils/lib/arrow/arrow-table-transport.ts
|
|
8262
|
-
function dehydrateArrowTable(table, options) {
|
|
8263
|
-
const splitTable = splitArrowBuffers(table, options);
|
|
8264
|
-
return {
|
|
8265
|
-
shape: "arrow-table",
|
|
8266
|
-
transport: "arrow-js",
|
|
8267
|
-
schema: serializeArrowSchema(splitTable.schema),
|
|
8268
|
-
batches: splitTable.batches.map((recordBatch) => dehydrateArrowRecordBatch(recordBatch))
|
|
8269
|
-
};
|
|
8270
|
-
}
|
|
8271
|
-
function hydrateArrowTable(table) {
|
|
8272
|
-
const schema = deserializeArrowSchema(table.schema);
|
|
8273
|
-
const recordBatches = table.batches.map(
|
|
8274
|
-
(recordBatch) => new arrow8.RecordBatch(schema, hydrateArrowData(recordBatch.data))
|
|
8275
|
-
);
|
|
8276
|
-
return new arrow8.Table(schema, recordBatches);
|
|
8277
|
-
}
|
|
8180
|
+
// ../core/src/arrow-worker-transport.ts
|
|
8278
8181
|
function serializeArrowWorkerTable(result) {
|
|
8279
8182
|
if (!isArrowTableWrapper(result)) {
|
|
8280
8183
|
throw new Error("Workers require Arrow table output");
|
|
@@ -8282,14 +8185,14 @@ function serializeArrowWorkerTable(result) {
|
|
|
8282
8185
|
const { data, ...metadata } = result;
|
|
8283
8186
|
return {
|
|
8284
8187
|
...structuredClone(metadata),
|
|
8285
|
-
data: dehydrateArrowTable(data, { copy: "all" })
|
|
8188
|
+
data: (0, import_arrow.dehydrateArrowTable)(data, { copy: "all" })
|
|
8286
8189
|
};
|
|
8287
8190
|
}
|
|
8288
8191
|
function deserializeArrowWorkerTable(result) {
|
|
8289
8192
|
if (!isDehydratedArrowTableWrapper(result)) {
|
|
8290
8193
|
throw new Error("Workers require Arrow column transport");
|
|
8291
8194
|
}
|
|
8292
|
-
return { ...result, data: hydrateArrowTable(result.data) };
|
|
8195
|
+
return { ...result, data: (0, import_arrow.hydrateArrowTable)(result.data) };
|
|
8293
8196
|
}
|
|
8294
8197
|
function isArrowTableWrapper(value) {
|
|
8295
8198
|
const table = value;
|
|
@@ -8303,61 +8206,11 @@ function isDehydratedArrowTableWrapper(value) {
|
|
|
8303
8206
|
table && table.shape === "arrow-table" && table.data && table.data.transport === "arrow-js" && Array.isArray(table.data.batches)
|
|
8304
8207
|
);
|
|
8305
8208
|
}
|
|
8306
|
-
|
|
8307
|
-
|
|
8308
|
-
|
|
8309
|
-
function dehydrateArrowData(data) {
|
|
8310
|
-
return {
|
|
8311
|
-
type: serializeArrowType(data.type),
|
|
8312
|
-
offset: data.offset,
|
|
8313
|
-
length: data.length,
|
|
8314
|
-
// @ts-expect-error _nullCount is protected. Preserve the Arrow lazy null-count state.
|
|
8315
|
-
nullCount: data._nullCount,
|
|
8316
|
-
buffers: {
|
|
8317
|
-
[arrow8.BufferType.OFFSET]: data.buffers[arrow8.BufferType.OFFSET],
|
|
8318
|
-
[arrow8.BufferType.DATA]: data.buffers[arrow8.BufferType.DATA],
|
|
8319
|
-
[arrow8.BufferType.VALIDITY]: data.buffers[arrow8.BufferType.VALIDITY],
|
|
8320
|
-
[arrow8.BufferType.TYPE]: data.buffers[arrow8.BufferType.TYPE]
|
|
8321
|
-
},
|
|
8322
|
-
children: data.children.map((childData) => dehydrateArrowData(childData)),
|
|
8323
|
-
dictionary: data.dictionary ? dehydrateArrowVector(data.dictionary) : void 0
|
|
8324
|
-
};
|
|
8325
|
-
}
|
|
8326
|
-
function dehydrateArrowVector(vector) {
|
|
8327
|
-
return { data: vector.data.map((data) => dehydrateArrowData(data)) };
|
|
8328
|
-
}
|
|
8329
|
-
function hydrateArrowData(data) {
|
|
8330
|
-
const children = data.children.map((childData) => hydrateArrowData(childData));
|
|
8331
|
-
const dictionary = data.dictionary ? hydrateArrowVector(data.dictionary) : void 0;
|
|
8332
|
-
return new arrow8.Data(
|
|
8333
|
-
deserializeArrowType(data.type),
|
|
8334
|
-
data.offset,
|
|
8335
|
-
data.length,
|
|
8336
|
-
data.nullCount,
|
|
8337
|
-
data.buffers,
|
|
8338
|
-
children,
|
|
8339
|
-
dictionary
|
|
8340
|
-
);
|
|
8341
|
-
}
|
|
8342
|
-
function hydrateArrowVector(vector) {
|
|
8343
|
-
return new arrow8.Vector(vector.data.map((data) => hydrateArrowData(data)));
|
|
8344
|
-
}
|
|
8345
|
-
var arrow8;
|
|
8346
|
-
var init_arrow_table_transport = __esm({
|
|
8347
|
-
"../core/src/schema-utils/lib/arrow/arrow-table-transport.ts"() {
|
|
8348
|
-
"use strict";
|
|
8349
|
-
arrow8 = __toESM(require("apache-arrow"), 1);
|
|
8350
|
-
init_convert_arrow_schema();
|
|
8351
|
-
init_split_arrow_buffers();
|
|
8352
|
-
}
|
|
8353
|
-
});
|
|
8354
|
-
|
|
8355
|
-
// ../core/src/schema-utils/arrow-transport.ts
|
|
8356
|
-
var init_arrow_transport = __esm({
|
|
8357
|
-
"../core/src/schema-utils/arrow-transport.ts"() {
|
|
8209
|
+
var import_arrow;
|
|
8210
|
+
var init_arrow_worker_transport = __esm({
|
|
8211
|
+
"../core/src/arrow-worker-transport.ts"() {
|
|
8358
8212
|
"use strict";
|
|
8359
|
-
|
|
8360
|
-
init_split_arrow_buffers();
|
|
8213
|
+
import_arrow = require("@math.gl/arrow");
|
|
8361
8214
|
}
|
|
8362
8215
|
});
|
|
8363
8216
|
|
|
@@ -11225,7 +11078,7 @@ var init_las_loader = __esm({
|
|
|
11225
11078
|
"use strict";
|
|
11226
11079
|
init_schema_utils();
|
|
11227
11080
|
init_las_loader_shared();
|
|
11228
|
-
|
|
11081
|
+
init_arrow_worker_transport();
|
|
11229
11082
|
init_parse_las();
|
|
11230
11083
|
LASLoaderWithParser = {
|
|
11231
11084
|
...LAS_LOADER_METADATA,
|
|
@@ -12835,7 +12688,7 @@ function inferPotreeColumnRole(name) {
|
|
|
12835
12688
|
|
|
12836
12689
|
// dist/potree/potree-source-loader.js
|
|
12837
12690
|
init_potree_format();
|
|
12838
|
-
var VERSION7 = true ? "5.0.0-beta.
|
|
12691
|
+
var VERSION7 = true ? "5.0.0-beta.5" : "latest";
|
|
12839
12692
|
var PotreeSourceLoader = {
|
|
12840
12693
|
...PotreeBinFormat,
|
|
12841
12694
|
dataType: null,
|
|
@@ -12862,7 +12715,7 @@ var PotreeSourceLoader = {
|
|
|
12862
12715
|
|
|
12863
12716
|
// dist/potree/potree-writer.js
|
|
12864
12717
|
init_schema_utils();
|
|
12865
|
-
var VERSION8 = true ? "5.0.0-beta.
|
|
12718
|
+
var VERSION8 = true ? "5.0.0-beta.5" : "latest";
|
|
12866
12719
|
var PotreeWriter = {
|
|
12867
12720
|
name: "Potree metadata",
|
|
12868
12721
|
id: "potree",
|