@rings-webgpu/core 1.0.33 → 1.0.34

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.
@@ -42146,7 +42146,7 @@ class PostProcessingComponent extends ComponentBase {
42146
42146
  }
42147
42147
  }
42148
42148
 
42149
- const version = "1.0.32";
42149
+ const version = "1.0.33";
42150
42150
 
42151
42151
  class Engine3D {
42152
42152
  /**
@@ -65407,8 +65407,10 @@ class TilesRenderer {
65407
65407
  tileItem.loadingState = UNLOADED;
65408
65408
  });
65409
65409
  }
65410
- if (tile.active) {
65410
+ {
65411
65411
  this.setTileActive(tile, true);
65412
+ tile.active = true;
65413
+ this.stats.active++;
65412
65414
  }
65413
65415
  } else {
65414
65416
  tile.loadingState = FAILED;
@@ -65455,55 +65457,18 @@ class TilesRenderer {
65455
65457
  }
65456
65458
  }
65457
65459
  }
65458
- _checkIsLoadingTileWillBeActive(tile) {
65459
- return tile.used && (tile.loadingState === LOADING || tile.loadingState === PARSING || !this._activeTiles.has(tile) || !this._visibleTiles.has(tile)) && tile.loadingState !== UNLOADED && tile.loadingState !== FAILED && tile.hasRenderableContent;
65460
- }
65461
- /**
65462
- * Get children tiles that are loading and will be active
65463
- * Check if child is used in current frame (will be displayed) but not yet loaded
65464
- */
65465
- _getLoadingChildrenThatWillBeActive(tile) {
65466
- const loadingChildren = [];
65467
- const children = tile.children;
65468
- for (let i = 0, l = children.length; i < l; i++) {
65469
- const child = children[i];
65470
- if (this._checkIsLoadingTileWillBeActive(child)) {
65471
- loadingChildren.push(child);
65472
- }
65473
- if (child.children && child.children.length > 0) {
65474
- loadingChildren.push(...this._getLoadingChildrenThatWillBeActive(child));
65475
- }
65476
- }
65477
- return loadingChildren;
65478
- }
65479
- /**
65480
- * Get parents tiles that are loading and will be active
65481
- * Check if parent is used in current frame (will be displayed) but not yet loaded
65482
- */
65483
- _getLoadingParentsThatWillBeActive(tile) {
65484
- const loadingParents = [];
65485
- const parent = tile.parent;
65486
- if (parent) {
65487
- if (this._checkIsLoadingTileWillBeActive(parent)) {
65488
- loadingParents.push(parent);
65489
- }
65490
- }
65491
- return loadingParents;
65492
- }
65493
65460
  /**
65494
65461
  * Check and process delayed hide tiles when a child finishes loading
65495
65462
  */
65496
65463
  _checkDelayedHideTiles() {
65464
+ if (this.stats.downloading !== 0) {
65465
+ return;
65466
+ }
65497
65467
  for (const tile of this._delayedHideTiles) {
65498
- const stillLoadingChildren = this._getLoadingChildrenThatWillBeActive(tile);
65499
- const stillLoadingParents = this._getLoadingParentsThatWillBeActive(tile);
65500
- const stillLoading = [...stillLoadingChildren, ...stillLoadingParents];
65501
- if (stillLoading.length === 0) {
65502
- this._delayedHideTiles.delete(tile);
65503
- const scene = tile.cached.scene;
65504
- if (scene) {
65505
- scene.transform.enable = false;
65506
- }
65468
+ this._delayedHideTiles.delete(tile);
65469
+ const scene = tile.cached.scene;
65470
+ if (scene) {
65471
+ scene.transform.enable = false;
65507
65472
  }
65508
65473
  }
65509
65474
  }