@rings-webgpu/core 1.0.33 → 1.0.35

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.
@@ -37773,6 +37773,7 @@ class LitMaterial extends Material {
37773
37773
 
37774
37774
  class OBJParser extends ParserBase {
37775
37775
  static format = ParserFormat.TEXT;
37776
+ static cloudImageProcessParam = "";
37776
37777
  textData = "";
37777
37778
  source_vertices;
37778
37779
  source_normals;
@@ -37939,7 +37940,7 @@ class OBJParser extends ParserBase {
37939
37940
  const texUrl = StringUtil.normalizePath(
37940
37941
  this.baseUrl + mat2.textures[i]
37941
37942
  );
37942
- promiseList.push(Engine3D.res.loadTexture(texUrl).catch(
37943
+ promiseList.push(Engine3D.res.loadTexture(texUrl + OBJParser.cloudImageProcessParam).catch(
37943
37944
  (error) => {
37944
37945
  console.error(`Failed to load texture: ${texUrl}`, error);
37945
37946
  return null;
@@ -42146,7 +42147,7 @@ class PostProcessingComponent extends ComponentBase {
42146
42147
  }
42147
42148
  }
42148
42149
 
42149
- const version = "1.0.32";
42150
+ const version = "1.0.34";
42150
42151
 
42151
42152
  class Engine3D {
42152
42153
  /**
@@ -61854,6 +61855,7 @@ class LASParser extends ParserBase {
61854
61855
 
61855
61856
  class PlyParser extends ParserBase {
61856
61857
  static format = ParserFormat.BIN;
61858
+ static cloudImageProcessParam = "";
61857
61859
  async parseBuffer(buffer) {
61858
61860
  const header = parsePlyHeader(buffer);
61859
61861
  switch (header.mode) {
@@ -61924,7 +61926,7 @@ class PlyParser extends ParserBase {
61924
61926
  const texturePath = StringUtil.normalizePath(
61925
61927
  this.baseUrl + plyData.textureFiles[texnum]
61926
61928
  );
61927
- promiseList.push(Engine3D.res.loadTexture(texturePath).then((texture) => {
61929
+ promiseList.push(Engine3D.res.loadTexture(texturePath + PlyParser.cloudImageProcessParam).then((texture) => {
61928
61930
  material.baseMap = texture;
61929
61931
  materials.set(texnum, material);
61930
61932
  }));
@@ -65407,8 +65409,10 @@ class TilesRenderer {
65407
65409
  tileItem.loadingState = UNLOADED;
65408
65410
  });
65409
65411
  }
65410
- if (tile.active) {
65412
+ {
65411
65413
  this.setTileActive(tile, true);
65414
+ tile.active = true;
65415
+ this.stats.active++;
65412
65416
  }
65413
65417
  } else {
65414
65418
  tile.loadingState = FAILED;
@@ -65455,55 +65459,18 @@ class TilesRenderer {
65455
65459
  }
65456
65460
  }
65457
65461
  }
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
65462
  /**
65494
65463
  * Check and process delayed hide tiles when a child finishes loading
65495
65464
  */
65496
65465
  _checkDelayedHideTiles() {
65466
+ if (this.stats.downloading !== 0) {
65467
+ return;
65468
+ }
65497
65469
  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
- }
65470
+ this._delayedHideTiles.delete(tile);
65471
+ const scene = tile.cached.scene;
65472
+ if (scene) {
65473
+ scene.transform.enable = false;
65507
65474
  }
65508
65475
  }
65509
65476
  }