@jdultra/threedtiles 13.0.27 → 13.0.29

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.
@@ -3513,24 +3513,22 @@ class Wt extends E.Object3D {
3513
3513
  for (let g in t.queryParams) t.queryParams.hasOwnProperty(g) && (d += "&" + g + "=" + t.queryParams[g]);
3514
3514
  n.includes("?") ? n += d : n += "?" + d.substring(1);
3515
3515
  }
3516
- if (n) if (o && (n.includes(".b3dm") || n.includes(".glb") || n.includes(".gltf"))) {
3517
- t.contentURL.push(n);
3518
- try {
3519
- t.tileLoader.get(t.abortController, t.uuid, n, (g) => {
3520
- t.deleted || (g.asset && g.asset.copyright && (g.asset.copyright.split(";").forEach((h) => {
3521
- Z[h] ? Z[h]++ : Z[h] = 1;
3522
- }), t.displayCopyright && ma()), t.meshContent.push(g), t.splatsMesh || (g.traverse((h) => {
3523
- if ((h.isMesh || h.isPoints) && h.layers.disable(0), h.isMesh && t.occlusionCullingService) {
3524
- const b = h.geometry.attributes.position, f = [];
3525
- for (let I = 0; I < b.count; I++) f.push(t.color.r, t.color.g, t.color.b);
3526
- h.geometry.setAttribute("color", new E.Float32BufferAttribute(f, 3));
3527
- }
3528
- }), t.add(g), t.updateMatrices()));
3529
- }, t.cameraOnLoad ? () => t.loadingStrategy == "IMMEDIATE" ? t._calculateDistanceToCamera(t.cameraOnLoad) : t.loadingStrategy == "INCREMENTAL" ? t.parentTile ? t.parentTile._calculateDistanceToCamera(t.cameraOnLoad) / t.parentTile.level : t._calculateDistanceToCamera(t.cameraOnLoad) / t.level : t.loadingStrategy == "PERLEVEL" ? t.parentTile ? t.level + t.parentTile._calculateDistanceToCamera(t.cameraOnLoad) : t.level + t._calculateDistanceToCamera(t.cameraOnLoad) : 0 : () => 0, () => t._getSiblings(), t.level, t.loadingStrategy, !t.json.boundingVolume.region, !!t.json.boundingVolume.region, t.geometricError, t.splatsMesh);
3530
- } catch (g) {
3531
- t.displayErrors && gt(g);
3532
- }
3533
- } else r && n.includes(".json") && (t.jsonRequested = n, t.tileLoader.get(t.abortController, t.uuid, n, async (g) => {
3516
+ if (n) if (o && (n.includes(".b3dm") || n.includes(".glb") || n.includes(".gltf"))) try {
3517
+ t.tileLoader.get(t.abortController, t.uuid, n, (g) => {
3518
+ t.deleted || (g.asset && g.asset.copyright && (g.asset.copyright.split(";").forEach((h) => {
3519
+ Z[h] ? Z[h]++ : Z[h] = 1;
3520
+ }), t.displayCopyright && ma()), t.meshContent.push(g), t.splatsMesh || (g.traverse((h) => {
3521
+ if ((h.isMesh || h.isPoints) && h.layers.disable(0), h.isMesh && t.occlusionCullingService) {
3522
+ const b = h.geometry.attributes.position, f = [];
3523
+ for (let I = 0; I < b.count; I++) f.push(t.color.r, t.color.g, t.color.b);
3524
+ h.geometry.setAttribute("color", new E.Float32BufferAttribute(f, 3));
3525
+ }
3526
+ }), t.add(g), t.updateMatrices()));
3527
+ }, t.cameraOnLoad ? () => t.loadingStrategy == "IMMEDIATE" ? t._calculateDistanceToCamera(t.cameraOnLoad) : t.loadingStrategy == "INCREMENTAL" ? t.parentTile ? t.parentTile._calculateDistanceToCamera(t.cameraOnLoad) / Math.max(1, t.parentTile.level) : t._calculateDistanceToCamera(t.cameraOnLoad) / Math.max(1, t.level) : t.loadingStrategy == "PERLEVEL" ? t.parentTile ? t.level + t.parentTile._calculateDistanceToCamera(t.cameraOnLoad) : t.level + t._calculateDistanceToCamera(t.cameraOnLoad) : 0 : () => 0, () => t._getSiblings(), t.level, t.loadingStrategy, !t.json.boundingVolume.region, !!t.json.boundingVolume.region, t.geometricError, t.splatsMesh);
3528
+ } catch (g) {
3529
+ t.displayErrors && gt(g);
3530
+ }
3531
+ else r && n.includes(".json") && (t.jsonRequested = n, t.tileLoader.get(t.abortController, t.uuid, n, async (g) => {
3534
3532
  t.jsonReceived = !0, t.deleted || (g.rootPath = le.dirname(n), t.json.children.push(g), s == null ? delete t.json.content : t.json.contents.splice(s, 1), t.hasUnloadedJSONContent--);
3535
3533
  }));
3536
3534
  }
@@ -3678,9 +3676,9 @@ class Wt extends E.Object3D {
3678
3676
  if (!t.isSetup) return;
3679
3677
  const A = t.materialVisibility;
3680
3678
  t.boundingVolume && t.geometricError && (t.metric = t._calculateUpdateMetric(e, a)), t.childrenTiles.forEach((i) => i._update(e, a)), function(i) {
3681
- if (t.hasMeshContent && !(t.meshContent.length < t.hasMeshContent)) {
3682
- if (i < 0) return t.inFrustum = !1, void t._changeContentVisibility(!!t.loadOutsideView);
3683
- if (t.inFrustum = !0, t.childrenTiles.length == 0) return void t._changeContentVisibility(!0);
3679
+ if (i < 0) return t.inFrustum = !1, void t._changeContentVisibility(!!t.loadOutsideView);
3680
+ if (t.inFrustum = !0, !!t.hasMeshContent && !(t.meshContent.length < t.hasMeshContent)) {
3681
+ if (t.childrenTiles.length == 0) return void t._changeContentVisibility(!0);
3684
3682
  if (i >= t.geometricErrorMultiplier * t.geometricError) t._changeContentVisibility(!0);
3685
3683
  else if (i < t.geometricErrorMultiplier * t.geometricError && t.refine == "REPLACE") {
3686
3684
  let s = !0;
@@ -3688,7 +3686,7 @@ class Wt extends E.Object3D {
3688
3686
  }
3689
3687
  }
3690
3688
  }(t.metric), function(i) {
3691
- i < 0 && t.hasMeshContent || t.occlusionCullingService && t.hasMeshContent && !t.occlusionCullingService.hasID(t.colorID) || (!t.hasMeshContent || i <= t.geometricErrorMultiplier * t.geometricError && t.meshContent.length > 0) && t.json && t.json.children && t.childrenTiles.length != t.json.children.length && t._loadJsonChildren(e);
3689
+ i < 0 && t.hasMeshContent || t.occlusionCullingService && t.hasMeshContent && !t.occlusionCullingService.hasID(t.colorID) || (!t.hasMeshContent || i <= t.geometricErrorMultiplier * t.geometricError && (t.meshContent.length > 0 || t.splatsMesh)) && t.json && t.json.children && t.childrenTiles.length != t.json.children.length && t._loadJsonChildren(e);
3692
3690
  }(t.metric), function(i, s) {
3693
3691
  if (t.hasMeshContent) {
3694
3692
  if (!t.inFrustum) return void t._disposeChildren();