@loaders.gl/i3s 4.2.0-alpha.6 → 4.2.0-beta.2
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.d.ts +19 -2
- package/dist/arcgis-webscene-loader.d.ts.map +1 -1
- package/dist/arcgis-webscene-loader.js +3 -1
- package/dist/dist.dev.js +139 -100
- package/dist/dist.min.js +1 -1
- package/dist/i3s-attribute-loader.d.ts +14 -3
- package/dist/i3s-attribute-loader.d.ts.map +1 -1
- package/dist/i3s-attribute-loader.js +3 -1
- package/dist/i3s-building-scene-layer-loader.d.ts +15 -3
- package/dist/i3s-building-scene-layer-loader.d.ts.map +1 -1
- package/dist/i3s-building-scene-layer-loader.js +3 -1
- package/dist/i3s-content-loader.d.ts +18 -2
- package/dist/i3s-content-loader.d.ts.map +1 -1
- package/dist/i3s-content-loader.js +6 -1
- package/dist/i3s-content-worker-node.js +48 -48
- package/dist/i3s-content-worker-node.js.map +4 -4
- package/dist/i3s-content-worker.js +1720 -1686
- package/dist/i3s-loader.d.ts +30 -2
- package/dist/i3s-loader.d.ts.map +1 -1
- package/dist/i3s-loader.js +6 -1
- package/dist/i3s-node-page-loader.d.ts +17 -3
- package/dist/i3s-node-page-loader.d.ts.map +1 -1
- package/dist/i3s-node-page-loader.js +6 -1
- package/dist/i3s-slpk-loader.d.ts +13 -2
- package/dist/i3s-slpk-loader.d.ts.map +1 -1
- package/dist/i3s-slpk-loader.js +6 -1
- package/dist/index.cjs +21 -7
- package/dist/index.cjs.map +2 -2
- package/dist/lib/parsers/parse-i3s-tile-content.d.ts.map +1 -1
- package/dist/lib/parsers/parse-i3s-tile-content.js +0 -1
- package/package.json +12 -12
- package/src/arcgis-webscene-loader.ts +4 -6
- package/src/i3s-attribute-loader.ts +4 -2
- package/src/i3s-building-scene-layer-loader.ts +6 -6
- package/src/i3s-content-loader.ts +9 -2
- package/src/i3s-loader.ts +9 -2
- package/src/i3s-node-page-loader.ts +9 -2
- package/src/i3s-slpk-loader.ts +9 -2
- package/src/lib/parsers/parse-i3s-tile-content.ts +3 -4
|
@@ -1,9 +1,26 @@
|
|
|
1
|
-
import type { LoaderOptions
|
|
1
|
+
import type { LoaderOptions } from '@loaders.gl/loader-utils';
|
|
2
2
|
import type { ArcGISWebSceneData } from "./types.js";
|
|
3
3
|
export type ArcGISWebSceneLoaderOptions = LoaderOptions & {};
|
|
4
4
|
/**
|
|
5
5
|
* Loader for ArcGIS WebScene
|
|
6
6
|
* Spec - https://developers.arcgis.com/web-scene-specification/objects/webscene/
|
|
7
7
|
*/
|
|
8
|
-
export declare const ArcGISWebSceneLoader:
|
|
8
|
+
export declare const ArcGISWebSceneLoader: {
|
|
9
|
+
readonly dataType: ArcGISWebSceneData;
|
|
10
|
+
readonly batchType: never;
|
|
11
|
+
readonly name: "ArcGIS Web Scene Loader";
|
|
12
|
+
readonly id: "arcgis-web-scene";
|
|
13
|
+
readonly module: "i3s";
|
|
14
|
+
readonly version: any;
|
|
15
|
+
readonly mimeTypes: ["application/json"];
|
|
16
|
+
readonly parse: typeof parse;
|
|
17
|
+
readonly extensions: ["json"];
|
|
18
|
+
readonly options: {};
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Parse ArcGIS webscene
|
|
22
|
+
* @param data
|
|
23
|
+
*/
|
|
24
|
+
declare function parse(data: ArrayBuffer): Promise<ArcGISWebSceneData>;
|
|
25
|
+
export {};
|
|
9
26
|
//# sourceMappingURL=arcgis-webscene-loader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arcgis-webscene-loader.d.ts","sourceRoot":"","sources":["../src/arcgis-webscene-loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,
|
|
1
|
+
{"version":3,"file":"arcgis-webscene-loader.d.ts","sourceRoot":"","sources":["../src/arcgis-webscene-loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAmB,MAAM,0BAA0B,CAAC;AAC9E,OAAO,KAAK,EAAC,kBAAkB,EAAC,mBAAgB;AAQhD,MAAM,MAAM,2BAA2B,GAAG,aAAa,GAAG,EAAE,CAAC;AAE7D;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;CAW4D,CAAC;AAE9F;;;GAGG;AACH,iBAAe,KAAK,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAEnE"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { parseWebscene } from "./lib/parsers/parse-arcgis-webscene.js";
|
|
2
2
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
3
3
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
4
|
-
const VERSION = typeof "4.2.0-
|
|
4
|
+
const VERSION = typeof "4.2.0-beta.1" !== 'undefined' ? "4.2.0-beta.1" : 'latest';
|
|
5
5
|
/**
|
|
6
6
|
* Loader for ArcGIS WebScene
|
|
7
7
|
* Spec - https://developers.arcgis.com/web-scene-specification/objects/webscene/
|
|
8
8
|
*/
|
|
9
9
|
export const ArcGISWebSceneLoader = {
|
|
10
|
+
dataType: null,
|
|
11
|
+
batchType: null,
|
|
10
12
|
name: 'ArcGIS Web Scene Loader',
|
|
11
13
|
id: 'arcgis-web-scene',
|
|
12
14
|
module: 'i3s',
|
package/dist/dist.dev.js
CHANGED
|
@@ -45,13 +45,6 @@ var __exports__ = (() => {
|
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
47
|
|
|
48
|
-
// (disabled):../worker-utils/src/lib/node/require-utils.node
|
|
49
|
-
var require_require_utils = __commonJS({
|
|
50
|
-
"(disabled):../worker-utils/src/lib/node/require-utils.node"() {
|
|
51
|
-
"use strict";
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
|
|
55
48
|
// ../../node_modules/pako/lib/utils/common.js
|
|
56
49
|
var require_common = __commonJS({
|
|
57
50
|
"../../node_modules/pako/lib/utils/common.js"(exports) {
|
|
@@ -505,7 +498,7 @@ var __exports__ = (() => {
|
|
|
505
498
|
var elems = desc.stat_desc.elems;
|
|
506
499
|
var n2, m;
|
|
507
500
|
var max_code = -1;
|
|
508
|
-
var
|
|
501
|
+
var node;
|
|
509
502
|
s2.heap_len = 0;
|
|
510
503
|
s2.heap_max = HEAP_SIZE;
|
|
511
504
|
for (n2 = 0; n2 < elems; n2++) {
|
|
@@ -517,19 +510,19 @@ var __exports__ = (() => {
|
|
|
517
510
|
}
|
|
518
511
|
}
|
|
519
512
|
while (s2.heap_len < 2) {
|
|
520
|
-
|
|
521
|
-
tree[
|
|
522
|
-
s2.depth[
|
|
513
|
+
node = s2.heap[++s2.heap_len] = max_code < 2 ? ++max_code : 0;
|
|
514
|
+
tree[node * 2] = 1;
|
|
515
|
+
s2.depth[node] = 0;
|
|
523
516
|
s2.opt_len--;
|
|
524
517
|
if (has_stree) {
|
|
525
|
-
s2.static_len -= stree[
|
|
518
|
+
s2.static_len -= stree[node * 2 + 1];
|
|
526
519
|
}
|
|
527
520
|
}
|
|
528
521
|
desc.max_code = max_code;
|
|
529
522
|
for (n2 = s2.heap_len >> 1; n2 >= 1; n2--) {
|
|
530
523
|
pqdownheap(s2, tree, n2);
|
|
531
524
|
}
|
|
532
|
-
|
|
525
|
+
node = elems;
|
|
533
526
|
do {
|
|
534
527
|
n2 = s2.heap[
|
|
535
528
|
1
|
|
@@ -551,13 +544,13 @@ var __exports__ = (() => {
|
|
|
551
544
|
];
|
|
552
545
|
s2.heap[--s2.heap_max] = n2;
|
|
553
546
|
s2.heap[--s2.heap_max] = m;
|
|
554
|
-
tree[
|
|
555
|
-
s2.depth[
|
|
556
|
-
tree[n2 * 2 + 1] = tree[m * 2 + 1] =
|
|
547
|
+
tree[node * 2] = tree[n2 * 2] + tree[m * 2];
|
|
548
|
+
s2.depth[node] = (s2.depth[n2] >= s2.depth[m] ? s2.depth[n2] : s2.depth[m]) + 1;
|
|
549
|
+
tree[n2 * 2 + 1] = tree[m * 2 + 1] = node;
|
|
557
550
|
s2.heap[
|
|
558
551
|
1
|
|
559
552
|
/*SMALLEST*/
|
|
560
|
-
] =
|
|
553
|
+
] = node++;
|
|
561
554
|
pqdownheap(
|
|
562
555
|
s2,
|
|
563
556
|
tree,
|
|
@@ -4342,6 +4335,63 @@ var __exports__ = (() => {
|
|
|
4342
4335
|
var matches = typeof process !== "undefined" && process.version && /v([0-9]*)/.exec(process.version);
|
|
4343
4336
|
var nodeVersion = matches && parseFloat(matches[1]) || 0;
|
|
4344
4337
|
|
|
4338
|
+
// ../../node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
4339
|
+
function _typeof(obj) {
|
|
4340
|
+
"@babel/helpers - typeof";
|
|
4341
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) {
|
|
4342
|
+
return typeof obj2;
|
|
4343
|
+
} : function(obj2) {
|
|
4344
|
+
return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
4345
|
+
}, _typeof(obj);
|
|
4346
|
+
}
|
|
4347
|
+
|
|
4348
|
+
// ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
|
4349
|
+
function _toPrimitive(input, hint) {
|
|
4350
|
+
if (_typeof(input) !== "object" || input === null)
|
|
4351
|
+
return input;
|
|
4352
|
+
var prim = input[Symbol.toPrimitive];
|
|
4353
|
+
if (prim !== void 0) {
|
|
4354
|
+
var res = prim.call(input, hint || "default");
|
|
4355
|
+
if (_typeof(res) !== "object")
|
|
4356
|
+
return res;
|
|
4357
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
4358
|
+
}
|
|
4359
|
+
return (hint === "string" ? String : Number)(input);
|
|
4360
|
+
}
|
|
4361
|
+
|
|
4362
|
+
// ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
|
4363
|
+
function _toPropertyKey(arg) {
|
|
4364
|
+
var key = _toPrimitive(arg, "string");
|
|
4365
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
4366
|
+
}
|
|
4367
|
+
|
|
4368
|
+
// ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
4369
|
+
function _defineProperty(obj, key, value) {
|
|
4370
|
+
key = _toPropertyKey(key);
|
|
4371
|
+
if (key in obj) {
|
|
4372
|
+
Object.defineProperty(obj, key, {
|
|
4373
|
+
value,
|
|
4374
|
+
enumerable: true,
|
|
4375
|
+
configurable: true,
|
|
4376
|
+
writable: true
|
|
4377
|
+
});
|
|
4378
|
+
} else {
|
|
4379
|
+
obj[key] = value;
|
|
4380
|
+
}
|
|
4381
|
+
return obj;
|
|
4382
|
+
}
|
|
4383
|
+
|
|
4384
|
+
// ../loader-utils/src/lib/module-utils/js-module-utils.ts
|
|
4385
|
+
function registerJSModules(modules) {
|
|
4386
|
+
globalThis.loaders ||= {};
|
|
4387
|
+
globalThis.loaders.modules ||= {};
|
|
4388
|
+
Object.assign(globalThis.loaders.modules, modules);
|
|
4389
|
+
}
|
|
4390
|
+
function getJSModuleOrNull(name) {
|
|
4391
|
+
const module = globalThis.loaders?.modules?.[name];
|
|
4392
|
+
return module || null;
|
|
4393
|
+
}
|
|
4394
|
+
|
|
4345
4395
|
// ../worker-utils/src/lib/env-utils/version.ts
|
|
4346
4396
|
var NPM_TAG = "latest";
|
|
4347
4397
|
function getVersion() {
|
|
@@ -4388,7 +4438,6 @@ var __exports__ = (() => {
|
|
|
4388
4438
|
var nodeVersion2 = matches2 && parseFloat(matches2[1]) || 0;
|
|
4389
4439
|
|
|
4390
4440
|
// ../worker-utils/src/lib/library-utils/library-utils.ts
|
|
4391
|
-
var node = __toESM(require_require_utils(), 1);
|
|
4392
4441
|
var loadLibraryPromises = {};
|
|
4393
4442
|
async function loadLibrary(libraryUrl, moduleName = null, options = {}, libraryName = null) {
|
|
4394
4443
|
if (moduleName) {
|
|
@@ -4425,7 +4474,8 @@ var __exports__ = (() => {
|
|
|
4425
4474
|
}
|
|
4426
4475
|
if (!isBrowser2) {
|
|
4427
4476
|
try {
|
|
4428
|
-
|
|
4477
|
+
const { requireFromFile } = globalThis.loaders || {};
|
|
4478
|
+
return await requireFromFile?.(libraryUrl);
|
|
4429
4479
|
} catch (error) {
|
|
4430
4480
|
console.error(error);
|
|
4431
4481
|
return null;
|
|
@@ -4439,7 +4489,8 @@ var __exports__ = (() => {
|
|
|
4439
4489
|
}
|
|
4440
4490
|
function loadLibraryFromString(scriptSource, id) {
|
|
4441
4491
|
if (!isBrowser2) {
|
|
4442
|
-
|
|
4492
|
+
const { requireFromString } = globalThis.loaders || {};
|
|
4493
|
+
return requireFromString?.(scriptSource, id);
|
|
4443
4494
|
}
|
|
4444
4495
|
if (isWorker) {
|
|
4445
4496
|
eval.call(globalThis, scriptSource);
|
|
@@ -4456,18 +4507,20 @@ var __exports__ = (() => {
|
|
|
4456
4507
|
return null;
|
|
4457
4508
|
}
|
|
4458
4509
|
async function loadAsArrayBuffer(url) {
|
|
4459
|
-
|
|
4510
|
+
const { readFileAsArrayBuffer } = globalThis.loaders || {};
|
|
4511
|
+
if (isBrowser2 || !readFileAsArrayBuffer || url.startsWith("http")) {
|
|
4460
4512
|
const response = await fetch(url);
|
|
4461
4513
|
return await response.arrayBuffer();
|
|
4462
4514
|
}
|
|
4463
|
-
return await (
|
|
4515
|
+
return await readFileAsArrayBuffer(url);
|
|
4464
4516
|
}
|
|
4465
4517
|
async function loadAsText(url) {
|
|
4466
|
-
|
|
4518
|
+
const { readFileAsText } = globalThis.loaders || {};
|
|
4519
|
+
if (isBrowser2 || !readFileAsText || url.startsWith("http")) {
|
|
4467
4520
|
const response = await fetch(url);
|
|
4468
4521
|
return await response.text();
|
|
4469
4522
|
}
|
|
4470
|
-
return await (
|
|
4523
|
+
return await readFileAsText(url);
|
|
4471
4524
|
}
|
|
4472
4525
|
|
|
4473
4526
|
// ../loader-utils/src/lib/binary-utils/array-buffer-utils.ts
|
|
@@ -4511,52 +4564,6 @@ var __exports__ = (() => {
|
|
|
4511
4564
|
return concatenateArrayBuffers(...arrayBuffers);
|
|
4512
4565
|
}
|
|
4513
4566
|
|
|
4514
|
-
// ../../node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
4515
|
-
function _typeof(obj) {
|
|
4516
|
-
"@babel/helpers - typeof";
|
|
4517
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) {
|
|
4518
|
-
return typeof obj2;
|
|
4519
|
-
} : function(obj2) {
|
|
4520
|
-
return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
4521
|
-
}, _typeof(obj);
|
|
4522
|
-
}
|
|
4523
|
-
|
|
4524
|
-
// ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
|
4525
|
-
function _toPrimitive(input, hint) {
|
|
4526
|
-
if (_typeof(input) !== "object" || input === null)
|
|
4527
|
-
return input;
|
|
4528
|
-
var prim = input[Symbol.toPrimitive];
|
|
4529
|
-
if (prim !== void 0) {
|
|
4530
|
-
var res = prim.call(input, hint || "default");
|
|
4531
|
-
if (_typeof(res) !== "object")
|
|
4532
|
-
return res;
|
|
4533
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
4534
|
-
}
|
|
4535
|
-
return (hint === "string" ? String : Number)(input);
|
|
4536
|
-
}
|
|
4537
|
-
|
|
4538
|
-
// ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
|
4539
|
-
function _toPropertyKey(arg) {
|
|
4540
|
-
var key = _toPrimitive(arg, "string");
|
|
4541
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
4542
|
-
}
|
|
4543
|
-
|
|
4544
|
-
// ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
4545
|
-
function _defineProperty(obj, key, value) {
|
|
4546
|
-
key = _toPropertyKey(key);
|
|
4547
|
-
if (key in obj) {
|
|
4548
|
-
Object.defineProperty(obj, key, {
|
|
4549
|
-
value,
|
|
4550
|
-
enumerable: true,
|
|
4551
|
-
configurable: true,
|
|
4552
|
-
writable: true
|
|
4553
|
-
});
|
|
4554
|
-
} else {
|
|
4555
|
-
obj[key] = value;
|
|
4556
|
-
}
|
|
4557
|
-
return obj;
|
|
4558
|
-
}
|
|
4559
|
-
|
|
4560
4567
|
// ../loader-utils/src/lib/node/buffer.browser.ts
|
|
4561
4568
|
function toArrayBuffer(buffer) {
|
|
4562
4569
|
return buffer;
|
|
@@ -9695,6 +9702,8 @@ var __exports__ = (() => {
|
|
|
9695
9702
|
// imagebitmap: {} - passes (platform dependent) parameters to ImageBitmap constructor
|
|
9696
9703
|
};
|
|
9697
9704
|
var ImageLoader = {
|
|
9705
|
+
dataType: null,
|
|
9706
|
+
batchType: null,
|
|
9698
9707
|
id: "image",
|
|
9699
9708
|
module: "images",
|
|
9700
9709
|
name: "Images",
|
|
@@ -9712,6 +9721,8 @@ var __exports__ = (() => {
|
|
|
9712
9721
|
|
|
9713
9722
|
// ../draco/src/draco-loader.ts
|
|
9714
9723
|
var DracoLoader = {
|
|
9724
|
+
dataType: null,
|
|
9725
|
+
batchType: null,
|
|
9715
9726
|
name: "Draco",
|
|
9716
9727
|
id: "draco",
|
|
9717
9728
|
module: "draco",
|
|
@@ -9866,7 +9877,11 @@ var __exports__ = (() => {
|
|
|
9866
9877
|
4: Uint16Array,
|
|
9867
9878
|
5: Int32Array,
|
|
9868
9879
|
6: Uint32Array,
|
|
9880
|
+
// 7: BigInt64Array,
|
|
9881
|
+
// 8: BigUint64Array,
|
|
9869
9882
|
9: Float32Array
|
|
9883
|
+
// 10: Float64Array
|
|
9884
|
+
// 11: BOOL - What array type do we use for this?
|
|
9870
9885
|
};
|
|
9871
9886
|
var INDEX_ITEM_SIZE = 4;
|
|
9872
9887
|
var DracoParser = class {
|
|
@@ -10039,14 +10054,17 @@ var __exports__ = (() => {
|
|
|
10039
10054
|
for (const loaderAttribute of Object.values(loaderData.attributes)) {
|
|
10040
10055
|
const attributeName = this._deduceAttributeName(loaderAttribute, options);
|
|
10041
10056
|
loaderAttribute.name = attributeName;
|
|
10042
|
-
const
|
|
10043
|
-
|
|
10044
|
-
value,
|
|
10045
|
-
|
|
10046
|
-
|
|
10047
|
-
|
|
10048
|
-
|
|
10049
|
-
|
|
10057
|
+
const values = this._getAttributeValues(dracoGeometry, loaderAttribute);
|
|
10058
|
+
if (values) {
|
|
10059
|
+
const { value, size } = values;
|
|
10060
|
+
attributes[attributeName] = {
|
|
10061
|
+
value,
|
|
10062
|
+
size,
|
|
10063
|
+
byteOffset: loaderAttribute.byte_offset,
|
|
10064
|
+
byteStride: loaderAttribute.byte_stride,
|
|
10065
|
+
normalized: loaderAttribute.normalized
|
|
10066
|
+
};
|
|
10067
|
+
}
|
|
10050
10068
|
}
|
|
10051
10069
|
return attributes;
|
|
10052
10070
|
}
|
|
@@ -10088,6 +10106,10 @@ var __exports__ = (() => {
|
|
|
10088
10106
|
*/
|
|
10089
10107
|
_getAttributeValues(dracoGeometry, attribute) {
|
|
10090
10108
|
const TypedArrayCtor = DRACO_DATA_TYPE_TO_TYPED_ARRAY_MAP[attribute.data_type];
|
|
10109
|
+
if (!TypedArrayCtor) {
|
|
10110
|
+
console.warn(`DRACO: Unsupported attribute type ${attribute.data_type}`);
|
|
10111
|
+
return null;
|
|
10112
|
+
}
|
|
10091
10113
|
const numComponents = attribute.num_components;
|
|
10092
10114
|
const numPoints = dracoGeometry.num_points();
|
|
10093
10115
|
const numValues = numPoints * numComponents;
|
|
@@ -10318,11 +10340,11 @@ var __exports__ = (() => {
|
|
|
10318
10340
|
async function loadDracoDecoderModule(options) {
|
|
10319
10341
|
const modules = options.modules || {};
|
|
10320
10342
|
if (modules.draco3d) {
|
|
10321
|
-
loadDecoderPromise
|
|
10343
|
+
loadDecoderPromise ||= modules.draco3d.createDecoderModule({}).then((draco) => {
|
|
10322
10344
|
return { draco };
|
|
10323
10345
|
});
|
|
10324
10346
|
} else {
|
|
10325
|
-
loadDecoderPromise
|
|
10347
|
+
loadDecoderPromise ||= loadDracoDecoder(options);
|
|
10326
10348
|
}
|
|
10327
10349
|
return await loadDecoderPromise;
|
|
10328
10350
|
}
|
|
@@ -10403,11 +10425,12 @@ var __exports__ = (() => {
|
|
|
10403
10425
|
};
|
|
10404
10426
|
var loadBasisTranscoderPromise;
|
|
10405
10427
|
async function loadBasisTranscoderModule(options) {
|
|
10406
|
-
|
|
10407
|
-
|
|
10408
|
-
|
|
10428
|
+
registerJSModules(options.modules);
|
|
10429
|
+
const basis = getJSModuleOrNull("basis");
|
|
10430
|
+
if (basis) {
|
|
10431
|
+
return basis;
|
|
10409
10432
|
}
|
|
10410
|
-
loadBasisTranscoderPromise
|
|
10433
|
+
loadBasisTranscoderPromise ||= loadBasisTranscoder(options);
|
|
10411
10434
|
return await loadBasisTranscoderPromise;
|
|
10412
10435
|
}
|
|
10413
10436
|
async function loadBasisTranscoder(options) {
|
|
@@ -11073,6 +11096,8 @@ var __exports__ = (() => {
|
|
|
11073
11096
|
|
|
11074
11097
|
// ../textures/src/basis-loader.ts
|
|
11075
11098
|
var BasisWorkerLoader = {
|
|
11099
|
+
dataType: null,
|
|
11100
|
+
batchType: null,
|
|
11076
11101
|
name: "Basis",
|
|
11077
11102
|
id: "basis",
|
|
11078
11103
|
module: "textures",
|
|
@@ -11085,12 +11110,9 @@ var __exports__ = (() => {
|
|
|
11085
11110
|
options: {
|
|
11086
11111
|
basis: {
|
|
11087
11112
|
format: "auto",
|
|
11088
|
-
// gl context doesn't exist on a worker thread
|
|
11089
11113
|
libraryPath: "libs/",
|
|
11090
11114
|
containerFormat: "auto",
|
|
11091
|
-
// 'basis' || 'ktx2' || 'auto'
|
|
11092
11115
|
module: "transcoder"
|
|
11093
|
-
// 'transcoder' || 'encoder'
|
|
11094
11116
|
}
|
|
11095
11117
|
}
|
|
11096
11118
|
};
|
|
@@ -11391,6 +11413,8 @@ var __exports__ = (() => {
|
|
|
11391
11413
|
|
|
11392
11414
|
// ../textures/src/compressed-texture-loader.ts
|
|
11393
11415
|
var CompressedTextureWorkerLoader = {
|
|
11416
|
+
dataType: null,
|
|
11417
|
+
batchType: null,
|
|
11394
11418
|
name: "Texture Containers",
|
|
11395
11419
|
id: "compressed-texture",
|
|
11396
11420
|
module: "textures",
|
|
@@ -11869,6 +11893,8 @@ var __exports__ = (() => {
|
|
|
11869
11893
|
// src/i3s-content-loader.ts
|
|
11870
11894
|
var VERSION5 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
11871
11895
|
var I3SContentLoader = {
|
|
11896
|
+
dataType: null,
|
|
11897
|
+
batchType: null,
|
|
11872
11898
|
name: "I3S Content (Indexed Scene Layers)",
|
|
11873
11899
|
id: "i3s-content",
|
|
11874
11900
|
module: "i3s",
|
|
@@ -12356,6 +12382,8 @@ var __exports__ = (() => {
|
|
|
12356
12382
|
// src/i3s-node-page-loader.ts
|
|
12357
12383
|
var VERSION6 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
12358
12384
|
var I3SNodePageLoader = {
|
|
12385
|
+
dataType: null,
|
|
12386
|
+
batchType: null,
|
|
12359
12387
|
name: "I3S Node Page",
|
|
12360
12388
|
id: "i3s-node-page",
|
|
12361
12389
|
module: "i3s",
|
|
@@ -12431,10 +12459,10 @@ var __exports__ = (() => {
|
|
|
12431
12459
|
*/
|
|
12432
12460
|
// eslint-disable-next-line complexity, max-statements
|
|
12433
12461
|
async formTileFromNodePages(id) {
|
|
12434
|
-
const
|
|
12462
|
+
const node = await this.getNodeById(id);
|
|
12435
12463
|
const children = [];
|
|
12436
12464
|
const childNodesPromises = [];
|
|
12437
|
-
for (const child of
|
|
12465
|
+
for (const child of node.children || []) {
|
|
12438
12466
|
childNodesPromises.push(this.getNodeById(child));
|
|
12439
12467
|
}
|
|
12440
12468
|
const childNodes = await Promise.all(childNodesPromises);
|
|
@@ -12450,29 +12478,29 @@ var __exports__ = (() => {
|
|
|
12450
12478
|
let textureFormat = "jpg";
|
|
12451
12479
|
let attributeUrls = [];
|
|
12452
12480
|
let isDracoGeometry = false;
|
|
12453
|
-
if (
|
|
12454
|
-
const { url, isDracoGeometry: isDracoGeometryResult } =
|
|
12481
|
+
if (node && node.mesh) {
|
|
12482
|
+
const { url, isDracoGeometry: isDracoGeometryResult } = node.mesh.geometry && this.getContentUrl(node.mesh.geometry) || { isDracoGeometry: false };
|
|
12455
12483
|
contentUrl = url;
|
|
12456
12484
|
isDracoGeometry = isDracoGeometryResult;
|
|
12457
|
-
const { textureData, materialDefinition: nodeMaterialDefinition } = this.getInformationFromMaterial(
|
|
12485
|
+
const { textureData, materialDefinition: nodeMaterialDefinition } = this.getInformationFromMaterial(node.mesh.material);
|
|
12458
12486
|
materialDefinition = nodeMaterialDefinition;
|
|
12459
12487
|
textureFormat = textureData.format || textureFormat;
|
|
12460
12488
|
if (textureData.name) {
|
|
12461
|
-
textureUrl = `${this.url}/nodes/${
|
|
12489
|
+
textureUrl = `${this.url}/nodes/${node.mesh.material.resource}/textures/${textureData.name}`;
|
|
12462
12490
|
}
|
|
12463
12491
|
if (this.tileset.attributeStorageInfo) {
|
|
12464
12492
|
attributeUrls = generateTilesetAttributeUrls(
|
|
12465
12493
|
this.tileset,
|
|
12466
12494
|
this.url,
|
|
12467
|
-
|
|
12495
|
+
node.mesh.attribute.resource
|
|
12468
12496
|
);
|
|
12469
12497
|
}
|
|
12470
12498
|
}
|
|
12471
|
-
const lodSelection = this.getLodSelection(
|
|
12499
|
+
const lodSelection = this.getLodSelection(node);
|
|
12472
12500
|
return normalizeTileNonUrlData({
|
|
12473
12501
|
id: id.toString(),
|
|
12474
12502
|
lodSelection,
|
|
12475
|
-
obb:
|
|
12503
|
+
obb: node.obb,
|
|
12476
12504
|
contentUrl,
|
|
12477
12505
|
textureUrl,
|
|
12478
12506
|
attributeUrls,
|
|
@@ -12520,19 +12548,19 @@ var __exports__ = (() => {
|
|
|
12520
12548
|
* @param node - a node from nodepage
|
|
12521
12549
|
* @returns- Array of LodSelection
|
|
12522
12550
|
*/
|
|
12523
|
-
getLodSelection(
|
|
12551
|
+
getLodSelection(node) {
|
|
12524
12552
|
const lodSelection = [];
|
|
12525
12553
|
if (this.lodSelectionMetricType === "maxScreenThresholdSQ") {
|
|
12526
12554
|
lodSelection.push({
|
|
12527
12555
|
metricType: "maxScreenThreshold",
|
|
12528
12556
|
// @ts-ignore
|
|
12529
|
-
maxError: Math.sqrt(
|
|
12557
|
+
maxError: Math.sqrt(node.lodThreshold / (Math.PI * 0.25))
|
|
12530
12558
|
});
|
|
12531
12559
|
}
|
|
12532
12560
|
lodSelection.push({
|
|
12533
12561
|
metricType: this.lodSelectionMetricType,
|
|
12534
12562
|
// @ts-ignore
|
|
12535
|
-
maxError:
|
|
12563
|
+
maxError: node.lodThreshold
|
|
12536
12564
|
});
|
|
12537
12565
|
return lodSelection;
|
|
12538
12566
|
}
|
|
@@ -12715,6 +12743,8 @@ var __exports__ = (() => {
|
|
|
12715
12743
|
var SLPK_HEX = "504b0304";
|
|
12716
12744
|
var POINT_CLOUD = "PointCloud";
|
|
12717
12745
|
var I3SLoader = {
|
|
12746
|
+
dataType: null,
|
|
12747
|
+
batchType: null,
|
|
12718
12748
|
name: "I3S (Indexed Scene Layers)",
|
|
12719
12749
|
id: "i3s",
|
|
12720
12750
|
module: "i3s",
|
|
@@ -13838,7 +13868,8 @@ var __exports__ = (() => {
|
|
|
13838
13868
|
this.decompressBatches = this.decompressBatches.bind(this);
|
|
13839
13869
|
}
|
|
13840
13870
|
/** Preloads any dynamic libraries. May enable sync functions */
|
|
13841
|
-
async preload() {
|
|
13871
|
+
async preload(modules = {}) {
|
|
13872
|
+
registerJSModules(modules);
|
|
13842
13873
|
return;
|
|
13843
13874
|
}
|
|
13844
13875
|
/** Asynchronously compress data */
|
|
@@ -14364,6 +14395,8 @@ var __exports__ = (() => {
|
|
|
14364
14395
|
// src/i3s-slpk-loader.ts
|
|
14365
14396
|
var VERSION8 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
14366
14397
|
var SLPKLoader = {
|
|
14398
|
+
dataType: null,
|
|
14399
|
+
batchType: null,
|
|
14367
14400
|
name: "I3S SLPK (Scene Layer Package)",
|
|
14368
14401
|
id: "slpk",
|
|
14369
14402
|
module: "i3s",
|
|
@@ -14446,6 +14479,8 @@ var __exports__ = (() => {
|
|
|
14446
14479
|
var EMPTY_VALUE = "";
|
|
14447
14480
|
var REJECTED_STATUS = "rejected";
|
|
14448
14481
|
var I3SAttributeLoader = {
|
|
14482
|
+
dataType: null,
|
|
14483
|
+
batchType: null,
|
|
14449
14484
|
name: "I3S Attribute",
|
|
14450
14485
|
id: "i3s-attribute",
|
|
14451
14486
|
module: "i3s",
|
|
@@ -14578,6 +14613,8 @@ var __exports__ = (() => {
|
|
|
14578
14613
|
// src/i3s-building-scene-layer-loader.ts
|
|
14579
14614
|
var VERSION10 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
14580
14615
|
var I3SBuildingSceneLayerLoader = {
|
|
14616
|
+
dataType: null,
|
|
14617
|
+
batchType: null,
|
|
14581
14618
|
name: "I3S Building Scene Layer",
|
|
14582
14619
|
id: "i3s-building-scene-layer",
|
|
14583
14620
|
module: "i3s",
|
|
@@ -14667,6 +14704,8 @@ var __exports__ = (() => {
|
|
|
14667
14704
|
// src/arcgis-webscene-loader.ts
|
|
14668
14705
|
var VERSION11 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
14669
14706
|
var ArcGISWebSceneLoader = {
|
|
14707
|
+
dataType: null,
|
|
14708
|
+
batchType: null,
|
|
14670
14709
|
name: "ArcGIS Web Scene Loader",
|
|
14671
14710
|
id: "arcgis-web-scene",
|
|
14672
14711
|
module: "i3s",
|