@loaders.gl/i3s 4.0.2 → 4.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/arcgis-webscene-loader.js +1 -1
- package/dist/arcgis-webscene-loader.js.map +1 -1
- package/dist/dist.dev.js +9 -6
- package/dist/i3s-building-scene-layer-loader.js +1 -1
- package/dist/i3s-building-scene-layer-loader.js.map +1 -1
- package/dist/i3s-content-loader.js +1 -1
- package/dist/i3s-content-loader.js.map +1 -1
- package/dist/i3s-content-worker-node.js +46 -46
- package/dist/i3s-content-worker-node.js.map +4 -4
- package/dist/i3s-content-worker.js +93 -102
- package/dist/index.cjs +3 -3
- package/package.json +10 -10
- package/src/arcgis-webscene-loader.ts +1 -1
- package/src/i3s-building-scene-layer-loader.ts +1 -1
- package/src/i3s-content-loader.ts +1 -1
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
// ../worker-utils/src/lib/env-utils/version.ts
|
|
95
|
-
var NPM_TAG = "
|
|
95
|
+
var NPM_TAG = "latest";
|
|
96
96
|
function getVersion() {
|
|
97
97
|
if (!globalThis._loadersgl_?.version) {
|
|
98
98
|
globalThis._loadersgl_ = globalThis._loadersgl_ || {};
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
);
|
|
103
103
|
globalThis._loadersgl_.version = NPM_TAG;
|
|
104
104
|
} else {
|
|
105
|
-
globalThis._loadersgl_.version = "4.0.
|
|
105
|
+
globalThis._loadersgl_.version = "4.0.4";
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
return globalThis._loadersgl_.version;
|
|
@@ -186,10 +186,11 @@
|
|
|
186
186
|
};
|
|
187
187
|
|
|
188
188
|
// ../worker-utils/src/lib/node/worker_threads-browser.ts
|
|
189
|
-
var
|
|
189
|
+
var NodeWorker = class {
|
|
190
190
|
terminate() {
|
|
191
191
|
}
|
|
192
192
|
};
|
|
193
|
+
var parentPort = null;
|
|
193
194
|
|
|
194
195
|
// ../worker-utils/src/lib/worker-utils/get-loadable-worker-url.ts
|
|
195
196
|
var workerURLCache = /* @__PURE__ */ new Map();
|
|
@@ -278,7 +279,7 @@
|
|
|
278
279
|
_loadableURL = "";
|
|
279
280
|
/** Checks if workers are supported on this platform */
|
|
280
281
|
static isSupported() {
|
|
281
|
-
return typeof Worker !== "undefined" && isBrowser2 || typeof
|
|
282
|
+
return typeof Worker !== "undefined" && isBrowser2 || typeof NodeWorker !== "undefined" && !isBrowser2;
|
|
282
283
|
}
|
|
283
284
|
constructor(props) {
|
|
284
285
|
const { name, source, url } = props;
|
|
@@ -357,9 +358,9 @@
|
|
|
357
358
|
if (this.url) {
|
|
358
359
|
const absolute = this.url.includes(":/") || this.url.startsWith("/");
|
|
359
360
|
const url = absolute ? this.url : `./${this.url}`;
|
|
360
|
-
worker = new
|
|
361
|
+
worker = new NodeWorker(url, { eval: false });
|
|
361
362
|
} else if (this.source) {
|
|
362
|
-
worker = new
|
|
363
|
+
worker = new NodeWorker(this.source, { eval: true });
|
|
363
364
|
} else {
|
|
364
365
|
throw new Error("no worker");
|
|
365
366
|
}
|
|
@@ -603,19 +604,6 @@
|
|
|
603
604
|
|
|
604
605
|
// ../worker-utils/src/lib/worker-farm/worker-body.ts
|
|
605
606
|
async function getParentPort() {
|
|
606
|
-
let parentPort;
|
|
607
|
-
try {
|
|
608
|
-
eval("globalThis.parentPort = require('worker_threads').parentPort");
|
|
609
|
-
parentPort = globalThis.parentPort;
|
|
610
|
-
} catch {
|
|
611
|
-
try {
|
|
612
|
-
eval("globalThis.workerThreadsPromise = import('worker_threads')");
|
|
613
|
-
const workerThreads = await globalThis.workerThreadsPromise;
|
|
614
|
-
parentPort = workerThreads.parentPort;
|
|
615
|
-
} catch (error) {
|
|
616
|
-
console.error(error.message);
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
607
|
return parentPort;
|
|
620
608
|
}
|
|
621
609
|
var onMessageWrapperMap = /* @__PURE__ */ new Map();
|
|
@@ -1447,7 +1435,7 @@
|
|
|
1447
1435
|
var navigator_ = globalThis.navigator || {};
|
|
1448
1436
|
|
|
1449
1437
|
// ../../node_modules/@probe.gl/log/node_modules/@probe.gl/env/dist/utils/globals.js
|
|
1450
|
-
var VERSION2 = true ? "4.0.
|
|
1438
|
+
var VERSION2 = true ? "4.0.4" : "untranspiled source";
|
|
1451
1439
|
var isBrowser4 = isBrowser3();
|
|
1452
1440
|
|
|
1453
1441
|
// ../../node_modules/@probe.gl/log/dist/utils/local-storage.js
|
|
@@ -2610,6 +2598,83 @@
|
|
|
2610
2598
|
throw new Error(`${loader.id} loader - no parser found and worker is disabled`);
|
|
2611
2599
|
}
|
|
2612
2600
|
|
|
2601
|
+
// ../schema/src/lib/table/simple-table/data-type.ts
|
|
2602
|
+
function getDataTypeFromTypedArray(array) {
|
|
2603
|
+
switch (array.constructor) {
|
|
2604
|
+
case Int8Array:
|
|
2605
|
+
return "int8";
|
|
2606
|
+
case Uint8Array:
|
|
2607
|
+
case Uint8ClampedArray:
|
|
2608
|
+
return "uint8";
|
|
2609
|
+
case Int16Array:
|
|
2610
|
+
return "int16";
|
|
2611
|
+
case Uint16Array:
|
|
2612
|
+
return "uint16";
|
|
2613
|
+
case Int32Array:
|
|
2614
|
+
return "int32";
|
|
2615
|
+
case Uint32Array:
|
|
2616
|
+
return "uint32";
|
|
2617
|
+
case Float32Array:
|
|
2618
|
+
return "float32";
|
|
2619
|
+
case Float64Array:
|
|
2620
|
+
return "float64";
|
|
2621
|
+
default:
|
|
2622
|
+
return "null";
|
|
2623
|
+
}
|
|
2624
|
+
}
|
|
2625
|
+
|
|
2626
|
+
// ../schema/src/lib/mesh/mesh-utils.ts
|
|
2627
|
+
function getMeshBoundingBox(attributes) {
|
|
2628
|
+
let minX = Infinity;
|
|
2629
|
+
let minY = Infinity;
|
|
2630
|
+
let minZ = Infinity;
|
|
2631
|
+
let maxX = -Infinity;
|
|
2632
|
+
let maxY = -Infinity;
|
|
2633
|
+
let maxZ = -Infinity;
|
|
2634
|
+
const positions = attributes.POSITION ? attributes.POSITION.value : [];
|
|
2635
|
+
const len2 = positions && positions.length;
|
|
2636
|
+
for (let i2 = 0; i2 < len2; i2 += 3) {
|
|
2637
|
+
const x = positions[i2];
|
|
2638
|
+
const y = positions[i2 + 1];
|
|
2639
|
+
const z = positions[i2 + 2];
|
|
2640
|
+
minX = x < minX ? x : minX;
|
|
2641
|
+
minY = y < minY ? y : minY;
|
|
2642
|
+
minZ = z < minZ ? z : minZ;
|
|
2643
|
+
maxX = x > maxX ? x : maxX;
|
|
2644
|
+
maxY = y > maxY ? y : maxY;
|
|
2645
|
+
maxZ = z > maxZ ? z : maxZ;
|
|
2646
|
+
}
|
|
2647
|
+
return [
|
|
2648
|
+
[minX, minY, minZ],
|
|
2649
|
+
[maxX, maxY, maxZ]
|
|
2650
|
+
];
|
|
2651
|
+
}
|
|
2652
|
+
|
|
2653
|
+
// ../schema/src/lib/mesh/deduce-mesh-schema.ts
|
|
2654
|
+
function deduceMeshField(name, attribute, optionalMetadata) {
|
|
2655
|
+
const type = getDataTypeFromTypedArray(attribute.value);
|
|
2656
|
+
const metadata = optionalMetadata ? optionalMetadata : makeMeshAttributeMetadata(attribute);
|
|
2657
|
+
return {
|
|
2658
|
+
name,
|
|
2659
|
+
type: { type: "fixed-size-list", listSize: attribute.size, children: [{ name: "value", type }] },
|
|
2660
|
+
nullable: false,
|
|
2661
|
+
metadata
|
|
2662
|
+
};
|
|
2663
|
+
}
|
|
2664
|
+
function makeMeshAttributeMetadata(attribute) {
|
|
2665
|
+
const result = {};
|
|
2666
|
+
if ("byteOffset" in attribute) {
|
|
2667
|
+
result.byteOffset = attribute.byteOffset.toString(10);
|
|
2668
|
+
}
|
|
2669
|
+
if ("byteStride" in attribute) {
|
|
2670
|
+
result.byteStride = attribute.byteStride.toString(10);
|
|
2671
|
+
}
|
|
2672
|
+
if ("normalized" in attribute) {
|
|
2673
|
+
result.normalized = attribute.normalized.toString();
|
|
2674
|
+
}
|
|
2675
|
+
return result;
|
|
2676
|
+
}
|
|
2677
|
+
|
|
2613
2678
|
// ../core/src/lib/api/load.ts
|
|
2614
2679
|
async function load(url, loaders, options, context) {
|
|
2615
2680
|
let resolvedLoaders;
|
|
@@ -5238,7 +5303,7 @@
|
|
|
5238
5303
|
_defineProperty(Ellipsoid, "WGS84", new Ellipsoid(WGS84_RADIUS_X, WGS84_RADIUS_Y, WGS84_RADIUS_Z));
|
|
5239
5304
|
|
|
5240
5305
|
// ../images/src/lib/utils/version.ts
|
|
5241
|
-
var VERSION3 = true ? "4.0.
|
|
5306
|
+
var VERSION3 = true ? "4.0.4" : "latest";
|
|
5242
5307
|
|
|
5243
5308
|
// ../images/src/lib/category-api/image-type.ts
|
|
5244
5309
|
var parseImageNode = globalThis.loaders?.parseImageNode;
|
|
@@ -5365,7 +5430,10 @@
|
|
|
5365
5430
|
return await new Promise((resolve2, reject) => {
|
|
5366
5431
|
try {
|
|
5367
5432
|
image.onload = () => resolve2(image);
|
|
5368
|
-
image.onerror = (
|
|
5433
|
+
image.onerror = (error) => {
|
|
5434
|
+
const message = error instanceof Error ? error.message : "error";
|
|
5435
|
+
reject(new Error(message));
|
|
5436
|
+
};
|
|
5369
5437
|
} catch (error) {
|
|
5370
5438
|
reject(error);
|
|
5371
5439
|
}
|
|
@@ -5641,7 +5709,7 @@
|
|
|
5641
5709
|
};
|
|
5642
5710
|
|
|
5643
5711
|
// ../draco/src/lib/utils/version.ts
|
|
5644
|
-
var VERSION4 = true ? "4.0.
|
|
5712
|
+
var VERSION4 = true ? "4.0.4" : "latest";
|
|
5645
5713
|
|
|
5646
5714
|
// ../draco/src/draco-loader.ts
|
|
5647
5715
|
var DEFAULT_DRACO_OPTIONS = {
|
|
@@ -5667,83 +5735,6 @@
|
|
|
5667
5735
|
options: DEFAULT_DRACO_OPTIONS
|
|
5668
5736
|
};
|
|
5669
5737
|
|
|
5670
|
-
// ../schema/src/lib/table/simple-table/data-type.ts
|
|
5671
|
-
function getDataTypeFromTypedArray(array) {
|
|
5672
|
-
switch (array.constructor) {
|
|
5673
|
-
case Int8Array:
|
|
5674
|
-
return "int8";
|
|
5675
|
-
case Uint8Array:
|
|
5676
|
-
case Uint8ClampedArray:
|
|
5677
|
-
return "uint8";
|
|
5678
|
-
case Int16Array:
|
|
5679
|
-
return "int16";
|
|
5680
|
-
case Uint16Array:
|
|
5681
|
-
return "uint16";
|
|
5682
|
-
case Int32Array:
|
|
5683
|
-
return "int32";
|
|
5684
|
-
case Uint32Array:
|
|
5685
|
-
return "uint32";
|
|
5686
|
-
case Float32Array:
|
|
5687
|
-
return "float32";
|
|
5688
|
-
case Float64Array:
|
|
5689
|
-
return "float64";
|
|
5690
|
-
default:
|
|
5691
|
-
return "null";
|
|
5692
|
-
}
|
|
5693
|
-
}
|
|
5694
|
-
|
|
5695
|
-
// ../schema/src/lib/mesh/mesh-utils.ts
|
|
5696
|
-
function getMeshBoundingBox(attributes) {
|
|
5697
|
-
let minX = Infinity;
|
|
5698
|
-
let minY = Infinity;
|
|
5699
|
-
let minZ = Infinity;
|
|
5700
|
-
let maxX = -Infinity;
|
|
5701
|
-
let maxY = -Infinity;
|
|
5702
|
-
let maxZ = -Infinity;
|
|
5703
|
-
const positions = attributes.POSITION ? attributes.POSITION.value : [];
|
|
5704
|
-
const len2 = positions && positions.length;
|
|
5705
|
-
for (let i2 = 0; i2 < len2; i2 += 3) {
|
|
5706
|
-
const x = positions[i2];
|
|
5707
|
-
const y = positions[i2 + 1];
|
|
5708
|
-
const z = positions[i2 + 2];
|
|
5709
|
-
minX = x < minX ? x : minX;
|
|
5710
|
-
minY = y < minY ? y : minY;
|
|
5711
|
-
minZ = z < minZ ? z : minZ;
|
|
5712
|
-
maxX = x > maxX ? x : maxX;
|
|
5713
|
-
maxY = y > maxY ? y : maxY;
|
|
5714
|
-
maxZ = z > maxZ ? z : maxZ;
|
|
5715
|
-
}
|
|
5716
|
-
return [
|
|
5717
|
-
[minX, minY, minZ],
|
|
5718
|
-
[maxX, maxY, maxZ]
|
|
5719
|
-
];
|
|
5720
|
-
}
|
|
5721
|
-
|
|
5722
|
-
// ../schema/src/lib/mesh/deduce-mesh-schema.ts
|
|
5723
|
-
function deduceMeshField(name, attribute, optionalMetadata) {
|
|
5724
|
-
const type = getDataTypeFromTypedArray(attribute.value);
|
|
5725
|
-
const metadata = optionalMetadata ? optionalMetadata : makeMeshAttributeMetadata(attribute);
|
|
5726
|
-
return {
|
|
5727
|
-
name,
|
|
5728
|
-
type: { type: "fixed-size-list", listSize: attribute.size, children: [{ name: "value", type }] },
|
|
5729
|
-
nullable: false,
|
|
5730
|
-
metadata
|
|
5731
|
-
};
|
|
5732
|
-
}
|
|
5733
|
-
function makeMeshAttributeMetadata(attribute) {
|
|
5734
|
-
const result = {};
|
|
5735
|
-
if ("byteOffset" in attribute) {
|
|
5736
|
-
result.byteOffset = attribute.byteOffset.toString(10);
|
|
5737
|
-
}
|
|
5738
|
-
if ("byteStride" in attribute) {
|
|
5739
|
-
result.byteStride = attribute.byteStride.toString(10);
|
|
5740
|
-
}
|
|
5741
|
-
if ("normalized" in attribute) {
|
|
5742
|
-
result.normalized = attribute.normalized.toString();
|
|
5743
|
-
}
|
|
5744
|
-
return result;
|
|
5745
|
-
}
|
|
5746
|
-
|
|
5747
5738
|
// ../draco/src/lib/utils/get-draco-schema.ts
|
|
5748
5739
|
function getDracoSchema(attributes, loaderData, indices) {
|
|
5749
5740
|
const metadata = makeMetadata(loaderData.metadata);
|
|
@@ -6322,7 +6313,7 @@
|
|
|
6322
6313
|
}
|
|
6323
6314
|
|
|
6324
6315
|
// ../textures/src/lib/utils/version.ts
|
|
6325
|
-
var VERSION5 = true ? "4.0.
|
|
6316
|
+
var VERSION5 = true ? "4.0.4" : "latest";
|
|
6326
6317
|
|
|
6327
6318
|
// ../textures/src/lib/parsers/basis-module-loader.ts
|
|
6328
6319
|
var BASIS_EXTERNAL_LIBRARIES = {
|
|
@@ -7850,7 +7841,7 @@
|
|
|
7850
7841
|
}
|
|
7851
7842
|
|
|
7852
7843
|
// src/i3s-content-loader.ts
|
|
7853
|
-
var VERSION6 = true ? "4.0.
|
|
7844
|
+
var VERSION6 = true ? "4.0.4" : "latest";
|
|
7854
7845
|
var I3SContentLoader = {
|
|
7855
7846
|
name: "I3S Content (Indexed Scene Layers)",
|
|
7856
7847
|
id: "i3s-content",
|
package/dist/index.cjs
CHANGED
|
@@ -533,7 +533,7 @@ function getFeatureIdsFromFeatureIndexMetadata(featureIndex) {
|
|
|
533
533
|
}
|
|
534
534
|
|
|
535
535
|
// src/i3s-content-loader.ts
|
|
536
|
-
var VERSION = typeof __VERSION__ !== "undefined" ? __VERSION__ : "
|
|
536
|
+
var VERSION = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
537
537
|
var I3SContentLoader = {
|
|
538
538
|
name: "I3S Content (Indexed Scene Layers)",
|
|
539
539
|
id: "i3s-content",
|
|
@@ -1387,7 +1387,7 @@ function parseSublayersTree(sublayers, url) {
|
|
|
1387
1387
|
}
|
|
1388
1388
|
|
|
1389
1389
|
// src/i3s-building-scene-layer-loader.ts
|
|
1390
|
-
var VERSION6 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "
|
|
1390
|
+
var VERSION6 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
1391
1391
|
var I3SBuildingSceneLayerLoader = {
|
|
1392
1392
|
name: "I3S Building Scene Layer",
|
|
1393
1393
|
id: "i3s-building-scene-layer",
|
|
@@ -1471,7 +1471,7 @@ async function checkSupportedIndexCRS(layer) {
|
|
|
1471
1471
|
}
|
|
1472
1472
|
|
|
1473
1473
|
// src/arcgis-webscene-loader.ts
|
|
1474
|
-
var VERSION7 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "
|
|
1474
|
+
var VERSION7 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
1475
1475
|
var ArcGISWebSceneLoader = {
|
|
1476
1476
|
name: "ArcGIS Web Scene Loader",
|
|
1477
1477
|
id: "arcgis-web-scene",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/i3s",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.4",
|
|
4
4
|
"description": "i3s .",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"build-worker-node": "esbuild src/workers/i3s-content-worker-node.ts --outfile=dist/i3s-content-worker-node.js --platform=node --target=node16 --minify --bundle --sourcemap --define:__VERSION__=\\\"$npm_package_version\\\""
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@loaders.gl/compression": "4.0.
|
|
45
|
-
"@loaders.gl/crypto": "4.0.
|
|
46
|
-
"@loaders.gl/draco": "4.0.
|
|
47
|
-
"@loaders.gl/images": "4.0.
|
|
48
|
-
"@loaders.gl/loader-utils": "4.0.
|
|
49
|
-
"@loaders.gl/schema": "4.0.
|
|
50
|
-
"@loaders.gl/textures": "4.0.
|
|
51
|
-
"@loaders.gl/tiles": "4.0.
|
|
44
|
+
"@loaders.gl/compression": "4.0.4",
|
|
45
|
+
"@loaders.gl/crypto": "4.0.4",
|
|
46
|
+
"@loaders.gl/draco": "4.0.4",
|
|
47
|
+
"@loaders.gl/images": "4.0.4",
|
|
48
|
+
"@loaders.gl/loader-utils": "4.0.4",
|
|
49
|
+
"@loaders.gl/schema": "4.0.4",
|
|
50
|
+
"@loaders.gl/textures": "4.0.4",
|
|
51
|
+
"@loaders.gl/tiles": "4.0.4",
|
|
52
52
|
"@math.gl/core": "^4.0.0",
|
|
53
53
|
"@math.gl/culling": "^4.0.0",
|
|
54
54
|
"@math.gl/geospatial": "^4.0.0"
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"@loaders.gl/core": "^4.0.0"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "4dc810fa04bb400f4aedfef98a83c7ef882ed3d7"
|
|
60
60
|
}
|
|
@@ -5,7 +5,7 @@ import {parseWebscene} from './lib/parsers/parse-arcgis-webscene';
|
|
|
5
5
|
|
|
6
6
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
7
7
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
8
|
-
const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : '
|
|
8
|
+
const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
|
|
9
9
|
|
|
10
10
|
export type ArcGISWebSceneLoaderOptions = LoaderOptions & {};
|
|
11
11
|
|
|
@@ -7,7 +7,7 @@ import {parseBuildingSceneLayer} from './lib/parsers/parse-i3s-building-scene-la
|
|
|
7
7
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
8
8
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
9
9
|
|
|
10
|
-
const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : '
|
|
10
|
+
const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
|
|
11
11
|
/**
|
|
12
12
|
* Loader for I3S - Building Scene Layer
|
|
13
13
|
*/
|
|
@@ -6,7 +6,7 @@ import {I3STileContent, I3STileOptions, I3STilesetOptions} from './types';
|
|
|
6
6
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
7
7
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
8
8
|
|
|
9
|
-
const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : '
|
|
9
|
+
const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Loader for I3S - Indexed 3D Scene Layer
|