@loaders.gl/tiles-3d 5.0.0-beta.4 → 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 +891 -620
- package/dist/3d-tiles/dist.min.js +37 -37
- package/dist/3d-tiles/index.cjs +821 -943
- 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 +820 -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 +24 -178
- 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 +3080 -710
- 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 +1999 -541
- 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 +767 -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 +1748 -290
- 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 +226 -82
- package/dist/potree/dist.min.js +30 -30
- package/dist/potree/index.cjs +13 -165
- 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/parsers/parse-3d-tile-instanced-model.ts +4 -1
- package/src/copc/copc-source-loader.ts +1 -1
|
@@ -6042,6 +6042,35 @@ var __exports__ = (() => {
|
|
|
6042
6042
|
out[15] = 1;
|
|
6043
6043
|
return out;
|
|
6044
6044
|
}
|
|
6045
|
+
function affineComponents(matrix) {
|
|
6046
|
+
if (matrix.length !== 16 || Array.from(matrix).some((x) => !Number.isFinite(x)) || matrix[3] !== 0 || matrix[7] !== 0 || matrix[11] !== 0 || matrix[15] !== 1) {
|
|
6047
|
+
throw new RangeError("Expected a finite affine matrix");
|
|
6048
|
+
}
|
|
6049
|
+
const scale6 = [
|
|
6050
|
+
Math.hypot(matrix[0], matrix[1], matrix[2]),
|
|
6051
|
+
Math.hypot(matrix[4], matrix[5], matrix[6]),
|
|
6052
|
+
Math.hypot(matrix[8], matrix[9], matrix[10])
|
|
6053
|
+
];
|
|
6054
|
+
if (scale6.some((x) => x === 0 || !Number.isFinite(x)))
|
|
6055
|
+
throw new RangeError("Singular transform");
|
|
6056
|
+
const rotation2 = Array.from({ length: 9 }, (_, i) => matrix[Math.floor(i / 3) * 4 + i % 3] / scale6[Math.floor(i / 3)]);
|
|
6057
|
+
for (const [a, b] of [
|
|
6058
|
+
[0, 3],
|
|
6059
|
+
[0, 6],
|
|
6060
|
+
[3, 6]
|
|
6061
|
+
]) {
|
|
6062
|
+
if (Math.abs(rotation2[a] * rotation2[b] + rotation2[a + 1] * rotation2[b + 1] + rotation2[a + 2] * rotation2[b + 2]) > 1e-7) {
|
|
6063
|
+
throw new RangeError("Sheared transforms do not have a TRS decomposition");
|
|
6064
|
+
}
|
|
6065
|
+
}
|
|
6066
|
+
const determinant3 = rotation2[0] * (rotation2[4] * rotation2[8] - rotation2[5] * rotation2[7]) - rotation2[3] * (rotation2[1] * rotation2[8] - rotation2[2] * rotation2[7]) + rotation2[6] * (rotation2[1] * rotation2[5] - rotation2[2] * rotation2[4]);
|
|
6067
|
+
if (determinant3 < 0) {
|
|
6068
|
+
scale6[0] = -scale6[0];
|
|
6069
|
+
for (let i = 0; i < 3; i++)
|
|
6070
|
+
rotation2[i] = -rotation2[i];
|
|
6071
|
+
}
|
|
6072
|
+
return { rotation: rotation2, scale: scale6, translation: [matrix[12], matrix[13], matrix[14]] };
|
|
6073
|
+
}
|
|
6045
6074
|
var perspective, ortho;
|
|
6046
6075
|
var init_mat4 = __esm({
|
|
6047
6076
|
"../../node_modules/@math.gl/core/dist/gl-matrix/mat4.js"() {
|
|
@@ -6175,6 +6204,7 @@ var __exports__ = (() => {
|
|
|
6175
6204
|
var init_matrix4 = __esm({
|
|
6176
6205
|
"../../node_modules/@math.gl/core/dist/classes/matrix4.js"() {
|
|
6177
6206
|
init_matrix();
|
|
6207
|
+
init_mat4();
|
|
6178
6208
|
init_validators();
|
|
6179
6209
|
init_gl_matrix_extras();
|
|
6180
6210
|
init_mat4();
|
|
@@ -6459,27 +6489,15 @@ var __exports__ = (() => {
|
|
|
6459
6489
|
* @returns self
|
|
6460
6490
|
*/
|
|
6461
6491
|
getRotation(result, scaleResult) {
|
|
6462
|
-
|
|
6463
|
-
|
|
6464
|
-
|
|
6465
|
-
|
|
6466
|
-
|
|
6467
|
-
|
|
6468
|
-
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
result[3] = 0;
|
|
6472
|
-
result[4] = this[4] * inverseScale0;
|
|
6473
|
-
result[5] = this[5] * inverseScale1;
|
|
6474
|
-
result[6] = this[6] * inverseScale2;
|
|
6475
|
-
result[7] = 0;
|
|
6476
|
-
result[8] = this[8] * inverseScale0;
|
|
6477
|
-
result[9] = this[9] * inverseScale1;
|
|
6478
|
-
result[10] = this[10] * inverseScale2;
|
|
6479
|
-
result[11] = 0;
|
|
6480
|
-
result[12] = 0;
|
|
6481
|
-
result[13] = 0;
|
|
6482
|
-
result[14] = 0;
|
|
6492
|
+
const { rotation: rotation2, scale: scale6 } = affineComponents(this);
|
|
6493
|
+
result = result || new Array(16);
|
|
6494
|
+
if (scaleResult)
|
|
6495
|
+
for (let i = 0; i < 3; i++)
|
|
6496
|
+
scaleResult[i] = scale6[i];
|
|
6497
|
+
for (let i = 0; i < 16; i++)
|
|
6498
|
+
result[i] = 0;
|
|
6499
|
+
for (let i = 0; i < 9; i++)
|
|
6500
|
+
result[Math.floor(i / 3) * 4 + i % 3] = rotation2[i];
|
|
6483
6501
|
result[15] = 1;
|
|
6484
6502
|
return result;
|
|
6485
6503
|
}
|
|
@@ -6490,21 +6508,13 @@ var __exports__ = (() => {
|
|
|
6490
6508
|
* @returns self
|
|
6491
6509
|
*/
|
|
6492
6510
|
getRotationMatrix3(result, scaleResult) {
|
|
6493
|
-
|
|
6494
|
-
|
|
6495
|
-
|
|
6496
|
-
|
|
6497
|
-
|
|
6498
|
-
|
|
6499
|
-
|
|
6500
|
-
result[1] = this[1] * inverseScale1;
|
|
6501
|
-
result[2] = this[2] * inverseScale2;
|
|
6502
|
-
result[3] = this[4] * inverseScale0;
|
|
6503
|
-
result[4] = this[5] * inverseScale1;
|
|
6504
|
-
result[5] = this[6] * inverseScale2;
|
|
6505
|
-
result[6] = this[8] * inverseScale0;
|
|
6506
|
-
result[7] = this[9] * inverseScale1;
|
|
6507
|
-
result[8] = this[10] * inverseScale2;
|
|
6511
|
+
const { rotation: rotation2, scale: scale6 } = affineComponents(this);
|
|
6512
|
+
result = result || new Array(9);
|
|
6513
|
+
if (scaleResult)
|
|
6514
|
+
for (let i = 0; i < 3; i++)
|
|
6515
|
+
scaleResult[i] = scale6[i];
|
|
6516
|
+
for (let i = 0; i < 9; i++)
|
|
6517
|
+
result[i] = rotation2[i];
|
|
6508
6518
|
return result;
|
|
6509
6519
|
}
|
|
6510
6520
|
// Modifiers
|
|
@@ -6817,6 +6827,28 @@ var __exports__ = (() => {
|
|
|
6817
6827
|
}
|
|
6818
6828
|
return out;
|
|
6819
6829
|
}
|
|
6830
|
+
function rotateTowards(out, a, b, step) {
|
|
6831
|
+
if (a.length !== 4 || b.length !== 4 || [...Array.from(a), ...Array.from(b), step].some((x) => !Number.isFinite(x))) {
|
|
6832
|
+
throw new RangeError("Expected finite quaternions and step");
|
|
6833
|
+
}
|
|
6834
|
+
if (a.length !== 4 || step < 0)
|
|
6835
|
+
throw new RangeError("Expected quaternions and a nonnegative step");
|
|
6836
|
+
const aScale = Math.max(...Array.from(a, Math.abs)), bScale = Math.max(...Array.from(b, Math.abs));
|
|
6837
|
+
if (!aScale || !bScale)
|
|
6838
|
+
throw new RangeError("Zero quaternion");
|
|
6839
|
+
const an = Array.from(a, (x) => x / aScale), bn = Array.from(b, (x) => x / bScale);
|
|
6840
|
+
const al = Math.hypot(...an), bl = Math.hypot(...bn);
|
|
6841
|
+
for (let i = 0; i < 4; i++) {
|
|
6842
|
+
an[i] /= al;
|
|
6843
|
+
bn[i] /= bl;
|
|
6844
|
+
}
|
|
6845
|
+
const dot5 = an.reduce((sum, x, i) => sum + x * bn[i], 0);
|
|
6846
|
+
const angle2 = 2 * Math.acos(Math.min(1, Math.abs(dot5)));
|
|
6847
|
+
if (out.length < 4)
|
|
6848
|
+
throw new RangeError("Result buffer is too short");
|
|
6849
|
+
slerp(out, an, bn, angle2 === 0 ? 0 : Math.min(1, step / angle2));
|
|
6850
|
+
return out;
|
|
6851
|
+
}
|
|
6820
6852
|
var add2, scale4, dot3, lerp2, length3, squaredLength2, normalize3, rotationTo;
|
|
6821
6853
|
var init_quat = __esm({
|
|
6822
6854
|
"../../node_modules/@math.gl/core/dist/gl-matrix/quat.js"() {
|
|
@@ -6865,6 +6897,7 @@ var __exports__ = (() => {
|
|
|
6865
6897
|
var Quaternion;
|
|
6866
6898
|
var init_quaternion = __esm({
|
|
6867
6899
|
"../../node_modules/@math.gl/core/dist/classes/quaternion.js"() {
|
|
6900
|
+
init_quat();
|
|
6868
6901
|
init_math_array();
|
|
6869
6902
|
init_validators();
|
|
6870
6903
|
init_quat();
|
|
@@ -6938,6 +6971,9 @@ var __exports__ = (() => {
|
|
|
6938
6971
|
return this.check();
|
|
6939
6972
|
}
|
|
6940
6973
|
/** Set a quat to the identity quaternion */
|
|
6974
|
+
rotateTowards(target, step) {
|
|
6975
|
+
return rotateTowards(this, this, target, step);
|
|
6976
|
+
}
|
|
6941
6977
|
identity() {
|
|
6942
6978
|
identity2(this);
|
|
6943
6979
|
return this.check();
|
|
@@ -7413,6 +7449,19 @@ var __exports__ = (() => {
|
|
|
7413
7449
|
}
|
|
7414
7450
|
});
|
|
7415
7451
|
|
|
7452
|
+
// ../../node_modules/@math.gl/core/dist/projections.js
|
|
7453
|
+
function getProjectionDepthRange(options = {}) {
|
|
7454
|
+
const range = options.depthRange ?? "negative-one-to-one";
|
|
7455
|
+
if (range !== "negative-one-to-one" && range !== "zero-to-one")
|
|
7456
|
+
throw new RangeError("Unknown depth range");
|
|
7457
|
+
const low = range === "zero-to-one" ? 0 : -1;
|
|
7458
|
+
return options.reversedDepth ? [1, low] : [low, 1];
|
|
7459
|
+
}
|
|
7460
|
+
var init_projections = __esm({
|
|
7461
|
+
"../../node_modules/@math.gl/core/dist/projections.js"() {
|
|
7462
|
+
}
|
|
7463
|
+
});
|
|
7464
|
+
|
|
7416
7465
|
// ../../node_modules/@math.gl/core/dist/index.js
|
|
7417
7466
|
var init_dist = __esm({
|
|
7418
7467
|
"../../node_modules/@math.gl/core/dist/index.js"() {
|
|
@@ -7434,6 +7483,7 @@ var __exports__ = (() => {
|
|
|
7434
7483
|
init_vec32();
|
|
7435
7484
|
init_vec42();
|
|
7436
7485
|
init_mat42();
|
|
7486
|
+
init_projections();
|
|
7437
7487
|
}
|
|
7438
7488
|
});
|
|
7439
7489
|
|
|
@@ -8386,11 +8436,49 @@ var __exports__ = (() => {
|
|
|
8386
8436
|
}
|
|
8387
8437
|
});
|
|
8388
8438
|
|
|
8439
|
+
// ../../node_modules/@math.gl/geometry/dist/culling/frustum-planes.js
|
|
8440
|
+
function extractFrustumPlanes(matrix, options = {}) {
|
|
8441
|
+
if (matrix.length !== 16 || Array.from(matrix).some((x2) => !Number.isFinite(x2)))
|
|
8442
|
+
throw new RangeError("Expected a finite view-projection matrix");
|
|
8443
|
+
const [near, far] = getProjectionDepthRange(options);
|
|
8444
|
+
const low = Math.min(near, far), high = Math.max(near, far);
|
|
8445
|
+
const row = (i) => [matrix[i], matrix[i + 4], matrix[i + 8], matrix[i + 12]];
|
|
8446
|
+
const x = row(0), y = row(1), z2 = row(2), w = row(3);
|
|
8447
|
+
const combine2 = (a, b, factor) => a.map((v, i) => v + factor * b[i]);
|
|
8448
|
+
const lo = combine2(z2, w, -low), hi = w.map((v, i) => high * v - z2[i]);
|
|
8449
|
+
const coefficients = [
|
|
8450
|
+
combine2(w, x, 1),
|
|
8451
|
+
combine2(w, x, -1),
|
|
8452
|
+
combine2(w, y, 1),
|
|
8453
|
+
combine2(w, y, -1),
|
|
8454
|
+
...options.reversedDepth ? [hi, lo] : [lo, hi]
|
|
8455
|
+
];
|
|
8456
|
+
const planes = [];
|
|
8457
|
+
for (const [a, b, c, d] of coefficients) {
|
|
8458
|
+
const length4 = Math.hypot(a, b, c);
|
|
8459
|
+
if (length4 === 0) {
|
|
8460
|
+
if (d < 0)
|
|
8461
|
+
throw new RangeError("Empty clipping volume");
|
|
8462
|
+
} else
|
|
8463
|
+
planes.push(new Plane([a / length4, b / length4, c / length4], d / length4));
|
|
8464
|
+
}
|
|
8465
|
+
if (planes.length < 4)
|
|
8466
|
+
throw new RangeError("Degenerate clipping volume");
|
|
8467
|
+
return planes;
|
|
8468
|
+
}
|
|
8469
|
+
var init_frustum_planes = __esm({
|
|
8470
|
+
"../../node_modules/@math.gl/geometry/dist/culling/frustum-planes.js"() {
|
|
8471
|
+
init_dist();
|
|
8472
|
+
init_plane();
|
|
8473
|
+
}
|
|
8474
|
+
});
|
|
8475
|
+
|
|
8389
8476
|
// ../../node_modules/@math.gl/geometry/dist/culling/lib/culling-volume.js
|
|
8390
8477
|
var faces, scratchPlaneCenter, scratchPlaneNormal, CullingVolume;
|
|
8391
8478
|
var init_culling_volume = __esm({
|
|
8392
8479
|
"../../node_modules/@math.gl/geometry/dist/culling/lib/culling-volume.js"() {
|
|
8393
8480
|
init_dist();
|
|
8481
|
+
init_frustum_planes();
|
|
8394
8482
|
init_plane();
|
|
8395
8483
|
faces = [new Vector3([1, 0, 0]), new Vector3([0, 1, 0]), new Vector3([0, 0, 1])];
|
|
8396
8484
|
scratchPlaneCenter = new Vector3();
|
|
@@ -8430,6 +8518,12 @@ var __exports__ = (() => {
|
|
|
8430
8518
|
}
|
|
8431
8519
|
return this;
|
|
8432
8520
|
}
|
|
8521
|
+
/** Replace planes from a view-projection matrix; validates before mutating. */
|
|
8522
|
+
fromViewProjection(matrix, options = {}) {
|
|
8523
|
+
const planes = extractFrustumPlanes(matrix, options);
|
|
8524
|
+
this.planes.splice(0, this.planes.length, ...planes);
|
|
8525
|
+
return this;
|
|
8526
|
+
}
|
|
8433
8527
|
/** Determines whether a bounding volume intersects the culling volume. */
|
|
8434
8528
|
computeVisibility(boundingVolume) {
|
|
8435
8529
|
let intersect = "inside";
|
|
@@ -16421,19 +16515,26 @@ var __exports__ = (() => {
|
|
|
16421
16515
|
for (const [primitiveIndex, primitive] of mesh.primitives.entries()) {
|
|
16422
16516
|
const extension = primitive.extensions?.[name6];
|
|
16423
16517
|
if (!extension) continue;
|
|
16518
|
+
const descriptor = descriptors.find(
|
|
16519
|
+
(item) => item.meshIndex === meshIndex && item.primitiveIndex === primitiveIndex
|
|
16520
|
+
);
|
|
16521
|
+
const legacyColorSpace = options?.gltf?.legacyGaussianSplatColorSpace;
|
|
16522
|
+
const normalizedExtension = legacyColorSpace && extension.extensions?.[SPZ_COMPRESSION_EXTENSION_NAME] ? {
|
|
16523
|
+
...extension,
|
|
16524
|
+
kernel: extension.kernel ?? "ellipse",
|
|
16525
|
+
colorSpace: extension.colorSpace ?? legacyColorSpace
|
|
16526
|
+
} : extension;
|
|
16527
|
+
if (descriptor) descriptor.extension = normalizedExtension;
|
|
16424
16528
|
validateGaussianSplatPrimitive(
|
|
16425
16529
|
gltfData.json,
|
|
16426
16530
|
primitive,
|
|
16427
|
-
|
|
16531
|
+
normalizedExtension,
|
|
16428
16532
|
meshIndex,
|
|
16429
16533
|
primitiveIndex,
|
|
16430
16534
|
iterator
|
|
16431
16535
|
);
|
|
16432
16536
|
const compression = extension.extensions?.[SPZ_COMPRESSION_EXTENSION_NAME];
|
|
16433
16537
|
if (compression) {
|
|
16434
|
-
const descriptor = descriptors.find(
|
|
16435
|
-
(item) => item.meshIndex === meshIndex && item.primitiveIndex === primitiveIndex
|
|
16436
|
-
);
|
|
16437
16538
|
if (descriptor) {
|
|
16438
16539
|
const decoder2 = options?.gltf?.splatDecoder;
|
|
16439
16540
|
const bufferView = gltfData.json.bufferViews?.[compression.bufferView];
|
|
@@ -37949,7 +38050,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
37949
38050
|
});
|
|
37950
38051
|
|
|
37951
38052
|
// ../scene/src/gltf/lib/types/gltf-additional-extension-schemas.ts
|
|
37952
|
-
var indexSchema, propertyShape, GLTFKHRMaterialVariantSchema, GLTFKHRMaterialsVariantsSchema, GLTFKHRMaterialVariantMappingSchema, GLTFKHRMaterialsVariantsPrimitiveSchema, GLTFEXTMeshGPUInstancingSchema, GLTFKHRAnimationPointerSchema, GLTFKHRNodeVisibilitySchema, GLTFKHRNodeSelectabilitySchema, GLTFKHRNodeHoverabilitySchema, GLTFKHRXMPPacketSchema, GLTFKHRXMPJSONLDSchema, GLTFKHRXMPJSONLDReferenceSchema;
|
|
38053
|
+
var indexSchema, propertyShape, GLTFKHRMaterialVariantSchema, GLTFKHRMaterialsVariantsSchema, GLTFKHRMaterialVariantMappingSchema, GLTFKHRMaterialsVariantsPrimitiveSchema, GLTFEXTMeshGPUInstancingSchema, GLTFKHRAnimationPointerSchema, GLTFKHRNodeVisibilitySchema, GLTFKHRNodeSelectabilitySchema, GLTFKHRNodeHoverabilitySchema, GLTFKHRXMPPacketSchema, GLTFKHRXMPJSONLDSchema, GLTFKHRXMPJSONLDReferenceSchema, GLTFKHRMaterialsEmissiveStrengthSchema, GLTFFBGeometryMetadataSchema;
|
|
37953
38054
|
var init_gltf_additional_extension_schemas = __esm({
|
|
37954
38055
|
"../scene/src/gltf/lib/types/gltf-additional-extension-schemas.ts"() {
|
|
37955
38056
|
"use strict";
|
|
@@ -38024,6 +38125,24 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
38024
38125
|
/** Index into the document-level packets array. */
|
|
38025
38126
|
packet: indexSchema
|
|
38026
38127
|
});
|
|
38128
|
+
GLTFKHRMaterialsEmissiveStrengthSchema = external_exports.looseObject({
|
|
38129
|
+
...propertyShape,
|
|
38130
|
+
/** Unitless multiplier; defaults to one when omitted. */
|
|
38131
|
+
emissiveStrength: external_exports.number().nonnegative().optional()
|
|
38132
|
+
});
|
|
38133
|
+
GLTFFBGeometryMetadataSchema = external_exports.looseObject({
|
|
38134
|
+
...propertyShape,
|
|
38135
|
+
/** Authored count of vertices. */
|
|
38136
|
+
vertexCount: external_exports.number().nonnegative().optional(),
|
|
38137
|
+
/** Authored count of primitives. */
|
|
38138
|
+
primitiveCount: external_exports.number().nonnegative().optional(),
|
|
38139
|
+
/** Static scene-space bounding box. */
|
|
38140
|
+
sceneBounds: external_exports.looseObject({
|
|
38141
|
+
...propertyShape,
|
|
38142
|
+
min: external_exports.array(external_exports.number()).length(3),
|
|
38143
|
+
max: external_exports.array(external_exports.number()).length(3)
|
|
38144
|
+
}).optional()
|
|
38145
|
+
});
|
|
38027
38146
|
}
|
|
38028
38147
|
});
|
|
38029
38148
|
|
|
@@ -38175,7 +38294,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
38175
38294
|
});
|
|
38176
38295
|
|
|
38177
38296
|
// ../scene/src/gltf/lib/types/gltf-extension-schemas.ts
|
|
38178
|
-
var GLTFPropertyExtensionsSchema, GLTFRootExtensionsSchema, GLTFNodeExtensionsSchema, GLTFSceneExtensionsSchema, GLTFMeshPrimitiveExtensionsSchema, GLTFAnimationTargetExtensionsSchema;
|
|
38297
|
+
var GLTFPropertyExtensionsSchema, GLTFMaterialExtensionsSchema, GLTFRootExtensionsSchema, GLTFNodeExtensionsSchema, GLTFSceneExtensionsSchema, GLTFMeshPrimitiveExtensionsSchema, GLTFAnimationTargetExtensionsSchema;
|
|
38179
38298
|
var init_gltf_extension_schemas = __esm({
|
|
38180
38299
|
"../scene/src/gltf/lib/types/gltf-extension-schemas.ts"() {
|
|
38181
38300
|
"use strict";
|
|
@@ -38186,6 +38305,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
38186
38305
|
/** Shared XMP packet reference. */
|
|
38187
38306
|
KHR_xmp_json_ld: GLTFKHRXMPJSONLDReferenceSchema.optional()
|
|
38188
38307
|
});
|
|
38308
|
+
GLTFMaterialExtensionsSchema = GLTFPropertyExtensionsSchema.extend({
|
|
38309
|
+
/** Emissive intensity multiplier. */
|
|
38310
|
+
KHR_materials_emissive_strength: GLTFKHRMaterialsEmissiveStrengthSchema.optional()
|
|
38311
|
+
});
|
|
38189
38312
|
GLTFRootExtensionsSchema = external_exports.looseObject({
|
|
38190
38313
|
/** Shared material variant declarations. */
|
|
38191
38314
|
KHR_materials_variants: GLTFKHRMaterialsVariantsSchema.optional(),
|
|
@@ -38211,6 +38334,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
38211
38334
|
MPEG_audio_spatial: GLTFMPEGAudioSpatialSchema.optional()
|
|
38212
38335
|
});
|
|
38213
38336
|
GLTFSceneExtensionsSchema = GLTFPropertyExtensionsSchema.extend({
|
|
38337
|
+
/** Authored static geometry summary. */
|
|
38338
|
+
FB_geometry_metadata: GLTFFBGeometryMetadataSchema.optional(),
|
|
38214
38339
|
/** Attached global KHR audio emitters. */
|
|
38215
38340
|
KHR_audio_emitter: GLTFKHRAudioAttachmentSchema.optional()
|
|
38216
38341
|
});
|
|
@@ -54008,442 +54133,29 @@ return true;`);
|
|
|
54008
54133
|
}
|
|
54009
54134
|
});
|
|
54010
54135
|
|
|
54011
|
-
//
|
|
54012
|
-
function
|
|
54013
|
-
return
|
|
54014
|
-
fields: arrowSchema.fields.map((arrowField) => serializeArrowField(arrowField)),
|
|
54015
|
-
metadata: serializeArrowMetadata(arrowSchema.metadata)
|
|
54016
|
-
};
|
|
54017
|
-
}
|
|
54018
|
-
function deserializeArrowSchema(schema, options) {
|
|
54019
|
-
return new Schema2(
|
|
54020
|
-
schema.fields.map((field) => deserializeArrowField(field, options)),
|
|
54021
|
-
deserializeArrowMetadata(schema.metadata)
|
|
54022
|
-
);
|
|
54023
|
-
}
|
|
54024
|
-
function serializeArrowMetadata(arrowMetadata) {
|
|
54025
|
-
return Object.fromEntries(arrowMetadata);
|
|
54026
|
-
}
|
|
54027
|
-
function deserializeArrowMetadata(metadata) {
|
|
54028
|
-
return metadata ? new Map(Object.entries(metadata)) : /* @__PURE__ */ new Map();
|
|
54136
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/arrow-data.js
|
|
54137
|
+
function getArrowVariadicBuffers(data) {
|
|
54138
|
+
return data.variadicBuffers ?? [];
|
|
54029
54139
|
}
|
|
54030
|
-
function
|
|
54031
|
-
return
|
|
54032
|
-
|
|
54033
|
-
|
|
54034
|
-
|
|
54035
|
-
|
|
54036
|
-
|
|
54037
|
-
|
|
54038
|
-
|
|
54039
|
-
|
|
54040
|
-
|
|
54041
|
-
deserializeArrowType(field.type, options),
|
|
54042
|
-
field.nullable,
|
|
54043
|
-
deserializeArrowMetadata(field.metadata)
|
|
54044
|
-
);
|
|
54045
|
-
}
|
|
54046
|
-
function serializeArrowType(arrowType) {
|
|
54047
|
-
if (isArrowViewType(arrowType, "BinaryView")) {
|
|
54048
|
-
return "binary-view";
|
|
54049
|
-
}
|
|
54050
|
-
if (isArrowViewType(arrowType, "Utf8View")) {
|
|
54051
|
-
return "utf8-view";
|
|
54052
|
-
}
|
|
54053
|
-
if (isOptionalArrowType(arrowType, "LargeList")) {
|
|
54054
|
-
const largeListType = arrowType;
|
|
54055
|
-
return {
|
|
54056
|
-
type: "large-list",
|
|
54057
|
-
children: [serializeArrowField(largeListType.valueField)]
|
|
54058
|
-
};
|
|
54059
|
-
}
|
|
54060
|
-
switch (arrowType.constructor) {
|
|
54061
|
-
case Null2:
|
|
54062
|
-
return "null";
|
|
54063
|
-
case Binary2:
|
|
54064
|
-
return "binary";
|
|
54065
|
-
case FixedSizeBinary2:
|
|
54066
|
-
return {
|
|
54067
|
-
type: "fixed-size-binary",
|
|
54068
|
-
byteWidth: arrowType.byteWidth
|
|
54069
|
-
};
|
|
54070
|
-
case Bool2:
|
|
54071
|
-
return "bool";
|
|
54072
|
-
case Int_:
|
|
54073
|
-
const intType = arrowType;
|
|
54074
|
-
return `${intType.isSigned ? "" : "u"}int${intType.bitWidth}`;
|
|
54075
|
-
case Int8:
|
|
54076
|
-
return "int8";
|
|
54077
|
-
case Int16:
|
|
54078
|
-
return "int16";
|
|
54079
|
-
case Int32:
|
|
54080
|
-
return "int32";
|
|
54081
|
-
case Int64:
|
|
54082
|
-
return "int64";
|
|
54083
|
-
case Uint8:
|
|
54084
|
-
return "uint8";
|
|
54085
|
-
case Uint16:
|
|
54086
|
-
return "uint16";
|
|
54087
|
-
case Uint32:
|
|
54088
|
-
return "uint32";
|
|
54089
|
-
case Uint64:
|
|
54090
|
-
return "uint64";
|
|
54091
|
-
case Float:
|
|
54092
|
-
const precision = arrowType.precision;
|
|
54093
|
-
switch (precision) {
|
|
54094
|
-
case Precision.HALF:
|
|
54095
|
-
return "float16";
|
|
54096
|
-
case Precision.SINGLE:
|
|
54097
|
-
return "float32";
|
|
54098
|
-
case Precision.DOUBLE:
|
|
54099
|
-
return "float64";
|
|
54100
|
-
default:
|
|
54101
|
-
return "float16";
|
|
54102
|
-
}
|
|
54103
|
-
case Float16:
|
|
54104
|
-
return "float16";
|
|
54105
|
-
case Float32:
|
|
54106
|
-
return "float32";
|
|
54107
|
-
case Float64:
|
|
54108
|
-
return "float64";
|
|
54109
|
-
case Utf82:
|
|
54110
|
-
return "utf8";
|
|
54111
|
-
case Decimal2:
|
|
54112
|
-
const decimal = arrowType;
|
|
54113
|
-
return {
|
|
54114
|
-
type: "decimal",
|
|
54115
|
-
bitWidth: decimal.bitWidth,
|
|
54116
|
-
precision: decimal.precision,
|
|
54117
|
-
scale: decimal.scale
|
|
54118
|
-
};
|
|
54119
|
-
case Date_:
|
|
54120
|
-
const dateUnit = arrowType.unit;
|
|
54121
|
-
return dateUnit === DateUnit.DAY ? "date-day" : "date-millisecond";
|
|
54122
|
-
case DateDay:
|
|
54123
|
-
return "date-day";
|
|
54124
|
-
case DateMillisecond:
|
|
54125
|
-
return "date-millisecond";
|
|
54126
|
-
case Time_:
|
|
54127
|
-
const timeUnit = arrowType.unit;
|
|
54128
|
-
switch (timeUnit) {
|
|
54129
|
-
case TimeUnit.SECOND:
|
|
54130
|
-
return "time-second";
|
|
54131
|
-
case TimeUnit.MILLISECOND:
|
|
54132
|
-
return "time-millisecond";
|
|
54133
|
-
case TimeUnit.MICROSECOND:
|
|
54134
|
-
return "time-microsecond";
|
|
54135
|
-
case TimeUnit.NANOSECOND:
|
|
54136
|
-
return "time-nanosecond";
|
|
54137
|
-
default:
|
|
54138
|
-
return "time-second";
|
|
54139
|
-
}
|
|
54140
|
-
case TimeMillisecond:
|
|
54141
|
-
return "time-millisecond";
|
|
54142
|
-
case TimeSecond:
|
|
54143
|
-
return "time-second";
|
|
54144
|
-
case TimeMicrosecond:
|
|
54145
|
-
return "time-microsecond";
|
|
54146
|
-
case TimeNanosecond:
|
|
54147
|
-
return "time-nanosecond";
|
|
54148
|
-
case Timestamp_:
|
|
54149
|
-
const timeStampUnit = arrowType.unit;
|
|
54150
|
-
switch (timeStampUnit) {
|
|
54151
|
-
case TimeUnit.SECOND:
|
|
54152
|
-
return "timestamp-second";
|
|
54153
|
-
case TimeUnit.MILLISECOND:
|
|
54154
|
-
return "timestamp-millisecond";
|
|
54155
|
-
case TimeUnit.MICROSECOND:
|
|
54156
|
-
return "timestamp-microsecond";
|
|
54157
|
-
case TimeUnit.NANOSECOND:
|
|
54158
|
-
return "timestamp-nanosecond";
|
|
54159
|
-
default:
|
|
54160
|
-
return "timestamp-second";
|
|
54161
|
-
}
|
|
54162
|
-
case TimestampSecond:
|
|
54163
|
-
return "timestamp-second";
|
|
54164
|
-
case TimestampMillisecond:
|
|
54165
|
-
return "timestamp-millisecond";
|
|
54166
|
-
case TimestampMicrosecond:
|
|
54167
|
-
return "timestamp-microsecond";
|
|
54168
|
-
case TimestampNanosecond:
|
|
54169
|
-
return "timestamp-nanosecond";
|
|
54170
|
-
case Interval_:
|
|
54171
|
-
const intervalUnit = arrowType.unit;
|
|
54172
|
-
switch (intervalUnit) {
|
|
54173
|
-
case IntervalUnit.DAY_TIME:
|
|
54174
|
-
return "interval-daytime";
|
|
54175
|
-
case IntervalUnit.YEAR_MONTH:
|
|
54176
|
-
return "interval-yearmonth";
|
|
54177
|
-
default:
|
|
54178
|
-
return "interval-daytime";
|
|
54179
|
-
}
|
|
54180
|
-
case IntervalDayTime:
|
|
54181
|
-
return "interval-daytime";
|
|
54182
|
-
case IntervalYearMonth:
|
|
54183
|
-
return "interval-yearmonth";
|
|
54184
|
-
case Map_:
|
|
54185
|
-
const mapType = arrowType;
|
|
54186
|
-
return {
|
|
54187
|
-
type: "map",
|
|
54188
|
-
keysSorted: mapType.keysSorted,
|
|
54189
|
-
children: mapType.children.map((arrowField) => serializeArrowField(arrowField))
|
|
54190
|
-
};
|
|
54191
|
-
case List2:
|
|
54192
|
-
const listType = arrowType;
|
|
54193
|
-
const listField = listType.valueField;
|
|
54194
|
-
return {
|
|
54195
|
-
type: "list",
|
|
54196
|
-
children: [serializeArrowField(listField)]
|
|
54197
|
-
};
|
|
54198
|
-
case FixedSizeList2:
|
|
54199
|
-
const fixedSizeList = arrowType;
|
|
54200
|
-
return {
|
|
54201
|
-
type: "fixed-size-list",
|
|
54202
|
-
listSize: fixedSizeList.listSize,
|
|
54203
|
-
children: [serializeArrowField(fixedSizeList.children[0])]
|
|
54204
|
-
};
|
|
54205
|
-
case Struct:
|
|
54206
|
-
const structType = arrowType;
|
|
54207
|
-
return {
|
|
54208
|
-
type: "struct",
|
|
54209
|
-
children: structType.children.map((arrowField) => serializeArrowField(arrowField))
|
|
54210
|
-
};
|
|
54211
|
-
case SparseUnion:
|
|
54212
|
-
case DenseUnion:
|
|
54213
|
-
const unionType = arrowType;
|
|
54214
|
-
return {
|
|
54215
|
-
type: unionType instanceof DenseUnion ? "dense-union" : "sparse-union",
|
|
54216
|
-
typeIds: unionType.typeIds,
|
|
54217
|
-
children: unionType.children.map((arrowField) => serializeArrowField(arrowField)),
|
|
54218
|
-
typeIdToChildIndex: { ...unionType.typeIdToChildIndex }
|
|
54219
|
-
};
|
|
54220
|
-
case Dictionary:
|
|
54221
|
-
const dictionaryType = arrowType;
|
|
54222
|
-
return {
|
|
54223
|
-
type: "dictionary",
|
|
54224
|
-
id: dictionaryType.id,
|
|
54225
|
-
indices: serializeArrowDictionaryKeyType(dictionaryType.indices),
|
|
54226
|
-
dictionary: serializeArrowType(dictionaryType.dictionary),
|
|
54227
|
-
isOrdered: dictionaryType.isOrdered
|
|
54228
|
-
};
|
|
54229
|
-
default:
|
|
54230
|
-
throw new Error(`arrow type not supported: ${arrowType.constructor.name}`);
|
|
54231
|
-
}
|
|
54232
|
-
}
|
|
54233
|
-
function deserializeArrowType(dataType, options) {
|
|
54234
|
-
if (typeof dataType === "object") {
|
|
54235
|
-
switch (dataType.type) {
|
|
54236
|
-
case "decimal":
|
|
54237
|
-
return new Decimal2(dataType.scale, dataType.precision, dataType.bitWidth);
|
|
54238
|
-
case "map": {
|
|
54239
|
-
const children2 = dataType.children.map(
|
|
54240
|
-
(arrowField) => deserializeArrowField(arrowField, options)
|
|
54241
|
-
);
|
|
54242
|
-
return new Map_(children2[0], dataType.keysSorted);
|
|
54243
|
-
}
|
|
54244
|
-
case "list": {
|
|
54245
|
-
const field = deserializeArrowField(dataType.children[0], options);
|
|
54246
|
-
return new List2(field);
|
|
54247
|
-
}
|
|
54248
|
-
case "large-list": {
|
|
54249
|
-
const field = deserializeArrowField(dataType.children[0], options);
|
|
54250
|
-
const LargeList3 = getOptionalArrowConstructor("LargeList");
|
|
54251
|
-
if (!LargeList3) {
|
|
54252
|
-
throw new Error(
|
|
54253
|
-
"LargeList requires an Apache Arrow runtime that exports the LargeList constructor"
|
|
54254
|
-
);
|
|
54255
|
-
}
|
|
54256
|
-
return new LargeList3(field);
|
|
54257
|
-
}
|
|
54258
|
-
case "fixed-size-list": {
|
|
54259
|
-
const child2 = deserializeArrowField(dataType.children[0], options);
|
|
54260
|
-
return new FixedSizeList2(dataType.listSize, child2);
|
|
54261
|
-
}
|
|
54262
|
-
case "fixed-size-binary":
|
|
54263
|
-
return new FixedSizeBinary2(dataType.byteWidth);
|
|
54264
|
-
case "struct": {
|
|
54265
|
-
const children2 = dataType.children.map(
|
|
54266
|
-
(arrowField) => deserializeArrowField(arrowField, options)
|
|
54267
|
-
);
|
|
54268
|
-
return new Struct(children2);
|
|
54269
|
-
}
|
|
54270
|
-
case "sparse-union":
|
|
54271
|
-
case "dense-union": {
|
|
54272
|
-
const children2 = dataType.children.map(
|
|
54273
|
-
(arrowField) => deserializeArrowField(arrowField, options)
|
|
54274
|
-
);
|
|
54275
|
-
return dataType.type === "dense-union" ? new DenseUnion(dataType.typeIds, children2) : new SparseUnion(dataType.typeIds, children2);
|
|
54276
|
-
}
|
|
54277
|
-
case "dictionary": {
|
|
54278
|
-
return new Dictionary(
|
|
54279
|
-
deserializeArrowType(dataType.dictionary, options),
|
|
54280
|
-
deserializeArrowDictionaryKeyType(dataType.indices),
|
|
54281
|
-
dataType.id,
|
|
54282
|
-
dataType.isOrdered
|
|
54283
|
-
);
|
|
54284
|
-
}
|
|
54285
|
-
default:
|
|
54286
|
-
throw new Error("array type not supported");
|
|
54287
|
-
}
|
|
54288
|
-
}
|
|
54289
|
-
switch (dataType) {
|
|
54290
|
-
case "null":
|
|
54291
|
-
return new Null2();
|
|
54292
|
-
case "binary":
|
|
54293
|
-
return makeVariableWidthArrowType("BinaryView", new Binary2(), options);
|
|
54294
|
-
case "binary-view":
|
|
54295
|
-
return makeRequiredArrowViewType("BinaryView");
|
|
54296
|
-
case "bool":
|
|
54297
|
-
return new Bool2();
|
|
54298
|
-
case "int8":
|
|
54299
|
-
return new Int8();
|
|
54300
|
-
case "int16":
|
|
54301
|
-
return new Int16();
|
|
54302
|
-
case "int32":
|
|
54303
|
-
return new Int32();
|
|
54304
|
-
case "int64":
|
|
54305
|
-
return new Int64();
|
|
54306
|
-
case "uint8":
|
|
54307
|
-
return new Uint8();
|
|
54308
|
-
case "uint16":
|
|
54309
|
-
return new Uint16();
|
|
54310
|
-
case "uint32":
|
|
54311
|
-
return new Uint32();
|
|
54312
|
-
case "uint64":
|
|
54313
|
-
return new Uint64();
|
|
54314
|
-
case "float16":
|
|
54315
|
-
return new Float16();
|
|
54316
|
-
case "float32":
|
|
54317
|
-
return new Float32();
|
|
54318
|
-
case "float64":
|
|
54319
|
-
return new Float64();
|
|
54320
|
-
case "utf8":
|
|
54321
|
-
return makeVariableWidthArrowType("Utf8View", new Utf82(), options);
|
|
54322
|
-
case "utf8-view":
|
|
54323
|
-
return makeRequiredArrowViewType("Utf8View");
|
|
54324
|
-
case "date-day":
|
|
54325
|
-
return new DateDay();
|
|
54326
|
-
case "date-millisecond":
|
|
54327
|
-
return new DateMillisecond();
|
|
54328
|
-
case "time-second":
|
|
54329
|
-
return new TimeSecond();
|
|
54330
|
-
case "time-millisecond":
|
|
54331
|
-
return new TimeMillisecond();
|
|
54332
|
-
case "time-microsecond":
|
|
54333
|
-
return new TimeMicrosecond();
|
|
54334
|
-
case "time-nanosecond":
|
|
54335
|
-
return new TimeNanosecond();
|
|
54336
|
-
case "timestamp-second":
|
|
54337
|
-
return new TimestampSecond();
|
|
54338
|
-
case "timestamp-millisecond":
|
|
54339
|
-
return new TimestampMillisecond();
|
|
54340
|
-
case "timestamp-microsecond":
|
|
54341
|
-
return new TimestampMicrosecond();
|
|
54342
|
-
case "timestamp-nanosecond":
|
|
54343
|
-
return new TimestampNanosecond();
|
|
54344
|
-
case "interval-daytime":
|
|
54345
|
-
return new IntervalDayTime();
|
|
54346
|
-
case "interval-yearmonth":
|
|
54347
|
-
return new IntervalYearMonth();
|
|
54348
|
-
default:
|
|
54349
|
-
throw new Error("array type not supported");
|
|
54350
|
-
}
|
|
54351
|
-
}
|
|
54352
|
-
function getOptionalArrowConstructor(typeName) {
|
|
54353
|
-
return Arrow_dom_exports[typeName];
|
|
54354
|
-
}
|
|
54355
|
-
function isArrowViewType(arrowType, viewTypeName) {
|
|
54356
|
-
const constructor = getOptionalArrowConstructor(viewTypeName);
|
|
54357
|
-
if (constructor && arrowType instanceof constructor) {
|
|
54358
|
-
return true;
|
|
54359
|
-
}
|
|
54360
|
-
const guards = DataType;
|
|
54361
|
-
const guard = viewTypeName === "BinaryView" ? guards.isBinaryView : guards.isUtf8View;
|
|
54362
|
-
return Boolean(guard?.(arrowType));
|
|
54363
|
-
}
|
|
54364
|
-
function isOptionalArrowType(arrowType, typeName) {
|
|
54365
|
-
const constructor = getOptionalArrowConstructor(typeName);
|
|
54366
|
-
return Boolean(constructor && arrowType instanceof constructor);
|
|
54367
|
-
}
|
|
54368
|
-
function makeVariableWidthArrowType(viewTypeName, fallbackType, options) {
|
|
54369
|
-
const viewTypeMode = options?.viewTypes || "never";
|
|
54370
|
-
if (viewTypeMode === "never") {
|
|
54371
|
-
return fallbackType;
|
|
54372
|
-
}
|
|
54373
|
-
const constructor = getOptionalArrowConstructor(viewTypeName);
|
|
54374
|
-
if (constructor) {
|
|
54375
|
-
return new constructor();
|
|
54376
|
-
}
|
|
54377
|
-
if (viewTypeMode === "require") {
|
|
54378
|
-
throw new Error(
|
|
54379
|
-
`${viewTypeName} requires apache-arrow 21.2.0 or later; the installed runtime does not support it`
|
|
54380
|
-
);
|
|
54381
|
-
}
|
|
54382
|
-
return fallbackType;
|
|
54383
|
-
}
|
|
54384
|
-
function makeRequiredArrowViewType(viewTypeName) {
|
|
54385
|
-
const constructor = getOptionalArrowConstructor(viewTypeName);
|
|
54386
|
-
if (!constructor) {
|
|
54387
|
-
throw new Error(
|
|
54388
|
-
`${viewTypeName} requires apache-arrow 21.2.0 or later; the installed runtime does not support it`
|
|
54389
|
-
);
|
|
54390
|
-
}
|
|
54391
|
-
return new constructor();
|
|
54392
|
-
}
|
|
54393
|
-
function serializeArrowDictionaryKeyType(arrowType) {
|
|
54394
|
-
if (arrowType instanceof Int_) {
|
|
54395
|
-
const prefix = arrowType.isSigned ? "int" : "uint";
|
|
54396
|
-
const keyType = `${prefix}${arrowType.bitWidth}`;
|
|
54397
|
-
if (isSchemaDictionaryKeyType(keyType)) {
|
|
54398
|
-
return keyType;
|
|
54399
|
-
}
|
|
54400
|
-
}
|
|
54401
|
-
switch (arrowType.constructor) {
|
|
54402
|
-
case Int8:
|
|
54403
|
-
return "int8";
|
|
54404
|
-
case Int16:
|
|
54405
|
-
return "int16";
|
|
54406
|
-
case Int32:
|
|
54407
|
-
return "int32";
|
|
54408
|
-
case Uint8:
|
|
54409
|
-
return "uint8";
|
|
54410
|
-
case Uint16:
|
|
54411
|
-
return "uint16";
|
|
54412
|
-
case Uint32:
|
|
54413
|
-
return "uint32";
|
|
54414
|
-
default:
|
|
54415
|
-
throw new Error(`arrow dictionary index type not supported: ${arrowType.constructor.name}`);
|
|
54416
|
-
}
|
|
54417
|
-
}
|
|
54418
|
-
function isSchemaDictionaryKeyType(keyType) {
|
|
54419
|
-
return ["int8", "int16", "int32", "uint8", "uint16", "uint32"].includes(keyType);
|
|
54420
|
-
}
|
|
54421
|
-
function deserializeArrowDictionaryKeyType(keyType) {
|
|
54422
|
-
switch (keyType) {
|
|
54423
|
-
case "int8":
|
|
54424
|
-
return new Int8();
|
|
54425
|
-
case "int16":
|
|
54426
|
-
return new Int16();
|
|
54427
|
-
case "int32":
|
|
54428
|
-
return new Int32();
|
|
54429
|
-
case "uint8":
|
|
54430
|
-
return new Uint8();
|
|
54431
|
-
case "uint16":
|
|
54432
|
-
return new Uint16();
|
|
54433
|
-
case "uint32":
|
|
54434
|
-
return new Uint32();
|
|
54435
|
-
default:
|
|
54436
|
-
throw new Error(`schema dictionary index type not supported: ${keyType}`);
|
|
54437
|
-
}
|
|
54140
|
+
function createArrowData(type, offset2, length4, nullCount, buffers, children2, dictionary, variadicBuffers) {
|
|
54141
|
+
return Reflect.construct(Data, [
|
|
54142
|
+
type,
|
|
54143
|
+
offset2,
|
|
54144
|
+
length4,
|
|
54145
|
+
nullCount,
|
|
54146
|
+
buffers,
|
|
54147
|
+
children2,
|
|
54148
|
+
dictionary,
|
|
54149
|
+
variadicBuffers
|
|
54150
|
+
]);
|
|
54438
54151
|
}
|
|
54439
|
-
var
|
|
54440
|
-
"
|
|
54441
|
-
"use strict";
|
|
54152
|
+
var init_arrow_data = __esm({
|
|
54153
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/arrow-data.js"() {
|
|
54442
54154
|
init_Arrow_dom();
|
|
54443
54155
|
}
|
|
54444
54156
|
});
|
|
54445
54157
|
|
|
54446
|
-
//
|
|
54158
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/split-arrow-buffers.js
|
|
54447
54159
|
function splitArrowBuffers(input2, options = {}) {
|
|
54448
54160
|
const context = { ...options, copies: /* @__PURE__ */ new WeakMap() };
|
|
54449
54161
|
if (isArrowTable2(input2)) {
|
|
@@ -54466,17 +54178,12 @@ return true;`);
|
|
|
54466
54178
|
function isArrowVector2(input2) {
|
|
54467
54179
|
return "data" in input2 && Array.isArray(input2.data);
|
|
54468
54180
|
}
|
|
54469
|
-
function splitArrowTableBuffersInternal(
|
|
54470
|
-
const recordBatches =
|
|
54471
|
-
|
|
54472
|
-
);
|
|
54473
|
-
return new Table(table.schema, recordBatches);
|
|
54181
|
+
function splitArrowTableBuffersInternal(arrowTable, options) {
|
|
54182
|
+
const recordBatches = arrowTable.batches.map((recordBatch) => splitArrowRecordBatchBuffers(recordBatch, options));
|
|
54183
|
+
return new Table(arrowTable.schema, recordBatches);
|
|
54474
54184
|
}
|
|
54475
54185
|
function splitArrowRecordBatchBuffers(recordBatch, options) {
|
|
54476
|
-
return new RecordBatch3(
|
|
54477
|
-
recordBatch.schema,
|
|
54478
|
-
splitArrowDataBuffers(recordBatch.data, options)
|
|
54479
|
-
);
|
|
54186
|
+
return new RecordBatch3(recordBatch.schema, splitArrowDataBuffers(recordBatch.data, options));
|
|
54480
54187
|
}
|
|
54481
54188
|
function splitArrowDataBuffers(data, options) {
|
|
54482
54189
|
const children2 = data.children.map((childData) => splitArrowDataBuffers(childData, options));
|
|
@@ -54487,7 +54194,7 @@ return true;`);
|
|
|
54487
54194
|
[BufferType.VALIDITY]: splitArrowBuffer(data.buffers[BufferType.VALIDITY], options),
|
|
54488
54195
|
[BufferType.TYPE]: splitArrowBuffer(data.buffers[BufferType.TYPE], options)
|
|
54489
54196
|
};
|
|
54490
|
-
return
|
|
54197
|
+
return createArrowData(
|
|
54491
54198
|
data.type,
|
|
54492
54199
|
data.offset,
|
|
54493
54200
|
data.length,
|
|
@@ -54495,7 +54202,8 @@ return true;`);
|
|
|
54495
54202
|
data._nullCount,
|
|
54496
54203
|
buffers,
|
|
54497
54204
|
children2,
|
|
54498
|
-
dictionary
|
|
54205
|
+
dictionary,
|
|
54206
|
+
getArrowVariadicBuffers(data).map((buffer) => splitArrowBuffer(buffer, options))
|
|
54499
54207
|
);
|
|
54500
54208
|
}
|
|
54501
54209
|
function splitArrowVectorBuffers(vector, options) {
|
|
@@ -54513,7 +54221,7 @@ return true;`);
|
|
|
54513
54221
|
}
|
|
54514
54222
|
let copy3 = options.copies.get(array3);
|
|
54515
54223
|
if (!copy3) {
|
|
54516
|
-
copy3 = array3.slice();
|
|
54224
|
+
copy3 = array3 instanceof Uint8Array ? new Uint8Array(array3) : array3.slice();
|
|
54517
54225
|
options.copies.set(array3, copy3);
|
|
54518
54226
|
}
|
|
54519
54227
|
return copy3;
|
|
@@ -54522,29 +54230,106 @@ return true;`);
|
|
|
54522
54230
|
return ArrayBuffer.isView(value2) && !(value2 instanceof DataView);
|
|
54523
54231
|
}
|
|
54524
54232
|
var init_split_arrow_buffers = __esm({
|
|
54525
|
-
"
|
|
54526
|
-
"use strict";
|
|
54233
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/split-arrow-buffers.js"() {
|
|
54527
54234
|
init_Arrow_dom();
|
|
54235
|
+
init_arrow_data();
|
|
54236
|
+
}
|
|
54237
|
+
});
|
|
54238
|
+
|
|
54239
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/indexed-arrow-vector.js
|
|
54240
|
+
var init_indexed_arrow_vector = __esm({
|
|
54241
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/indexed-arrow-vector.js"() {
|
|
54242
|
+
}
|
|
54243
|
+
});
|
|
54244
|
+
|
|
54245
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/indexed-arrow-table.js
|
|
54246
|
+
var init_indexed_arrow_table = __esm({
|
|
54247
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/indexed-arrow-table.js"() {
|
|
54528
54248
|
}
|
|
54529
54249
|
});
|
|
54530
54250
|
|
|
54531
|
-
//
|
|
54532
|
-
|
|
54533
|
-
|
|
54251
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/mapped-arrow-table.js
|
|
54252
|
+
var init_mapped_arrow_table = __esm({
|
|
54253
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/mapped-arrow-table.js"() {
|
|
54254
|
+
}
|
|
54255
|
+
});
|
|
54256
|
+
|
|
54257
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/rename-arrow-columns.js
|
|
54258
|
+
var init_rename_arrow_columns = __esm({
|
|
54259
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/rename-arrow-columns.js"() {
|
|
54260
|
+
}
|
|
54261
|
+
});
|
|
54262
|
+
|
|
54263
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/arrow-table-transport.js
|
|
54264
|
+
function dehydrateArrowTable(arrowTable, options) {
|
|
54265
|
+
const splitTable = splitArrowBuffers(arrowTable, options);
|
|
54534
54266
|
return {
|
|
54535
|
-
shape: "arrow-table",
|
|
54536
54267
|
transport: "arrow-js",
|
|
54537
|
-
|
|
54538
|
-
|
|
54268
|
+
version: 1,
|
|
54269
|
+
schema: tableToIPC(new Table(splitTable.schema, [])),
|
|
54270
|
+
metadataVersion: splitTable.schema.metadataVersion,
|
|
54271
|
+
batches: splitTable.batches.map((batch) => dehydrateArrowData(batch.data))
|
|
54539
54272
|
};
|
|
54540
54273
|
}
|
|
54541
54274
|
function hydrateArrowTable(table) {
|
|
54542
|
-
|
|
54543
|
-
|
|
54544
|
-
|
|
54545
|
-
);
|
|
54546
|
-
|
|
54275
|
+
if (table.transport !== "arrow-js" || table.version !== 1) {
|
|
54276
|
+
throw new Error("Unsupported Arrow column-buffer transport protocol.");
|
|
54277
|
+
}
|
|
54278
|
+
const decodedSchema = tableFromIPC(table.schema).schema;
|
|
54279
|
+
const schema = new Schema2(decodedSchema.fields, decodedSchema.metadata, decodedSchema.dictionaries, table.metadataVersion);
|
|
54280
|
+
const type = new Struct(schema.fields);
|
|
54281
|
+
const batches = table.batches.map((data) => new RecordBatch3(schema, hydrateArrowData(data, type)));
|
|
54282
|
+
return new Table(schema, batches);
|
|
54283
|
+
}
|
|
54284
|
+
function dehydrateArrowData(data) {
|
|
54285
|
+
return {
|
|
54286
|
+
offset: data.offset,
|
|
54287
|
+
length: data.length,
|
|
54288
|
+
nullCount: data.nullCount,
|
|
54289
|
+
buffers: {
|
|
54290
|
+
[BufferType.OFFSET]: data.buffers[BufferType.OFFSET],
|
|
54291
|
+
[BufferType.DATA]: data.buffers[BufferType.DATA],
|
|
54292
|
+
[BufferType.VALIDITY]: data.buffers[BufferType.VALIDITY],
|
|
54293
|
+
[BufferType.TYPE]: data.buffers[BufferType.TYPE]
|
|
54294
|
+
},
|
|
54295
|
+
children: data.children.map((child2) => dehydrateArrowData(child2)),
|
|
54296
|
+
variadicBuffers: getArrowVariadicBuffers(data),
|
|
54297
|
+
dictionary: data.dictionary?.data.map((chunk) => dehydrateArrowData(chunk))
|
|
54298
|
+
};
|
|
54299
|
+
}
|
|
54300
|
+
function hydrateArrowData(data, type) {
|
|
54301
|
+
const children2 = data.children.map((child2, index) => hydrateArrowData(child2, type.children[index].type));
|
|
54302
|
+
const dictionary = data.dictionary && DataType.isDictionary(type) ? new Vector4(data.dictionary.map((chunk) => hydrateArrowData(chunk, type.dictionary))) : void 0;
|
|
54303
|
+
return createArrowData(type, data.offset, data.length, data.nullCount, data.buffers, children2, dictionary, data.variadicBuffers);
|
|
54547
54304
|
}
|
|
54305
|
+
var init_arrow_table_transport = __esm({
|
|
54306
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/arrow-table-transport.js"() {
|
|
54307
|
+
init_Arrow_dom();
|
|
54308
|
+
init_arrow_data();
|
|
54309
|
+
init_split_arrow_buffers();
|
|
54310
|
+
}
|
|
54311
|
+
});
|
|
54312
|
+
|
|
54313
|
+
// ../../node_modules/@math.gl/arrow/dist/arrow/index.js
|
|
54314
|
+
var init_arrow = __esm({
|
|
54315
|
+
"../../node_modules/@math.gl/arrow/dist/arrow/index.js"() {
|
|
54316
|
+
init_indexed_arrow_table();
|
|
54317
|
+
init_indexed_arrow_vector();
|
|
54318
|
+
init_mapped_arrow_table();
|
|
54319
|
+
init_rename_arrow_columns();
|
|
54320
|
+
init_split_arrow_buffers();
|
|
54321
|
+
init_arrow_table_transport();
|
|
54322
|
+
}
|
|
54323
|
+
});
|
|
54324
|
+
|
|
54325
|
+
// ../../node_modules/@math.gl/arrow/dist/index.js
|
|
54326
|
+
var init_dist4 = __esm({
|
|
54327
|
+
"../../node_modules/@math.gl/arrow/dist/index.js"() {
|
|
54328
|
+
init_arrow();
|
|
54329
|
+
}
|
|
54330
|
+
});
|
|
54331
|
+
|
|
54332
|
+
// ../core/src/arrow-worker-transport.ts
|
|
54548
54333
|
function serializeArrowWorkerResult(result, options) {
|
|
54549
54334
|
if (!isArrowTableWrapper(result)) {
|
|
54550
54335
|
return result;
|
|
@@ -54574,60 +54359,10 @@ return true;`);
|
|
|
54574
54359
|
table && table.shape === "arrow-table" && table.data && table.data.transport === "arrow-js" && Array.isArray(table.data.batches)
|
|
54575
54360
|
);
|
|
54576
54361
|
}
|
|
54577
|
-
|
|
54578
|
-
|
|
54579
|
-
}
|
|
54580
|
-
function dehydrateArrowData(data) {
|
|
54581
|
-
return {
|
|
54582
|
-
type: serializeArrowType(data.type),
|
|
54583
|
-
offset: data.offset,
|
|
54584
|
-
length: data.length,
|
|
54585
|
-
// @ts-expect-error _nullCount is protected. Preserve the Arrow lazy null-count state.
|
|
54586
|
-
nullCount: data._nullCount,
|
|
54587
|
-
buffers: {
|
|
54588
|
-
[BufferType.OFFSET]: data.buffers[BufferType.OFFSET],
|
|
54589
|
-
[BufferType.DATA]: data.buffers[BufferType.DATA],
|
|
54590
|
-
[BufferType.VALIDITY]: data.buffers[BufferType.VALIDITY],
|
|
54591
|
-
[BufferType.TYPE]: data.buffers[BufferType.TYPE]
|
|
54592
|
-
},
|
|
54593
|
-
children: data.children.map((childData) => dehydrateArrowData(childData)),
|
|
54594
|
-
dictionary: data.dictionary ? dehydrateArrowVector(data.dictionary) : void 0
|
|
54595
|
-
};
|
|
54596
|
-
}
|
|
54597
|
-
function dehydrateArrowVector(vector) {
|
|
54598
|
-
return { data: vector.data.map((data) => dehydrateArrowData(data)) };
|
|
54599
|
-
}
|
|
54600
|
-
function hydrateArrowData(data) {
|
|
54601
|
-
const children2 = data.children.map((childData) => hydrateArrowData(childData));
|
|
54602
|
-
const dictionary = data.dictionary ? hydrateArrowVector(data.dictionary) : void 0;
|
|
54603
|
-
return new Data(
|
|
54604
|
-
deserializeArrowType(data.type),
|
|
54605
|
-
data.offset,
|
|
54606
|
-
data.length,
|
|
54607
|
-
data.nullCount,
|
|
54608
|
-
data.buffers,
|
|
54609
|
-
children2,
|
|
54610
|
-
dictionary
|
|
54611
|
-
);
|
|
54612
|
-
}
|
|
54613
|
-
function hydrateArrowVector(vector) {
|
|
54614
|
-
return new Vector4(vector.data.map((data) => hydrateArrowData(data)));
|
|
54615
|
-
}
|
|
54616
|
-
var init_arrow_table_transport = __esm({
|
|
54617
|
-
"../core/src/schema-utils/lib/arrow/arrow-table-transport.ts"() {
|
|
54362
|
+
var init_arrow_worker_transport = __esm({
|
|
54363
|
+
"../core/src/arrow-worker-transport.ts"() {
|
|
54618
54364
|
"use strict";
|
|
54619
|
-
|
|
54620
|
-
init_convert_arrow_schema();
|
|
54621
|
-
init_split_arrow_buffers();
|
|
54622
|
-
}
|
|
54623
|
-
});
|
|
54624
|
-
|
|
54625
|
-
// ../core/src/schema-utils/arrow-transport.ts
|
|
54626
|
-
var init_arrow_transport = __esm({
|
|
54627
|
-
"../core/src/schema-utils/arrow-transport.ts"() {
|
|
54628
|
-
"use strict";
|
|
54629
|
-
init_arrow_table_transport();
|
|
54630
|
-
init_split_arrow_buffers();
|
|
54365
|
+
init_dist4();
|
|
54631
54366
|
}
|
|
54632
54367
|
});
|
|
54633
54368
|
|
|
@@ -54982,6 +54717,435 @@ return true;`);
|
|
|
54982
54717
|
}
|
|
54983
54718
|
});
|
|
54984
54719
|
|
|
54720
|
+
// ../core/src/schema-utils/lib/schema/convert-arrow-schema.ts
|
|
54721
|
+
function serializeArrowSchema(arrowSchema) {
|
|
54722
|
+
return {
|
|
54723
|
+
fields: arrowSchema.fields.map((arrowField) => serializeArrowField(arrowField)),
|
|
54724
|
+
metadata: serializeArrowMetadata(arrowSchema.metadata)
|
|
54725
|
+
};
|
|
54726
|
+
}
|
|
54727
|
+
function serializeArrowMetadata(arrowMetadata) {
|
|
54728
|
+
return Object.fromEntries(arrowMetadata);
|
|
54729
|
+
}
|
|
54730
|
+
function deserializeArrowMetadata(metadata) {
|
|
54731
|
+
return metadata ? new Map(Object.entries(metadata)) : /* @__PURE__ */ new Map();
|
|
54732
|
+
}
|
|
54733
|
+
function serializeArrowField(field) {
|
|
54734
|
+
return {
|
|
54735
|
+
name: field.name,
|
|
54736
|
+
type: serializeArrowType(field.type),
|
|
54737
|
+
nullable: field.nullable,
|
|
54738
|
+
metadata: serializeArrowMetadata(field.metadata)
|
|
54739
|
+
};
|
|
54740
|
+
}
|
|
54741
|
+
function deserializeArrowField(field, options) {
|
|
54742
|
+
return new Field2(
|
|
54743
|
+
field.name,
|
|
54744
|
+
deserializeArrowType(field.type, options),
|
|
54745
|
+
field.nullable,
|
|
54746
|
+
deserializeArrowMetadata(field.metadata)
|
|
54747
|
+
);
|
|
54748
|
+
}
|
|
54749
|
+
function serializeArrowType(arrowType) {
|
|
54750
|
+
if (isArrowViewType(arrowType, "BinaryView")) {
|
|
54751
|
+
return "binary-view";
|
|
54752
|
+
}
|
|
54753
|
+
if (isArrowViewType(arrowType, "Utf8View")) {
|
|
54754
|
+
return "utf8-view";
|
|
54755
|
+
}
|
|
54756
|
+
if (isOptionalArrowType(arrowType, "LargeList")) {
|
|
54757
|
+
const largeListType = arrowType;
|
|
54758
|
+
return {
|
|
54759
|
+
type: "large-list",
|
|
54760
|
+
children: [serializeArrowField(largeListType.valueField)]
|
|
54761
|
+
};
|
|
54762
|
+
}
|
|
54763
|
+
switch (arrowType.constructor) {
|
|
54764
|
+
case Null2:
|
|
54765
|
+
return "null";
|
|
54766
|
+
case Binary2:
|
|
54767
|
+
return "binary";
|
|
54768
|
+
case FixedSizeBinary2:
|
|
54769
|
+
return {
|
|
54770
|
+
type: "fixed-size-binary",
|
|
54771
|
+
byteWidth: arrowType.byteWidth
|
|
54772
|
+
};
|
|
54773
|
+
case Bool2:
|
|
54774
|
+
return "bool";
|
|
54775
|
+
case Int_:
|
|
54776
|
+
const intType = arrowType;
|
|
54777
|
+
return `${intType.isSigned ? "" : "u"}int${intType.bitWidth}`;
|
|
54778
|
+
case Int8:
|
|
54779
|
+
return "int8";
|
|
54780
|
+
case Int16:
|
|
54781
|
+
return "int16";
|
|
54782
|
+
case Int32:
|
|
54783
|
+
return "int32";
|
|
54784
|
+
case Int64:
|
|
54785
|
+
return "int64";
|
|
54786
|
+
case Uint8:
|
|
54787
|
+
return "uint8";
|
|
54788
|
+
case Uint16:
|
|
54789
|
+
return "uint16";
|
|
54790
|
+
case Uint32:
|
|
54791
|
+
return "uint32";
|
|
54792
|
+
case Uint64:
|
|
54793
|
+
return "uint64";
|
|
54794
|
+
case Float:
|
|
54795
|
+
const precision = arrowType.precision;
|
|
54796
|
+
switch (precision) {
|
|
54797
|
+
case Precision.HALF:
|
|
54798
|
+
return "float16";
|
|
54799
|
+
case Precision.SINGLE:
|
|
54800
|
+
return "float32";
|
|
54801
|
+
case Precision.DOUBLE:
|
|
54802
|
+
return "float64";
|
|
54803
|
+
default:
|
|
54804
|
+
return "float16";
|
|
54805
|
+
}
|
|
54806
|
+
case Float16:
|
|
54807
|
+
return "float16";
|
|
54808
|
+
case Float32:
|
|
54809
|
+
return "float32";
|
|
54810
|
+
case Float64:
|
|
54811
|
+
return "float64";
|
|
54812
|
+
case Utf82:
|
|
54813
|
+
return "utf8";
|
|
54814
|
+
case Decimal2:
|
|
54815
|
+
const decimal = arrowType;
|
|
54816
|
+
return {
|
|
54817
|
+
type: "decimal",
|
|
54818
|
+
bitWidth: decimal.bitWidth,
|
|
54819
|
+
precision: decimal.precision,
|
|
54820
|
+
scale: decimal.scale
|
|
54821
|
+
};
|
|
54822
|
+
case Date_:
|
|
54823
|
+
const dateUnit = arrowType.unit;
|
|
54824
|
+
return dateUnit === DateUnit.DAY ? "date-day" : "date-millisecond";
|
|
54825
|
+
case DateDay:
|
|
54826
|
+
return "date-day";
|
|
54827
|
+
case DateMillisecond:
|
|
54828
|
+
return "date-millisecond";
|
|
54829
|
+
case Time_:
|
|
54830
|
+
const timeUnit = arrowType.unit;
|
|
54831
|
+
switch (timeUnit) {
|
|
54832
|
+
case TimeUnit.SECOND:
|
|
54833
|
+
return "time-second";
|
|
54834
|
+
case TimeUnit.MILLISECOND:
|
|
54835
|
+
return "time-millisecond";
|
|
54836
|
+
case TimeUnit.MICROSECOND:
|
|
54837
|
+
return "time-microsecond";
|
|
54838
|
+
case TimeUnit.NANOSECOND:
|
|
54839
|
+
return "time-nanosecond";
|
|
54840
|
+
default:
|
|
54841
|
+
return "time-second";
|
|
54842
|
+
}
|
|
54843
|
+
case TimeMillisecond:
|
|
54844
|
+
return "time-millisecond";
|
|
54845
|
+
case TimeSecond:
|
|
54846
|
+
return "time-second";
|
|
54847
|
+
case TimeMicrosecond:
|
|
54848
|
+
return "time-microsecond";
|
|
54849
|
+
case TimeNanosecond:
|
|
54850
|
+
return "time-nanosecond";
|
|
54851
|
+
case Timestamp_:
|
|
54852
|
+
const timeStampUnit = arrowType.unit;
|
|
54853
|
+
switch (timeStampUnit) {
|
|
54854
|
+
case TimeUnit.SECOND:
|
|
54855
|
+
return "timestamp-second";
|
|
54856
|
+
case TimeUnit.MILLISECOND:
|
|
54857
|
+
return "timestamp-millisecond";
|
|
54858
|
+
case TimeUnit.MICROSECOND:
|
|
54859
|
+
return "timestamp-microsecond";
|
|
54860
|
+
case TimeUnit.NANOSECOND:
|
|
54861
|
+
return "timestamp-nanosecond";
|
|
54862
|
+
default:
|
|
54863
|
+
return "timestamp-second";
|
|
54864
|
+
}
|
|
54865
|
+
case TimestampSecond:
|
|
54866
|
+
return "timestamp-second";
|
|
54867
|
+
case TimestampMillisecond:
|
|
54868
|
+
return "timestamp-millisecond";
|
|
54869
|
+
case TimestampMicrosecond:
|
|
54870
|
+
return "timestamp-microsecond";
|
|
54871
|
+
case TimestampNanosecond:
|
|
54872
|
+
return "timestamp-nanosecond";
|
|
54873
|
+
case Interval_:
|
|
54874
|
+
const intervalUnit = arrowType.unit;
|
|
54875
|
+
switch (intervalUnit) {
|
|
54876
|
+
case IntervalUnit.DAY_TIME:
|
|
54877
|
+
return "interval-daytime";
|
|
54878
|
+
case IntervalUnit.YEAR_MONTH:
|
|
54879
|
+
return "interval-yearmonth";
|
|
54880
|
+
default:
|
|
54881
|
+
return "interval-daytime";
|
|
54882
|
+
}
|
|
54883
|
+
case IntervalDayTime:
|
|
54884
|
+
return "interval-daytime";
|
|
54885
|
+
case IntervalYearMonth:
|
|
54886
|
+
return "interval-yearmonth";
|
|
54887
|
+
case Map_:
|
|
54888
|
+
const mapType = arrowType;
|
|
54889
|
+
return {
|
|
54890
|
+
type: "map",
|
|
54891
|
+
keysSorted: mapType.keysSorted,
|
|
54892
|
+
children: mapType.children.map((arrowField) => serializeArrowField(arrowField))
|
|
54893
|
+
};
|
|
54894
|
+
case List2:
|
|
54895
|
+
const listType = arrowType;
|
|
54896
|
+
const listField = listType.valueField;
|
|
54897
|
+
return {
|
|
54898
|
+
type: "list",
|
|
54899
|
+
children: [serializeArrowField(listField)]
|
|
54900
|
+
};
|
|
54901
|
+
case FixedSizeList2:
|
|
54902
|
+
const fixedSizeList = arrowType;
|
|
54903
|
+
return {
|
|
54904
|
+
type: "fixed-size-list",
|
|
54905
|
+
listSize: fixedSizeList.listSize,
|
|
54906
|
+
children: [serializeArrowField(fixedSizeList.children[0])]
|
|
54907
|
+
};
|
|
54908
|
+
case Struct:
|
|
54909
|
+
const structType = arrowType;
|
|
54910
|
+
return {
|
|
54911
|
+
type: "struct",
|
|
54912
|
+
children: structType.children.map((arrowField) => serializeArrowField(arrowField))
|
|
54913
|
+
};
|
|
54914
|
+
case SparseUnion:
|
|
54915
|
+
case DenseUnion:
|
|
54916
|
+
const unionType = arrowType;
|
|
54917
|
+
return {
|
|
54918
|
+
type: unionType instanceof DenseUnion ? "dense-union" : "sparse-union",
|
|
54919
|
+
typeIds: unionType.typeIds,
|
|
54920
|
+
children: unionType.children.map((arrowField) => serializeArrowField(arrowField)),
|
|
54921
|
+
typeIdToChildIndex: { ...unionType.typeIdToChildIndex }
|
|
54922
|
+
};
|
|
54923
|
+
case Dictionary:
|
|
54924
|
+
const dictionaryType = arrowType;
|
|
54925
|
+
return {
|
|
54926
|
+
type: "dictionary",
|
|
54927
|
+
id: dictionaryType.id,
|
|
54928
|
+
indices: serializeArrowDictionaryKeyType(dictionaryType.indices),
|
|
54929
|
+
dictionary: serializeArrowType(dictionaryType.dictionary),
|
|
54930
|
+
isOrdered: dictionaryType.isOrdered
|
|
54931
|
+
};
|
|
54932
|
+
default:
|
|
54933
|
+
throw new Error(`arrow type not supported: ${arrowType.constructor.name}`);
|
|
54934
|
+
}
|
|
54935
|
+
}
|
|
54936
|
+
function deserializeArrowType(dataType, options) {
|
|
54937
|
+
if (typeof dataType === "object") {
|
|
54938
|
+
switch (dataType.type) {
|
|
54939
|
+
case "decimal":
|
|
54940
|
+
return new Decimal2(dataType.scale, dataType.precision, dataType.bitWidth);
|
|
54941
|
+
case "map": {
|
|
54942
|
+
const children2 = dataType.children.map(
|
|
54943
|
+
(arrowField) => deserializeArrowField(arrowField, options)
|
|
54944
|
+
);
|
|
54945
|
+
return new Map_(children2[0], dataType.keysSorted);
|
|
54946
|
+
}
|
|
54947
|
+
case "list": {
|
|
54948
|
+
const field = deserializeArrowField(dataType.children[0], options);
|
|
54949
|
+
return new List2(field);
|
|
54950
|
+
}
|
|
54951
|
+
case "large-list": {
|
|
54952
|
+
const field = deserializeArrowField(dataType.children[0], options);
|
|
54953
|
+
const LargeList3 = getOptionalArrowConstructor("LargeList");
|
|
54954
|
+
if (!LargeList3) {
|
|
54955
|
+
throw new Error(
|
|
54956
|
+
"LargeList requires an Apache Arrow runtime that exports the LargeList constructor"
|
|
54957
|
+
);
|
|
54958
|
+
}
|
|
54959
|
+
return new LargeList3(field);
|
|
54960
|
+
}
|
|
54961
|
+
case "fixed-size-list": {
|
|
54962
|
+
const child2 = deserializeArrowField(dataType.children[0], options);
|
|
54963
|
+
return new FixedSizeList2(dataType.listSize, child2);
|
|
54964
|
+
}
|
|
54965
|
+
case "fixed-size-binary":
|
|
54966
|
+
return new FixedSizeBinary2(dataType.byteWidth);
|
|
54967
|
+
case "struct": {
|
|
54968
|
+
const children2 = dataType.children.map(
|
|
54969
|
+
(arrowField) => deserializeArrowField(arrowField, options)
|
|
54970
|
+
);
|
|
54971
|
+
return new Struct(children2);
|
|
54972
|
+
}
|
|
54973
|
+
case "sparse-union":
|
|
54974
|
+
case "dense-union": {
|
|
54975
|
+
const children2 = dataType.children.map(
|
|
54976
|
+
(arrowField) => deserializeArrowField(arrowField, options)
|
|
54977
|
+
);
|
|
54978
|
+
return dataType.type === "dense-union" ? new DenseUnion(dataType.typeIds, children2) : new SparseUnion(dataType.typeIds, children2);
|
|
54979
|
+
}
|
|
54980
|
+
case "dictionary": {
|
|
54981
|
+
return new Dictionary(
|
|
54982
|
+
deserializeArrowType(dataType.dictionary, options),
|
|
54983
|
+
deserializeArrowDictionaryKeyType(dataType.indices),
|
|
54984
|
+
dataType.id,
|
|
54985
|
+
dataType.isOrdered
|
|
54986
|
+
);
|
|
54987
|
+
}
|
|
54988
|
+
default:
|
|
54989
|
+
throw new Error("array type not supported");
|
|
54990
|
+
}
|
|
54991
|
+
}
|
|
54992
|
+
switch (dataType) {
|
|
54993
|
+
case "null":
|
|
54994
|
+
return new Null2();
|
|
54995
|
+
case "binary":
|
|
54996
|
+
return makeVariableWidthArrowType("BinaryView", new Binary2(), options);
|
|
54997
|
+
case "binary-view":
|
|
54998
|
+
return makeRequiredArrowViewType("BinaryView");
|
|
54999
|
+
case "bool":
|
|
55000
|
+
return new Bool2();
|
|
55001
|
+
case "int8":
|
|
55002
|
+
return new Int8();
|
|
55003
|
+
case "int16":
|
|
55004
|
+
return new Int16();
|
|
55005
|
+
case "int32":
|
|
55006
|
+
return new Int32();
|
|
55007
|
+
case "int64":
|
|
55008
|
+
return new Int64();
|
|
55009
|
+
case "uint8":
|
|
55010
|
+
return new Uint8();
|
|
55011
|
+
case "uint16":
|
|
55012
|
+
return new Uint16();
|
|
55013
|
+
case "uint32":
|
|
55014
|
+
return new Uint32();
|
|
55015
|
+
case "uint64":
|
|
55016
|
+
return new Uint64();
|
|
55017
|
+
case "float16":
|
|
55018
|
+
return new Float16();
|
|
55019
|
+
case "float32":
|
|
55020
|
+
return new Float32();
|
|
55021
|
+
case "float64":
|
|
55022
|
+
return new Float64();
|
|
55023
|
+
case "utf8":
|
|
55024
|
+
return makeVariableWidthArrowType("Utf8View", new Utf82(), options);
|
|
55025
|
+
case "utf8-view":
|
|
55026
|
+
return makeRequiredArrowViewType("Utf8View");
|
|
55027
|
+
case "date-day":
|
|
55028
|
+
return new DateDay();
|
|
55029
|
+
case "date-millisecond":
|
|
55030
|
+
return new DateMillisecond();
|
|
55031
|
+
case "time-second":
|
|
55032
|
+
return new TimeSecond();
|
|
55033
|
+
case "time-millisecond":
|
|
55034
|
+
return new TimeMillisecond();
|
|
55035
|
+
case "time-microsecond":
|
|
55036
|
+
return new TimeMicrosecond();
|
|
55037
|
+
case "time-nanosecond":
|
|
55038
|
+
return new TimeNanosecond();
|
|
55039
|
+
case "timestamp-second":
|
|
55040
|
+
return new TimestampSecond();
|
|
55041
|
+
case "timestamp-millisecond":
|
|
55042
|
+
return new TimestampMillisecond();
|
|
55043
|
+
case "timestamp-microsecond":
|
|
55044
|
+
return new TimestampMicrosecond();
|
|
55045
|
+
case "timestamp-nanosecond":
|
|
55046
|
+
return new TimestampNanosecond();
|
|
55047
|
+
case "interval-daytime":
|
|
55048
|
+
return new IntervalDayTime();
|
|
55049
|
+
case "interval-yearmonth":
|
|
55050
|
+
return new IntervalYearMonth();
|
|
55051
|
+
default:
|
|
55052
|
+
throw new Error("array type not supported");
|
|
55053
|
+
}
|
|
55054
|
+
}
|
|
55055
|
+
function getOptionalArrowConstructor(typeName) {
|
|
55056
|
+
return Arrow_dom_exports[typeName];
|
|
55057
|
+
}
|
|
55058
|
+
function isArrowViewType(arrowType, viewTypeName) {
|
|
55059
|
+
const constructor = getOptionalArrowConstructor(viewTypeName);
|
|
55060
|
+
if (constructor && arrowType instanceof constructor) {
|
|
55061
|
+
return true;
|
|
55062
|
+
}
|
|
55063
|
+
const guards = DataType;
|
|
55064
|
+
const guard = viewTypeName === "BinaryView" ? guards.isBinaryView : guards.isUtf8View;
|
|
55065
|
+
return Boolean(guard?.(arrowType));
|
|
55066
|
+
}
|
|
55067
|
+
function isOptionalArrowType(arrowType, typeName) {
|
|
55068
|
+
const constructor = getOptionalArrowConstructor(typeName);
|
|
55069
|
+
return Boolean(constructor && arrowType instanceof constructor);
|
|
55070
|
+
}
|
|
55071
|
+
function makeVariableWidthArrowType(viewTypeName, fallbackType, options) {
|
|
55072
|
+
const viewTypeMode = options?.viewTypes || "never";
|
|
55073
|
+
if (viewTypeMode === "never") {
|
|
55074
|
+
return fallbackType;
|
|
55075
|
+
}
|
|
55076
|
+
const constructor = getOptionalArrowConstructor(viewTypeName);
|
|
55077
|
+
if (constructor) {
|
|
55078
|
+
return new constructor();
|
|
55079
|
+
}
|
|
55080
|
+
if (viewTypeMode === "require") {
|
|
55081
|
+
throw new Error(
|
|
55082
|
+
`${viewTypeName} requires apache-arrow 21.2.0 or later; the installed runtime does not support it`
|
|
55083
|
+
);
|
|
55084
|
+
}
|
|
55085
|
+
return fallbackType;
|
|
55086
|
+
}
|
|
55087
|
+
function makeRequiredArrowViewType(viewTypeName) {
|
|
55088
|
+
const constructor = getOptionalArrowConstructor(viewTypeName);
|
|
55089
|
+
if (!constructor) {
|
|
55090
|
+
throw new Error(
|
|
55091
|
+
`${viewTypeName} requires apache-arrow 21.2.0 or later; the installed runtime does not support it`
|
|
55092
|
+
);
|
|
55093
|
+
}
|
|
55094
|
+
return new constructor();
|
|
55095
|
+
}
|
|
55096
|
+
function serializeArrowDictionaryKeyType(arrowType) {
|
|
55097
|
+
if (arrowType instanceof Int_) {
|
|
55098
|
+
const prefix = arrowType.isSigned ? "int" : "uint";
|
|
55099
|
+
const keyType = `${prefix}${arrowType.bitWidth}`;
|
|
55100
|
+
if (isSchemaDictionaryKeyType(keyType)) {
|
|
55101
|
+
return keyType;
|
|
55102
|
+
}
|
|
55103
|
+
}
|
|
55104
|
+
switch (arrowType.constructor) {
|
|
55105
|
+
case Int8:
|
|
55106
|
+
return "int8";
|
|
55107
|
+
case Int16:
|
|
55108
|
+
return "int16";
|
|
55109
|
+
case Int32:
|
|
55110
|
+
return "int32";
|
|
55111
|
+
case Uint8:
|
|
55112
|
+
return "uint8";
|
|
55113
|
+
case Uint16:
|
|
55114
|
+
return "uint16";
|
|
55115
|
+
case Uint32:
|
|
55116
|
+
return "uint32";
|
|
55117
|
+
default:
|
|
55118
|
+
throw new Error(`arrow dictionary index type not supported: ${arrowType.constructor.name}`);
|
|
55119
|
+
}
|
|
55120
|
+
}
|
|
55121
|
+
function isSchemaDictionaryKeyType(keyType) {
|
|
55122
|
+
return ["int8", "int16", "int32", "uint8", "uint16", "uint32"].includes(keyType);
|
|
55123
|
+
}
|
|
55124
|
+
function deserializeArrowDictionaryKeyType(keyType) {
|
|
55125
|
+
switch (keyType) {
|
|
55126
|
+
case "int8":
|
|
55127
|
+
return new Int8();
|
|
55128
|
+
case "int16":
|
|
55129
|
+
return new Int16();
|
|
55130
|
+
case "int32":
|
|
55131
|
+
return new Int32();
|
|
55132
|
+
case "uint8":
|
|
55133
|
+
return new Uint8();
|
|
55134
|
+
case "uint16":
|
|
55135
|
+
return new Uint16();
|
|
55136
|
+
case "uint32":
|
|
55137
|
+
return new Uint32();
|
|
55138
|
+
default:
|
|
55139
|
+
throw new Error(`schema dictionary index type not supported: ${keyType}`);
|
|
55140
|
+
}
|
|
55141
|
+
}
|
|
55142
|
+
var init_convert_arrow_schema = __esm({
|
|
55143
|
+
"../core/src/schema-utils/lib/schema/convert-arrow-schema.ts"() {
|
|
55144
|
+
"use strict";
|
|
55145
|
+
init_Arrow_dom();
|
|
55146
|
+
}
|
|
55147
|
+
});
|
|
55148
|
+
|
|
54985
55149
|
// ../core/src/schema-utils/lib/mesh/mesh-utils.ts
|
|
54986
55150
|
function getMeshBoundingBox(attributes) {
|
|
54987
55151
|
const positionAttribute = attributes?.POSITION;
|
|
@@ -56183,7 +56347,7 @@ return true;`);
|
|
|
56183
56347
|
var init_draco_loader_types = __esm({
|
|
56184
56348
|
"../scene/src/draco/draco-loader-types.ts"() {
|
|
56185
56349
|
"use strict";
|
|
56186
|
-
|
|
56350
|
+
init_arrow_worker_transport();
|
|
56187
56351
|
init_version4();
|
|
56188
56352
|
init_draco_format();
|
|
56189
56353
|
init_draco_loader_options();
|
|
@@ -63613,6 +63777,59 @@ return true;`);
|
|
|
63613
63777
|
}
|
|
63614
63778
|
});
|
|
63615
63779
|
|
|
63780
|
+
// ../../node_modules/@math.gl/geospatial/dist/projection/experimental/transform-description.js
|
|
63781
|
+
function describeCRS(crs) {
|
|
63782
|
+
const ellipsoid = Object.freeze({ ...crs.ellipsoid });
|
|
63783
|
+
return Object.freeze({
|
|
63784
|
+
kind: crs.kind,
|
|
63785
|
+
projection: crs.projection,
|
|
63786
|
+
parameters: Object.freeze(Object.fromEntries(Object.entries(crs.parameters).map(([name22, value2]) => [name22, value2 ?? null]))),
|
|
63787
|
+
ellipsoid,
|
|
63788
|
+
datum: Object.freeze({
|
|
63789
|
+
ellipsoid: Object.freeze({ ...crs.datum.ellipsoid }),
|
|
63790
|
+
towgs84: crs.datum.towgs84 && Object.freeze([...crs.datum.towgs84]),
|
|
63791
|
+
grids: crs.datum.grids && Object.freeze(crs.datum.grids.map((reference) => Object.freeze({
|
|
63792
|
+
name: reference.name,
|
|
63793
|
+
optional: reference.optional,
|
|
63794
|
+
loaded: Boolean(reference.grid)
|
|
63795
|
+
})))
|
|
63796
|
+
}),
|
|
63797
|
+
angularUnit: crs.angularUnit,
|
|
63798
|
+
toMeter: crs.toMeter,
|
|
63799
|
+
verticalUnit: crs.verticalUnit,
|
|
63800
|
+
primeMeridian: crs.primeMeridian,
|
|
63801
|
+
axis: crs.axis,
|
|
63802
|
+
storedAxis: crs.storedAxis,
|
|
63803
|
+
longitudeWrap: crs.longitudeWrap,
|
|
63804
|
+
areaOfUse: crs.areaOfUse && Object.freeze([...crs.areaOfUse]),
|
|
63805
|
+
lossy: crs.lossy,
|
|
63806
|
+
algorithm: crs.algorithm && Object.freeze({ ...crs.algorithm })
|
|
63807
|
+
});
|
|
63808
|
+
}
|
|
63809
|
+
function describeTransform(source, target, forward33, inverse33) {
|
|
63810
|
+
const opaqueReasons = [];
|
|
63811
|
+
if (!source.algorithm)
|
|
63812
|
+
opaqueReasons.push("source-algorithm");
|
|
63813
|
+
if (!target.algorithm)
|
|
63814
|
+
opaqueReasons.push("target-algorithm");
|
|
63815
|
+
if (source.datum.grids || target.datum.grids || source.parameters["geoidgrids"] || target.parameters["geoidgrids"])
|
|
63816
|
+
opaqueReasons.push("grid-resource");
|
|
63817
|
+
return Object.freeze({
|
|
63818
|
+
version: 1,
|
|
63819
|
+
source,
|
|
63820
|
+
target,
|
|
63821
|
+
forward: forward33,
|
|
63822
|
+
inverse: inverse33,
|
|
63823
|
+
lossy: source.lossy || target.lossy,
|
|
63824
|
+
complete: opaqueReasons.length === 0,
|
|
63825
|
+
opaqueReasons: Object.freeze(opaqueReasons)
|
|
63826
|
+
});
|
|
63827
|
+
}
|
|
63828
|
+
var init_transform_description = __esm({
|
|
63829
|
+
"../../node_modules/@math.gl/geospatial/dist/projection/experimental/transform-description.js"() {
|
|
63830
|
+
}
|
|
63831
|
+
});
|
|
63832
|
+
|
|
63616
63833
|
// ../../node_modules/@math.gl/geospatial/dist/projection/experimental/typescript-projection.js
|
|
63617
63834
|
function requiredProjections(options) {
|
|
63618
63835
|
const available = registry2(options.projections || []);
|
|
@@ -63682,7 +63899,8 @@ return true;`);
|
|
|
63682
63899
|
const verticalGrid = compileVerticalGrid(crs.parameters["geoidgrids"], options.verticalGrids);
|
|
63683
63900
|
if (verticalGrid && (crs.kind === "geocentric" || crs.kind === "identity" || crs.lossy))
|
|
63684
63901
|
unsupportedStage("Vertical grids require a non-lossy geographic or projected CRS");
|
|
63685
|
-
|
|
63902
|
+
const algorithm = plugin ? plugin.semantics : { id: "@math.gl/geospatial/" + crs.kind, version: 1 };
|
|
63903
|
+
return { ...crs, datum, implementation, verticalGrid, algorithm };
|
|
63686
63904
|
}
|
|
63687
63905
|
function finite(point) {
|
|
63688
63906
|
return Number.isFinite(point.x) && Number.isFinite(point.y) && Number.isFinite(point.z);
|
|
@@ -63725,9 +63943,51 @@ return true;`);
|
|
|
63725
63943
|
if (from.kind === "projected" && to.kind === "geographic")
|
|
63726
63944
|
flat = from.implementation?.createInverseFlat?.(context);
|
|
63727
63945
|
}
|
|
63946
|
+
const requiresInputZ = Boolean(from.verticalGrid || to.verticalGrid) || from.kind === "geocentric" || /[ud]/.test(fromAxis.slice(0, 2)) || /[ud]/.test(toAxis.slice(0, 2));
|
|
63947
|
+
const stages = [];
|
|
63948
|
+
if (inputAxis)
|
|
63949
|
+
stages.push("input-axis");
|
|
63950
|
+
if (horizontalOnly)
|
|
63951
|
+
stages.push("discard-height");
|
|
63952
|
+
if (inputScale !== 1)
|
|
63953
|
+
stages.push("input-scale");
|
|
63954
|
+
if (source)
|
|
63955
|
+
stages.push("source-inverse");
|
|
63956
|
+
if (inputVerticalScale !== 1)
|
|
63957
|
+
stages.push("input-height-scale");
|
|
63958
|
+
stages.push("geographic-domain-check");
|
|
63959
|
+
if (fromPrime)
|
|
63960
|
+
stages.push("source-prime-meridian");
|
|
63961
|
+
if (from.verticalGrid)
|
|
63962
|
+
stages.push("source-vertical-grid");
|
|
63963
|
+
if (datum)
|
|
63964
|
+
stages.push("datum");
|
|
63965
|
+
if (to.verticalGrid)
|
|
63966
|
+
stages.push("target-vertical-grid");
|
|
63967
|
+
if (toPrime)
|
|
63968
|
+
stages.push("target-prime-meridian");
|
|
63969
|
+
if (longitudeWrap !== void 0)
|
|
63970
|
+
stages.push("longitude-wrap");
|
|
63971
|
+
if (target)
|
|
63972
|
+
stages.push("target-forward");
|
|
63973
|
+
if (outputScale !== 1)
|
|
63974
|
+
stages.push("output-scale");
|
|
63975
|
+
if (outputVerticalScale !== 1)
|
|
63976
|
+
stages.push("output-height-scale");
|
|
63977
|
+
if (horizontalOnly)
|
|
63978
|
+
stages.push("restore-height");
|
|
63979
|
+
if (outputAxis)
|
|
63980
|
+
stages.push("output-axis");
|
|
63728
63981
|
return {
|
|
63982
|
+
description: Object.freeze({
|
|
63983
|
+
inputAxis: fromAxis,
|
|
63984
|
+
outputAxis: toAxis,
|
|
63985
|
+
requiresInputZ,
|
|
63986
|
+
geocentricOutput: to.kind === "geocentric",
|
|
63987
|
+
stages: Object.freeze(stages)
|
|
63988
|
+
}),
|
|
63729
63989
|
flat,
|
|
63730
|
-
requiresInputZ
|
|
63990
|
+
requiresInputZ,
|
|
63731
63991
|
geocentricOutput: to.kind === "geocentric",
|
|
63732
63992
|
run(point) {
|
|
63733
63993
|
if (!finite(point))
|
|
@@ -63841,6 +64101,7 @@ return true;`);
|
|
|
63841
64101
|
init_parameters();
|
|
63842
64102
|
init_geographic_rendering_profile();
|
|
63843
64103
|
init_vertical_datum();
|
|
64104
|
+
init_transform_description();
|
|
63844
64105
|
ProjectionTransform = class _ProjectionTransform {
|
|
63845
64106
|
/** Resolve required descriptors once, then return an ordinary synchronous instance. */
|
|
63846
64107
|
static async create(options = {}) {
|
|
@@ -63854,6 +64115,10 @@ return true;`);
|
|
|
63854
64115
|
getTargetRenderingProfile(coverage) {
|
|
63855
64116
|
return this.targetRenderingProfile && resolveRenderingProfile(this.targetRenderingProfile, coverage);
|
|
63856
64117
|
}
|
|
64118
|
+
/** Deferred transforms expose metadata only once their implementations are prepared. */
|
|
64119
|
+
get description() {
|
|
64120
|
+
return this.deferred?.implementation?.description ?? this.resolvedDescription;
|
|
64121
|
+
}
|
|
63857
64122
|
constructor(options = {}) {
|
|
63858
64123
|
this.coordinateScratch = new ProjectionScratch();
|
|
63859
64124
|
this.targetLongitudeOrigin = 0;
|
|
@@ -63879,6 +64144,7 @@ return true;`);
|
|
|
63879
64144
|
unsupportedStage("Horizontal extraction cannot be combined with vertical grids");
|
|
63880
64145
|
this.forwardTransform = compileTransform(from, to, Boolean(options.enforceAxis));
|
|
63881
64146
|
this.inverseTransform = compileTransform(to, from, Boolean(options.enforceAxis));
|
|
64147
|
+
this.resolvedDescription = describeTransform(describeCRS(from), describeCRS(to), this.forwardTransform.description, this.inverseTransform.description);
|
|
63882
64148
|
}
|
|
63883
64149
|
this.project = this.project.bind(this);
|
|
63884
64150
|
this.unproject = this.unproject.bind(this);
|
|
@@ -64390,6 +64656,7 @@ return true;`);
|
|
|
64390
64656
|
init_rendering_bounds();
|
|
64391
64657
|
mercator = {
|
|
64392
64658
|
name: "merc",
|
|
64659
|
+
semantics: { id: "@math.gl/geospatial/merc", version: 1 },
|
|
64393
64660
|
aliases: [
|
|
64394
64661
|
"Mercator",
|
|
64395
64662
|
"Popular Visualisation Pseudo Mercator",
|
|
@@ -64483,6 +64750,7 @@ return true;`);
|
|
|
64483
64750
|
init_rendering_bounds();
|
|
64484
64751
|
equidistantCylindrical = {
|
|
64485
64752
|
name: "eqc",
|
|
64753
|
+
semantics: { id: "@math.gl/geospatial/eqc", version: 1 },
|
|
64486
64754
|
aliases: ["Equirectangular", "Equidistant_Cylindrical", "Equidistant_Cylindrical_Spherical"],
|
|
64487
64755
|
parameters: ["lon_0", "lat_0", "lat_ts", "x_0", "y_0"],
|
|
64488
64756
|
create({ semiMajorAxis: a, parameters, primeMeridian: primeMeridian2 = 0 }) {
|
|
@@ -72640,7 +72908,7 @@ return true;`);
|
|
|
72640
72908
|
});
|
|
72641
72909
|
|
|
72642
72910
|
// ../../node_modules/@math.gl/dggs/dist/index.js
|
|
72643
|
-
var
|
|
72911
|
+
var init_dist5 = __esm({
|
|
72644
72912
|
"../../node_modules/@math.gl/dggs/dist/index.js"() {
|
|
72645
72913
|
init_s2_decoder();
|
|
72646
72914
|
init_s2_token();
|
|
@@ -72661,7 +72929,7 @@ return true;`);
|
|
|
72661
72929
|
var init_s2_bounding_volume = __esm({
|
|
72662
72930
|
"src/tileset-3d/helpers/s2-bounding-volume.ts"() {
|
|
72663
72931
|
"use strict";
|
|
72664
|
-
|
|
72932
|
+
init_dist5();
|
|
72665
72933
|
init_dist3();
|
|
72666
72934
|
}
|
|
72667
72935
|
});
|
|
@@ -73237,7 +73505,7 @@ return true;`);
|
|
|
73237
73505
|
var init_implicit_tiling = __esm({
|
|
73238
73506
|
"src/tileset-3d/format-3d-tiles/implicit-tiling.ts"() {
|
|
73239
73507
|
"use strict";
|
|
73240
|
-
|
|
73508
|
+
init_dist5();
|
|
73241
73509
|
init_s2_bounding_volume();
|
|
73242
73510
|
QUADTREE_CHILD_COUNT = 4;
|
|
73243
73511
|
OCTREE_CHILD_COUNT = 8;
|
|
@@ -75442,6 +75710,7 @@ return true;`);
|
|
|
75442
75710
|
function extractInstancedAttributes(tile, featureTable, batchTable, instancesLength) {
|
|
75443
75711
|
const instances = new Array(instancesLength);
|
|
75444
75712
|
const instancePosition = new Vector3();
|
|
75713
|
+
const instanceFramePosition = new Vector3();
|
|
75445
75714
|
const instanceNormalRight = new Vector3();
|
|
75446
75715
|
const instanceNormalUp = new Vector3();
|
|
75447
75716
|
const instanceNormalForward = new Vector3();
|
|
@@ -75536,7 +75805,9 @@ return true;`);
|
|
|
75536
75805
|
tile.hasCustomOrientation = true;
|
|
75537
75806
|
hasCustomOrientation = true;
|
|
75538
75807
|
} else if (tile.eastNorthUp) {
|
|
75539
|
-
|
|
75808
|
+
instanceFramePosition.copy(instancePosition);
|
|
75809
|
+
if (tile.rtcCenter) instanceFramePosition.add(tile.rtcCenter);
|
|
75810
|
+
eastNorthUpToFixedFrame(Ellipsoid.WGS84, instanceFramePosition, instanceTransform);
|
|
75540
75811
|
instanceTransform.getRotationMatrix3(instanceRotation);
|
|
75541
75812
|
} else {
|
|
75542
75813
|
instanceRotation.identity();
|
|
@@ -81134,11 +81405,11 @@ return true;`);
|
|
|
81134
81405
|
var bundle_exports = {};
|
|
81135
81406
|
__export(bundle_exports, {
|
|
81136
81407
|
CesiumIonLoader: () => CesiumIonLoader,
|
|
81137
|
-
FetchError: () =>
|
|
81138
|
-
JSONLoader: () =>
|
|
81139
|
-
NullLoader: () =>
|
|
81140
|
-
NullWorkerLoader: () =>
|
|
81141
|
-
RequestScheduler: () =>
|
|
81408
|
+
FetchError: () => import_core45.FetchError,
|
|
81409
|
+
JSONLoader: () => import_core45.JSONLoader,
|
|
81410
|
+
NullLoader: () => import_core45.NullLoader,
|
|
81411
|
+
NullWorkerLoader: () => import_core45.NullWorkerLoader,
|
|
81412
|
+
RequestScheduler: () => import_core45.RequestScheduler,
|
|
81142
81413
|
TILE3D_TYPE: () => TILE3D_TYPE,
|
|
81143
81414
|
ThreeTZFormat: () => ThreeTZFormat,
|
|
81144
81415
|
Tile3DBatchTable: () => Tile3DBatchTableParser,
|
|
@@ -81152,71 +81423,71 @@ return true;`);
|
|
|
81152
81423
|
Tiles3DArchiveWriter: () => Tiles3DArchiveWriter,
|
|
81153
81424
|
Tiles3DFormat: () => Tiles3DFormat,
|
|
81154
81425
|
Tiles3DLoader: () => Tiles3DLoader,
|
|
81155
|
-
_BrowserFileSystem: () =>
|
|
81156
|
-
_fetchProgress: () =>
|
|
81426
|
+
_BrowserFileSystem: () => import_core45._BrowserFileSystem,
|
|
81427
|
+
_fetchProgress: () => import_core45._fetchProgress,
|
|
81157
81428
|
_getIonTilesetMetadata: () => getIonTilesetMetadata,
|
|
81158
|
-
_selectSource: () =>
|
|
81159
|
-
_unregisterLoaders: () =>
|
|
81160
|
-
assert: () =>
|
|
81161
|
-
concatenateArrayBuffersAsync: () =>
|
|
81162
|
-
coreApi: () =>
|
|
81163
|
-
createDataSource: () =>
|
|
81429
|
+
_selectSource: () => import_core45._selectSource,
|
|
81430
|
+
_unregisterLoaders: () => import_core45._unregisterLoaders,
|
|
81431
|
+
assert: () => import_core45.assert,
|
|
81432
|
+
concatenateArrayBuffersAsync: () => import_core45.concatenateArrayBuffersAsync,
|
|
81433
|
+
coreApi: () => import_core45.coreApi,
|
|
81434
|
+
createDataSource: () => import_core45.createDataSource,
|
|
81164
81435
|
createTile3DStyleInput: () => createTile3DStyleInput,
|
|
81165
|
-
document: () =>
|
|
81166
|
-
encode: () =>
|
|
81167
|
-
encodeInBatches: () =>
|
|
81168
|
-
encodeSync: () =>
|
|
81169
|
-
encodeTable: () =>
|
|
81170
|
-
encodeTableAsText: () =>
|
|
81171
|
-
encodeTableInBatches: () =>
|
|
81172
|
-
encodeText: () =>
|
|
81173
|
-
encodeTextSync: () =>
|
|
81174
|
-
encodeURLtoURL: () =>
|
|
81175
|
-
fetchFile: () =>
|
|
81176
|
-
forEach: () =>
|
|
81177
|
-
getLoaderOptions: () =>
|
|
81178
|
-
getPathPrefix: () =>
|
|
81436
|
+
document: () => import_core45.document,
|
|
81437
|
+
encode: () => import_core45.encode,
|
|
81438
|
+
encodeInBatches: () => import_core45.encodeInBatches,
|
|
81439
|
+
encodeSync: () => import_core45.encodeSync,
|
|
81440
|
+
encodeTable: () => import_core45.encodeTable,
|
|
81441
|
+
encodeTableAsText: () => import_core45.encodeTableAsText,
|
|
81442
|
+
encodeTableInBatches: () => import_core45.encodeTableInBatches,
|
|
81443
|
+
encodeText: () => import_core45.encodeText,
|
|
81444
|
+
encodeTextSync: () => import_core45.encodeTextSync,
|
|
81445
|
+
encodeURLtoURL: () => import_core45.encodeURLtoURL,
|
|
81446
|
+
fetchFile: () => import_core45.fetchFile,
|
|
81447
|
+
forEach: () => import_core45.forEach,
|
|
81448
|
+
getLoaderOptions: () => import_core45.getLoaderOptions,
|
|
81449
|
+
getPathPrefix: () => import_core45.getPathPrefix,
|
|
81179
81450
|
getStructuralMetadataProperty: () => getStructuralMetadataProperty,
|
|
81180
81451
|
getStructuralMetadataRow: () => getStructuralMetadataRow,
|
|
81181
81452
|
getTile3DBatchTableProperties: () => getTile3DBatchTableProperties,
|
|
81182
81453
|
getTile3DStyleProperty: () => getTile3DStyleProperty,
|
|
81183
|
-
global: () =>
|
|
81184
|
-
isAsyncIterable: () =>
|
|
81185
|
-
isBrowser: () =>
|
|
81186
|
-
isIterable: () =>
|
|
81187
|
-
isIterator: () =>
|
|
81188
|
-
isPromise: () =>
|
|
81189
|
-
isPureObject: () =>
|
|
81190
|
-
isReadableStream: () =>
|
|
81191
|
-
isResponse: () =>
|
|
81192
|
-
isWorker: () =>
|
|
81193
|
-
isWritableStream: () =>
|
|
81194
|
-
load: () =>
|
|
81195
|
-
loadInBatches: () =>
|
|
81196
|
-
makeIterator: () =>
|
|
81197
|
-
makeLineIterator: () =>
|
|
81198
|
-
makeNumberedLineIterator: () =>
|
|
81199
|
-
makeStream: () =>
|
|
81200
|
-
makeTextDecoderIterator: () =>
|
|
81201
|
-
makeTextEncoderIterator: () =>
|
|
81202
|
-
parse: () =>
|
|
81454
|
+
global: () => import_core45.global,
|
|
81455
|
+
isAsyncIterable: () => import_core45.isAsyncIterable,
|
|
81456
|
+
isBrowser: () => import_core45.isBrowser,
|
|
81457
|
+
isIterable: () => import_core45.isIterable,
|
|
81458
|
+
isIterator: () => import_core45.isIterator,
|
|
81459
|
+
isPromise: () => import_core45.isPromise,
|
|
81460
|
+
isPureObject: () => import_core45.isPureObject,
|
|
81461
|
+
isReadableStream: () => import_core45.isReadableStream,
|
|
81462
|
+
isResponse: () => import_core45.isResponse,
|
|
81463
|
+
isWorker: () => import_core45.isWorker,
|
|
81464
|
+
isWritableStream: () => import_core45.isWritableStream,
|
|
81465
|
+
load: () => import_core45.load,
|
|
81466
|
+
loadInBatches: () => import_core45.loadInBatches,
|
|
81467
|
+
makeIterator: () => import_core45.makeIterator,
|
|
81468
|
+
makeLineIterator: () => import_core45.makeLineIterator,
|
|
81469
|
+
makeNumberedLineIterator: () => import_core45.makeNumberedLineIterator,
|
|
81470
|
+
makeStream: () => import_core45.makeStream,
|
|
81471
|
+
makeTextDecoderIterator: () => import_core45.makeTextDecoderIterator,
|
|
81472
|
+
makeTextEncoderIterator: () => import_core45.makeTextEncoderIterator,
|
|
81473
|
+
parse: () => import_core45.parse,
|
|
81203
81474
|
parse3DTilesArchive: () => parse3DTilesArchive,
|
|
81204
|
-
parseFile: () =>
|
|
81205
|
-
parseInBatches: () =>
|
|
81206
|
-
parseSync: () =>
|
|
81207
|
-
preload: () =>
|
|
81208
|
-
preloadSync: () =>
|
|
81209
|
-
readArrayBuffer: () =>
|
|
81210
|
-
registerLoaders: () =>
|
|
81211
|
-
resolvePath: () =>
|
|
81212
|
-
selectLoader: () =>
|
|
81213
|
-
selectLoaderSync: () =>
|
|
81214
|
-
self: () =>
|
|
81215
|
-
setLoaderOptions: () =>
|
|
81216
|
-
setPathPrefix: () =>
|
|
81217
|
-
window: () =>
|
|
81218
|
-
});
|
|
81219
|
-
var
|
|
81475
|
+
parseFile: () => import_core45.parseFile,
|
|
81476
|
+
parseInBatches: () => import_core45.parseInBatches,
|
|
81477
|
+
parseSync: () => import_core45.parseSync,
|
|
81478
|
+
preload: () => import_core45.preload,
|
|
81479
|
+
preloadSync: () => import_core45.preloadSync,
|
|
81480
|
+
readArrayBuffer: () => import_core45.readArrayBuffer,
|
|
81481
|
+
registerLoaders: () => import_core45.registerLoaders,
|
|
81482
|
+
resolvePath: () => import_core45.resolvePath,
|
|
81483
|
+
selectLoader: () => import_core45.selectLoader,
|
|
81484
|
+
selectLoaderSync: () => import_core45.selectLoaderSync,
|
|
81485
|
+
self: () => import_core45.self,
|
|
81486
|
+
setLoaderOptions: () => import_core45.setLoaderOptions,
|
|
81487
|
+
setPathPrefix: () => import_core45.setPathPrefix,
|
|
81488
|
+
window: () => import_core45.window
|
|
81489
|
+
});
|
|
81490
|
+
var import_core45 = __toESM(require_core(), 1);
|
|
81220
81491
|
|
|
81221
81492
|
// src/3d-tiles/index.ts
|
|
81222
81493
|
init_tiles_3d_format();
|