@rings-webgpu/core 1.0.35 → 1.0.37

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.
@@ -2113,7 +2113,7 @@ function GetShader(name) {
2113
2113
  }
2114
2114
 
2115
2115
  var __defProp$2 = Object.defineProperty;
2116
- var __decorateClass$o = (decorators, target, key, kind) => {
2116
+ var __decorateClass$p = (decorators, target, key, kind) => {
2117
2117
  var result = void 0 ;
2118
2118
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
2119
2119
  if (decorator = decorators[i])
@@ -2216,10 +2216,10 @@ const _Struct = class _Struct {
2216
2216
  return struct.__size;
2217
2217
  }
2218
2218
  };
2219
- __decorateClass$o([
2219
+ __decorateClass$p([
2220
2220
  NonSerialize
2221
2221
  ], _Struct.prototype, "__refection");
2222
- __decorateClass$o([
2222
+ __decorateClass$p([
2223
2223
  NonSerialize
2224
2224
  ], _Struct.prototype, "__size");
2225
2225
  let Struct = _Struct;
@@ -21965,9 +21965,9 @@ class OctreeEntity {
21965
21965
  }
21966
21966
 
21967
21967
  var __defProp$1 = Object.defineProperty;
21968
- var __getOwnPropDesc$n = Object.getOwnPropertyDescriptor;
21969
- var __decorateClass$n = (decorators, target, key, kind) => {
21970
- var result = __getOwnPropDesc$n(target, key) ;
21968
+ var __getOwnPropDesc$o = Object.getOwnPropertyDescriptor;
21969
+ var __decorateClass$o = (decorators, target, key, kind) => {
21970
+ var result = __getOwnPropDesc$o(target, key) ;
21971
21971
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
21972
21972
  if (decorator = decorators[i])
21973
21973
  result = (decorator(target, key, result) ) || result;
@@ -22565,13 +22565,13 @@ class RenderNode extends ComponentBase {
22565
22565
  this._combineShaderRefection = void 0;
22566
22566
  }
22567
22567
  }
22568
- __decorateClass$n([
22568
+ __decorateClass$o([
22569
22569
  EditorInspector
22570
22570
  ], RenderNode.prototype, "materials");
22571
- __decorateClass$n([
22571
+ __decorateClass$o([
22572
22572
  EditorInspector
22573
22573
  ], RenderNode.prototype, "castShadow");
22574
- __decorateClass$n([
22574
+ __decorateClass$o([
22575
22575
  EditorInspector
22576
22576
  ], RenderNode.prototype, "castGI");
22577
22577
 
@@ -23238,9 +23238,9 @@ class Shader {
23238
23238
  }
23239
23239
  }
23240
23240
 
23241
- var __getOwnPropDesc$m = Object.getOwnPropertyDescriptor;
23242
- var __decorateClass$m = (decorators, target, key, kind) => {
23243
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$m(target, key) : target;
23241
+ var __getOwnPropDesc$n = Object.getOwnPropertyDescriptor;
23242
+ var __decorateClass$n = (decorators, target, key, kind) => {
23243
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$n(target, key) : target;
23244
23244
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
23245
23245
  if (decorator = decorators[i])
23246
23246
  result = (decorator(result)) || result;
@@ -23272,7 +23272,7 @@ let GSplatShader = class extends Shader {
23272
23272
  pass.setUniform("pixelCull", new Float32Array([2, 0, 0, 0]));
23273
23273
  }
23274
23274
  };
23275
- GSplatShader = __decorateClass$m([
23275
+ GSplatShader = __decorateClass$n([
23276
23276
  RegisterShader(GSplatShader, "GSplatShader")
23277
23277
  ], GSplatShader);
23278
23278
 
@@ -23316,6 +23316,10 @@ class GSplatMaterial extends Material {
23316
23316
  const pass = this.shader.getDefaultColorShader();
23317
23317
  pass.setUniform("pixelCull", this._pixelCullArray);
23318
23318
  }
23319
+ setTexParams(texParams) {
23320
+ const pass = this.shader.getDefaultColorShader();
23321
+ pass.setUniformArray("tex_params", texParams);
23322
+ }
23319
23323
  }
23320
23324
 
23321
23325
  class VertexGPUBuffer extends GPUBufferBase {
@@ -24289,9 +24293,9 @@ class Float16ArrayTexture extends Texture {
24289
24293
  }
24290
24294
  }
24291
24295
 
24292
- var __getOwnPropDesc$l = Object.getOwnPropertyDescriptor;
24293
- var __decorateClass$l = (decorators, target, key, kind) => {
24294
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$l(target, key) : target;
24296
+ var __getOwnPropDesc$m = Object.getOwnPropertyDescriptor;
24297
+ var __decorateClass$m = (decorators, target, key, kind) => {
24298
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$m(target, key) : target;
24295
24299
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
24296
24300
  if (decorator = decorators[i])
24297
24301
  result = (decorator(result)) || result;
@@ -25090,7 +25094,7 @@ let GSplatRenderer = class extends RenderNode {
25090
25094
  super.destroy(force);
25091
25095
  }
25092
25096
  };
25093
- GSplatRenderer = __decorateClass$l([
25097
+ GSplatRenderer = __decorateClass$m([
25094
25098
  RegisterComponent(GSplatRenderer, "GSplatRenderer")
25095
25099
  ], GSplatRenderer);
25096
25100
 
@@ -25229,9 +25233,9 @@ const PointCloud_FS = (
25229
25233
  `
25230
25234
  );
25231
25235
 
25232
- var __getOwnPropDesc$k = Object.getOwnPropertyDescriptor;
25233
- var __decorateClass$k = (decorators, target, key, kind) => {
25234
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$k(target, key) : target;
25236
+ var __getOwnPropDesc$l = Object.getOwnPropertyDescriptor;
25237
+ var __decorateClass$l = (decorators, target, key, kind) => {
25238
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$l(target, key) : target;
25235
25239
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
25236
25240
  if (decorator = decorators[i])
25237
25241
  result = (decorator(result)) || result;
@@ -25263,7 +25267,7 @@ let PointCloudShader = class extends Shader {
25263
25267
  pass.setUniformArray("pointParams", new Float32Array([0, 0, 0, 128]));
25264
25268
  }
25265
25269
  };
25266
- PointCloudShader = __decorateClass$k([
25270
+ PointCloudShader = __decorateClass$l([
25267
25271
  RegisterShader(PointCloudShader, "PointCloudShader")
25268
25272
  ], PointCloudShader);
25269
25273
 
@@ -25456,9 +25460,9 @@ class Float32ArrayTexture extends Texture {
25456
25460
  }
25457
25461
  }
25458
25462
 
25459
- var __getOwnPropDesc$j = Object.getOwnPropertyDescriptor;
25460
- var __decorateClass$j = (decorators, target, key, kind) => {
25461
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$j(target, key) : target;
25463
+ var __getOwnPropDesc$k = Object.getOwnPropertyDescriptor;
25464
+ var __decorateClass$k = (decorators, target, key, kind) => {
25465
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$k(target, key) : target;
25462
25466
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
25463
25467
  if (decorator = decorators[i])
25464
25468
  result = (decorator(result)) || result;
@@ -25769,7 +25773,7 @@ let PointCloudRenderer = class extends RenderNode {
25769
25773
  super.destroy(force);
25770
25774
  }
25771
25775
  };
25772
- PointCloudRenderer = __decorateClass$j([
25776
+ PointCloudRenderer = __decorateClass$k([
25773
25777
  RegisterComponent(PointCloudRenderer, "PointCloudRenderer")
25774
25778
  ], PointCloudRenderer);
25775
25779
 
@@ -26124,9 +26128,9 @@ class Entity extends CEventDispatcher {
26124
26128
  }
26125
26129
  }
26126
26130
 
26127
- var __getOwnPropDesc$i = Object.getOwnPropertyDescriptor;
26128
- var __decorateClass$i = (decorators, target, key, kind) => {
26129
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$i(target, key) : target;
26131
+ var __getOwnPropDesc$j = Object.getOwnPropertyDescriptor;
26132
+ var __decorateClass$j = (decorators, target, key, kind) => {
26133
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$j(target, key) : target;
26130
26134
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
26131
26135
  if (decorator = decorators[i])
26132
26136
  result = (decorator(result)) || result;
@@ -26401,7 +26405,7 @@ let Object3D = class extends Entity {
26401
26405
  super.destroy(force);
26402
26406
  }
26403
26407
  };
26404
- Object3D = __decorateClass$i([
26408
+ Object3D = __decorateClass$j([
26405
26409
  DecorateObject3D
26406
26410
  ], Object3D);
26407
26411
  function DecorateObject3D(ctor, _) {
@@ -27767,9 +27771,9 @@ class MorphTargetData {
27767
27771
  }
27768
27772
 
27769
27773
  var __defProp = Object.defineProperty;
27770
- var __getOwnPropDesc$h = Object.getOwnPropertyDescriptor;
27771
- var __decorateClass$h = (decorators, target, key, kind) => {
27772
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$h(target, key) : target;
27774
+ var __getOwnPropDesc$i = Object.getOwnPropertyDescriptor;
27775
+ var __decorateClass$i = (decorators, target, key, kind) => {
27776
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$i(target, key) : target;
27773
27777
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
27774
27778
  if (decorator = decorators[i])
27775
27779
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
@@ -27882,13 +27886,13 @@ let MeshRenderer = class extends RenderNode {
27882
27886
  super.destroy(force);
27883
27887
  }
27884
27888
  };
27885
- __decorateClass$h([
27889
+ __decorateClass$i([
27886
27890
  EditorInspector
27887
27891
  ], MeshRenderer.prototype, "geometry", 1);
27888
- __decorateClass$h([
27892
+ __decorateClass$i([
27889
27893
  EditorInspector
27890
27894
  ], MeshRenderer.prototype, "material", 1);
27891
- MeshRenderer = __decorateClass$h([
27895
+ MeshRenderer = __decorateClass$i([
27892
27896
  RegisterComponent(MeshRenderer, "MeshRenderer")
27893
27897
  ], MeshRenderer);
27894
27898
 
@@ -28494,9 +28498,9 @@ class PlaneGeometry extends GeometryBase {
28494
28498
  }
28495
28499
  }
28496
28500
 
28497
- var __getOwnPropDesc$g = Object.getOwnPropertyDescriptor;
28498
- var __decorateClass$g = (decorators, target, key, kind) => {
28499
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$g(target, key) : target;
28501
+ var __getOwnPropDesc$h = Object.getOwnPropertyDescriptor;
28502
+ var __decorateClass$h = (decorators, target, key, kind) => {
28503
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$h(target, key) : target;
28500
28504
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
28501
28505
  if (decorator = decorators[i])
28502
28506
  result = (decorator(result)) || result;
@@ -28520,7 +28524,7 @@ let QuadShader = class extends Shader {
28520
28524
  this.setUniformFloat(`height`, 100);
28521
28525
  }
28522
28526
  };
28523
- QuadShader = __decorateClass$g([
28527
+ QuadShader = __decorateClass$h([
28524
28528
  RegisterShader(QuadShader, "QuadShader")
28525
28529
  ], QuadShader);
28526
28530
 
@@ -35883,9 +35887,9 @@ class LightBase extends ComponentBase {
35883
35887
  }
35884
35888
  }
35885
35889
 
35886
- var __getOwnPropDesc$f = Object.getOwnPropertyDescriptor;
35887
- var __decorateClass$f = (decorators, target, key, kind) => {
35888
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$f(target, key) : target;
35890
+ var __getOwnPropDesc$g = Object.getOwnPropertyDescriptor;
35891
+ var __decorateClass$g = (decorators, target, key, kind) => {
35892
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$g(target, key) : target;
35889
35893
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
35890
35894
  if (decorator = decorators[i])
35891
35895
  result = (decorator(result)) || result;
@@ -35927,13 +35931,13 @@ let DirectLight = class extends LightBase {
35927
35931
  debug() {
35928
35932
  }
35929
35933
  };
35930
- DirectLight = __decorateClass$f([
35934
+ DirectLight = __decorateClass$g([
35931
35935
  RegisterComponent(DirectLight, "DirectLight")
35932
35936
  ], DirectLight);
35933
35937
 
35934
- var __getOwnPropDesc$e = Object.getOwnPropertyDescriptor;
35935
- var __decorateClass$e = (decorators, target, key, kind) => {
35936
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$e(target, key) : target;
35938
+ var __getOwnPropDesc$f = Object.getOwnPropertyDescriptor;
35939
+ var __decorateClass$f = (decorators, target, key, kind) => {
35940
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$f(target, key) : target;
35937
35941
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
35938
35942
  if (decorator = decorators[i])
35939
35943
  result = (decorator(result)) || result;
@@ -35991,13 +35995,13 @@ let PointLight = class extends LightBase {
35991
35995
  debugDraw(show) {
35992
35996
  }
35993
35997
  };
35994
- PointLight = __decorateClass$e([
35998
+ PointLight = __decorateClass$f([
35995
35999
  RegisterComponent(PointLight, "PointLight")
35996
36000
  ], PointLight);
35997
36001
 
35998
- var __getOwnPropDesc$d = Object.getOwnPropertyDescriptor;
35999
- var __decorateClass$d = (decorators, target, key, kind) => {
36000
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$d(target, key) : target;
36002
+ var __getOwnPropDesc$e = Object.getOwnPropertyDescriptor;
36003
+ var __decorateClass$e = (decorators, target, key, kind) => {
36004
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$e(target, key) : target;
36001
36005
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
36002
36006
  if (decorator = decorators[i])
36003
36007
  result = (decorator(result)) || result;
@@ -36062,7 +36066,7 @@ let SpotLight = class extends LightBase {
36062
36066
  debugDraw(show) {
36063
36067
  }
36064
36068
  };
36065
- SpotLight = __decorateClass$d([
36069
+ SpotLight = __decorateClass$e([
36066
36070
  RegisterComponent(SpotLight, "SpotLight")
36067
36071
  ], SpotLight);
36068
36072
 
@@ -38233,7 +38237,7 @@ class OBJParser extends ParserBase {
38233
38237
  const texturePath = StringUtil.normalizePath(
38234
38238
  this.baseUrl + matData.map_Kd
38235
38239
  );
38236
- const texture = Engine3D.res.getTexture(texturePath);
38240
+ const texture = Engine3D.res.getTexture(texturePath + OBJParser.cloudImageProcessParam);
38237
38241
  if (texture) {
38238
38242
  mat.baseMap = texture;
38239
38243
  }
@@ -42147,7 +42151,7 @@ class PostProcessingComponent extends ComponentBase {
42147
42151
  }
42148
42152
  }
42149
42153
 
42150
- const version = "1.0.34";
42154
+ const version = "1.0.36";
42151
42155
 
42152
42156
  class Engine3D {
42153
42157
  /**
@@ -46660,9 +46664,9 @@ class AtmosphericTexture2D extends VirtualTexture {
46660
46664
  }
46661
46665
  }
46662
46666
 
46663
- var __getOwnPropDesc$c = Object.getOwnPropertyDescriptor;
46664
- var __decorateClass$c = (decorators, target, key, kind) => {
46665
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$c(target, key) : target;
46667
+ var __getOwnPropDesc$d = Object.getOwnPropertyDescriptor;
46668
+ var __decorateClass$d = (decorators, target, key, kind) => {
46669
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$d(target, key) : target;
46666
46670
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
46667
46671
  if (decorator = decorators[i])
46668
46672
  result = (decorator(result)) || result;
@@ -46686,7 +46690,7 @@ let SkyShader = class extends Shader {
46686
46690
  shaderState.depthCompare = GPUCompareFunction.less;
46687
46691
  }
46688
46692
  };
46689
- SkyShader = __decorateClass$c([
46693
+ SkyShader = __decorateClass$d([
46690
46694
  RegisterShader(SkyShader, "SkyShader")
46691
46695
  ], SkyShader);
46692
46696
 
@@ -47484,9 +47488,9 @@ class SkeletonAnimationClipState {
47484
47488
  }
47485
47489
  }
47486
47490
 
47487
- var __getOwnPropDesc$b = Object.getOwnPropertyDescriptor;
47488
- var __decorateClass$b = (decorators, target, key, kind) => {
47489
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$b(target, key) : target;
47491
+ var __getOwnPropDesc$c = Object.getOwnPropertyDescriptor;
47492
+ var __decorateClass$c = (decorators, target, key, kind) => {
47493
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$c(target, key) : target;
47490
47494
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
47491
47495
  if (decorator = decorators[i])
47492
47496
  result = (decorator(result)) || result;
@@ -47690,7 +47694,7 @@ let SkeletonAnimationComponent = class extends ComponentBase {
47690
47694
  this._currentClipState.weight = 1;
47691
47695
  }
47692
47696
  };
47693
- SkeletonAnimationComponent = __decorateClass$b([
47697
+ SkeletonAnimationComponent = __decorateClass$c([
47694
47698
  RegisterComponent(SkeletonAnimationComponent, "SkeletonAnimationComponent")
47695
47699
  ], SkeletonAnimationComponent);
47696
47700
  class SkeletonAnimationCrossFadeState {
@@ -47726,9 +47730,9 @@ class SkeletonAnimationCrossFadeState {
47726
47730
  }
47727
47731
  }
47728
47732
 
47729
- var __getOwnPropDesc$a = Object.getOwnPropertyDescriptor;
47730
- var __decorateClass$a = (decorators, target, key, kind) => {
47731
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$a(target, key) : target;
47733
+ var __getOwnPropDesc$b = Object.getOwnPropertyDescriptor;
47734
+ var __decorateClass$b = (decorators, target, key, kind) => {
47735
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$b(target, key) : target;
47732
47736
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
47733
47737
  if (decorator = decorators[i])
47734
47738
  result = (decorator(result)) || result;
@@ -48139,7 +48143,7 @@ let AnimatorComponent = class extends ComponentBase {
48139
48143
  return dst;
48140
48144
  }
48141
48145
  };
48142
- AnimatorComponent = __decorateClass$a([
48146
+ AnimatorComponent = __decorateClass$b([
48143
48147
  RegisterComponent(AnimatorComponent, "AnimatorComponent")
48144
48148
  ], AnimatorComponent);
48145
48149
  class PropertyAnimationClipState {
@@ -48896,9 +48900,9 @@ class PropertyAnimation extends ComponentBase {
48896
48900
  }
48897
48901
  }
48898
48902
 
48899
- var __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor;
48900
- var __decorateClass$9 = (decorators, target, key, kind) => {
48901
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$9(target, key) : target;
48903
+ var __getOwnPropDesc$a = Object.getOwnPropertyDescriptor;
48904
+ var __decorateClass$a = (decorators, target, key, kind) => {
48905
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$a(target, key) : target;
48902
48906
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
48903
48907
  if (decorator = decorators[i])
48904
48908
  result = (decorator(result)) || result;
@@ -49047,7 +49051,7 @@ let SkinnedMeshRenderer2 = class extends MeshRenderer {
49047
49051
  super.nodeUpdate(view, passType, renderPassState, clusterLightingBuffer);
49048
49052
  }
49049
49053
  };
49050
- SkinnedMeshRenderer2 = __decorateClass$9([
49054
+ SkinnedMeshRenderer2 = __decorateClass$a([
49051
49055
  RegisterComponent(SkinnedMeshRenderer2, "SkinnedMeshRenderer2")
49052
49056
  ], SkinnedMeshRenderer2);
49053
49057
 
@@ -54180,9 +54184,9 @@ class UITextField extends UIRenderAble {
54180
54184
  }
54181
54185
  }
54182
54186
 
54183
- var __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor;
54184
- var __decorateClass$8 = (decorators, target, key, kind) => {
54185
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$8(target, key) : target;
54187
+ var __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor;
54188
+ var __decorateClass$9 = (decorators, target, key, kind) => {
54189
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$9(target, key) : target;
54186
54190
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
54187
54191
  if (decorator = decorators[i])
54188
54192
  result = (decorator(result)) || result;
@@ -54259,13 +54263,13 @@ let Light = class extends LightBase {
54259
54263
  debugDraw(show) {
54260
54264
  }
54261
54265
  };
54262
- Light = __decorateClass$8([
54266
+ Light = __decorateClass$9([
54263
54267
  RegisterComponent(Light, "Light")
54264
54268
  ], Light);
54265
54269
 
54266
- var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor;
54267
- var __decorateClass$7 = (decorators, target, key, kind) => {
54268
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$7(target, key) : target;
54270
+ var __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor;
54271
+ var __decorateClass$8 = (decorators, target, key, kind) => {
54272
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$8(target, key) : target;
54269
54273
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
54270
54274
  if (decorator = decorators[i])
54271
54275
  result = (decorator(result)) || result;
@@ -54340,10 +54344,771 @@ let FatLineRenderer = class extends RenderNode {
54340
54344
  super.destroy(force);
54341
54345
  }
54342
54346
  };
54343
- FatLineRenderer = __decorateClass$7([
54347
+ FatLineRenderer = __decorateClass$8([
54344
54348
  RegisterComponent(FatLineRenderer, "FatLineRenderer")
54345
54349
  ], FatLineRenderer);
54346
54350
 
54351
+ var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor;
54352
+ var __decorateClass$7 = (decorators, target, key, kind) => {
54353
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$7(target, key) : target;
54354
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
54355
+ if (decorator = decorators[i])
54356
+ result = (decorator(result)) || result;
54357
+ return result;
54358
+ };
54359
+ let GSplatStreamRenderer = class extends RenderNode {
54360
+ // Splat count and texture dimensions
54361
+ totalCount = 0;
54362
+ size = new Vector2();
54363
+ worldBoundBox = new BoundingBox();
54364
+ // GPU textures for splat data
54365
+ splatColor;
54366
+ transformA;
54367
+ transformB;
54368
+ texParams;
54369
+ // [numSplats, texWidth, validCount, visBoost]
54370
+ splatOrder;
54371
+ // Material and geometry
54372
+ gsplatMaterial;
54373
+ // CPU-side data buffers (pre-allocated)
54374
+ _colorData;
54375
+ // RGBA8: count * 4
54376
+ _transformAData;
54377
+ // RGBA32U: count * 4
54378
+ _transformBData;
54379
+ // RGBA16F: count * 4
54380
+ _orderData;
54381
+ // R32U: size.x * size.y
54382
+ _positions;
54383
+ // xyz per splat (local space)
54384
+ _worldPositions;
54385
+ // xyz per splat (world space, cached)
54386
+ // Tracking which splats have been set
54387
+ _splatSetFlags;
54388
+ // Track which indices have data
54389
+ _validCount = 0;
54390
+ // Number of splats with valid data
54391
+ // Web Worker for sorting (same as GSplatRenderer)
54392
+ _sortWorker;
54393
+ _lastSentTime = 0;
54394
+ _minIntervalMs = 16;
54395
+ _centersSent = false;
54396
+ _lastViewMatrixHash = 0;
54397
+ // Adaptive sorting optimization
54398
+ _lastCameraSpeed = 0;
54399
+ _adaptiveSorting = true;
54400
+ _lastPixelCullParams = "";
54401
+ _texturesInitialized = false;
54402
+ // Pixel coverage culling
54403
+ _minPixelCoverage = 4;
54404
+ _maxPixelCoverage = 0;
54405
+ _maxPixelCullDistance = 0;
54406
+ // Batched rendering
54407
+ _batchSize = 128;
54408
+ instanceCount = 0;
54409
+ // Batch update optimization
54410
+ _pendingUpdates = /* @__PURE__ */ new Set();
54411
+ // Indices pending GPU update
54412
+ _autoFlushThreshold = 100;
54413
+ // Auto-flush when this many updates pending
54414
+ _frameCount = 0;
54415
+ constructor() {
54416
+ super();
54417
+ }
54418
+ /**
54419
+ * Initialize renderer with total splat count
54420
+ * Pre-allocates all GPU resources with zero-initialized data
54421
+ * @param totalCount Total number of splats that will be streamed
54422
+ * @param batchSize Splats per draw call (default: 128)
54423
+ */
54424
+ initCount(totalCount, batchSize = 128) {
54425
+ if (totalCount <= 0) {
54426
+ throw new Error("Total count must be greater than 0");
54427
+ }
54428
+ this.totalCount = totalCount;
54429
+ this._batchSize = batchSize;
54430
+ this.size = this.evalTextureSize(totalCount);
54431
+ const w = this.size.x | 0;
54432
+ const h = this.size.y | 0;
54433
+ const total = w * h;
54434
+ this._colorData = new Uint8Array(total * 4);
54435
+ this._colorData.fill(0);
54436
+ this._transformAData = new Uint32Array(total * 4);
54437
+ this._transformAData.fill(0);
54438
+ this._transformBData = new Array(total * 4).fill(0);
54439
+ this._orderData = new Uint32Array(total);
54440
+ for (let i = 0; i < total; i++) {
54441
+ this._orderData[i] = i < totalCount ? i : totalCount > 0 ? totalCount - 1 : 0;
54442
+ }
54443
+ this._positions = new Float32Array(totalCount * 3);
54444
+ this._positions.fill(0);
54445
+ this._worldPositions = new Float32Array(totalCount * 3);
54446
+ this._worldPositions.fill(0);
54447
+ this._splatSetFlags = new Array(totalCount).fill(false);
54448
+ this._validCount = 0;
54449
+ this.texParams = new Float32Array([this._validCount, this.size.x, 0, 1]);
54450
+ this.splatColor = new Uint8ArrayTexture().create(w, h, this._colorData, false);
54451
+ this.splatColor.name = "splatColor";
54452
+ this.splatColor.minFilter = "nearest";
54453
+ this.splatColor.magFilter = "nearest";
54454
+ this.splatColor.mipmapFilter = "nearest";
54455
+ this.splatColor.addressModeU = "clamp-to-edge";
54456
+ this.splatColor.addressModeV = "clamp-to-edge";
54457
+ this.transformA = new Uint32ArrayTexture().create(w, h, this._transformAData);
54458
+ this.transformA.name = "transformA";
54459
+ this.transformA.minFilter = "nearest";
54460
+ this.transformA.magFilter = "nearest";
54461
+ this.transformA.addressModeU = "clamp-to-edge";
54462
+ this.transformA.addressModeV = "clamp-to-edge";
54463
+ this.transformB = new Float16ArrayTexture().create(w, h, this._transformBData, false);
54464
+ this.transformB.name = "transformB";
54465
+ this.transformB.minFilter = "nearest";
54466
+ this.transformB.magFilter = "nearest";
54467
+ this.transformB.mipmapFilter = "nearest";
54468
+ this.transformB.addressModeU = "clamp-to-edge";
54469
+ this.transformB.addressModeV = "clamp-to-edge";
54470
+ this.splatOrder = new R32UintTexture().create(w, h, this._orderData);
54471
+ this.splatOrder.name = "splatOrder";
54472
+ this.splatOrder.minFilter = "nearest";
54473
+ this.splatOrder.magFilter = "nearest";
54474
+ this.splatOrder.addressModeU = "clamp-to-edge";
54475
+ this.splatOrder.addressModeV = "clamp-to-edge";
54476
+ this.gsplatMaterial = new GSplatMaterial();
54477
+ this.geometry = new GSplatGeometry(this._batchSize);
54478
+ this.materials = [this.gsplatMaterial];
54479
+ this.instanceCount = 0;
54480
+ }
54481
+ /**
54482
+ * Set data for a single splat at the given index
54483
+ * Updates CPU buffers and marks for GPU update
54484
+ * @param index Splat index (0 to count-1)
54485
+ * @param data Splat data (position is required, others optional)
54486
+ */
54487
+ setSplatData(index, data) {
54488
+ if (index < 0 || index >= this.totalCount) {
54489
+ throw new Error(`Index ${index} out of range [0, ${this.totalCount})`);
54490
+ }
54491
+ const wasSet = this._splatSetFlags[index];
54492
+ this._positions[index * 3 + 0] = data.position[0];
54493
+ this._positions[index * 3 + 1] = data.position[1];
54494
+ this._positions[index * 3 + 2] = data.position[2];
54495
+ const SH_C0 = 0.28209479177387814;
54496
+ let r = 0.5, g = 0.5, b = 0.5;
54497
+ if (data.sh && data.sh.coeffs && data.sh.coeffs.length >= 3) {
54498
+ r = 0.5 + data.sh.coeffs[0] * SH_C0;
54499
+ g = 0.5 + data.sh.coeffs[1] * SH_C0;
54500
+ b = 0.5 + data.sh.coeffs[2] * SH_C0;
54501
+ }
54502
+ const a = data.opacity !== void 0 ? 1 / (1 + Math.exp(-data.opacity)) : 1;
54503
+ const colorIdx = index * 4;
54504
+ this._colorData[colorIdx + 0] = Math.max(0, Math.min(255, Math.floor(r * 255)));
54505
+ this._colorData[colorIdx + 1] = Math.max(0, Math.min(255, Math.floor(g * 255)));
54506
+ this._colorData[colorIdx + 2] = Math.max(0, Math.min(255, Math.floor(b * 255)));
54507
+ this._colorData[colorIdx + 3] = Math.max(0, Math.min(255, Math.floor(a * 255)));
54508
+ this.updateTransformData(index, data);
54509
+ if (!wasSet) {
54510
+ this._splatSetFlags[index] = true;
54511
+ this._validCount++;
54512
+ this.texParams[2] = this._validCount;
54513
+ this._centersSent = false;
54514
+ }
54515
+ this._pendingUpdates.add(index);
54516
+ }
54517
+ /**
54518
+ * Update transform data for a single splat
54519
+ */
54520
+ updateTransformData(index, data) {
54521
+ const idx = index * 4;
54522
+ const fb = new ArrayBuffer(4);
54523
+ const f32 = new Float32Array(fb);
54524
+ const u32 = new Uint32Array(fb);
54525
+ const setFloatBits = (v) => {
54526
+ f32[0] = v;
54527
+ return u32[0];
54528
+ };
54529
+ const x = data.position[0];
54530
+ const y = data.position[1];
54531
+ const z = data.position[2];
54532
+ this._transformAData[idx + 0] = setFloatBits(x);
54533
+ this._transformAData[idx + 1] = setFloatBits(y);
54534
+ this._transformAData[idx + 2] = setFloatBits(z);
54535
+ let qx = 0, qy = 0, qz = 0, qw = 1;
54536
+ if (data.rotation) {
54537
+ qx = data.rotation[0];
54538
+ qy = data.rotation[1];
54539
+ qz = data.rotation[2];
54540
+ qw = data.rotation[3];
54541
+ const inv = 1 / Math.hypot(qx, qy, qz, qw);
54542
+ qx *= inv;
54543
+ qy *= inv;
54544
+ qz *= inv;
54545
+ qw *= inv;
54546
+ }
54547
+ let sx = 1, sy = 1, sz = 1;
54548
+ if (data.scale) {
54549
+ sx = Math.exp(data.scale[0]);
54550
+ sy = Math.exp(data.scale[1]);
54551
+ sz = Math.exp(data.scale[2]);
54552
+ }
54553
+ const x2 = qx + qx;
54554
+ const y2 = qy + qy;
54555
+ const z2 = qz + qz;
54556
+ const xx = qx * x2;
54557
+ const xy = qx * y2;
54558
+ const xz = qx * z2;
54559
+ const yy = qy * y2;
54560
+ const yz = qy * z2;
54561
+ const zz = qz * z2;
54562
+ const wx = qw * x2;
54563
+ const wy = qw * y2;
54564
+ const wz = qw * z2;
54565
+ const data0 = 1 - (yy + zz);
54566
+ const data1 = xy + wz;
54567
+ const data2 = xz - wy;
54568
+ const data3 = xy - wz;
54569
+ const data4 = 1 - (xx + zz);
54570
+ const data5 = yz + wx;
54571
+ const data6 = xz + wy;
54572
+ const data7 = yz - wx;
54573
+ const data8 = 1 - (xx + yy);
54574
+ const r00 = data0 * sx;
54575
+ const r01 = data1 * sx;
54576
+ const r02 = data2 * sx;
54577
+ const r10 = data3 * sy;
54578
+ const r11 = data4 * sy;
54579
+ const r12 = data5 * sy;
54580
+ const r20 = data6 * sz;
54581
+ const r21 = data7 * sz;
54582
+ const r22 = data8 * sz;
54583
+ const cAx = r00 * r00 + r10 * r10 + r20 * r20;
54584
+ const cAy = r00 * r01 + r10 * r11 + r20 * r21;
54585
+ const cAz = r00 * r02 + r10 * r12 + r20 * r22;
54586
+ const cBx = r01 * r01 + r11 * r11 + r21 * r21;
54587
+ const cBy = r01 * r02 + r11 * r12 + r21 * r22;
54588
+ const cBz = r02 * r02 + r12 * r12 + r22 * r22;
54589
+ const bidx = idx;
54590
+ this._transformBData[bidx + 0] = cAx;
54591
+ this._transformBData[bidx + 1] = cAy;
54592
+ this._transformBData[bidx + 2] = cAz;
54593
+ this._transformBData[bidx + 3] = cBz;
54594
+ const hx = toHalfFloat(cBx) & 65535;
54595
+ const hy = toHalfFloat(cBy) & 65535;
54596
+ this._transformAData[idx + 3] = hx | hy << 16;
54597
+ }
54598
+ /**
54599
+ * Flush pending updates to GPU
54600
+ * Updates GPU textures with all pending changes
54601
+ */
54602
+ flushUpdates() {
54603
+ if (this._pendingUpdates.size === 0) return;
54604
+ const w = this.size.x | 0;
54605
+ const h = this.size.y | 0;
54606
+ this.splatColor.updateTexture(w, h, this._colorData);
54607
+ this.transformA.updateTexture(w, h, this._transformAData);
54608
+ this.transformB.updateTexture(w, h, this._transformBData, false);
54609
+ this.updatePendingWorldPositions();
54610
+ this._pendingUpdates.clear();
54611
+ }
54612
+ /**
54613
+ * Set auto-flush threshold
54614
+ * @param threshold Number of pending updates before auto-flush (default: 100)
54615
+ */
54616
+ setAutoFlushThreshold(threshold) {
54617
+ this._autoFlushThreshold = Math.max(1, threshold);
54618
+ }
54619
+ /**
54620
+ * Get current streaming statistics
54621
+ */
54622
+ getStreamingStats() {
54623
+ return {
54624
+ totalCount: this.totalCount,
54625
+ validCount: this._validCount,
54626
+ pendingUpdates: this._pendingUpdates.size,
54627
+ progress: this.totalCount > 0 ? this._validCount / this.totalCount * 100 : 0
54628
+ };
54629
+ }
54630
+ /**
54631
+ * Update splat sorting before rendering
54632
+ * Uses the same logic as GSplatRenderer for reliable sorting
54633
+ */
54634
+ onBeforeUpdate(view) {
54635
+ if (this._validCount > 0 && view?.camera) {
54636
+ if (view.camera.viewMatrix) {
54637
+ this.scheduleOrder(view.camera.viewMatrix);
54638
+ }
54639
+ }
54640
+ }
54641
+ /**
54642
+ * Update world space positions when transform changes
54643
+ */
54644
+ updateWorldPositions() {
54645
+ if (!this._positions || this._validCount === 0) return;
54646
+ const worldMatrix = this.object3D.transform.worldMatrix;
54647
+ const localPos = this._positions;
54648
+ const count = this._validCount;
54649
+ const m = worldMatrix.rawData;
54650
+ this.worldBoundBox.makeEmpty();
54651
+ for (let i = 0; i < count; i++) {
54652
+ if (!this._splatSetFlags[i]) continue;
54653
+ const idx = i * 3;
54654
+ const x = localPos[idx + 0];
54655
+ const y = localPos[idx + 1];
54656
+ const z = localPos[idx + 2];
54657
+ this._worldPositions[idx + 0] = m[0] * x + m[4] * y + m[8] * z + m[12];
54658
+ this._worldPositions[idx + 1] = m[1] * x + m[5] * y + m[9] * z + m[13];
54659
+ this._worldPositions[idx + 2] = m[2] * x + m[6] * y + m[10] * z + m[14];
54660
+ this.worldBoundBox.expandByPoint(new Vector3(this._worldPositions[idx + 0], this._worldPositions[idx + 1], this._worldPositions[idx + 2]));
54661
+ }
54662
+ this._centersSent = false;
54663
+ }
54664
+ updatePendingWorldPositions() {
54665
+ if (!this._positions || this._validCount === 0) return;
54666
+ const worldMatrix = this.object3D.transform.worldMatrix;
54667
+ const localPos = this._positions;
54668
+ this._validCount;
54669
+ const m = worldMatrix.rawData;
54670
+ const pendingUpdates = Array.from(this._pendingUpdates.values());
54671
+ for (let i = 0; i < pendingUpdates.length; i++) {
54672
+ const ii = pendingUpdates[i];
54673
+ if (!this._splatSetFlags[ii]) continue;
54674
+ const idx = ii * 3;
54675
+ const x = localPos[idx + 0];
54676
+ const y = localPos[idx + 1];
54677
+ const z = localPos[idx + 2];
54678
+ this._worldPositions[idx + 0] = m[0] * x + m[4] * y + m[8] * z + m[12];
54679
+ this._worldPositions[idx + 1] = m[1] * x + m[5] * y + m[9] * z + m[13];
54680
+ this._worldPositions[idx + 2] = m[2] * x + m[6] * y + m[10] * z + m[14];
54681
+ this.worldBoundBox.expandByPoint(new Vector3(this._worldPositions[idx + 0], this._worldPositions[idx + 1], this._worldPositions[idx + 2]));
54682
+ }
54683
+ this._centersSent = false;
54684
+ }
54685
+ /**
54686
+ * Schedule Web Worker-based sorting task
54687
+ * Uses the same logic as GSplatRenderer for consistency
54688
+ */
54689
+ scheduleOrder(viewMatrix) {
54690
+ if (this._validCount === 0) return;
54691
+ const transformChanged = this.object3D.transform.localChange;
54692
+ if (transformChanged || !this._worldPositions || this._worldPositions.length === 0) {
54693
+ this.updateWorldPositions();
54694
+ }
54695
+ const r = viewMatrix.rawData;
54696
+ const vx = r[2], vy = r[6], vz = r[10];
54697
+ const px = -(r[0] * r[12] + r[1] * r[13] + r[2] * r[14]);
54698
+ const py = -(r[4] * r[12] + r[5] * r[13] + r[6] * r[14]);
54699
+ const pz = -(r[8] * r[12] + r[9] * r[13] + r[10] * r[14]);
54700
+ const now = performance.now();
54701
+ const deltaTime = (now - this._lastSentTime) / 1e3;
54702
+ const posHash = Math.floor(px * 1e3) ^ Math.floor(py * 1e3) ^ Math.floor(pz * 1e3);
54703
+ const dirHash = Math.floor(vx * 1e3) ^ Math.floor(vy * 1e3) ^ Math.floor(vz * 1e3);
54704
+ const hash = posHash ^ dirHash;
54705
+ if (hash === this._lastViewMatrixHash && !transformChanged && this._centersSent) {
54706
+ return;
54707
+ }
54708
+ let effectiveThrottle = this._minIntervalMs;
54709
+ if (this._adaptiveSorting && this._minIntervalMs > 0) {
54710
+ const hashDelta = Math.abs(hash - this._lastViewMatrixHash);
54711
+ const speed = hashDelta / Math.max(deltaTime, 1e-3);
54712
+ if (speed < 1e3) {
54713
+ effectiveThrottle = this._minIntervalMs;
54714
+ } else if (speed < 1e4) {
54715
+ effectiveThrottle = this._minIntervalMs * 0.5;
54716
+ } else {
54717
+ effectiveThrottle = this._minIntervalMs * 0.2;
54718
+ }
54719
+ this._lastCameraSpeed = speed;
54720
+ }
54721
+ if (now - this._lastSentTime < effectiveThrottle) {
54722
+ return;
54723
+ }
54724
+ this._lastViewMatrixHash = hash;
54725
+ this._lastSentTime = now;
54726
+ if (!this._sortWorker) {
54727
+ this._sortWorker = this.createSortWorker();
54728
+ this._sortWorker.onmessage = (ev) => {
54729
+ const newOrder = ev.data.order;
54730
+ const oldOrder = this._orderData.buffer;
54731
+ this._sortWorker.postMessage({
54732
+ order: oldOrder
54733
+ }, [oldOrder]);
54734
+ const indices = new Uint32Array(newOrder);
54735
+ const total = this.size.x * this.size.y;
54736
+ const validCount = Math.min(this._validCount, indices.length);
54737
+ if (!this._orderData || this._orderData.length !== total) {
54738
+ this._orderData = new Uint32Array(total);
54739
+ }
54740
+ this._orderData.set(indices.subarray(0, validCount), 0);
54741
+ if (validCount < total) {
54742
+ const lastIndex = this._validCount > 0 ? this._validCount - 1 : 0;
54743
+ this._orderData.fill(lastIndex, validCount, total);
54744
+ }
54745
+ this.splatOrder.updateTexture(this.size.x, this.size.y, this._orderData);
54746
+ const valid = Math.max(0, Math.min(this._validCount, ev.data.count | 0));
54747
+ this.texParams[2] = valid;
54748
+ this.texParams[0] = valid;
54749
+ this._updateTexParams();
54750
+ const newInstanceCount = Math.ceil(valid / this._batchSize);
54751
+ this.instanceCount = newInstanceCount;
54752
+ };
54753
+ const centers = new Float32Array(this._validCount * 3);
54754
+ const worldPos = this._worldPositions || this._positions;
54755
+ let centerIdx = 0;
54756
+ for (let i = 0; i < this._validCount; i++) {
54757
+ if (this._splatSetFlags[i]) {
54758
+ const srcIdx = i * 3;
54759
+ centers[centerIdx * 3 + 0] = worldPos[srcIdx + 0];
54760
+ centers[centerIdx * 3 + 1] = worldPos[srcIdx + 1];
54761
+ centers[centerIdx * 3 + 2] = worldPos[srcIdx + 2];
54762
+ centerIdx++;
54763
+ }
54764
+ }
54765
+ const orderBuffer = new Uint32Array(this.totalCount);
54766
+ for (let i = 0; i < this.totalCount; i++) {
54767
+ orderBuffer[i] = i < this._validCount ? i : this._validCount > 0 ? this._validCount - 1 : 0;
54768
+ }
54769
+ this._sortWorker.postMessage({
54770
+ order: orderBuffer.buffer,
54771
+ centers: centers.buffer
54772
+ }, [orderBuffer.buffer, centers.buffer]);
54773
+ this._centersSent = true;
54774
+ }
54775
+ if (!this._centersSent && this._sortWorker) {
54776
+ const centers = new Float32Array(this._validCount * 3);
54777
+ const worldPos = this._worldPositions || this._positions;
54778
+ let centerIdx = 0;
54779
+ for (let i = 0; i < this._validCount; i++) {
54780
+ if (this._splatSetFlags[i]) {
54781
+ const srcIdx = i * 3;
54782
+ centers[centerIdx * 3 + 0] = worldPos[srcIdx + 0];
54783
+ centers[centerIdx * 3 + 1] = worldPos[srcIdx + 1];
54784
+ centers[centerIdx * 3 + 2] = worldPos[srcIdx + 2];
54785
+ centerIdx++;
54786
+ }
54787
+ }
54788
+ this._sortWorker.postMessage({
54789
+ type: "centers",
54790
+ centers: centers.buffer
54791
+ }, [centers.buffer]);
54792
+ this._centersSent = true;
54793
+ }
54794
+ this._sortWorker.postMessage({
54795
+ cameraPosition: { x: px, y: py, z: pz },
54796
+ cameraDirection: { x: -vx, y: -vy, z: -vz }
54797
+ });
54798
+ }
54799
+ /**
54800
+ * Create Web Worker for sorting
54801
+ * Uses the exact same logic as GSplatRenderer for consistency
54802
+ */
54803
+ createSortWorker() {
54804
+ function SortWorker() {
54805
+ const compareBits = 16;
54806
+ const bucketCount = 2 ** compareBits + 1;
54807
+ let order;
54808
+ let centers;
54809
+ let cameraPosition;
54810
+ let cameraDirection;
54811
+ let forceUpdate = false;
54812
+ const lastCameraPosition = { x: 0, y: 0, z: 0 };
54813
+ const lastCameraDirection = { x: 0, y: 0, z: 0 };
54814
+ const boundMin = { x: 0, y: 0, z: 0 };
54815
+ const boundMax = { x: 0, y: 0, z: 0 };
54816
+ let distances;
54817
+ let countBuffer;
54818
+ const binarySearch = (m, n, compare_fn) => {
54819
+ while (m <= n) {
54820
+ const k = n + m >> 1;
54821
+ const cmp = compare_fn(k);
54822
+ if (cmp > 0) {
54823
+ m = k + 1;
54824
+ } else if (cmp < 0) {
54825
+ n = k - 1;
54826
+ } else {
54827
+ return k;
54828
+ }
54829
+ }
54830
+ return ~m;
54831
+ };
54832
+ const update = () => {
54833
+ if (!order || !centers || !cameraPosition || !cameraDirection) return;
54834
+ const px = cameraPosition.x;
54835
+ const py = cameraPosition.y;
54836
+ const pz = cameraPosition.z;
54837
+ const dx = cameraDirection.x;
54838
+ const dy = cameraDirection.y;
54839
+ const dz = cameraDirection.z;
54840
+ const epsilon = 1e-3;
54841
+ if (!forceUpdate && Math.abs(px - lastCameraPosition.x) < epsilon && Math.abs(py - lastCameraPosition.y) < epsilon && Math.abs(pz - lastCameraPosition.z) < epsilon && Math.abs(dx - lastCameraDirection.x) < epsilon && Math.abs(dy - lastCameraDirection.y) < epsilon && Math.abs(dz - lastCameraDirection.z) < epsilon) {
54842
+ return;
54843
+ }
54844
+ forceUpdate = false;
54845
+ lastCameraPosition.x = px;
54846
+ lastCameraPosition.y = py;
54847
+ lastCameraPosition.z = pz;
54848
+ lastCameraDirection.x = dx;
54849
+ lastCameraDirection.y = dy;
54850
+ lastCameraDirection.z = dz;
54851
+ const numVertices = centers.length / 3;
54852
+ if (distances?.length !== numVertices) {
54853
+ distances = new Uint32Array(numVertices);
54854
+ }
54855
+ let minDist;
54856
+ let maxDist;
54857
+ for (let i = 0; i < 8; ++i) {
54858
+ const x = (i & 1 ? boundMin.x : boundMax.x) - px;
54859
+ const y = (i & 2 ? boundMin.y : boundMax.y) - py;
54860
+ const z = (i & 4 ? boundMin.z : boundMax.z) - pz;
54861
+ const d = x * dx + y * dy + z * dz;
54862
+ if (i === 0) {
54863
+ minDist = maxDist = d;
54864
+ } else {
54865
+ minDist = Math.min(minDist, d);
54866
+ maxDist = Math.max(maxDist, d);
54867
+ }
54868
+ }
54869
+ if (!countBuffer) {
54870
+ countBuffer = new Uint32Array(bucketCount);
54871
+ } else {
54872
+ countBuffer.fill(0);
54873
+ }
54874
+ const range = maxDist - minDist;
54875
+ const divider = range < 1e-6 ? 0 : 1 / range * 2 ** compareBits;
54876
+ for (let i = 0; i < numVertices; ++i) {
54877
+ const istride = i * 3;
54878
+ const x = centers[istride + 0] - px;
54879
+ const y = centers[istride + 1] - py;
54880
+ const z = centers[istride + 2] - pz;
54881
+ const d = x * dx + y * dy + z * dz;
54882
+ const sortKey = Math.floor((d - minDist) * divider);
54883
+ distances[i] = sortKey;
54884
+ countBuffer[sortKey]++;
54885
+ }
54886
+ for (let i = 1; i < bucketCount; i++) {
54887
+ countBuffer[i] += countBuffer[i - 1];
54888
+ }
54889
+ for (let i = 0; i < numVertices; i++) {
54890
+ const distance = distances[i];
54891
+ const destIndex = --countBuffer[distance];
54892
+ order[destIndex] = i;
54893
+ }
54894
+ const dist = (i) => distances[order[i]] / divider + minDist;
54895
+ const findZero = () => {
54896
+ const result = binarySearch(0, numVertices - 1, (i) => -dist(i));
54897
+ return Math.min(numVertices, Math.abs(result));
54898
+ };
54899
+ const count = dist(numVertices - 1) >= 0 ? findZero() : numVertices;
54900
+ self.postMessage({
54901
+ order: order.buffer,
54902
+ count
54903
+ }, [order.buffer]);
54904
+ order = null;
54905
+ };
54906
+ self.onmessage = (message) => {
54907
+ if (message.data.order) {
54908
+ order = new Uint32Array(message.data.order);
54909
+ }
54910
+ if (message.data.centers) {
54911
+ centers = new Float32Array(message.data.centers);
54912
+ boundMin.x = boundMax.x = centers[0];
54913
+ boundMin.y = boundMax.y = centers[1];
54914
+ boundMin.z = boundMax.z = centers[2];
54915
+ const numVertices = centers.length / 3;
54916
+ for (let i = 1; i < numVertices; ++i) {
54917
+ const x = centers[i * 3 + 0];
54918
+ const y = centers[i * 3 + 1];
54919
+ const z = centers[i * 3 + 2];
54920
+ boundMin.x = Math.min(boundMin.x, x);
54921
+ boundMin.y = Math.min(boundMin.y, y);
54922
+ boundMin.z = Math.min(boundMin.z, z);
54923
+ boundMax.x = Math.max(boundMax.x, x);
54924
+ boundMax.y = Math.max(boundMax.y, y);
54925
+ boundMax.z = Math.max(boundMax.z, z);
54926
+ }
54927
+ forceUpdate = true;
54928
+ }
54929
+ if (message.data.cameraPosition) cameraPosition = message.data.cameraPosition;
54930
+ if (message.data.cameraDirection) cameraDirection = message.data.cameraDirection;
54931
+ update();
54932
+ };
54933
+ }
54934
+ const code = `(${SortWorker.toString()})()`;
54935
+ const blob = new Blob([code], { type: "application/javascript" });
54936
+ const url = URL.createObjectURL(blob);
54937
+ return new Worker(url);
54938
+ }
54939
+ /**
54940
+ * Set visibility boost factor
54941
+ */
54942
+ setVisBoost(v) {
54943
+ this.texParams[3] = Math.max(0, v);
54944
+ }
54945
+ setCount(c) {
54946
+ this.texParams[0] = Math.max(0, c);
54947
+ }
54948
+ _updateTexParams() {
54949
+ this.gsplatMaterial.setTexParams(this.texParams);
54950
+ }
54951
+ /**
54952
+ * Set sort throttle interval (milliseconds)
54953
+ */
54954
+ setSortThrottle(ms) {
54955
+ this._minIntervalMs = Math.max(0, ms | 0);
54956
+ }
54957
+ /**
54958
+ * Enable/disable adaptive sorting
54959
+ */
54960
+ setAdaptiveSorting(enabled) {
54961
+ this._adaptiveSorting = enabled;
54962
+ }
54963
+ /**
54964
+ * Set pixel coverage culling thresholds
54965
+ */
54966
+ setPixelCulling(minPixels, maxPixels = 0, maxPixelCullDistance = 0) {
54967
+ this._minPixelCoverage = Math.max(0, minPixels);
54968
+ this._maxPixelCoverage = Math.max(0, maxPixels);
54969
+ this._maxPixelCullDistance = Math.max(0, maxPixelCullDistance);
54970
+ }
54971
+ /**
54972
+ * Get current pixel culling settings
54973
+ */
54974
+ getPixelCullingStats() {
54975
+ return {
54976
+ minPixels: this._minPixelCoverage,
54977
+ maxPixels: this._maxPixelCoverage,
54978
+ maxPixelCullDistance: this._maxPixelCullDistance,
54979
+ maxEnabled: this._maxPixelCoverage > 0,
54980
+ distanceEnabled: this._maxPixelCullDistance > 0
54981
+ };
54982
+ }
54983
+ /**
54984
+ * Get batching statistics
54985
+ */
54986
+ getBatchingStats() {
54987
+ return {
54988
+ enabled: true,
54989
+ batchSize: this._batchSize,
54990
+ instanceCount: this.instanceCount,
54991
+ splatCount: this._validCount,
54992
+ reduction: this._validCount > 0 ? (1 - this.instanceCount / this._validCount) * 100 : 0
54993
+ };
54994
+ }
54995
+ /**
54996
+ * Calculate texture size for given splat count
54997
+ */
54998
+ evalTextureSize(count) {
54999
+ let w = Math.ceil(Math.sqrt(count));
55000
+ const align = 64;
55001
+ w = Math.ceil(w / align) * align;
55002
+ const h = Math.ceil(count / w);
55003
+ return new Vector2(w, h);
55004
+ }
55005
+ /**
55006
+ * Update node before rendering
55007
+ */
55008
+ nodeUpdate(view, passType, renderPassState, clusterLightingBuffer) {
55009
+ if (this._pendingUpdates.size > 0 && this._frameCount >= 60) {
55010
+ this.flushUpdates();
55011
+ }
55012
+ if (this._frameCount >= 60 && this._pendingUpdates.size === 0) {
55013
+ this._frameCount = 0;
55014
+ }
55015
+ this._frameCount++;
55016
+ const worldMatrix = this.object3D.transform.worldMatrix;
55017
+ this.gsplatMaterial.setTransformMatrix(worldMatrix);
55018
+ const currentParams = `${this._minPixelCoverage},${this._maxPixelCoverage},${this._maxPixelCullDistance},${this._batchSize}`;
55019
+ if (currentParams !== this._lastPixelCullParams) {
55020
+ this.gsplatMaterial.setPixelCulling(this._minPixelCoverage, this._maxPixelCoverage, this._maxPixelCullDistance, this._batchSize);
55021
+ this._lastPixelCullParams = currentParams;
55022
+ }
55023
+ if (!this._texturesInitialized) {
55024
+ this.gsplatMaterial.setSplatTextures(
55025
+ this.splatColor,
55026
+ this.transformA,
55027
+ this.transformB,
55028
+ this.texParams,
55029
+ this.splatOrder
55030
+ );
55031
+ this._texturesInitialized = true;
55032
+ }
55033
+ super.nodeUpdate(view, passType, renderPassState, clusterLightingBuffer);
55034
+ }
55035
+ /**
55036
+ * Render pass
55037
+ */
55038
+ renderPass(view, passType, renderContext) {
55039
+ const encoder = renderContext.encoder;
55040
+ for (let mat of this.materials) {
55041
+ const passes = mat.getPass(passType);
55042
+ if (!passes || passes.length === 0) continue;
55043
+ for (const pass of passes) {
55044
+ if (!pass.pipeline) continue;
55045
+ pass.apply(this.geometry, renderContext.rendererPassState || renderContext);
55046
+ GPUContext.bindPipeline(encoder, pass);
55047
+ GPUContext.bindGeometryBuffer(encoder, this.geometry);
55048
+ const subGeometry = this.geometry.subGeometries[0];
55049
+ const lodInfo = subGeometry.lodLevels[0];
55050
+ if (this.instanceCount > 0) {
55051
+ GPUContext.drawIndexed(
55052
+ encoder,
55053
+ lodInfo.indexCount,
55054
+ this.instanceCount,
55055
+ lodInfo.indexStart,
55056
+ 0,
55057
+ 0
55058
+ );
55059
+ } else {
55060
+ GPUContext.drawIndexed(
55061
+ encoder,
55062
+ lodInfo.indexCount,
55063
+ 1,
55064
+ lodInfo.indexStart,
55065
+ 0,
55066
+ 0
55067
+ );
55068
+ }
55069
+ }
55070
+ }
55071
+ }
55072
+ /**
55073
+ * Clean up resources
55074
+ */
55075
+ destroy(force) {
55076
+ if (this._sortWorker) {
55077
+ this._sortWorker.terminate();
55078
+ this._sortWorker = null;
55079
+ }
55080
+ if (this.splatColor) {
55081
+ this.splatColor.destroy(force);
55082
+ this.splatColor = null;
55083
+ }
55084
+ if (this.transformA) {
55085
+ this.transformA.destroy(force);
55086
+ this.transformA = null;
55087
+ }
55088
+ if (this.transformB) {
55089
+ this.transformB.destroy(force);
55090
+ this.transformB = null;
55091
+ }
55092
+ if (this.splatOrder) {
55093
+ this.splatOrder.destroy(force);
55094
+ this.splatOrder = null;
55095
+ }
55096
+ this._positions = null;
55097
+ this._worldPositions = null;
55098
+ this._orderData = null;
55099
+ this._colorData = null;
55100
+ this._transformAData = null;
55101
+ this._transformBData = null;
55102
+ this.texParams = null;
55103
+ this._splatSetFlags = null;
55104
+ this._pendingUpdates.clear();
55105
+ super.destroy(force);
55106
+ }
55107
+ };
55108
+ GSplatStreamRenderer = __decorateClass$7([
55109
+ RegisterComponent(GSplatStreamRenderer, "GSplatStreamRenderer")
55110
+ ], GSplatStreamRenderer);
55111
+
54347
55112
  class Probe extends Object3D {
54348
55113
  index = 0;
54349
55114
  drawCallFrame = -1;
@@ -59823,6 +60588,127 @@ class LoaderManager extends CEventDispatcher {
59823
60588
  }
59824
60589
  }
59825
60590
 
60591
+ class StreamLoader extends LoaderBase {
60592
+ /**
60593
+ * Load resource with streaming support
60594
+ * @param url Resource URL
60595
+ * @param parserClass Parser class that supports streaming
60596
+ * @param loaderFunctions Optional loader callbacks
60597
+ * @param userData Optional user data
60598
+ * @returns Promise that resolves when initial data is ready (header parsed), includes cancel method
60599
+ */
60600
+ async loadStream(url, parserClass, loaderFunctions, userData) {
60601
+ if (parserClass.format !== ParserFormat.BIN) {
60602
+ throw new Error("StreamLoader only supports BIN format parsers");
60603
+ }
60604
+ return new Promise(async (succ, fail) => {
60605
+ let aborted = false;
60606
+ let reader = null;
60607
+ let abortController = null;
60608
+ const cancel = () => {
60609
+ aborted = true;
60610
+ if (reader) {
60611
+ reader.cancel().catch(() => {
60612
+ });
60613
+ reader.releaseLock();
60614
+ }
60615
+ if (abortController) {
60616
+ abortController.abort();
60617
+ }
60618
+ if (parser && typeof parser.cancel === "function") {
60619
+ parser.cancel();
60620
+ }
60621
+ };
60622
+ let parser = null;
60623
+ try {
60624
+ this.baseUrl = url.substring(0, url.lastIndexOf("/") + 1);
60625
+ this.initUrl = url;
60626
+ abortController = new AbortController();
60627
+ const response = await fetch(url, {
60628
+ headers: loaderFunctions?.headers,
60629
+ signal: abortController.signal
60630
+ });
60631
+ if (!response.ok) {
60632
+ throw new Error(`Request rejected with status ${response.status}`);
60633
+ }
60634
+ reader = response.body.getReader();
60635
+ const contentLength = +response.headers.get("Content-Length") || 0;
60636
+ parser = new parserClass();
60637
+ parser.userData = userData;
60638
+ parser.baseUrl = this.baseUrl;
60639
+ parser.initUrl = url;
60640
+ parser.loaderFunctions = loaderFunctions;
60641
+ if (typeof parser.initStream !== "function") {
60642
+ throw new Error(`Parser ${parserClass.name} does not support streaming. Implement initStream() method.`);
60643
+ }
60644
+ let parserResolved = false;
60645
+ await parser.initStream(contentLength, () => {
60646
+ if (!parserResolved && !aborted && parser && parser.verification()) {
60647
+ parserResolved = true;
60648
+ succ({ parser, cancel });
60649
+ }
60650
+ });
60651
+ let receivedLength = 0;
60652
+ while (!aborted) {
60653
+ const { done, value } = await reader.read();
60654
+ if (done || aborted) {
60655
+ if (!aborted) {
60656
+ if (typeof parser.finalizeStream === "function") {
60657
+ await parser.finalizeStream();
60658
+ }
60659
+ if (!parserResolved && parser) {
60660
+ if (parser.verification()) {
60661
+ parserResolved = true;
60662
+ succ({ parser, cancel });
60663
+ } else {
60664
+ throw new Error("Parser verification failed");
60665
+ }
60666
+ }
60667
+ }
60668
+ break;
60669
+ }
60670
+ if (aborted) break;
60671
+ receivedLength += value.length;
60672
+ if (contentLength > 0 && loaderFunctions?.onProgress && !aborted) {
60673
+ loaderFunctions.onProgress.call(
60674
+ this,
60675
+ receivedLength,
60676
+ contentLength,
60677
+ url,
60678
+ parser
60679
+ );
60680
+ }
60681
+ if (!aborted && typeof parser.processChunk === "function") {
60682
+ await parser.processChunk(value, receivedLength, contentLength);
60683
+ }
60684
+ if (!parserResolved && !aborted && parser && parser.verification()) {
60685
+ parserResolved = true;
60686
+ succ({ parser, cancel });
60687
+ }
60688
+ }
60689
+ if (!aborted && loaderFunctions?.onComplete) {
60690
+ loaderFunctions.onComplete.call(this, url);
60691
+ }
60692
+ } catch (e) {
60693
+ if (aborted) {
60694
+ return;
60695
+ }
60696
+ if (loaderFunctions?.onError) {
60697
+ loaderFunctions.onError(e);
60698
+ }
60699
+ fail(e);
60700
+ } finally {
60701
+ if (reader && !aborted) {
60702
+ try {
60703
+ reader.releaseLock();
60704
+ } catch {
60705
+ }
60706
+ }
60707
+ }
60708
+ });
60709
+ }
60710
+ }
60711
+
59826
60712
  function computeAABBFromPositions(position) {
59827
60713
  const min = [Infinity, Infinity, Infinity];
59828
60714
  const max = [-Infinity, -Infinity, -Infinity];
@@ -61041,6 +61927,314 @@ function parsePlyPointCloudASCII(buffer, header) {
61041
61927
  };
61042
61928
  }
61043
61929
 
61930
+ class PlyStreamParser {
61931
+ _header = null;
61932
+ _headerBuffer = new Uint8Array(4096);
61933
+ _headerLength = 0;
61934
+ _headerParsed = false;
61935
+ // Data parsing state
61936
+ _dataBuffer = null;
61937
+ _dataOffset = 0;
61938
+ _processedVertices = 0;
61939
+ _vertexStride = 0;
61940
+ _propOffsets = [];
61941
+ _properties = [];
61942
+ // Callbacks
61943
+ _onHeaderParsed = null;
61944
+ _onSplatParsed = null;
61945
+ _batchSize = 1e3;
61946
+ _cancelled = false;
61947
+ constructor(onHeaderParsed, onSplatParsed, batchSize = 1e3) {
61948
+ this._onHeaderParsed = onHeaderParsed;
61949
+ this._onSplatParsed = onSplatParsed;
61950
+ this._batchSize = batchSize;
61951
+ }
61952
+ /**
61953
+ * Process incoming data chunk
61954
+ */
61955
+ processChunk(chunk) {
61956
+ if (this._cancelled) return;
61957
+ if (!this._headerParsed) {
61958
+ this._processHeaderChunk(chunk);
61959
+ } else {
61960
+ this._processDataChunk(chunk);
61961
+ }
61962
+ }
61963
+ /**
61964
+ * Cancel parsing
61965
+ * Stops processing new chunks
61966
+ */
61967
+ cancel() {
61968
+ this._cancelled = true;
61969
+ }
61970
+ /**
61971
+ * Check if parsing is cancelled
61972
+ */
61973
+ isCancelled() {
61974
+ return this._cancelled;
61975
+ }
61976
+ /**
61977
+ * Process header chunk
61978
+ */
61979
+ _processHeaderChunk(chunk) {
61980
+ const needed = this._headerLength + chunk.length;
61981
+ if (needed > this._headerBuffer.length) {
61982
+ const newBuffer = new Uint8Array(Math.max(needed, this._headerBuffer.length * 2));
61983
+ newBuffer.set(this._headerBuffer.subarray(0, this._headerLength));
61984
+ this._headerBuffer = newBuffer;
61985
+ }
61986
+ this._headerBuffer.set(chunk, this._headerLength);
61987
+ this._headerLength += chunk.length;
61988
+ const headerText = new TextDecoder("utf-8").decode(
61989
+ this._headerBuffer.subarray(0, this._headerLength)
61990
+ );
61991
+ const headerEnd = headerText.indexOf("end_header\n");
61992
+ if (headerEnd >= 0) {
61993
+ const headerEndPos = headerEnd + "end_header\n".length;
61994
+ const headerBuffer = this._headerBuffer.subarray(0, headerEndPos);
61995
+ const headerArrayBuffer = headerBuffer.buffer.slice(headerBuffer.byteOffset, headerBuffer.byteOffset + headerBuffer.byteLength);
61996
+ const header = this._parseHeader(headerArrayBuffer);
61997
+ this._header = header;
61998
+ this._headerParsed = true;
61999
+ this._initializeDataParsing(header);
62000
+ if (this._onHeaderParsed) {
62001
+ this._onHeaderParsed(header);
62002
+ }
62003
+ const chunkStartInHeader = this._headerLength - chunk.length;
62004
+ const remainingStartInChunk = headerEndPos - chunkStartInHeader;
62005
+ if (remainingStartInChunk > 0 && remainingStartInChunk < chunk.length) {
62006
+ const remainingChunk = chunk.subarray(remainingStartInChunk);
62007
+ this._processDataChunk(remainingChunk);
62008
+ } else if (remainingStartInChunk === 0) {
62009
+ this._processDataChunk(chunk);
62010
+ }
62011
+ }
62012
+ }
62013
+ /**
62014
+ * Parse PLY header from buffer
62015
+ */
62016
+ _parseHeader(buffer) {
62017
+ const ascii = new TextDecoder("utf-8").decode(new Uint8Array(buffer));
62018
+ const headerEnd = ascii.indexOf("end_header\n");
62019
+ if (headerEnd < 0) {
62020
+ throw new Error("PLY: Invalid PLY header");
62021
+ }
62022
+ const headerText = ascii.substring(0, headerEnd + "end_header\n".length);
62023
+ const lines = headerText.split(/\r?\n/);
62024
+ let format = "";
62025
+ let vertexCount = 0;
62026
+ let faceCount = 0;
62027
+ const properties = [];
62028
+ const faceProperties = [];
62029
+ const textureFiles = [];
62030
+ let inVertexElement = false;
62031
+ let inFaceElement = false;
62032
+ for (const line of lines) {
62033
+ if (line.startsWith("format ")) {
62034
+ format = line.split(/\s+/)[1];
62035
+ } else if (line.startsWith("comment TextureFile ")) {
62036
+ const texturePath = line.substring("comment TextureFile ".length).trim();
62037
+ if (texturePath) {
62038
+ textureFiles.push(texturePath);
62039
+ }
62040
+ } else if (line.startsWith("element ")) {
62041
+ const toks = line.split(/\s+/);
62042
+ inVertexElement = toks[1] === "vertex";
62043
+ inFaceElement = toks[1] === "face";
62044
+ if (inVertexElement) {
62045
+ vertexCount = parseInt(toks[2]);
62046
+ inFaceElement = false;
62047
+ }
62048
+ if (inFaceElement) {
62049
+ faceCount = parseInt(toks[2]);
62050
+ inVertexElement = false;
62051
+ }
62052
+ } else if (inVertexElement && line.startsWith("property ")) {
62053
+ const toks = line.split(/\s+/);
62054
+ const type = toks[1];
62055
+ const name = toks[2];
62056
+ properties.push({ name, type });
62057
+ } else if (inFaceElement && line.startsWith("property ")) {
62058
+ const toks = line.split(/\s+/);
62059
+ if (toks[1] === "list") {
62060
+ const countType = toks[2];
62061
+ const itemType = toks[3];
62062
+ const name = toks[4];
62063
+ faceProperties.push({ name, type: `list ${countType} ${itemType}` });
62064
+ } else {
62065
+ const type = toks[1];
62066
+ const name = toks[2];
62067
+ faceProperties.push({ name, type });
62068
+ }
62069
+ }
62070
+ }
62071
+ if (format !== "binary_little_endian" && format !== "ascii") {
62072
+ throw new Error(`PLY: Unsupported format: ${format}`);
62073
+ }
62074
+ let splatPropertyCount = 0;
62075
+ let splatPropertyColorCount = 0;
62076
+ for (const property of properties) {
62077
+ if (splatProperties.includes(property.name)) {
62078
+ splatPropertyCount++;
62079
+ }
62080
+ if (splatColorProperties.includes(property.name)) {
62081
+ splatPropertyColorCount++;
62082
+ }
62083
+ }
62084
+ let mode;
62085
+ if (faceCount > 0) {
62086
+ mode = PlyMode.Mesh;
62087
+ } else if (splatPropertyCount === splatProperties.length && splatPropertyColorCount === 3) {
62088
+ mode = PlyMode.Splat;
62089
+ } else {
62090
+ mode = PlyMode.PointCloud;
62091
+ }
62092
+ return {
62093
+ format,
62094
+ vertexCount,
62095
+ faceCount,
62096
+ properties,
62097
+ faceProperties: faceProperties.length > 0 ? faceProperties : void 0,
62098
+ textureFiles,
62099
+ headerByteLength: headerText.length,
62100
+ mode
62101
+ };
62102
+ }
62103
+ /**
62104
+ * Initialize data parsing structures
62105
+ */
62106
+ _initializeDataParsing(header) {
62107
+ this._properties = header.properties;
62108
+ this._propOffsets = [];
62109
+ this._vertexStride = 0;
62110
+ for (const p of this._properties) {
62111
+ this._propOffsets.push(this._vertexStride);
62112
+ this._vertexStride += byteSizeOfType(p.type);
62113
+ }
62114
+ const estimatedSize = header.vertexCount * this._vertexStride;
62115
+ this._dataBuffer = new Uint8Array(Math.min(estimatedSize, 1024 * 1024 * 10));
62116
+ this._dataOffset = 0;
62117
+ this._processedVertices = 0;
62118
+ }
62119
+ /**
62120
+ * Process data chunk
62121
+ */
62122
+ _processDataChunk(chunk) {
62123
+ if (!this._header || !this._dataBuffer) return;
62124
+ const needed = this._dataOffset + chunk.length;
62125
+ if (needed > this._dataBuffer.length) {
62126
+ const newSize = Math.max(needed, this._dataBuffer.length * 2);
62127
+ const newBuffer = new Uint8Array(newSize);
62128
+ newBuffer.set(this._dataBuffer);
62129
+ this._dataBuffer = newBuffer;
62130
+ }
62131
+ this._dataBuffer.set(chunk, this._dataOffset);
62132
+ this._dataOffset += chunk.length;
62133
+ this._parseVertices();
62134
+ }
62135
+ /**
62136
+ * Parse vertices from current data buffer
62137
+ */
62138
+ _parseVertices() {
62139
+ if (!this._header || !this._dataBuffer) return;
62140
+ const payload = new DataView(this._dataBuffer.buffer, this._dataBuffer.byteOffset, this._dataBuffer.byteLength);
62141
+ const vertexCount = this._header.vertexCount;
62142
+ const has = (n) => this._properties.find((p) => p.name === n) != null;
62143
+ const propIndex = (n) => this._properties.findIndex((p) => p.name === n);
62144
+ while (this._processedVertices < vertexCount && !this._cancelled) {
62145
+ const v = this._processedVertices;
62146
+ const vOffset = v * this._vertexStride;
62147
+ if (vOffset + this._vertexStride > this._dataOffset) {
62148
+ break;
62149
+ }
62150
+ if (this._cancelled) {
62151
+ break;
62152
+ }
62153
+ const ix = propIndex("x");
62154
+ const iy = propIndex("y");
62155
+ const iz = propIndex("z");
62156
+ if (ix < 0 || iy < 0 || iz < 0) {
62157
+ throw new Error("PLY: Missing required x/y/z properties for vertex");
62158
+ }
62159
+ const splatData = {
62160
+ position: [
62161
+ readByType(payload, vOffset + this._propOffsets[ix], this._properties[ix].type),
62162
+ readByType(payload, vOffset + this._propOffsets[iy], this._properties[iy].type),
62163
+ readByType(payload, vOffset + this._propOffsets[iz], this._properties[iz].type)
62164
+ ]
62165
+ };
62166
+ if (has("scale_0")) {
62167
+ splatData.scale = [
62168
+ readByType(payload, vOffset + this._propOffsets[propIndex("scale_0")], this._properties[propIndex("scale_0")].type),
62169
+ readByType(payload, vOffset + this._propOffsets[propIndex("scale_1")], this._properties[propIndex("scale_1")].type),
62170
+ readByType(payload, vOffset + this._propOffsets[propIndex("scale_2")], this._properties[propIndex("scale_2")].type)
62171
+ ];
62172
+ }
62173
+ if (has("rot_0")) {
62174
+ const w = readByType(payload, vOffset + this._propOffsets[propIndex("rot_0")], this._properties[propIndex("rot_0")].type);
62175
+ const x = readByType(payload, vOffset + this._propOffsets[propIndex("rot_1")], this._properties[propIndex("rot_1")].type);
62176
+ const y = readByType(payload, vOffset + this._propOffsets[propIndex("rot_2")], this._properties[propIndex("rot_2")].type);
62177
+ const z = readByType(payload, vOffset + this._propOffsets[propIndex("rot_3")], this._properties[propIndex("rot_3")].type);
62178
+ splatData.rotation = [x, y, z, w];
62179
+ }
62180
+ if (has("opacity")) {
62181
+ splatData.opacity = readByType(payload, vOffset + this._propOffsets[propIndex("opacity")], this._properties[propIndex("opacity")].type);
62182
+ }
62183
+ const dcIdx = [propIndex("f_dc_0"), propIndex("f_dc_1"), propIndex("f_dc_2")];
62184
+ if (dcIdx[0] >= 0 && dcIdx[1] >= 0 && dcIdx[2] >= 0) {
62185
+ const restIndices = [];
62186
+ for (let i = 0; i < this._properties.length; i++) {
62187
+ if (this._properties[i].name.startsWith("f_rest_")) restIndices.push(i);
62188
+ }
62189
+ const coeffsPerColor = 1 + restIndices.length / 3;
62190
+ const coeffs = new Float32Array(coeffsPerColor * 3);
62191
+ coeffs[0] = readByType(payload, vOffset + this._propOffsets[dcIdx[0]], this._properties[dcIdx[0]].type);
62192
+ coeffs[coeffsPerColor + 0] = readByType(payload, vOffset + this._propOffsets[dcIdx[1]], this._properties[dcIdx[1]].type);
62193
+ coeffs[2 * coeffsPerColor + 0] = readByType(payload, vOffset + this._propOffsets[dcIdx[2]], this._properties[dcIdx[2]].type);
62194
+ let rPtr = 1;
62195
+ let gPtr = 1;
62196
+ let bPtr = 1;
62197
+ for (let i = 0; i < restIndices.length; i += 3) {
62198
+ const ri = restIndices[i + 0];
62199
+ const gi = restIndices[i + 1];
62200
+ const bi = restIndices[i + 2];
62201
+ coeffs[rPtr] = readByType(payload, vOffset + this._propOffsets[ri], this._properties[ri].type);
62202
+ coeffs[coeffsPerColor + gPtr] = readByType(payload, vOffset + this._propOffsets[gi], this._properties[gi].type);
62203
+ coeffs[2 * coeffsPerColor + bPtr] = readByType(payload, vOffset + this._propOffsets[bi], this._properties[bi].type);
62204
+ rPtr++;
62205
+ gPtr++;
62206
+ bPtr++;
62207
+ }
62208
+ splatData.sh = {
62209
+ order: Math.floor(Math.sqrt(coeffsPerColor)),
62210
+ coeffs
62211
+ };
62212
+ }
62213
+ if (this._onSplatParsed) {
62214
+ this._onSplatParsed(splatData, v);
62215
+ }
62216
+ this._processedVertices++;
62217
+ if (this._processedVertices % this._batchSize === 0) {
62218
+ setTimeout(() => {
62219
+ this._parseVertices();
62220
+ }, 0);
62221
+ return;
62222
+ }
62223
+ }
62224
+ }
62225
+ /**
62226
+ * Get current parsing progress
62227
+ */
62228
+ getProgress() {
62229
+ const total = this._header?.vertexCount || 0;
62230
+ return {
62231
+ processed: this._processedVertices,
62232
+ total,
62233
+ percentage: total > 0 ? this._processedVertices / total * 100 : 0
62234
+ };
62235
+ }
62236
+ }
62237
+
61044
62238
  class GaussianSplatParser extends ParserBase {
61045
62239
  static format = ParserFormat.BIN;
61046
62240
  async parseBuffer(buffer) {
@@ -61076,6 +62270,95 @@ class GaussianSplatParser extends ParserBase {
61076
62270
  }
61077
62271
  }
61078
62272
 
62273
+ class StreamingGaussianSplatParser extends ParserBase {
62274
+ static format = ParserFormat.BIN;
62275
+ _streamParser = null;
62276
+ _streamingRenderer = null;
62277
+ _rendererObject = null;
62278
+ _chunksPerBatch = 1e3;
62279
+ // Number of splats to process per batch
62280
+ _headerParsed = false;
62281
+ _onHeaderParsed = null;
62282
+ _cancelled = false;
62283
+ /**
62284
+ * Initialize streaming parser
62285
+ * @param contentLength Total content length (if known)
62286
+ * @param onHeaderParsed Optional callback when header is parsed (parser is ready)
62287
+ */
62288
+ async initStream(contentLength, onHeaderParsed) {
62289
+ this._onHeaderParsed = onHeaderParsed || null;
62290
+ this._rendererObject = new Object3D();
62291
+ this._rendererObject.name = "StreamingGaussianSplat";
62292
+ this._streamingRenderer = this._rendererObject.addComponent(GSplatStreamRenderer);
62293
+ this._streamParser = new PlyStreamParser(
62294
+ (header) => {
62295
+ if (this._streamingRenderer) {
62296
+ this._streamingRenderer.initCount(header.vertexCount);
62297
+ }
62298
+ if (this._rendererObject) {
62299
+ this.data = this._rendererObject;
62300
+ }
62301
+ this._headerParsed = true;
62302
+ if (this._onHeaderParsed) {
62303
+ this._onHeaderParsed();
62304
+ }
62305
+ },
62306
+ (splatData, index) => {
62307
+ if (this._streamingRenderer) {
62308
+ this._streamingRenderer.setSplatData(index, splatData);
62309
+ }
62310
+ },
62311
+ this._chunksPerBatch
62312
+ );
62313
+ }
62314
+ /**
62315
+ * Process incoming data chunk
62316
+ * @param chunk Data chunk
62317
+ * @param receivedLength Total bytes received so far
62318
+ * @param contentLength Total content length (if known)
62319
+ */
62320
+ async processChunk(chunk, receivedLength, contentLength) {
62321
+ if (this._cancelled || !this._streamParser) return;
62322
+ this._streamParser.processChunk(chunk);
62323
+ }
62324
+ /**
62325
+ * Cancel streaming loading
62326
+ * Stops processing new chunks and cleans up resources
62327
+ */
62328
+ cancel() {
62329
+ this._cancelled = true;
62330
+ if (this._streamParser) {
62331
+ this._streamParser.cancel();
62332
+ }
62333
+ }
62334
+ /**
62335
+ * Check if loading is cancelled
62336
+ */
62337
+ isCancelled() {
62338
+ return this._cancelled;
62339
+ }
62340
+ /**
62341
+ * Finalize streaming parsing
62342
+ */
62343
+ async finalizeStream() {
62344
+ if (this._rendererObject) {
62345
+ this.data = this._rendererObject;
62346
+ }
62347
+ }
62348
+ /**
62349
+ * Get parsing progress
62350
+ */
62351
+ getProgress() {
62352
+ if (this._streamParser) {
62353
+ return this._streamParser.getProgress();
62354
+ }
62355
+ return { processed: 0, total: 0, percentage: 0 };
62356
+ }
62357
+ verification() {
62358
+ return this._headerParsed && !!this.data && !!this._streamingRenderer;
62359
+ }
62360
+ }
62361
+
61079
62362
  var GeoType = /* @__PURE__ */ ((GeoType2) => {
61080
62363
  GeoType2["Point"] = "Point";
61081
62364
  GeoType2["LineString"] = "LineString";
@@ -71686,4 +72969,4 @@ const __viteBrowserExternal = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.def
71686
72969
  __proto__: null
71687
72970
  }, Symbol.toStringTag, { value: 'Module' }));
71688
72971
 
71689
- export { AccelerateDecelerateInterpolator, AccelerateInterpolator, AnimationCurve, AnimationCurveT, AnimationMonitor, AnimatorComponent, AnimatorEventKeyframe, AnticipateInterpolator, AnticipateOvershootInterpolator, ArrayHas, ArrayItemIndex, AtlasParser, AtmosphericComponent, AtmosphericScatteringSky, AtmosphericScatteringSkySetting, AtmosphericScatteringSky_shader, AttributeAnimCurve, AxisObject, B3DMLoader, B3DMLoaderBase, B3DMParseUtil, B3DMParser, BRDFLUT, BRDFLUTGenerate, BRDF_frag, BatchTable, BiMap, BillboardComponent, BillboardType, BitUtil, BitmapTexture2D, BitmapTexture2DArray, BitmapTextureCube, Blend, BlendFactor, BlendMode, BlendShapeData, BlendShapePropertyData, BloomPost, BlurEffectCreatorBlur_cs, BlurEffectCreatorSample_cs, BlurTexture2DBufferCreator, BounceInterpolator, BoundUtil, BoundingBox, BoundingSphere, BoundingVolume, BoxColliderShape, BoxGeometry, BrdfLut_frag, BsDF_frag, BxDF_frag, BxdfDebug_frag, BytesArray, CEvent, CEventDispatcher, CEventListener, CResizeEvent, CSM, Camera3D, CameraControllerBase, CameraType, CameraUtil, CapsuleColliderShape, CastPointShadowMaterialPass, CastShadowMaterialPass, Clearcoat_frag, ClusterBoundsSource_cs, ClusterConfig, ClusterDebug_frag, ClusterLight, ClusterLightingBuffer, ClusterLightingRender, ClusterLighting_cs, CollectInfo, ColliderComponent, ColliderShape, ColliderShapeType, Color, ColorGradient, ColorLitMaterial, ColorLitShader, ColorPassFragmentOutput, ColorPassRenderer, ColorUtil, ComData, Combine_cs, Common_frag, Common_vert, ComponentBase, ComponentCollect, ComputeGPUBuffer, ComputeShader, Context3D, CubeCamera, CubeMapFaceEnum, CubeSky_Shader, CubicBezierCurve, CubicBezierPath, CubicBezierType, CycleInterpolator, CylinderGeometry, DDGIIrradianceComputePass, DDGIIrradianceGPUBufferReader, DDGIIrradianceVolume, DDGIIrradiance_shader, DDGILightingPass, DDGILighting_shader, DDGIMultiBouncePass, DDGIProbeRenderer, DEGREES_TO_RADIANS, DRACO_DECODER_GLTF_JS, DecelerateInterpolator, Denoising_cs, Depth2DTextureArray, DepthCubeArrayTexture, DepthMaterialPass, DepthOfFieldPost, DepthOfView_cs, DirectLight, DoubleArray, EditorInspector, Engine3D, Entity, EntityBatchCollect, EntityCollect, EnvMap_frag, ErpImage2CubeMap, ErpImage2CubeMapCreateCube_cs, ErpImage2CubeMapRgbe2rgba_cs, ExtrudeGeometry, FAILED, FASTFLOOR, FXAAPost, FXAAShader, FastMathShader, FatLineGeometry, FatLineMaterial, FatLineRenderer, FatLineShader, FatLine_FS, FatLine_VS, FeatureTable, FileLoader, FirstPersonCameraController, Float16ArrayTexture, Float32ArrayTexture, FlyCameraController, FontChar, FontInfo, FontPage, FontParser, ForwardRenderJob, FragmentOutput, FragmentVarying, FrameCache, Frustum, FrustumCSM, FrustumCulling_cs, FullQuad_vert_wgsl, GBufferFrame, GBufferPass, GBufferPost, GBufferStand, GBuffer_pass, GILighting, GIProbeMaterial, GIProbeMaterialType, GIProbeShader, GIRenderCompleteEvent, GIRenderStartEvent, GLBChunk, GLBHeader, GLBParser, GLSLLexer, GLSLLexerToken, GLSLPreprocessor, GLSLSyntax, GLTFBinaryExtension, GLTFMaterial, GLTFParser, GLTFSubParser, GLTFSubParserCamera, GLTFSubParserConverter, GLTFSubParserMaterial, GLTFSubParserMesh, GLTFSubParserSkeleton, GLTFSubParserSkin, GLTFType, GLTF_Accessors, GLTF_Info, GLTF_Light, GLTF_Mesh, GLTF_Node, GLTF_Primitives, GLTF_Scene, GPUAddressMode, GPUBlendFactor, GPUBufferBase, GPUBufferType, GPUCompareFunction, GPUContext, GPUCullMode, GPUFilterMode, GPUPrimitiveTopology, GPUTextureFormat, GPUVertexFormat, GPUVertexStepMode, GSplatFormat, GSplatGeometry, GSplatMaterial, GSplatRenderer, GSplatShader, GSplat_FS, GSplat_VS, GTAOPost, GTAO_cs, GUIAtlasTexture, GUICanvas, GUIConfig, GUIGeometry, GUIGeometryRebuild, GUIMaterial, GUIPassRenderer, GUIPick, GUIPickHelper, GUIQuad, GUIQuadAttrEnum, GUIRenderer, GUIShader, GUISpace, GUISprite, GUITexture, GaussianSplatParser, GenerayRandomDir, GeoJsonParser, GeoJsonUtil, GeoType, GeometryBase, GeometryIndicesBuffer, GeometryUtil, GeometryVertexBuffer, GeometryVertexType, GetComponentClass, GetCountInstanceID, GetRepeat, GetShader, GlassShader, GlobalBindGroup, GlobalBindGroupLayout, GlobalFog, GlobalFog_shader, GlobalIlluminationComponent, GlobalUniform, GlobalUniformGroup, GodRayPost, GodRay_cs, GridObject, HDRTexture, HDRTextureCube, Hair_frag, Hair_shader_op, Hair_shader_tr, HaltonSeq, Horizontal, HoverCameraController, I3DMLoader, I3DMLoaderBase, I3DMParser, IBLEnvMapCreator, IBLEnvMapCreator_cs, IESProfiles, IESProfiles_frag, IKDTreeUserData, ImageType, IndicesGPUBuffer, Inline_vert, InputSystem, InstanceDrawComponent, InstanceUniform, InstancedMesh, Interpolator, InterpolatorEnum, IrradianceDataReaderCompleteEvent, IrradianceVolumeData_frag, Irradiance_frag, IsEditorInspector, IsNonSerialize, Joint, JointPose, JumperInterpolator, KDTreeEntity, KDTreeNode, KDTreeRange, KDTreeSpace, KDTreeUUID, KHR_draco_mesh_compression, KHR_lights_punctual, KHR_materials_clearcoat, KHR_materials_emissive_strength, KHR_materials_ior, KHR_materials_unlit, KMZParser, KV, KelvinUtil, KeyCode, KeyEvent, Keyframe, KeyframeT, LASLoader, LASParser, LASUtils, LASVisualizationMode, LDRTextureCube, LOADED, LOADING, LRUCache, LambertMaterial, Lambert_shader, Light, LightBase, LightData, LightEntries, LightType, LightingFunction_frag, Line, LineClassification, LinearInterpolator, LitMaterial, LitSSSShader, LitShader, Lit_shader, LoaderBase, LoaderEvent, LoaderManager, MAX_VALUE, MIN_VALUE, Material, MaterialDataUniformGPUBuffer, MaterialUtilities, MathShader, MathUtil, Matrix3, Matrix4, MatrixBindGroup, MatrixGPUBuffer, MatrixShader, MemoryDO, MemoryInfo, MergeRGBACreator, MergeRGBA_cs, MeshColliderShape, MeshFilter, MeshRenderer, MinMaxAnimationCurves, MinMaxCurve, MinMaxCurveState, MinMaxPolyCurves, MorePassParser, MorePassShader, MorphTargetBlender, MorphTargetData, MorphTargetFrame, MorphTargetTransformKey, MorphTarget_shader, MouseCode, MultiBouncePass_cs, Navi3DAstar, Navi3DConst, Navi3DEdge, Navi3DFunnel, Navi3DMaskType, Navi3DMesh, Navi3DPoint, Navi3DPoint2D, Navi3DPointFat, Navi3DRouter, Navi3DTriangle, NonSerialize, NormalMap_frag, OAnimationEvent, OBJParser, Object3D, Object3DEvent, Object3DTransformTools, Object3DUtil, ObjectAnimClip, OcclusionSystem, Octree, OctreeEntity, OrbitController, OrderMap, Orientation3D, OutLineBlendColor_cs, OutlineCalcOutline_cs, OutlinePass, OutlinePost, OutlinePostData, OutlinePostManager, OutlinePostSlot, Outline_cs, OvershootInterpolator, PARSING, PBRLItShader, PBRLitSSSShader, PLUGIN_REGISTERED, PNTSLoader, PNTSLoaderBase, PNTSParser, ParserBase, ParserFormat, ParticleSystemCurveEvalMode, ParticleSystemRandomnessIds, PassGenerate, PassShader, PassType, PhysicMaterialUniform_frag, PickCompute, PickFire, PickGUIEvent3D, PickResult, Picker_cs, PingPong, PipelinePool, Plane3D, PlaneClassification, PlaneGeometry, PlyMode, PlyParser, PointClassification, PointCloudGeometry, PointCloudMaterial, PointCloudRenderer, PointCloudShader, PointCloud_FS, PointCloud_VS, PointLight, PointLightShadowRenderer, PointShadowCubeCamera, PointerEvent3D, Polynomial, PolynomialCurve, Polynomials, PoolNode, PostBase, PostProcessingComponent, PostRenderer, PreDepthPassRenderer, PreFilteredEnvironment_cs, PreFilteredEnvironment_cs2, PreIntegratedLut, PreIntegratedLutCompute, PrefabAvatarData, PrefabAvatarParser, PrefabBoneData, PrefabMaterialParser, PrefabMeshData, PrefabMeshParser, PrefabNode, PrefabParser, PrefabStringUtil, PrefabTextureData, PrefabTextureParser, Preprocessor, PriorityQueue, Probe, ProbeEntries, ProbeGBufferFrame, ProfilerUtil, PropertyAnimClip, PropertyAnimTag, PropertyAnimation, PropertyAnimationClip, PropertyAnimationClipState, PropertyAnimationEvent, PropertyHelp, QuadAABB, QuadGlsl_fs, QuadGlsl_vs, QuadRoot, QuadShader, QuadTree, QuadTreeCell, Quad_depth2dArray_frag_wgsl, Quad_depth2d_frag_wgsl, Quad_depthCube_frag_wgsl, Quad_frag_wgsl, Quad_vert_wgsl, Quaternion, R32UintTexture, RADIANS_TO_DEGREES, RGBEErrorCode, RGBEHeader, RGBEParser, RTDescriptor, RTFrame, RTResourceConfig, RTResourceMap, Rand, RandomSeed, Ray, RayCastMeshDetail, Reader, Rect, Reference, Reflection, ReflectionCG, ReflectionEntries, ReflectionMaterial, ReflectionRenderer, ReflectionShader, ReflectionShader_shader, RegisterComponent, RegisterShader, RenderContext, RenderLayer, RenderLayerUtil, RenderNode, RenderShaderCollect, RenderShaderCompute, RenderShaderPass, RenderTexture, RendererBase, RendererJob, RendererMap, RendererMask, RendererMaskUtil, RendererPassState, RepeatSE, Res, RotationControlComponents, SHCommon_frag, SN_ArrayConstant, SN_BinaryOperation, SN_Break, SN_CodeBlock, SN_Constant, SN_Continue, SN_Declaration, SN_Discard, SN_DoWhileLoop, SN_Expression, SN_ForLoop, SN_Function, SN_FunctionArgs, SN_FunctionCall, SN_IFBranch, SN_Identifier, SN_IndexOperation, SN_Layout, SN_ParenExpression, SN_Precision, SN_Return, SN_SelectOperation, SN_Struct, SN_TernaryOperation, SN_UnaryOperation, SN_WhileLoop, SSAO_cs, SSGI2_cs, SSGIPost, SSRPost, SSR_BlendColor_cs, SSR_IS_Kernel, SSR_IS_cs, SSR_RayTrace_cs, ScaleControlComponents, Scene3D, Shader, ShaderAttributeInfo, ShaderConverter, ShaderConverterResult, ShaderLib, ShaderPassBase, ShaderReflection, ShaderStage, ShaderState, ShaderUniformInfo, ShaderUtil, ShadingInput, ShadowLightsCollect, ShadowMapPassRenderer, ShadowMapping_frag, Skeleton, SkeletonAnimationClip, SkeletonAnimationClipState, SkeletonAnimationComponent, SkeletonAnimationCompute, SkeletonAnimation_shader, SkeletonBlendComputeArgs, SkeletonPose, SkeletonTransformComputeArgs, SkinnedMeshRenderer, SkinnedMeshRenderer2, SkyGBufferPass, SkyGBuffer_pass, SkyMaterial, SkyRenderer, SkyShader, SolidColorSky, SphereColliderShape, SphereGeometry, SphereReflection, SpotLight, StandShader, StatementNode, StorageGPUBuffer, StringUtil, Struct, StructStorageGPUBuffer, SubGeometry, TAACopyTex_cs, TAAPost, TAASharpTex_cs, TAA_cs, TestComputeLoadBuffer, TextAnchor, TextFieldLayout, TextFieldLine, Texture, TextureCube, TextureCubeFaceData, TextureCubeStdCreator, TextureCubeUtils, TextureMipmapCompute, TextureMipmapGenerator, TextureScaleCompute, ThirdPersonCameraController, Tile, TileSet, TileSetChild, TileSetChildContent, TileSetChildContentMetaData, TileSetRoot, TilesRenderer, Time, TokenType, TorusGeometry, TouchData, TrailGeometry, Transform, TransformAxisEnum, TransformControllerBaseComponent, TransformMode, TransformSpaceMode, TranslationControlComponents, TranslatorContext, TriGeometry, Triangle, UIButton, UIButtonTransition, UIComponentBase, UIEvent, UIImage, UIImageGroup, UIInteractive, UIInteractiveStyle, UIPanel, UIRenderAble, UIShadow, UITextField, UITransform, UNLOADED, UUID, UV, Uint32ArrayTexture, Uint8ArrayTexture, UnLit, UnLitMaterial, UnLitMaterialUniform_frag, UnLitShader, UnLitTexArrayMaterial, UnLitTexArrayShader, UnLitTextureArray, UnLit_frag, UniformGPUBuffer, UniformNode, UniformType, ValueEnumType, ValueOp, ValueParser, ValueSpread, Vector2, Vector3, Vector3Ex, Vector4, VertexAttribute, VertexAttributeIndexShader, VertexAttributeName, VertexAttributeSize, VertexAttributeStride, VertexAttributes_vert, VertexBufferLayout, VertexFormat, VertexGPUBuffer, Vertical, VideoUniform_frag, View3D, ViewPanel, ViewQuad, VirtualTexture, WGS84_FLATTENING, WGS84_HEIGHT, WGS84_RADIUS, WGSLTranslator, WayLines3D, WayPoint3D, WebGPUDescriptorCreator, WorldMatrixUniform, WorldPanel, WrapMode, WrapTimeMode, ZCullingCompute, ZPassShader_cs, ZPassShader_fs, ZPassShader_vs, ZSorterUtil, append, arrayToString, blendComponent, buildCurves, byteSizeOfType, calculateCurveRangesValue, calculateMinMax, castPointShadowMap_vert, clamp, clampRepeat, computeAABBFromPositions, cos, crossProduct, cubicPolynomialRoot, cubicPolynomialRootsGeneric, curvesSupportProcedural, deg2Rad, detectGSplatFormat, directionShadowCastMap_frag, dot, doubleIntegrateSegment, downSample, fastInvSqrt, floorfToIntPos, fonts, generateRandom, generateRandom3, getFloatFromInt, getGLTypeFromTypedArray, getGLTypeFromTypedArrayType, getGlobalRandomSeed, getTypedArray, getTypedArrayTypeFromGLType, grad1, grad2, grad3, grad4, inferSHOrder, integrateSegment, irradianceDataReader, kPI, lerp, lerpByte, lerpColor, lerpVector3, lruPriorityCallback, magnitude, makeAloneSprite, makeGUISprite, makeMatrix44, markUsedSetLeaves, markUsedTiles, markVisibleTiles, matrixMultiply, matrixRotate, matrixRotateY, mergeFunctions, multiplyMatrices4x4REF, normal_distribution, normalizeFast, normalizeSafe, normalizedToByte, normalizedToWord, outlinePostData, outlinePostManager, parsePlyGaussianSplat, parsePlyHeader, parsePlyMesh, parsePlyPointCloud, perm, post, priorityCallback, quadraticPolynomialRootsGeneric, rad2Deg, random01, randomBarycentricCoord, randomPointBetweenEllipsoid, randomPointBetweenSphere, randomPointInsideCube, randomPointInsideEllipsoid, randomPointInsideUnitCircle, randomPointInsideUnitSphere, randomQuaternion, randomQuaternionUniformDistribution, randomSeed, randomUnitVector, randomUnitVector2, rangedRandomFloat, rangedRandomInt, readByType, readMagicBytes, registerMaterial, repeat, rotMatrix, rotateVectorByQuat, roundfToIntPos, scale, shadowCastMap_frag, shadowCastMap_vert, simplex, sin, snoise1, snoise2, snoise3, snoise4, splatColorProperties, splatProperties, sqrMagnitude, sqrtImpl, stencilStateFace, swap, textureCompress, threshold, throttle, toHalfFloat, toggleTiles, traverseAncestors, traverseSet, tw, uniform_real_distribution, uniform_real_distribution2, upSample$1 as upSample, webGPUContext, zSorterUtil };
72972
+ export { AccelerateDecelerateInterpolator, AccelerateInterpolator, AnimationCurve, AnimationCurveT, AnimationMonitor, AnimatorComponent, AnimatorEventKeyframe, AnticipateInterpolator, AnticipateOvershootInterpolator, ArrayHas, ArrayItemIndex, AtlasParser, AtmosphericComponent, AtmosphericScatteringSky, AtmosphericScatteringSkySetting, AtmosphericScatteringSky_shader, AttributeAnimCurve, AxisObject, B3DMLoader, B3DMLoaderBase, B3DMParseUtil, B3DMParser, BRDFLUT, BRDFLUTGenerate, BRDF_frag, BatchTable, BiMap, BillboardComponent, BillboardType, BitUtil, BitmapTexture2D, BitmapTexture2DArray, BitmapTextureCube, Blend, BlendFactor, BlendMode, BlendShapeData, BlendShapePropertyData, BloomPost, BlurEffectCreatorBlur_cs, BlurEffectCreatorSample_cs, BlurTexture2DBufferCreator, BounceInterpolator, BoundUtil, BoundingBox, BoundingSphere, BoundingVolume, BoxColliderShape, BoxGeometry, BrdfLut_frag, BsDF_frag, BxDF_frag, BxdfDebug_frag, BytesArray, CEvent, CEventDispatcher, CEventListener, CResizeEvent, CSM, Camera3D, CameraControllerBase, CameraType, CameraUtil, CapsuleColliderShape, CastPointShadowMaterialPass, CastShadowMaterialPass, Clearcoat_frag, ClusterBoundsSource_cs, ClusterConfig, ClusterDebug_frag, ClusterLight, ClusterLightingBuffer, ClusterLightingRender, ClusterLighting_cs, CollectInfo, ColliderComponent, ColliderShape, ColliderShapeType, Color, ColorGradient, ColorLitMaterial, ColorLitShader, ColorPassFragmentOutput, ColorPassRenderer, ColorUtil, ComData, Combine_cs, Common_frag, Common_vert, ComponentBase, ComponentCollect, ComputeGPUBuffer, ComputeShader, Context3D, CubeCamera, CubeMapFaceEnum, CubeSky_Shader, CubicBezierCurve, CubicBezierPath, CubicBezierType, CycleInterpolator, CylinderGeometry, DDGIIrradianceComputePass, DDGIIrradianceGPUBufferReader, DDGIIrradianceVolume, DDGIIrradiance_shader, DDGILightingPass, DDGILighting_shader, DDGIMultiBouncePass, DDGIProbeRenderer, DEGREES_TO_RADIANS, DRACO_DECODER_GLTF_JS, DecelerateInterpolator, Denoising_cs, Depth2DTextureArray, DepthCubeArrayTexture, DepthMaterialPass, DepthOfFieldPost, DepthOfView_cs, DirectLight, DoubleArray, EditorInspector, Engine3D, Entity, EntityBatchCollect, EntityCollect, EnvMap_frag, ErpImage2CubeMap, ErpImage2CubeMapCreateCube_cs, ErpImage2CubeMapRgbe2rgba_cs, ExtrudeGeometry, FAILED, FASTFLOOR, FXAAPost, FXAAShader, FastMathShader, FatLineGeometry, FatLineMaterial, FatLineRenderer, FatLineShader, FatLine_FS, FatLine_VS, FeatureTable, FileLoader, FirstPersonCameraController, Float16ArrayTexture, Float32ArrayTexture, FlyCameraController, FontChar, FontInfo, FontPage, FontParser, ForwardRenderJob, FragmentOutput, FragmentVarying, FrameCache, Frustum, FrustumCSM, FrustumCulling_cs, FullQuad_vert_wgsl, GBufferFrame, GBufferPass, GBufferPost, GBufferStand, GBuffer_pass, GILighting, GIProbeMaterial, GIProbeMaterialType, GIProbeShader, GIRenderCompleteEvent, GIRenderStartEvent, GLBChunk, GLBHeader, GLBParser, GLSLLexer, GLSLLexerToken, GLSLPreprocessor, GLSLSyntax, GLTFBinaryExtension, GLTFMaterial, GLTFParser, GLTFSubParser, GLTFSubParserCamera, GLTFSubParserConverter, GLTFSubParserMaterial, GLTFSubParserMesh, GLTFSubParserSkeleton, GLTFSubParserSkin, GLTFType, GLTF_Accessors, GLTF_Info, GLTF_Light, GLTF_Mesh, GLTF_Node, GLTF_Primitives, GLTF_Scene, GPUAddressMode, GPUBlendFactor, GPUBufferBase, GPUBufferType, GPUCompareFunction, GPUContext, GPUCullMode, GPUFilterMode, GPUPrimitiveTopology, GPUTextureFormat, GPUVertexFormat, GPUVertexStepMode, GSplatFormat, GSplatGeometry, GSplatMaterial, GSplatRenderer, GSplatShader, GSplatStreamRenderer, GSplat_FS, GSplat_VS, GTAOPost, GTAO_cs, GUIAtlasTexture, GUICanvas, GUIConfig, GUIGeometry, GUIGeometryRebuild, GUIMaterial, GUIPassRenderer, GUIPick, GUIPickHelper, GUIQuad, GUIQuadAttrEnum, GUIRenderer, GUIShader, GUISpace, GUISprite, GUITexture, GaussianSplatParser, GenerayRandomDir, GeoJsonParser, GeoJsonUtil, GeoType, GeometryBase, GeometryIndicesBuffer, GeometryUtil, GeometryVertexBuffer, GeometryVertexType, GetComponentClass, GetCountInstanceID, GetRepeat, GetShader, GlassShader, GlobalBindGroup, GlobalBindGroupLayout, GlobalFog, GlobalFog_shader, GlobalIlluminationComponent, GlobalUniform, GlobalUniformGroup, GodRayPost, GodRay_cs, GridObject, HDRTexture, HDRTextureCube, Hair_frag, Hair_shader_op, Hair_shader_tr, HaltonSeq, Horizontal, HoverCameraController, I3DMLoader, I3DMLoaderBase, I3DMParser, IBLEnvMapCreator, IBLEnvMapCreator_cs, IESProfiles, IESProfiles_frag, IKDTreeUserData, ImageType, IndicesGPUBuffer, Inline_vert, InputSystem, InstanceDrawComponent, InstanceUniform, InstancedMesh, Interpolator, InterpolatorEnum, IrradianceDataReaderCompleteEvent, IrradianceVolumeData_frag, Irradiance_frag, IsEditorInspector, IsNonSerialize, Joint, JointPose, JumperInterpolator, KDTreeEntity, KDTreeNode, KDTreeRange, KDTreeSpace, KDTreeUUID, KHR_draco_mesh_compression, KHR_lights_punctual, KHR_materials_clearcoat, KHR_materials_emissive_strength, KHR_materials_ior, KHR_materials_unlit, KMZParser, KV, KelvinUtil, KeyCode, KeyEvent, Keyframe, KeyframeT, LASLoader, LASParser, LASUtils, LASVisualizationMode, LDRTextureCube, LOADED, LOADING, LRUCache, LambertMaterial, Lambert_shader, Light, LightBase, LightData, LightEntries, LightType, LightingFunction_frag, Line, LineClassification, LinearInterpolator, LitMaterial, LitSSSShader, LitShader, Lit_shader, LoaderBase, LoaderEvent, LoaderManager, MAX_VALUE, MIN_VALUE, Material, MaterialDataUniformGPUBuffer, MaterialUtilities, MathShader, MathUtil, Matrix3, Matrix4, MatrixBindGroup, MatrixGPUBuffer, MatrixShader, MemoryDO, MemoryInfo, MergeRGBACreator, MergeRGBA_cs, MeshColliderShape, MeshFilter, MeshRenderer, MinMaxAnimationCurves, MinMaxCurve, MinMaxCurveState, MinMaxPolyCurves, MorePassParser, MorePassShader, MorphTargetBlender, MorphTargetData, MorphTargetFrame, MorphTargetTransformKey, MorphTarget_shader, MouseCode, MultiBouncePass_cs, Navi3DAstar, Navi3DConst, Navi3DEdge, Navi3DFunnel, Navi3DMaskType, Navi3DMesh, Navi3DPoint, Navi3DPoint2D, Navi3DPointFat, Navi3DRouter, Navi3DTriangle, NonSerialize, NormalMap_frag, OAnimationEvent, OBJParser, Object3D, Object3DEvent, Object3DTransformTools, Object3DUtil, ObjectAnimClip, OcclusionSystem, Octree, OctreeEntity, OrbitController, OrderMap, Orientation3D, OutLineBlendColor_cs, OutlineCalcOutline_cs, OutlinePass, OutlinePost, OutlinePostData, OutlinePostManager, OutlinePostSlot, Outline_cs, OvershootInterpolator, PARSING, PBRLItShader, PBRLitSSSShader, PLUGIN_REGISTERED, PNTSLoader, PNTSLoaderBase, PNTSParser, ParserBase, ParserFormat, ParticleSystemCurveEvalMode, ParticleSystemRandomnessIds, PassGenerate, PassShader, PassType, PhysicMaterialUniform_frag, PickCompute, PickFire, PickGUIEvent3D, PickResult, Picker_cs, PingPong, PipelinePool, Plane3D, PlaneClassification, PlaneGeometry, PlyMode, PlyParser, PlyStreamParser, PointClassification, PointCloudGeometry, PointCloudMaterial, PointCloudRenderer, PointCloudShader, PointCloud_FS, PointCloud_VS, PointLight, PointLightShadowRenderer, PointShadowCubeCamera, PointerEvent3D, Polynomial, PolynomialCurve, Polynomials, PoolNode, PostBase, PostProcessingComponent, PostRenderer, PreDepthPassRenderer, PreFilteredEnvironment_cs, PreFilteredEnvironment_cs2, PreIntegratedLut, PreIntegratedLutCompute, PrefabAvatarData, PrefabAvatarParser, PrefabBoneData, PrefabMaterialParser, PrefabMeshData, PrefabMeshParser, PrefabNode, PrefabParser, PrefabStringUtil, PrefabTextureData, PrefabTextureParser, Preprocessor, PriorityQueue, Probe, ProbeEntries, ProbeGBufferFrame, ProfilerUtil, PropertyAnimClip, PropertyAnimTag, PropertyAnimation, PropertyAnimationClip, PropertyAnimationClipState, PropertyAnimationEvent, PropertyHelp, QuadAABB, QuadGlsl_fs, QuadGlsl_vs, QuadRoot, QuadShader, QuadTree, QuadTreeCell, Quad_depth2dArray_frag_wgsl, Quad_depth2d_frag_wgsl, Quad_depthCube_frag_wgsl, Quad_frag_wgsl, Quad_vert_wgsl, Quaternion, R32UintTexture, RADIANS_TO_DEGREES, RGBEErrorCode, RGBEHeader, RGBEParser, RTDescriptor, RTFrame, RTResourceConfig, RTResourceMap, Rand, RandomSeed, Ray, RayCastMeshDetail, Reader, Rect, Reference, Reflection, ReflectionCG, ReflectionEntries, ReflectionMaterial, ReflectionRenderer, ReflectionShader, ReflectionShader_shader, RegisterComponent, RegisterShader, RenderContext, RenderLayer, RenderLayerUtil, RenderNode, RenderShaderCollect, RenderShaderCompute, RenderShaderPass, RenderTexture, RendererBase, RendererJob, RendererMap, RendererMask, RendererMaskUtil, RendererPassState, RepeatSE, Res, RotationControlComponents, SHCommon_frag, SN_ArrayConstant, SN_BinaryOperation, SN_Break, SN_CodeBlock, SN_Constant, SN_Continue, SN_Declaration, SN_Discard, SN_DoWhileLoop, SN_Expression, SN_ForLoop, SN_Function, SN_FunctionArgs, SN_FunctionCall, SN_IFBranch, SN_Identifier, SN_IndexOperation, SN_Layout, SN_ParenExpression, SN_Precision, SN_Return, SN_SelectOperation, SN_Struct, SN_TernaryOperation, SN_UnaryOperation, SN_WhileLoop, SSAO_cs, SSGI2_cs, SSGIPost, SSRPost, SSR_BlendColor_cs, SSR_IS_Kernel, SSR_IS_cs, SSR_RayTrace_cs, ScaleControlComponents, Scene3D, Shader, ShaderAttributeInfo, ShaderConverter, ShaderConverterResult, ShaderLib, ShaderPassBase, ShaderReflection, ShaderStage, ShaderState, ShaderUniformInfo, ShaderUtil, ShadingInput, ShadowLightsCollect, ShadowMapPassRenderer, ShadowMapping_frag, Skeleton, SkeletonAnimationClip, SkeletonAnimationClipState, SkeletonAnimationComponent, SkeletonAnimationCompute, SkeletonAnimation_shader, SkeletonBlendComputeArgs, SkeletonPose, SkeletonTransformComputeArgs, SkinnedMeshRenderer, SkinnedMeshRenderer2, SkyGBufferPass, SkyGBuffer_pass, SkyMaterial, SkyRenderer, SkyShader, SolidColorSky, SphereColliderShape, SphereGeometry, SphereReflection, SpotLight, StandShader, StatementNode, StorageGPUBuffer, StreamLoader, StreamingGaussianSplatParser, StringUtil, Struct, StructStorageGPUBuffer, SubGeometry, TAACopyTex_cs, TAAPost, TAASharpTex_cs, TAA_cs, TestComputeLoadBuffer, TextAnchor, TextFieldLayout, TextFieldLine, Texture, TextureCube, TextureCubeFaceData, TextureCubeStdCreator, TextureCubeUtils, TextureMipmapCompute, TextureMipmapGenerator, TextureScaleCompute, ThirdPersonCameraController, Tile, TileSet, TileSetChild, TileSetChildContent, TileSetChildContentMetaData, TileSetRoot, TilesRenderer, Time, TokenType, TorusGeometry, TouchData, TrailGeometry, Transform, TransformAxisEnum, TransformControllerBaseComponent, TransformMode, TransformSpaceMode, TranslationControlComponents, TranslatorContext, TriGeometry, Triangle, UIButton, UIButtonTransition, UIComponentBase, UIEvent, UIImage, UIImageGroup, UIInteractive, UIInteractiveStyle, UIPanel, UIRenderAble, UIShadow, UITextField, UITransform, UNLOADED, UUID, UV, Uint32ArrayTexture, Uint8ArrayTexture, UnLit, UnLitMaterial, UnLitMaterialUniform_frag, UnLitShader, UnLitTexArrayMaterial, UnLitTexArrayShader, UnLitTextureArray, UnLit_frag, UniformGPUBuffer, UniformNode, UniformType, ValueEnumType, ValueOp, ValueParser, ValueSpread, Vector2, Vector3, Vector3Ex, Vector4, VertexAttribute, VertexAttributeIndexShader, VertexAttributeName, VertexAttributeSize, VertexAttributeStride, VertexAttributes_vert, VertexBufferLayout, VertexFormat, VertexGPUBuffer, Vertical, VideoUniform_frag, View3D, ViewPanel, ViewQuad, VirtualTexture, WGS84_FLATTENING, WGS84_HEIGHT, WGS84_RADIUS, WGSLTranslator, WayLines3D, WayPoint3D, WebGPUDescriptorCreator, WorldMatrixUniform, WorldPanel, WrapMode, WrapTimeMode, ZCullingCompute, ZPassShader_cs, ZPassShader_fs, ZPassShader_vs, ZSorterUtil, append, arrayToString, blendComponent, buildCurves, byteSizeOfType, calculateCurveRangesValue, calculateMinMax, castPointShadowMap_vert, clamp, clampRepeat, computeAABBFromPositions, cos, crossProduct, cubicPolynomialRoot, cubicPolynomialRootsGeneric, curvesSupportProcedural, deg2Rad, detectGSplatFormat, directionShadowCastMap_frag, dot, doubleIntegrateSegment, downSample, fastInvSqrt, floorfToIntPos, fonts, generateRandom, generateRandom3, getFloatFromInt, getGLTypeFromTypedArray, getGLTypeFromTypedArrayType, getGlobalRandomSeed, getTypedArray, getTypedArrayTypeFromGLType, grad1, grad2, grad3, grad4, inferSHOrder, integrateSegment, irradianceDataReader, kPI, lerp, lerpByte, lerpColor, lerpVector3, lruPriorityCallback, magnitude, makeAloneSprite, makeGUISprite, makeMatrix44, markUsedSetLeaves, markUsedTiles, markVisibleTiles, matrixMultiply, matrixRotate, matrixRotateY, mergeFunctions, multiplyMatrices4x4REF, normal_distribution, normalizeFast, normalizeSafe, normalizedToByte, normalizedToWord, outlinePostData, outlinePostManager, parsePlyGaussianSplat, parsePlyHeader, parsePlyMesh, parsePlyPointCloud, perm, post, priorityCallback, quadraticPolynomialRootsGeneric, rad2Deg, random01, randomBarycentricCoord, randomPointBetweenEllipsoid, randomPointBetweenSphere, randomPointInsideCube, randomPointInsideEllipsoid, randomPointInsideUnitCircle, randomPointInsideUnitSphere, randomQuaternion, randomQuaternionUniformDistribution, randomSeed, randomUnitVector, randomUnitVector2, rangedRandomFloat, rangedRandomInt, readByType, readMagicBytes, registerMaterial, repeat, rotMatrix, rotateVectorByQuat, roundfToIntPos, scale, shadowCastMap_frag, shadowCastMap_vert, simplex, sin, snoise1, snoise2, snoise3, snoise4, splatColorProperties, splatProperties, sqrMagnitude, sqrtImpl, stencilStateFace, swap, textureCompress, threshold, throttle, toHalfFloat, toggleTiles, traverseAncestors, traverseSet, tw, uniform_real_distribution, uniform_real_distribution2, upSample$1 as upSample, webGPUContext, zSorterUtil };