@loaders.gl/3d-tiles 4.2.0-alpha.6 → 4.2.0-beta.1

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.
@@ -1,4 +1,4 @@
1
- import type { LoaderOptions, LoaderWithParser } from '@loaders.gl/loader-utils';
1
+ import type { LoaderOptions } from '@loaders.gl/loader-utils';
2
2
  /** options to load data from 3tz */
3
3
  export type Tiles3DArchiveFileLoaderOptions = LoaderOptions & {
4
4
  '3d-tiles-archive'?: {
@@ -9,5 +9,24 @@ export type Tiles3DArchiveFileLoaderOptions = LoaderOptions & {
9
9
  /**
10
10
  * Loader for 3tz packages
11
11
  */
12
- export declare const Tiles3DArchiveFileLoader: LoaderWithParser<ArrayBuffer, never, Tiles3DArchiveFileLoaderOptions>;
12
+ export declare const Tiles3DArchiveFileLoader: {
13
+ dataType: ArrayBuffer;
14
+ batchType: never;
15
+ name: string;
16
+ id: string;
17
+ module: string;
18
+ version: any;
19
+ mimeTypes: string[];
20
+ parse: typeof parse3DTilesArchive;
21
+ extensions: string[];
22
+ options: {};
23
+ };
24
+ /**
25
+ * returns a single file from the 3tz archive
26
+ * @param data 3tz archive data
27
+ * @param options options
28
+ * @returns requested file
29
+ */
30
+ declare function parse3DTilesArchive(data: ArrayBuffer, options?: Tiles3DArchiveFileLoaderOptions): Promise<ArrayBuffer>;
31
+ export {};
13
32
  //# sourceMappingURL=3d-tiles-archive-loader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"3d-tiles-archive-loader.d.ts","sourceRoot":"","sources":["../src/3d-tiles-archive-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,aAAa,EAAE,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAQ9E,oCAAoC;AACpC,MAAM,MAAM,+BAA+B,GAAG,aAAa,GAAG;IAC5D,kBAAkB,CAAC,EAAE;QACnB,kCAAkC;QAClC,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,gBAAgB,CACrD,WAAW,EACX,KAAK,EACL,+BAA+B,CAUhC,CAAC"}
1
+ {"version":3,"file":"3d-tiles-archive-loader.d.ts","sourceRoot":"","sources":["../src/3d-tiles-archive-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,aAAa,EAAmB,MAAM,0BAA0B,CAAC;AAQ9E,oCAAoC;AACpC,MAAM,MAAM,+BAA+B,GAAG,aAAa,GAAG;IAC5D,kBAAkB,CAAC,EAAE;QACnB,kCAAkC;QAClC,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;CAW4C,CAAC;AAElF;;;;;GAKG;AACH,iBAAe,mBAAmB,CAChC,IAAI,EAAE,WAAW,EACjB,OAAO,GAAE,+BAAoC,GAC5C,OAAO,CAAC,WAAW,CAAC,CAGtB"}
@@ -5,11 +5,13 @@ import { DataViewFile } from '@loaders.gl/loader-utils';
5
5
  import { parse3DTilesArchive as parse3DTilesArchiveFromProvider } from "./3d-tiles-archive/3d-tiles-archive-parser.js";
6
6
  // __VERSION__ is injected by babel-plugin-version-inline
7
7
  // @ts-ignore TS2304: Cannot find name '__VERSION__'.
8
- const VERSION = typeof "4.2.0-alpha.5" !== 'undefined' ? "4.2.0-alpha.5" : 'latest';
8
+ const VERSION = typeof "4.2.0-alpha.6" !== 'undefined' ? "4.2.0-alpha.6" : 'latest';
9
9
  /**
10
10
  * Loader for 3tz packages
11
11
  */
12
12
  export const Tiles3DArchiveFileLoader = {
13
+ dataType: null,
14
+ batchType: null,
13
15
  name: '3tz',
14
16
  id: '3tz',
15
17
  module: '3d-tiles',
@@ -1,6 +1,29 @@
1
- import type { LoaderOptions, LoaderWithParser } from '@loaders.gl/loader-utils';
1
+ import type { LoaderOptions } from '@loaders.gl/loader-utils';
2
+ declare function preload(url: any, options?: {}): Promise<any>;
2
3
  /**
3
4
  * Loader for 3D tiles from Cesium ION
4
5
  */
5
- export declare const CesiumIonLoader: LoaderWithParser<unknown, never, LoaderOptions>;
6
+ export declare const CesiumIonLoader: {
7
+ readonly id: "cesium-ion";
8
+ readonly name: "Cesium Ion";
9
+ readonly preload: typeof preload;
10
+ readonly parse: (data: ArrayBuffer, options?: LoaderOptions | undefined, context?: import("@loaders.gl/loader-utils").LoaderContext | undefined) => Promise<import("./types").Tiles3DTilesetJSONPostprocessed | import("./types").Tiles3DTileContent>;
11
+ readonly options: {
12
+ readonly 'cesium-ion': {
13
+ readonly accessToken: null;
14
+ readonly loadGLTF: true;
15
+ readonly decodeQuantizedPositions: false;
16
+ readonly isTileset: "auto";
17
+ readonly assetGltfUpAxis: null;
18
+ };
19
+ };
20
+ readonly dataType: any;
21
+ readonly batchType: never;
22
+ readonly module: "3d-tiles";
23
+ readonly version: any;
24
+ readonly extensions: ["cmpt", "pnts", "b3dm", "i3dm"];
25
+ readonly mimeTypes: ["application/octet-stream"];
26
+ readonly tests: ["cmpt", "pnts", "b3dm", "i3dm"];
27
+ };
28
+ export {};
6
29
  //# sourceMappingURL=cesium-ion-loader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cesium-ion-loader.d.ts","sourceRoot":"","sources":["../src/cesium-ion-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,aAAa,EAAE,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAiB9E;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,gBAAgB,CAAC,OAAO,EAAE,KAAK,EAAE,aAAa,CAmB3E,CAAC"}
1
+ {"version":3,"file":"cesium-ion-loader.d.ts","sourceRoot":"","sources":["../src/cesium-ion-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,aAAa,EAAmB,MAAM,0BAA0B,CAAC;AAI9E,iBAAe,OAAO,CAAC,GAAG,KAAA,EAAE,OAAO,KAAK,gBAWvC;AAED;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;CAmBwC,CAAC"}
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 node2;
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
- node2 = s2.heap[++s2.heap_len] = max_code < 2 ? ++max_code : 0;
521
- tree[node2 * 2] = 1;
522
- s2.depth[node2] = 0;
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[node2 * 2 + 1];
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
- node2 = elems;
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[node2 * 2] = tree[n2 * 2] + tree[m * 2];
555
- s2.depth[node2] = (s2.depth[n2] >= s2.depth[m] ? s2.depth[n2] : s2.depth[m]) + 1;
556
- tree[n2 * 2 + 1] = tree[m * 2 + 1] = node2;
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
- ] = node2++;
553
+ ] = node++;
561
554
  pqdownheap(
562
555
  s2,
563
556
  tree,
@@ -4306,6 +4299,17 @@ var __exports__ = (() => {
4306
4299
  var matches = typeof process !== "undefined" && process.version && /v([0-9]*)/.exec(process.version);
4307
4300
  var nodeVersion = matches && parseFloat(matches[1]) || 0;
4308
4301
 
4302
+ // ../loader-utils/src/lib/module-utils/js-module-utils.ts
4303
+ function registerJSModules(modules) {
4304
+ globalThis.loaders ||= {};
4305
+ globalThis.loaders.modules ||= {};
4306
+ Object.assign(globalThis.loaders.modules, modules);
4307
+ }
4308
+ function getJSModuleOrNull(name12) {
4309
+ const module = globalThis.loaders?.modules?.[name12];
4310
+ return module || null;
4311
+ }
4312
+
4309
4313
  // ../worker-utils/src/lib/env-utils/version.ts
4310
4314
  var NPM_TAG = "latest";
4311
4315
  function getVersion() {
@@ -4352,7 +4356,6 @@ var __exports__ = (() => {
4352
4356
  var nodeVersion2 = matches2 && parseFloat(matches2[1]) || 0;
4353
4357
 
4354
4358
  // ../worker-utils/src/lib/library-utils/library-utils.ts
4355
- var node = __toESM(require_require_utils(), 1);
4356
4359
  var loadLibraryPromises = {};
4357
4360
  async function loadLibrary(libraryUrl, moduleName = null, options = {}, libraryName = null) {
4358
4361
  if (moduleName) {
@@ -4389,7 +4392,8 @@ var __exports__ = (() => {
4389
4392
  }
4390
4393
  if (!isBrowser2) {
4391
4394
  try {
4392
- return node && void 0 && await (void 0)(libraryUrl);
4395
+ const { requireFromFile } = globalThis.loaders || {};
4396
+ return await requireFromFile?.(libraryUrl);
4393
4397
  } catch (error) {
4394
4398
  console.error(error);
4395
4399
  return null;
@@ -4403,7 +4407,8 @@ var __exports__ = (() => {
4403
4407
  }
4404
4408
  function loadLibraryFromString(scriptSource, id) {
4405
4409
  if (!isBrowser2) {
4406
- return void 0 && (void 0)(scriptSource, id);
4410
+ const { requireFromString } = globalThis.loaders || {};
4411
+ return requireFromString?.(scriptSource, id);
4407
4412
  }
4408
4413
  if (isWorker) {
4409
4414
  eval.call(globalThis, scriptSource);
@@ -4420,18 +4425,20 @@ var __exports__ = (() => {
4420
4425
  return null;
4421
4426
  }
4422
4427
  async function loadAsArrayBuffer(url) {
4423
- if (isBrowser2 || !void 0 || url.startsWith("http")) {
4428
+ const { readFileAsArrayBuffer } = globalThis.loaders || {};
4429
+ if (isBrowser2 || !readFileAsArrayBuffer || url.startsWith("http")) {
4424
4430
  const response = await fetch(url);
4425
4431
  return await response.arrayBuffer();
4426
4432
  }
4427
- return await (void 0)(url);
4433
+ return await readFileAsArrayBuffer(url);
4428
4434
  }
4429
4435
  async function loadAsText(url) {
4430
- if (isBrowser2 || !void 0 || url.startsWith("http")) {
4436
+ const { readFileAsText } = globalThis.loaders || {};
4437
+ if (isBrowser2 || !readFileAsText || url.startsWith("http")) {
4431
4438
  const response = await fetch(url);
4432
4439
  return await response.text();
4433
4440
  }
4434
- return await (void 0)(url);
4441
+ return await readFileAsText(url);
4435
4442
  }
4436
4443
 
4437
4444
  // ../loader-utils/src/lib/binary-utils/get-first-characters.ts
@@ -6278,6 +6285,8 @@ var __exports__ = (() => {
6278
6285
 
6279
6286
  // ../draco/src/draco-loader.ts
6280
6287
  var DracoLoader = {
6288
+ dataType: null,
6289
+ batchType: null,
6281
6290
  name: "Draco",
6282
6291
  id: "draco",
6283
6292
  module: "draco",
@@ -6432,7 +6441,11 @@ var __exports__ = (() => {
6432
6441
  4: Uint16Array,
6433
6442
  5: Int32Array,
6434
6443
  6: Uint32Array,
6444
+ // 7: BigInt64Array,
6445
+ // 8: BigUint64Array,
6435
6446
  9: Float32Array
6447
+ // 10: Float64Array
6448
+ // 11: BOOL - What array type do we use for this?
6436
6449
  };
6437
6450
  var INDEX_ITEM_SIZE = 4;
6438
6451
  var DracoParser = class {
@@ -6605,14 +6618,17 @@ var __exports__ = (() => {
6605
6618
  for (const loaderAttribute of Object.values(loaderData.attributes)) {
6606
6619
  const attributeName = this._deduceAttributeName(loaderAttribute, options);
6607
6620
  loaderAttribute.name = attributeName;
6608
- const { value, size } = this._getAttributeValues(dracoGeometry, loaderAttribute);
6609
- attributes[attributeName] = {
6610
- value,
6611
- size,
6612
- byteOffset: loaderAttribute.byte_offset,
6613
- byteStride: loaderAttribute.byte_stride,
6614
- normalized: loaderAttribute.normalized
6615
- };
6621
+ const values = this._getAttributeValues(dracoGeometry, loaderAttribute);
6622
+ if (values) {
6623
+ const { value, size } = values;
6624
+ attributes[attributeName] = {
6625
+ value,
6626
+ size,
6627
+ byteOffset: loaderAttribute.byte_offset,
6628
+ byteStride: loaderAttribute.byte_stride,
6629
+ normalized: loaderAttribute.normalized
6630
+ };
6631
+ }
6616
6632
  }
6617
6633
  return attributes;
6618
6634
  }
@@ -6654,6 +6670,10 @@ var __exports__ = (() => {
6654
6670
  */
6655
6671
  _getAttributeValues(dracoGeometry, attribute) {
6656
6672
  const TypedArrayCtor = DRACO_DATA_TYPE_TO_TYPED_ARRAY_MAP[attribute.data_type];
6673
+ if (!TypedArrayCtor) {
6674
+ console.warn(`DRACO: Unsupported attribute type ${attribute.data_type}`);
6675
+ return null;
6676
+ }
6657
6677
  const numComponents = attribute.num_components;
6658
6678
  const numPoints = dracoGeometry.num_points();
6659
6679
  const numValues = numPoints * numComponents;
@@ -6884,11 +6904,11 @@ var __exports__ = (() => {
6884
6904
  async function loadDracoDecoderModule(options) {
6885
6905
  const modules = options.modules || {};
6886
6906
  if (modules.draco3d) {
6887
- loadDecoderPromise = loadDecoderPromise || modules.draco3d.createDecoderModule({}).then((draco) => {
6907
+ loadDecoderPromise ||= modules.draco3d.createDecoderModule({}).then((draco) => {
6888
6908
  return { draco };
6889
6909
  });
6890
6910
  } else {
6891
- loadDecoderPromise = loadDecoderPromise || loadDracoDecoder(options);
6911
+ loadDecoderPromise ||= loadDracoDecoder(options);
6892
6912
  }
6893
6913
  return await loadDecoderPromise;
6894
6914
  }
@@ -12925,6 +12945,8 @@ var __exports__ = (() => {
12925
12945
  // imagebitmap: {} - passes (platform dependent) parameters to ImageBitmap constructor
12926
12946
  };
12927
12947
  var ImageLoader = {
12948
+ dataType: null,
12949
+ batchType: null,
12928
12950
  id: "image",
12929
12951
  module: "images",
12930
12952
  name: "Images",
@@ -13384,8 +13406,8 @@ var __exports__ = (() => {
13384
13406
  * `name`, `extensions`, `extras`, `camera`, `children`, `skin`, `rotation`, `scale`, `translation`, `weights`
13385
13407
  * https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#node
13386
13408
  */
13387
- addNode(node2) {
13388
- const { meshIndex, matrix } = node2;
13409
+ addNode(node) {
13410
+ const { meshIndex, matrix } = node;
13389
13411
  this.json.nodes = this.json.nodes || [];
13390
13412
  const nodeData = { mesh: meshIndex };
13391
13413
  if (matrix) {
@@ -14507,11 +14529,12 @@ var __exports__ = (() => {
14507
14529
  };
14508
14530
  var loadBasisTranscoderPromise;
14509
14531
  async function loadBasisTranscoderModule(options) {
14510
- const modules = options.modules || {};
14511
- if (modules.basis) {
14512
- return modules.basis;
14532
+ registerJSModules(options.modules);
14533
+ const basis = getJSModuleOrNull("basis");
14534
+ if (basis) {
14535
+ return basis;
14513
14536
  }
14514
- loadBasisTranscoderPromise = loadBasisTranscoderPromise || loadBasisTranscoder(options);
14537
+ loadBasisTranscoderPromise ||= loadBasisTranscoder(options);
14515
14538
  return await loadBasisTranscoderPromise;
14516
14539
  }
14517
14540
  async function loadBasisTranscoder(options) {
@@ -14943,6 +14966,8 @@ var __exports__ = (() => {
14943
14966
 
14944
14967
  // ../textures/src/basis-loader.ts
14945
14968
  var BasisWorkerLoader = {
14969
+ dataType: null,
14970
+ batchType: null,
14946
14971
  name: "Basis",
14947
14972
  id: "basis",
14948
14973
  module: "textures",
@@ -14955,12 +14980,9 @@ var __exports__ = (() => {
14955
14980
  options: {
14956
14981
  basis: {
14957
14982
  format: "auto",
14958
- // gl context doesn't exist on a worker thread
14959
14983
  libraryPath: "libs/",
14960
14984
  containerFormat: "auto",
14961
- // 'basis' || 'ktx2' || 'auto'
14962
14985
  module: "transcoder"
14963
- // 'transcoder' || 'encoder'
14964
14986
  }
14965
14987
  }
14966
14988
  };
@@ -15739,12 +15761,12 @@ var __exports__ = (() => {
15739
15761
  gltfScenegraph.json.lights = extension.lights;
15740
15762
  gltfScenegraph.removeExtension(KHR_LIGHTS_PUNCTUAL);
15741
15763
  }
15742
- for (const node2 of json.nodes || []) {
15743
- const nodeExtension = gltfScenegraph.getObjectExtension(node2, KHR_LIGHTS_PUNCTUAL);
15764
+ for (const node of json.nodes || []) {
15765
+ const nodeExtension = gltfScenegraph.getObjectExtension(node, KHR_LIGHTS_PUNCTUAL);
15744
15766
  if (nodeExtension) {
15745
- node2.light = nodeExtension.light;
15767
+ node.light = nodeExtension.light;
15746
15768
  }
15747
- gltfScenegraph.removeObjectExtension(node2, KHR_LIGHTS_PUNCTUAL);
15769
+ gltfScenegraph.removeObjectExtension(node, KHR_LIGHTS_PUNCTUAL);
15748
15770
  }
15749
15771
  }
15750
15772
  async function encode2(gltfData) {
@@ -15758,8 +15780,8 @@ var __exports__ = (() => {
15758
15780
  }
15759
15781
  if (gltfScenegraph.json.lights) {
15760
15782
  for (const light of gltfScenegraph.json.lights) {
15761
- const node2 = light.node;
15762
- gltfScenegraph.addObjectExtension(node2, KHR_LIGHTS_PUNCTUAL, light);
15783
+ const node = light.node;
15784
+ gltfScenegraph.addObjectExtension(node, KHR_LIGHTS_PUNCTUAL, light);
15763
15785
  }
15764
15786
  delete gltfScenegraph.json.lights;
15765
15787
  }
@@ -16043,11 +16065,11 @@ var __exports__ = (() => {
16043
16065
  for (const mesh of json.meshes) {
16044
16066
  this._convertMeshIds(mesh);
16045
16067
  }
16046
- for (const node2 of json.nodes) {
16047
- this._convertNodeIds(node2);
16068
+ for (const node of json.nodes) {
16069
+ this._convertNodeIds(node);
16048
16070
  }
16049
- for (const node2 of json.scenes) {
16050
- this._convertSceneIds(node2);
16071
+ for (const node of json.scenes) {
16072
+ this._convertSceneIds(node);
16051
16073
  }
16052
16074
  }
16053
16075
  _convertTextureIds(texture) {
@@ -16069,17 +16091,17 @@ var __exports__ = (() => {
16069
16091
  }
16070
16092
  }
16071
16093
  }
16072
- _convertNodeIds(node2) {
16073
- if (node2.children) {
16074
- node2.children = node2.children.map((child) => this._convertIdToIndex(child, "node"));
16094
+ _convertNodeIds(node) {
16095
+ if (node.children) {
16096
+ node.children = node.children.map((child) => this._convertIdToIndex(child, "node"));
16075
16097
  }
16076
- if (node2.meshes) {
16077
- node2.meshes = node2.meshes.map((mesh) => this._convertIdToIndex(mesh, "mesh"));
16098
+ if (node.meshes) {
16099
+ node.meshes = node.meshes.map((mesh) => this._convertIdToIndex(mesh, "mesh"));
16078
16100
  }
16079
16101
  }
16080
16102
  _convertSceneIds(scene) {
16081
16103
  if (scene.nodes) {
16082
- scene.nodes = scene.nodes.map((node2) => this._convertIdToIndex(node2, "node"));
16104
+ scene.nodes = scene.nodes.map((node) => this._convertIdToIndex(node, "node"));
16083
16105
  }
16084
16106
  }
16085
16107
  /** Go through all objects in a top-level array and replace ids with indices */
@@ -16271,6 +16293,8 @@ var __exports__ = (() => {
16271
16293
 
16272
16294
  // ../gltf/src/gltf-loader.ts
16273
16295
  var GLTFLoader = {
16296
+ dataType: null,
16297
+ batchType: null,
16274
16298
  name: "glTF",
16275
16299
  id: "gltf",
16276
16300
  module: "gltf",
@@ -16411,8 +16435,8 @@ var __exports__ = (() => {
16411
16435
  json.meshes = gltf.meshes.map((mesh, i2) => this._resolveMesh(mesh, i2));
16412
16436
  }
16413
16437
  if (gltf.nodes) {
16414
- json.nodes = gltf.nodes.map((node2, i2) => this._resolveNode(node2, i2));
16415
- json.nodes = json.nodes.map((node2, i2) => this._resolveNodeChildren(node2));
16438
+ json.nodes = gltf.nodes.map((node, i2) => this._resolveNode(node, i2));
16439
+ json.nodes = json.nodes.map((node, i2) => this._resolveNodeChildren(node));
16416
16440
  }
16417
16441
  if (gltf.skins) {
16418
16442
  json.skins = gltf.skins.map((skin, i2) => this._resolveSkin(skin, i2));
@@ -16477,26 +16501,26 @@ var __exports__ = (() => {
16477
16501
  ...scene,
16478
16502
  // @ts-ignore
16479
16503
  id: scene.id || `scene-${index}`,
16480
- nodes: (scene.nodes || []).map((node2) => this.getNode(node2))
16504
+ nodes: (scene.nodes || []).map((node) => this.getNode(node))
16481
16505
  };
16482
16506
  }
16483
16507
  _resolveNode(gltfNode, index) {
16484
- const node2 = {
16508
+ const node = {
16485
16509
  ...gltfNode,
16486
16510
  // @ts-expect-error id could already be present, glTF standard does not prevent it
16487
16511
  id: gltfNode?.id || `node-${index}`
16488
16512
  };
16489
16513
  if (gltfNode.mesh !== void 0) {
16490
- node2.mesh = this.getMesh(gltfNode.mesh);
16514
+ node.mesh = this.getMesh(gltfNode.mesh);
16491
16515
  }
16492
16516
  if (gltfNode.camera !== void 0) {
16493
- node2.camera = this.getCamera(gltfNode.camera);
16517
+ node.camera = this.getCamera(gltfNode.camera);
16494
16518
  }
16495
16519
  if (gltfNode.skin !== void 0) {
16496
- node2.skin = this.getSkin(gltfNode.skin);
16520
+ node.skin = this.getSkin(gltfNode.skin);
16497
16521
  }
16498
16522
  if (gltfNode.meshes !== void 0 && gltfNode.meshes.length) {
16499
- node2.mesh = gltfNode.meshes.reduce(
16523
+ node.mesh = gltfNode.meshes.reduce(
16500
16524
  (accum, meshIndex) => {
16501
16525
  const mesh = this.getMesh(meshIndex);
16502
16526
  accum.id = mesh.id;
@@ -16506,13 +16530,13 @@ var __exports__ = (() => {
16506
16530
  { primitives: [] }
16507
16531
  );
16508
16532
  }
16509
- return node2;
16533
+ return node;
16510
16534
  }
16511
- _resolveNodeChildren(node2) {
16512
- if (node2.children) {
16513
- node2.children = node2.children.map((child) => this.getNode(child));
16535
+ _resolveNodeChildren(node) {
16536
+ if (node.children) {
16537
+ node.children = node.children.map((child) => this.getNode(child));
16514
16538
  }
16515
- return node2;
16539
+ return node;
16516
16540
  }
16517
16541
  _resolveSkin(gltfSkin, index) {
16518
16542
  const inverseBindMatrices = typeof gltfSkin.inverseBindMatrices === "number" ? this.getAccessor(gltfSkin.inverseBindMatrices) : void 0;
@@ -17473,6 +17497,8 @@ var __exports__ = (() => {
17473
17497
 
17474
17498
  // src/tile-3d-subtree-loader.ts
17475
17499
  var Tile3DSubtreeLoader = {
17500
+ dataType: null,
17501
+ batchType: null,
17476
17502
  id: "3d-tiles-subtree",
17477
17503
  name: "3D Tiles Subtree",
17478
17504
  module: "3d-tiles",
@@ -20329,6 +20355,8 @@ var __exports__ = (() => {
20329
20355
 
20330
20356
  // src/tiles-3d-loader.ts
20331
20357
  var Tiles3DLoader = {
20358
+ dataType: null,
20359
+ batchType: null,
20332
20360
  id: "3d-tiles",
20333
20361
  name: "3D Tiles",
20334
20362
  module: "3d-tiles",
@@ -21521,7 +21549,8 @@ var __exports__ = (() => {
21521
21549
  this.decompressBatches = this.decompressBatches.bind(this);
21522
21550
  }
21523
21551
  /** Preloads any dynamic libraries. May enable sync functions */
21524
- async preload() {
21552
+ async preload(modules = {}) {
21553
+ registerJSModules(modules);
21525
21554
  return;
21526
21555
  }
21527
21556
  /** Asynchronously compress data */
@@ -21991,6 +22020,8 @@ var __exports__ = (() => {
21991
22020
  // src/3d-tiles-archive-loader.ts
21992
22021
  var VERSION8 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
21993
22022
  var Tiles3DArchiveFileLoader = {
22023
+ dataType: null,
22024
+ batchType: null,
21994
22025
  name: "3tz",
21995
22026
  id: "3tz",
21996
22027
  module: "3d-tiles",