@rings-webgpu/core 1.0.44 → 1.0.46
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 +45 -41
- package/dist/rings.es.js.map +3 -3
- package/dist/rings.es.max.js +22 -13
- package/dist/rings.umd.js +16 -12
- package/dist/rings.umd.js.map +3 -3
- package/dist/rings.umd.max.js +22 -13
- package/dist/types/components/renderer/GSplatStreamRenderer.d.ts +1 -0
- package/dist/types/loader/parser/tileRenderer/TilesRenderer.d.ts +1 -0
- package/package.json +1 -1
package/dist/rings.umd.max.js
CHANGED
|
@@ -2148,13 +2148,13 @@
|
|
|
2148
2148
|
return null;
|
|
2149
2149
|
}
|
|
2150
2150
|
|
|
2151
|
-
var __defProp$
|
|
2151
|
+
var __defProp$3 = Object.defineProperty;
|
|
2152
2152
|
var __decorateClass$p = (decorators, target, key, kind) => {
|
|
2153
2153
|
var result = void 0 ;
|
|
2154
2154
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
2155
2155
|
if (decorator = decorators[i])
|
|
2156
2156
|
result = (decorator(target, key, result) ) || result;
|
|
2157
|
-
if (result) __defProp$
|
|
2157
|
+
if (result) __defProp$3(target, key, result);
|
|
2158
2158
|
return result;
|
|
2159
2159
|
};
|
|
2160
2160
|
const _Struct = class _Struct {
|
|
@@ -22000,14 +22000,14 @@ struct InstanceData {
|
|
|
22000
22000
|
}
|
|
22001
22001
|
}
|
|
22002
22002
|
|
|
22003
|
-
var __defProp$
|
|
22003
|
+
var __defProp$2 = Object.defineProperty;
|
|
22004
22004
|
var __getOwnPropDesc$o = Object.getOwnPropertyDescriptor;
|
|
22005
22005
|
var __decorateClass$o = (decorators, target, key, kind) => {
|
|
22006
22006
|
var result = __getOwnPropDesc$o(target, key) ;
|
|
22007
22007
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
22008
22008
|
if (decorator = decorators[i])
|
|
22009
22009
|
result = (decorator(target, key, result) ) || result;
|
|
22010
|
-
if (result) __defProp$
|
|
22010
|
+
if (result) __defProp$2(target, key, result);
|
|
22011
22011
|
return result;
|
|
22012
22012
|
};
|
|
22013
22013
|
class RenderNode extends ComponentBase {
|
|
@@ -22850,13 +22850,15 @@ struct InstanceData {
|
|
|
22850
22850
|
}
|
|
22851
22851
|
|
|
22852
22852
|
// === calcSplatUV() - returns optional UV ===
|
|
22853
|
-
fn
|
|
22853
|
+
fn getSplatId(orderId: u32, textureWidth: u32, numSplats: u32) -> u32 {
|
|
22854
22854
|
let orderUV = vec2<i32>(
|
|
22855
22855
|
i32(orderId % textureWidth),
|
|
22856
22856
|
i32(orderId / textureWidth)
|
|
22857
22857
|
);
|
|
22858
22858
|
|
|
22859
|
-
|
|
22859
|
+
return u32(textureLoad(splatOrder, orderUV, 0).r);
|
|
22860
|
+
}
|
|
22861
|
+
fn calcSplatUV(splatId: u32, textureWidth: u32, numSplats: u32) -> vec2<i32> {
|
|
22860
22862
|
return vec2<i32>(
|
|
22861
22863
|
i32(splatId % textureWidth),
|
|
22862
22864
|
i32(splatId / textureWidth)
|
|
@@ -22955,9 +22957,11 @@ struct InstanceData {
|
|
|
22955
22957
|
if (orderId >= numSplats) {
|
|
22956
22958
|
return discardSplat();
|
|
22957
22959
|
}
|
|
22960
|
+
|
|
22961
|
+
let splatId = getSplatId(orderId, textureWidth, numSplats);
|
|
22958
22962
|
|
|
22959
22963
|
// Calculate splat UV and load all data in one go
|
|
22960
|
-
let splatUV = calcSplatUV(
|
|
22964
|
+
let splatUV = calcSplatUV(splatId, textureWidth, numSplats);
|
|
22961
22965
|
let splatData = getSplatData(splatUV);
|
|
22962
22966
|
|
|
22963
22967
|
// Load color early for alpha test
|
|
@@ -27989,14 +27993,14 @@ struct InstanceData {
|
|
|
27989
27993
|
}
|
|
27990
27994
|
}
|
|
27991
27995
|
|
|
27992
|
-
var __defProp = Object.defineProperty;
|
|
27996
|
+
var __defProp$1 = Object.defineProperty;
|
|
27993
27997
|
var __getOwnPropDesc$i = Object.getOwnPropertyDescriptor;
|
|
27994
27998
|
var __decorateClass$i = (decorators, target, key, kind) => {
|
|
27995
27999
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$i(target, key) : target;
|
|
27996
28000
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
27997
28001
|
if (decorator = decorators[i])
|
|
27998
28002
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
27999
|
-
if (kind && result) __defProp(target, key, result);
|
|
28003
|
+
if (kind && result) __defProp$1(target, key, result);
|
|
28000
28004
|
return result;
|
|
28001
28005
|
};
|
|
28002
28006
|
exports.MeshRenderer = class MeshRenderer extends RenderNode {
|
|
@@ -42370,7 +42374,7 @@ else if (typeof exports === 'object')
|
|
|
42370
42374
|
}
|
|
42371
42375
|
}
|
|
42372
42376
|
|
|
42373
|
-
const version = "1.0.
|
|
42377
|
+
const version = "1.0.45";
|
|
42374
42378
|
|
|
42375
42379
|
class Engine3D {
|
|
42376
42380
|
/**
|
|
@@ -54567,7 +54571,9 @@ fn frag(){
|
|
|
54567
54571
|
RegisterComponent(exports.FatLineRenderer, "FatLineRenderer")
|
|
54568
54572
|
], exports.FatLineRenderer);
|
|
54569
54573
|
|
|
54574
|
+
var __defProp = Object.defineProperty;
|
|
54570
54575
|
var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor;
|
|
54576
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
54571
54577
|
var __decorateClass$7 = (decorators, target, key, kind) => {
|
|
54572
54578
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$7(target, key) : target;
|
|
54573
54579
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
@@ -54575,6 +54581,7 @@ fn frag(){
|
|
|
54575
54581
|
result = (decorator(result)) || result;
|
|
54576
54582
|
return result;
|
|
54577
54583
|
};
|
|
54584
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
|
|
54578
54585
|
exports.GSplatStreamRenderer = class GSplatStreamRenderer extends RenderNode {
|
|
54579
54586
|
// Splat count and texture dimensions
|
|
54580
54587
|
totalCount = 0;
|
|
@@ -55261,10 +55268,10 @@ fn frag(){
|
|
|
55261
55268
|
this.scheduleOrder(view.camera.viewMatrix);
|
|
55262
55269
|
}
|
|
55263
55270
|
}
|
|
55264
|
-
if (this._pendingUpdates.size > 0 && this._frameCount >=
|
|
55271
|
+
if (this._pendingUpdates.size > 0 && this._frameCount >= exports.GSplatStreamRenderer.flushFrameLimit) {
|
|
55265
55272
|
this.flushUpdates();
|
|
55266
55273
|
}
|
|
55267
|
-
if (this._frameCount >=
|
|
55274
|
+
if (this._frameCount >= exports.GSplatStreamRenderer.flushFrameLimit && this._pendingUpdates.size === 0) {
|
|
55268
55275
|
this._frameCount = 0;
|
|
55269
55276
|
}
|
|
55270
55277
|
this._frameCount++;
|
|
@@ -55360,6 +55367,7 @@ fn frag(){
|
|
|
55360
55367
|
super.destroy(force);
|
|
55361
55368
|
}
|
|
55362
55369
|
};
|
|
55370
|
+
__publicField(exports.GSplatStreamRenderer, "flushFrameLimit", 60);
|
|
55363
55371
|
exports.GSplatStreamRenderer = __decorateClass$7([
|
|
55364
55372
|
RegisterComponent(exports.GSplatStreamRenderer, "GSplatStreamRenderer")
|
|
55365
55373
|
], exports.GSplatStreamRenderer);
|
|
@@ -66405,6 +66413,7 @@ fn frag(){
|
|
|
66405
66413
|
toggleTime: 0,
|
|
66406
66414
|
queueProcessTime: 0
|
|
66407
66415
|
};
|
|
66416
|
+
transCdnUrlFunc = null;
|
|
66408
66417
|
constructor(url = null) {
|
|
66409
66418
|
this.rootURL = url;
|
|
66410
66419
|
this.lruCache = new LRUCache();
|
|
@@ -66853,7 +66862,7 @@ fn frag(){
|
|
|
66853
66862
|
return parts.length > 1 ? parts[parts.length - 1] : "";
|
|
66854
66863
|
};
|
|
66855
66864
|
const extension = getUrlExtension(uri);
|
|
66856
|
-
const fullUrl = url;
|
|
66865
|
+
const fullUrl = this.transCdnUrlFunc ? this.transCdnUrlFunc(url) : url;
|
|
66857
66866
|
let scene = null;
|
|
66858
66867
|
const loader = new FileLoader();
|
|
66859
66868
|
switch (extension.toLowerCase()) {
|