@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.
- package/dist/rings.es.js +112 -112
- package/dist/rings.es.js.map +3 -3
- package/dist/rings.es.max.js +15 -48
- package/dist/rings.umd.js +117 -117
- package/dist/rings.umd.js.map +3 -3
- package/dist/rings.umd.max.js +15 -48
- package/dist/types/loader/parser/OBJParser.d.ts +1 -0
- package/dist/types/loader/parser/ply/PlyParser.d.ts +1 -0
- package/dist/types/loader/parser/tileRenderer/TilesRenderer.d.ts +0 -11
- package/package.json +1 -1
package/dist/rings.umd.max.js
CHANGED
|
@@ -37780,6 +37780,7 @@ else if (typeof exports === 'object')
|
|
|
37780
37780
|
|
|
37781
37781
|
class OBJParser extends ParserBase {
|
|
37782
37782
|
static format = ParserFormat.TEXT;
|
|
37783
|
+
static cloudImageProcessParam = "";
|
|
37783
37784
|
textData = "";
|
|
37784
37785
|
source_vertices;
|
|
37785
37786
|
source_normals;
|
|
@@ -37946,7 +37947,7 @@ else if (typeof exports === 'object')
|
|
|
37946
37947
|
const texUrl = StringUtil.normalizePath(
|
|
37947
37948
|
this.baseUrl + mat2.textures[i]
|
|
37948
37949
|
);
|
|
37949
|
-
promiseList.push(Engine3D.res.loadTexture(texUrl).catch(
|
|
37950
|
+
promiseList.push(Engine3D.res.loadTexture(texUrl + OBJParser.cloudImageProcessParam).catch(
|
|
37950
37951
|
(error) => {
|
|
37951
37952
|
console.error(`Failed to load texture: ${texUrl}`, error);
|
|
37952
37953
|
return null;
|
|
@@ -42153,7 +42154,7 @@ else if (typeof exports === 'object')
|
|
|
42153
42154
|
}
|
|
42154
42155
|
}
|
|
42155
42156
|
|
|
42156
|
-
const version = "1.0.
|
|
42157
|
+
const version = "1.0.34";
|
|
42157
42158
|
|
|
42158
42159
|
class Engine3D {
|
|
42159
42160
|
/**
|
|
@@ -61861,6 +61862,7 @@ fn frag(){
|
|
|
61861
61862
|
|
|
61862
61863
|
class PlyParser extends ParserBase {
|
|
61863
61864
|
static format = ParserFormat.BIN;
|
|
61865
|
+
static cloudImageProcessParam = "";
|
|
61864
61866
|
async parseBuffer(buffer) {
|
|
61865
61867
|
const header = parsePlyHeader(buffer);
|
|
61866
61868
|
switch (header.mode) {
|
|
@@ -61931,7 +61933,7 @@ fn frag(){
|
|
|
61931
61933
|
const texturePath = StringUtil.normalizePath(
|
|
61932
61934
|
this.baseUrl + plyData.textureFiles[texnum]
|
|
61933
61935
|
);
|
|
61934
|
-
promiseList.push(Engine3D.res.loadTexture(texturePath).then((texture) => {
|
|
61936
|
+
promiseList.push(Engine3D.res.loadTexture(texturePath + PlyParser.cloudImageProcessParam).then((texture) => {
|
|
61935
61937
|
material.baseMap = texture;
|
|
61936
61938
|
materials.set(texnum, material);
|
|
61937
61939
|
}));
|
|
@@ -65414,8 +65416,10 @@ fn frag(){
|
|
|
65414
65416
|
tileItem.loadingState = UNLOADED;
|
|
65415
65417
|
});
|
|
65416
65418
|
}
|
|
65417
|
-
|
|
65419
|
+
{
|
|
65418
65420
|
this.setTileActive(tile, true);
|
|
65421
|
+
tile.active = true;
|
|
65422
|
+
this.stats.active++;
|
|
65419
65423
|
}
|
|
65420
65424
|
} else {
|
|
65421
65425
|
tile.loadingState = FAILED;
|
|
@@ -65462,55 +65466,18 @@ fn frag(){
|
|
|
65462
65466
|
}
|
|
65463
65467
|
}
|
|
65464
65468
|
}
|
|
65465
|
-
_checkIsLoadingTileWillBeActive(tile) {
|
|
65466
|
-
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;
|
|
65467
|
-
}
|
|
65468
|
-
/**
|
|
65469
|
-
* Get children tiles that are loading and will be active
|
|
65470
|
-
* Check if child is used in current frame (will be displayed) but not yet loaded
|
|
65471
|
-
*/
|
|
65472
|
-
_getLoadingChildrenThatWillBeActive(tile) {
|
|
65473
|
-
const loadingChildren = [];
|
|
65474
|
-
const children = tile.children;
|
|
65475
|
-
for (let i = 0, l = children.length; i < l; i++) {
|
|
65476
|
-
const child = children[i];
|
|
65477
|
-
if (this._checkIsLoadingTileWillBeActive(child)) {
|
|
65478
|
-
loadingChildren.push(child);
|
|
65479
|
-
}
|
|
65480
|
-
if (child.children && child.children.length > 0) {
|
|
65481
|
-
loadingChildren.push(...this._getLoadingChildrenThatWillBeActive(child));
|
|
65482
|
-
}
|
|
65483
|
-
}
|
|
65484
|
-
return loadingChildren;
|
|
65485
|
-
}
|
|
65486
|
-
/**
|
|
65487
|
-
* Get parents tiles that are loading and will be active
|
|
65488
|
-
* Check if parent is used in current frame (will be displayed) but not yet loaded
|
|
65489
|
-
*/
|
|
65490
|
-
_getLoadingParentsThatWillBeActive(tile) {
|
|
65491
|
-
const loadingParents = [];
|
|
65492
|
-
const parent = tile.parent;
|
|
65493
|
-
if (parent) {
|
|
65494
|
-
if (this._checkIsLoadingTileWillBeActive(parent)) {
|
|
65495
|
-
loadingParents.push(parent);
|
|
65496
|
-
}
|
|
65497
|
-
}
|
|
65498
|
-
return loadingParents;
|
|
65499
|
-
}
|
|
65500
65469
|
/**
|
|
65501
65470
|
* Check and process delayed hide tiles when a child finishes loading
|
|
65502
65471
|
*/
|
|
65503
65472
|
_checkDelayedHideTiles() {
|
|
65473
|
+
if (this.stats.downloading !== 0) {
|
|
65474
|
+
return;
|
|
65475
|
+
}
|
|
65504
65476
|
for (const tile of this._delayedHideTiles) {
|
|
65505
|
-
|
|
65506
|
-
const
|
|
65507
|
-
|
|
65508
|
-
|
|
65509
|
-
this._delayedHideTiles.delete(tile);
|
|
65510
|
-
const scene = tile.cached.scene;
|
|
65511
|
-
if (scene) {
|
|
65512
|
-
scene.transform.enable = false;
|
|
65513
|
-
}
|
|
65477
|
+
this._delayedHideTiles.delete(tile);
|
|
65478
|
+
const scene = tile.cached.scene;
|
|
65479
|
+
if (scene) {
|
|
65480
|
+
scene.transform.enable = false;
|
|
65514
65481
|
}
|
|
65515
65482
|
}
|
|
65516
65483
|
}
|
|
@@ -2,6 +2,7 @@ import { ParserBase } from "../ParserBase";
|
|
|
2
2
|
import { ParserFormat } from "../ParserFormat";
|
|
3
3
|
export declare class PlyParser extends ParserBase {
|
|
4
4
|
static format: ParserFormat;
|
|
5
|
+
static cloudImageProcessParam: string;
|
|
5
6
|
parseBuffer(buffer: ArrayBuffer): Promise<void>;
|
|
6
7
|
verification(): boolean;
|
|
7
8
|
}
|
|
@@ -207,17 +207,6 @@ export declare class TilesRenderer {
|
|
|
207
207
|
* Set tile active state
|
|
208
208
|
*/
|
|
209
209
|
setTileActive(tile: Tile, active: boolean): void;
|
|
210
|
-
private _checkIsLoadingTileWillBeActive;
|
|
211
|
-
/**
|
|
212
|
-
* Get children tiles that are loading and will be active
|
|
213
|
-
* Check if child is used in current frame (will be displayed) but not yet loaded
|
|
214
|
-
*/
|
|
215
|
-
private _getLoadingChildrenThatWillBeActive;
|
|
216
|
-
/**
|
|
217
|
-
* Get parents tiles that are loading and will be active
|
|
218
|
-
* Check if parent is used in current frame (will be displayed) but not yet loaded
|
|
219
|
-
*/
|
|
220
|
-
private _getLoadingParentsThatWillBeActive;
|
|
221
210
|
/**
|
|
222
211
|
* Check and process delayed hide tiles when a child finishes loading
|
|
223
212
|
*/
|