@rings-webgpu/core 1.0.27 → 1.0.29

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$m = (decorators, target, key, kind) => {
2116
+ var __decorateClass$o = (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$m([
2219
+ __decorateClass$o([
2220
2220
  NonSerialize
2221
2221
  ], _Struct.prototype, "__refection");
2222
- __decorateClass$m([
2222
+ __decorateClass$o([
2223
2223
  NonSerialize
2224
2224
  ], _Struct.prototype, "__size");
2225
2225
  let Struct = _Struct;
@@ -20489,6 +20489,10 @@ class RenderShaderPass extends ShaderPassBase {
20489
20489
  this.vsEntryPoint = vsEntryPoint;
20490
20490
  this.fsEntryPoint = fsEntryPoint;
20491
20491
  }
20492
+ setUniformArray(name, value) {
20493
+ super.setUniformArray(name, value);
20494
+ this.materialDataUniformBuffer.onChange();
20495
+ }
20492
20496
  setUniform(name, value) {
20493
20497
  super.setUniform(name, value);
20494
20498
  this.materialDataUniformBuffer.onChange();
@@ -20757,16 +20761,21 @@ class RenderShaderPass extends ShaderPassBase {
20757
20761
  if (buffer) {
20758
20762
  if (buffer.bufferType == GPUBufferType.MaterialDataUniformGPUBuffer) {
20759
20763
  let uniforms = [];
20760
- for (let i = 0; i < refs.dataFields.length; i++) {
20761
- const field = refs.dataFields[i];
20762
- if (!this.uniforms[field.name]) {
20763
- console.error(
20764
- `shader-${this.vsName}:${this.fsName} ${field.name}is empty`
20765
- );
20764
+ if (refs.dataFields) {
20765
+ for (let i = 0; i < refs.dataFields.length; i++) {
20766
+ const field = refs.dataFields[i];
20767
+ if (!this.uniforms[field.name]) {
20768
+ console.error(
20769
+ `shader-${this.vsName}:${this.fsName} ${field.name}is empty`
20770
+ );
20771
+ } else {
20772
+ uniforms.push(this.uniforms[field.name]);
20773
+ }
20766
20774
  }
20767
- uniforms.push(this.uniforms[field.name]);
20768
20775
  }
20769
- this.materialDataUniformBuffer.initDataUniform(uniforms);
20776
+ if (uniforms.length > 0) {
20777
+ this.materialDataUniformBuffer.initDataUniform(uniforms);
20778
+ }
20770
20779
  }
20771
20780
  let entry = {
20772
20781
  binding: refs.binding,
@@ -21956,9 +21965,9 @@ class OctreeEntity {
21956
21965
  }
21957
21966
 
21958
21967
  var __defProp$1 = Object.defineProperty;
21959
- var __getOwnPropDesc$l = Object.getOwnPropertyDescriptor;
21960
- var __decorateClass$l = (decorators, target, key, kind) => {
21961
- var result = __getOwnPropDesc$l(target, key) ;
21968
+ var __getOwnPropDesc$n = Object.getOwnPropertyDescriptor;
21969
+ var __decorateClass$n = (decorators, target, key, kind) => {
21970
+ var result = __getOwnPropDesc$n(target, key) ;
21962
21971
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
21963
21972
  if (decorator = decorators[i])
21964
21973
  result = (decorator(target, key, result) ) || result;
@@ -22556,13 +22565,13 @@ class RenderNode extends ComponentBase {
22556
22565
  this._combineShaderRefection = void 0;
22557
22566
  }
22558
22567
  }
22559
- __decorateClass$l([
22568
+ __decorateClass$n([
22560
22569
  EditorInspector
22561
22570
  ], RenderNode.prototype, "materials");
22562
- __decorateClass$l([
22571
+ __decorateClass$n([
22563
22572
  EditorInspector
22564
22573
  ], RenderNode.prototype, "castShadow");
22565
- __decorateClass$l([
22574
+ __decorateClass$n([
22566
22575
  EditorInspector
22567
22576
  ], RenderNode.prototype, "castGI");
22568
22577
 
@@ -22783,7 +22792,7 @@ const GSplat_VS = (
22783
22792
  @location(1) vTexCoord: vec2<f32>,
22784
22793
  };
22785
22794
 
22786
- // Textures (like PlayCanvas)
22795
+ // Textures
22787
22796
  @group(1) @binding(1) var splatColor: texture_2d<f32>;
22788
22797
  @group(1) @binding(2) var transformA: texture_2d<u32>;
22789
22798
  @group(1) @binding(3) var transformB: texture_2d<f32>;
@@ -22880,7 +22889,7 @@ const GSplat_VS = (
22880
22889
  return vec4f(v1.x, -v1.y, v2.x, -v2.y);
22881
22890
  }
22882
22891
 
22883
- // ===== SPLAT MAIN VS (from PlayCanvas gsplat-material.js) =====
22892
+ // ===== SPLAT MAIN VS =====
22884
22893
 
22885
22894
  @vertex
22886
22895
  fn VertMain(
@@ -23229,9 +23238,9 @@ class Shader {
23229
23238
  }
23230
23239
  }
23231
23240
 
23232
- var __getOwnPropDesc$k = Object.getOwnPropertyDescriptor;
23233
- var __decorateClass$k = (decorators, target, key, kind) => {
23234
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$k(target, key) : target;
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;
23235
23244
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
23236
23245
  if (decorator = decorators[i])
23237
23246
  result = (decorator(result)) || result;
@@ -23263,7 +23272,7 @@ let GSplatShader = class extends Shader {
23263
23272
  pass.setUniform("pixelCull", new Float32Array([2, 0, 0, 0]));
23264
23273
  }
23265
23274
  };
23266
- GSplatShader = __decorateClass$k([
23275
+ GSplatShader = __decorateClass$m([
23267
23276
  RegisterShader(GSplatShader, "GSplatShader")
23268
23277
  ], GSplatShader);
23269
23278
 
@@ -24046,7 +24055,7 @@ class Uint8ArrayTexture extends Texture {
24046
24055
  size: data.byteLength,
24047
24056
  usage: GPUBufferUsage.COPY_DST | GPUBufferUsage.COPY_SRC
24048
24057
  });
24049
- device.queue.writeBuffer(textureDataBuffer, 0, data);
24058
+ device.queue.writeBuffer(textureDataBuffer, 0, data.buffer);
24050
24059
  const commandEncoder = GPUContext.beginCommandEncoder();
24051
24060
  commandEncoder.copyBufferToTexture(
24052
24061
  {
@@ -24078,7 +24087,7 @@ class Uint8ArrayTexture extends Texture {
24078
24087
  size: data.byteLength,
24079
24088
  usage: GPUBufferUsage.COPY_DST | GPUBufferUsage.COPY_SRC
24080
24089
  });
24081
- device.queue.writeBuffer(textureDataBuffer, 0, data);
24090
+ device.queue.writeBuffer(textureDataBuffer, 0, data.buffer);
24082
24091
  const commandEncoder = GPUContext.beginCommandEncoder();
24083
24092
  commandEncoder.copyBufferToTexture(
24084
24093
  {
@@ -24280,9 +24289,9 @@ class Float16ArrayTexture extends Texture {
24280
24289
  }
24281
24290
  }
24282
24291
 
24283
- var __getOwnPropDesc$j = Object.getOwnPropertyDescriptor;
24284
- var __decorateClass$j = (decorators, target, key, kind) => {
24285
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$j(target, key) : target;
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;
24286
24295
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
24287
24296
  if (decorator = decorators[i])
24288
24297
  result = (decorator(result)) || result;
@@ -25081,10 +25090,689 @@ let GSplatRenderer = class extends RenderNode {
25081
25090
  super.destroy(force);
25082
25091
  }
25083
25092
  };
25084
- GSplatRenderer = __decorateClass$j([
25093
+ GSplatRenderer = __decorateClass$l([
25085
25094
  RegisterComponent(GSplatRenderer, "GSplatRenderer")
25086
25095
  ], GSplatRenderer);
25087
25096
 
25097
+ const PointCloud_VS = (
25098
+ /* wgsl */
25099
+ `
25100
+ #include "GlobalUniform"
25101
+
25102
+ const ALPHA_THRESHOLD: f32 = 0.00392156863;
25103
+
25104
+ struct MaterialUniform {
25105
+ modelMatrix: mat4x4<f32>,
25106
+ tex_params: vec4<f32>,
25107
+ pointParams: vec4<f32>,
25108
+ };
25109
+ @group(1) @binding(0) var<uniform> materialUniform: MaterialUniform;
25110
+
25111
+ struct VSOut {
25112
+ @builtin(position) member: vec4<f32>,
25113
+ @location(0) vColor: vec4<f32>,
25114
+ @location(1) vTexCoord: vec2<f32>,
25115
+ };
25116
+
25117
+ @group(1) @binding(1) var pointColor: texture_2d<f32>;
25118
+ @group(1) @binding(2) var pointPosition: texture_2d<f32>;
25119
+ @group(1) @binding(3) var pointOrder: texture_2d<u32>;
25120
+
25121
+ fn discardPoint() -> VSOut {
25122
+ var o: VSOut;
25123
+ o.member = vec4f(0.0, 0.0, 2.0, 1.0);
25124
+ o.vColor = vec4f(0.0);
25125
+ o.vTexCoord = vec2f(0.0);
25126
+ return o;
25127
+ }
25128
+
25129
+ fn calcPointUV(orderId: u32, textureWidth: u32, numPoints: u32) -> vec2<i32> {
25130
+ let pointId = orderId;
25131
+ return vec2<i32>(
25132
+ i32(pointId % textureWidth),
25133
+ i32(pointId / textureWidth)
25134
+ );
25135
+ }
25136
+
25137
+ @vertex
25138
+ fn VertMain(
25139
+ @builtin(vertex_index) vid: u32,
25140
+ @builtin(instance_index) iid: u32,
25141
+ @location(0) position: vec3<f32>
25142
+ ) -> VSOut {
25143
+ let batchSize = max(1u, u32(materialUniform.pointParams.w));
25144
+ let orderId = iid * batchSize + u32(position.z);
25145
+
25146
+ let textureWidth = max(1u, u32(materialUniform.tex_params.y));
25147
+ let numPoints = max(1u, u32(materialUniform.tex_params.x));
25148
+ let safeOrderId = min(orderId, numPoints - 1u);
25149
+
25150
+ let pointUV = calcPointUV(safeOrderId, textureWidth, numPoints);
25151
+ let color = textureLoad(pointColor, pointUV, 0);
25152
+
25153
+ let posData = textureLoad(pointPosition, pointUV, 0);
25154
+ let pointPos = vec3f(
25155
+ posData.x,
25156
+ posData.y,
25157
+ posData.z
25158
+ );
25159
+
25160
+ let matrix_model = materialUniform.modelMatrix;
25161
+ let matrix_view = globalUniform.viewMat;
25162
+ let matrix_projection = globalUniform.projMat;
25163
+ let model_view = matrix_view * matrix_model;
25164
+
25165
+ let centerClip = matrix_projection * (model_view * vec4f(pointPos, 1.0));
25166
+
25167
+ let inv_w = 1.0 / centerClip.w;
25168
+ let ndc = centerClip.xyz * inv_w;
25169
+ if (ndc.x < -1.0 || ndc.x > 1.0 ||
25170
+ ndc.y < -1.0 || ndc.y > 1.0 ||
25171
+ ndc.z < 0.0 || ndc.z > 1.0) {
25172
+ return discardPoint();
25173
+ }
25174
+
25175
+ let viewPos = model_view * vec4f(pointPos, 1.0);
25176
+ if (viewPos.z <= 0.0) {
25177
+ return discardPoint();
25178
+ }
25179
+
25180
+ let pointSize = materialUniform.tex_params.w;
25181
+ let viewport = vec2f(globalUniform.windowWidth, globalUniform.windowHeight);
25182
+ let safeViewport = max(viewport, vec2f(1.0, 1.0));
25183
+ let inv_viewport = 2.0 / safeViewport;
25184
+ let offsetNDC = position.xy * pointSize * 0.5 * inv_viewport;
25185
+ let offsetClip = vec4f(offsetNDC * centerClip.w, 0.0, 0.0);
25186
+
25187
+ var o: VSOut;
25188
+ o.member = centerClip + offsetClip;
25189
+ o.vColor = color;
25190
+ o.vTexCoord = position.xy;
25191
+ return o;
25192
+ }
25193
+ `
25194
+ );
25195
+ const PointCloud_FS = (
25196
+ /* wgsl */
25197
+ `
25198
+ #include "FragmentOutput"
25199
+
25200
+ const ALPHA_THRESHOLD: f32 = 0.00392156863;
25201
+
25202
+ struct MaterialUniform {
25203
+ modelMatrix: mat4x4<f32>,
25204
+ tex_params: vec4<f32>,
25205
+ pointParams: vec4<f32>,
25206
+ };
25207
+ @group(1) @binding(0) var<uniform> materialUniform: MaterialUniform;
25208
+
25209
+ @fragment
25210
+ fn FragMain(
25211
+ @location(0) vColor: vec4<f32>,
25212
+ @location(1) vTexCoord: vec2<f32>
25213
+ ) -> FragmentOutput {
25214
+ var o: FragmentOutput;
25215
+
25216
+ let pointShape = materialUniform.pointParams.x;
25217
+ let distSq = dot(vTexCoord, vTexCoord);
25218
+ let isCircle = pointShape > 0.5;
25219
+ let discardPixel = isCircle && distSq > 1.0;
25220
+
25221
+ if (discardPixel) {
25222
+ discard;
25223
+ }
25224
+
25225
+ o.color = vColor;
25226
+ o.gBuffer = vec4f(0.0);
25227
+ return o;
25228
+ }
25229
+ `
25230
+ );
25231
+
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;
25235
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
25236
+ if (decorator = decorators[i])
25237
+ result = (decorator(result)) || result;
25238
+ return result;
25239
+ };
25240
+ let PointCloudShader = class extends Shader {
25241
+ constructor() {
25242
+ super();
25243
+ ShaderLib.register("pointcloud_vs_dc", PointCloud_VS);
25244
+ ShaderLib.register("pointcloud_fs_dc", PointCloud_FS);
25245
+ const pass = new RenderShaderPass("pointcloud_vs_dc", "pointcloud_fs_dc");
25246
+ pass.passType = PassType.COLOR;
25247
+ pass.setShaderEntry("VertMain", "FragMain");
25248
+ pass.topology = GPUPrimitiveTopology.triangle_list;
25249
+ pass.depthWriteEnabled = true;
25250
+ pass.cullMode = GPUCullMode.none;
25251
+ pass.shaderState.transparent = false;
25252
+ pass.shaderState.blendMode = BlendMode.NORMAL;
25253
+ pass.shaderState.writeMasks = [15, 15];
25254
+ pass.shaderState.castReflection = false;
25255
+ this.addRenderPass(pass);
25256
+ this.setDefault();
25257
+ }
25258
+ setDefault() {
25259
+ const pass = this.getDefaultColorShader();
25260
+ const identityMatrix = new Matrix4();
25261
+ pass.setUniform("modelMatrix", identityMatrix.rawData);
25262
+ pass.setUniformArray("tex_params", new Float32Array([0, 0, 0, 4]));
25263
+ pass.setUniformArray("pointParams", new Float32Array([0, 0, 0, 128]));
25264
+ }
25265
+ };
25266
+ PointCloudShader = __decorateClass$k([
25267
+ RegisterShader(PointCloudShader, "PointCloudShader")
25268
+ ], PointCloudShader);
25269
+
25270
+ class PointCloudMaterial extends Material {
25271
+ _texParams = new Float32Array([0, 0, 0, 4]);
25272
+ _pointParamsArray = new Float32Array([0, 0, 0, 128]);
25273
+ constructor() {
25274
+ super();
25275
+ this.shader = new PointCloudShader();
25276
+ }
25277
+ /**
25278
+ * Set point cloud textures
25279
+ * @param pointPosition Position texture (RGB = xyz)
25280
+ * @param pointColor Color texture (RGBA)
25281
+ * @param texParams Texture parameters [numPoints, texWidth, validCount, pointSize]
25282
+ * @param pointOrder Optional sorting texture (R32U format)
25283
+ */
25284
+ setPointTextures(pointPosition, pointColor, texParams, pointOrder) {
25285
+ const pass = this.shader.getDefaultColorShader();
25286
+ if (!pass.getUniform("modelMatrix")) {
25287
+ const identityMatrix = new Matrix4();
25288
+ pass.setUniform("modelMatrix", identityMatrix.rawData);
25289
+ }
25290
+ pass.setTexture("pointColor", pointColor);
25291
+ pass.setTexture("pointPosition", pointPosition);
25292
+ this._texParams[0] = texParams[0];
25293
+ this._texParams[1] = texParams[1];
25294
+ this._texParams[2] = texParams[2];
25295
+ this._texParams[3] = texParams[3];
25296
+ pass.setUniformArray("tex_params", this._texParams);
25297
+ pass.setUniformArray("pointParams", this._pointParamsArray);
25298
+ if (pointOrder) {
25299
+ pass.setTexture("pointOrder", pointOrder);
25300
+ }
25301
+ pass.shaderState.depthCompare = GPUCompareFunction.less;
25302
+ }
25303
+ /**
25304
+ * Set the model matrix for transforming points to world space
25305
+ * @param matrix Model transformation matrix
25306
+ */
25307
+ setTransformMatrix(matrix) {
25308
+ const pass = this.shader.getDefaultColorShader();
25309
+ pass.setUniform("modelMatrix", matrix.rawData);
25310
+ }
25311
+ /**
25312
+ * Set point size in pixels
25313
+ * @param size Point size in pixels (default: 4.0)
25314
+ */
25315
+ setPointSize(size) {
25316
+ this._texParams[3] = Math.max(0.1, size);
25317
+ const pass = this.shader.getDefaultColorShader();
25318
+ pass.setUniformArray("tex_params", this._texParams);
25319
+ }
25320
+ /**
25321
+ * Set point shape
25322
+ * @param shape Point shape: 'square' or 'circle'
25323
+ */
25324
+ setPointShape(shape) {
25325
+ this._pointParamsArray[0] = shape === "circle" ? 1 : 0;
25326
+ const pass = this.shader.getDefaultColorShader();
25327
+ pass.setUniformArray("pointParams", this._pointParamsArray);
25328
+ }
25329
+ enableDebugFullScreen(enabled) {
25330
+ this._pointParamsArray[1] = enabled ? 1 : 0;
25331
+ const pass = this.shader.getDefaultColorShader();
25332
+ pass.setUniformArray("pointParams", this._pointParamsArray);
25333
+ }
25334
+ /**
25335
+ * Set batch size for instanced rendering
25336
+ * @param batchSize Number of points per draw call (default: 128)
25337
+ */
25338
+ setBatchSize(batchSize) {
25339
+ this._pointParamsArray[3] = Math.max(1, batchSize | 0);
25340
+ const pass = this.shader.getDefaultColorShader();
25341
+ pass.setUniformArray("pointParams", this._pointParamsArray);
25342
+ }
25343
+ }
25344
+
25345
+ class PointCloudGeometry extends GeometryBase {
25346
+ batchSize;
25347
+ constructor(batchSize = 128) {
25348
+ super();
25349
+ this.batchSize = batchSize;
25350
+ const meshPositions = new Float32Array(12 * batchSize);
25351
+ for (let i = 0; i < batchSize; ++i) {
25352
+ const baseIdx = i * 12;
25353
+ meshPositions.set([
25354
+ -1,
25355
+ -1,
25356
+ i,
25357
+ 1,
25358
+ -1,
25359
+ i,
25360
+ 1,
25361
+ 1,
25362
+ i,
25363
+ -1,
25364
+ 1,
25365
+ i
25366
+ ], baseIdx);
25367
+ }
25368
+ const meshIndices = new Uint32Array(6 * batchSize);
25369
+ for (let i = 0; i < batchSize; ++i) {
25370
+ const baseVertex = i * 4;
25371
+ const baseIdx = i * 6;
25372
+ meshIndices.set([
25373
+ 0 + baseVertex,
25374
+ 1 + baseVertex,
25375
+ 2 + baseVertex,
25376
+ 0 + baseVertex,
25377
+ 2 + baseVertex,
25378
+ 3 + baseVertex
25379
+ ], baseIdx);
25380
+ }
25381
+ this.setAttribute(VertexAttributeName.position, meshPositions);
25382
+ this.setIndices(meshIndices);
25383
+ this.addSubGeometry({
25384
+ indexStart: 0,
25385
+ indexCount: meshIndices.length,
25386
+ vertexStart: 0,
25387
+ vertexCount: meshPositions.length / 3,
25388
+ firstStart: 0,
25389
+ index: 0,
25390
+ topology: 0
25391
+ });
25392
+ }
25393
+ }
25394
+
25395
+ class Float32ArrayTexture extends Texture {
25396
+ create(width, height, data, filtering = true) {
25397
+ let device = webGPUContext.device;
25398
+ const bytesPerRow = width * 4 * 4;
25399
+ this.format = GPUTextureFormat.rgba32float;
25400
+ let mipmapCount = 1;
25401
+ this.createTextureDescriptor(width, height, mipmapCount, this.format);
25402
+ const textureDataBuffer = device.createBuffer({
25403
+ size: data.byteLength,
25404
+ usage: GPUBufferUsage.COPY_DST | GPUBufferUsage.COPY_SRC
25405
+ });
25406
+ device.queue.writeBuffer(textureDataBuffer, 0, data.buffer);
25407
+ const commandEncoder = GPUContext.beginCommandEncoder();
25408
+ commandEncoder.copyBufferToTexture(
25409
+ {
25410
+ buffer: textureDataBuffer,
25411
+ bytesPerRow
25412
+ },
25413
+ {
25414
+ texture: this.getGPUTexture()
25415
+ },
25416
+ {
25417
+ width,
25418
+ height,
25419
+ depthOrArrayLayers: 1
25420
+ }
25421
+ );
25422
+ GPUContext.endCommandEncoder(commandEncoder);
25423
+ if (filtering) {
25424
+ this.samplerBindingLayout.type = `non-filtering`;
25425
+ this.textureBindingLayout.sampleType = `unfilterable-float`;
25426
+ }
25427
+ this.gpuSampler = device.createSampler({});
25428
+ return this;
25429
+ }
25430
+ fromBuffer(width, height, textureDataBuffer) {
25431
+ let device = webGPUContext.device;
25432
+ const bytesPerRow = width * 4 * 4;
25433
+ this.format = GPUTextureFormat.rgba32float;
25434
+ this.mipmapCount = 1;
25435
+ this.createTextureDescriptor(width, height, this.mipmapCount, this.format);
25436
+ const commandEncoder = GPUContext.beginCommandEncoder();
25437
+ commandEncoder.copyBufferToTexture(
25438
+ {
25439
+ buffer: textureDataBuffer,
25440
+ bytesPerRow
25441
+ },
25442
+ {
25443
+ texture: this.getGPUTexture()
25444
+ },
25445
+ {
25446
+ width,
25447
+ height,
25448
+ depthOrArrayLayers: 1
25449
+ }
25450
+ );
25451
+ GPUContext.endCommandEncoder(commandEncoder);
25452
+ this.samplerBindingLayout.type = `non-filtering`;
25453
+ this.textureBindingLayout.sampleType = `unfilterable-float`;
25454
+ this.gpuSampler = device.createSampler({});
25455
+ return this;
25456
+ }
25457
+ }
25458
+
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;
25462
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
25463
+ if (decorator = decorators[i])
25464
+ result = (decorator(result)) || result;
25465
+ return result;
25466
+ };
25467
+ let PointCloudRenderer = class extends RenderNode {
25468
+ count = 0;
25469
+ size = new Vector2();
25470
+ pointColor;
25471
+ pointPosition;
25472
+ pointOrder;
25473
+ texParams;
25474
+ // [numPoints, texWidth, validCount, pointSize]
25475
+ pointCloudMaterial;
25476
+ _positions;
25477
+ get positions() {
25478
+ return this._positions;
25479
+ }
25480
+ _colors;
25481
+ _orderData;
25482
+ _fullCount = 0;
25483
+ get fullCount() {
25484
+ return this._fullCount;
25485
+ }
25486
+ _batchSize = 128;
25487
+ instanceCount = 0;
25488
+ _texturesInitialized = false;
25489
+ _debugFullScreen = false;
25490
+ _centerOffset = new Vector3();
25491
+ get centerOffset() {
25492
+ return this._centerOffset;
25493
+ }
25494
+ constructor() {
25495
+ super();
25496
+ }
25497
+ /**
25498
+ * Initialize point cloud from raw data
25499
+ * @param positions Point positions (xyz per point, Float32Array)
25500
+ * @param colors Point colors (rgba per point, Uint8Array)
25501
+ * @param count Number of points
25502
+ */
25503
+ initFromData(positions, colors, count) {
25504
+ if (!positions || !colors || count <= 0) {
25505
+ console.error("PointCloudRenderer: Invalid input data");
25506
+ return;
25507
+ }
25508
+ if (positions.length < count * 3) {
25509
+ console.error("PointCloudRenderer: Positions array too small");
25510
+ return;
25511
+ }
25512
+ if (colors.length < count * 4) {
25513
+ console.error("PointCloudRenderer: Colors array too small");
25514
+ return;
25515
+ }
25516
+ this.count = count;
25517
+ this._fullCount = count;
25518
+ this.size = this.evalTextureSize(count);
25519
+ this._positions = positions;
25520
+ this._colors = colors;
25521
+ this.centerizePositions();
25522
+ this.buildPositionTexture();
25523
+ this.buildColorTexture();
25524
+ this.texParams = new Float32Array([
25525
+ this.count,
25526
+ this.size.x,
25527
+ this.count,
25528
+ 4
25529
+ ]);
25530
+ this.buildOrderTexture();
25531
+ this.pointCloudMaterial = new PointCloudMaterial();
25532
+ this.geometry = new PointCloudGeometry(this._batchSize);
25533
+ this.materials = [this.pointCloudMaterial];
25534
+ this.instanceCount = Math.ceil(this.count / this._batchSize);
25535
+ }
25536
+ /**
25537
+ * Calculate texture size for given point count
25538
+ * @param count Number of points
25539
+ * @returns Texture dimensions (width, height)
25540
+ */
25541
+ evalTextureSize(count) {
25542
+ let w = Math.ceil(Math.sqrt(count));
25543
+ const align = 64;
25544
+ w = Math.ceil(w / align) * align;
25545
+ const h = Math.ceil(count / w);
25546
+ return new Vector2(w, h);
25547
+ }
25548
+ /**
25549
+ * Centerize positions to improve precision for large values
25550
+ * Subtracts the center point from all positions to keep values near zero
25551
+ */
25552
+ centerizePositions() {
25553
+ if (this.count === 0) return;
25554
+ let sumX = 0, sumY = 0, sumZ = 0;
25555
+ for (let i = 0; i < this.count; i++) {
25556
+ const idx = i * 3;
25557
+ sumX += this._positions[idx + 0];
25558
+ sumY += this._positions[idx + 1];
25559
+ sumZ += this._positions[idx + 2];
25560
+ }
25561
+ const centerX = sumX / this.count;
25562
+ const centerY = sumY / this.count;
25563
+ const centerZ = sumZ / this.count;
25564
+ this._centerOffset.set(centerX, centerY, centerZ);
25565
+ for (let i = 0; i < this.count; i++) {
25566
+ const idx = i * 3;
25567
+ this._positions[idx + 0] -= centerX;
25568
+ this._positions[idx + 1] -= centerY;
25569
+ this._positions[idx + 2] -= centerZ;
25570
+ }
25571
+ this.object3D.localPosition = this._centerOffset;
25572
+ }
25573
+ buildPositionTexture() {
25574
+ const w = this.size.x | 0;
25575
+ const h = this.size.y | 0;
25576
+ const count = this.count;
25577
+ const data = new Float32Array(w * h * 4);
25578
+ for (let i = 0; i < count; i++) {
25579
+ const idx = i * 4;
25580
+ const posIdx = i * 3;
25581
+ data[idx + 0] = this._positions[posIdx + 0];
25582
+ data[idx + 1] = this._positions[posIdx + 1];
25583
+ data[idx + 2] = this._positions[posIdx + 2];
25584
+ data[idx + 3] = 0;
25585
+ }
25586
+ if (count < w * h) {
25587
+ const lastIdx = (count - 1) * 4;
25588
+ for (let i = count; i < w * h; i++) {
25589
+ const idx = i * 4;
25590
+ data[idx + 0] = data[lastIdx + 0];
25591
+ data[idx + 1] = data[lastIdx + 1];
25592
+ data[idx + 2] = data[lastIdx + 2];
25593
+ data[idx + 3] = 0;
25594
+ }
25595
+ }
25596
+ this.pointPosition = new Float32ArrayTexture().create(w, h, data);
25597
+ this.pointPosition.name = "pointPosition";
25598
+ this.pointPosition.minFilter = "nearest";
25599
+ this.pointPosition.magFilter = "nearest";
25600
+ this.pointPosition.addressModeU = "clamp-to-edge";
25601
+ this.pointPosition.addressModeV = "clamp-to-edge";
25602
+ }
25603
+ buildColorTexture() {
25604
+ const w = this.size.x | 0;
25605
+ const h = this.size.y | 0;
25606
+ const count = this.count;
25607
+ const data = new Uint8Array(w * h * 4);
25608
+ for (let i = 0; i < count; i++) {
25609
+ const idx = i * 4;
25610
+ const colorIdx = i * 4;
25611
+ data[idx + 0] = this._colors[colorIdx + 0];
25612
+ data[idx + 1] = this._colors[colorIdx + 1];
25613
+ data[idx + 2] = this._colors[colorIdx + 2];
25614
+ data[idx + 3] = this._colors[colorIdx + 3];
25615
+ }
25616
+ if (count < w * h) {
25617
+ const lastIdx = (count - 1) * 4;
25618
+ for (let i = count; i < w * h; i++) {
25619
+ const idx = i * 4;
25620
+ data[idx + 0] = data[lastIdx + 0];
25621
+ data[idx + 1] = data[lastIdx + 1];
25622
+ data[idx + 2] = data[lastIdx + 2];
25623
+ data[idx + 3] = data[lastIdx + 3];
25624
+ }
25625
+ }
25626
+ this.pointColor = new Uint8ArrayTexture().create(w, h, data, false);
25627
+ this.pointColor.name = "pointColor";
25628
+ this.pointColor.minFilter = "nearest";
25629
+ this.pointColor.magFilter = "nearest";
25630
+ this.pointColor.mipmapFilter = "nearest";
25631
+ this.pointColor.addressModeU = "clamp-to-edge";
25632
+ this.pointColor.addressModeV = "clamp-to-edge";
25633
+ }
25634
+ buildOrderTexture() {
25635
+ const total = this.size.x * this.size.y;
25636
+ this._orderData = new Uint32Array(total);
25637
+ for (let i = 0; i < total; i++) {
25638
+ this._orderData[i] = i < this.count ? i : this.count > 0 ? this.count - 1 : 0;
25639
+ }
25640
+ this.pointOrder = new R32UintTexture().create(this.size.x, this.size.y, this._orderData);
25641
+ this.pointOrder.name = "pointOrder";
25642
+ this.pointOrder.minFilter = "nearest";
25643
+ this.pointOrder.magFilter = "nearest";
25644
+ this.pointOrder.addressModeU = "clamp-to-edge";
25645
+ this.pointOrder.addressModeV = "clamp-to-edge";
25646
+ }
25647
+ /**
25648
+ * Update node before rendering
25649
+ */
25650
+ nodeUpdate(view, passType, renderPassState, clusterLightingBuffer) {
25651
+ const worldMatrix = this.object3D.transform.worldMatrix;
25652
+ this.pointCloudMaterial.setTransformMatrix(worldMatrix);
25653
+ if (!this._texturesInitialized) {
25654
+ this.pointCloudMaterial.setPointTextures(
25655
+ this.pointPosition,
25656
+ this.pointColor,
25657
+ this.texParams,
25658
+ this.pointOrder
25659
+ );
25660
+ this.pointCloudMaterial.setBatchSize(this._batchSize);
25661
+ this.pointCloudMaterial.setPointSize(this.texParams[3]);
25662
+ this.pointCloudMaterial.enableDebugFullScreen(this._debugFullScreen);
25663
+ this._texturesInitialized = true;
25664
+ }
25665
+ super.nodeUpdate(view, passType, renderPassState, clusterLightingBuffer);
25666
+ }
25667
+ /**
25668
+ * Render pass
25669
+ */
25670
+ renderPass(view, passType, renderContext) {
25671
+ const encoder = renderContext.encoder;
25672
+ for (let mat of this.materials) {
25673
+ const passes = mat.getPass(passType);
25674
+ if (!passes || passes.length === 0) continue;
25675
+ for (const pass of passes) {
25676
+ if (!pass.pipeline) continue;
25677
+ pass.apply(this.geometry, renderContext.rendererPassState || renderContext);
25678
+ GPUContext.bindPipeline(encoder, pass);
25679
+ GPUContext.bindGeometryBuffer(encoder, this.geometry);
25680
+ const subGeometry = this.geometry.subGeometries[0];
25681
+ const lodInfo = subGeometry.lodLevels[0];
25682
+ if (this.instanceCount > 0) {
25683
+ GPUContext.drawIndexed(
25684
+ encoder,
25685
+ lodInfo.indexCount,
25686
+ this.instanceCount,
25687
+ lodInfo.indexStart,
25688
+ 0,
25689
+ 0
25690
+ );
25691
+ } else {
25692
+ GPUContext.drawIndexed(
25693
+ encoder,
25694
+ lodInfo.indexCount,
25695
+ 1,
25696
+ lodInfo.indexStart,
25697
+ 0,
25698
+ 0
25699
+ );
25700
+ }
25701
+ }
25702
+ }
25703
+ }
25704
+ /**
25705
+ * Set point size in pixels
25706
+ * @param size Point size in pixels
25707
+ */
25708
+ setPointSize(size) {
25709
+ this.texParams[3] = Math.max(0.1, size);
25710
+ if (this.pointCloudMaterial) {
25711
+ this.pointCloudMaterial.setPointSize(size);
25712
+ }
25713
+ }
25714
+ /**
25715
+ * Set point shape
25716
+ * @param shape 'square' or 'circle'
25717
+ */
25718
+ setPointShape(shape) {
25719
+ if (this.pointCloudMaterial) {
25720
+ this.pointCloudMaterial.setPointShape(shape);
25721
+ }
25722
+ }
25723
+ /**
25724
+ * Enable a fullscreen debug quad to validate the render pipeline.
25725
+ */
25726
+ enableDebugFullScreen(enabled) {
25727
+ this._debugFullScreen = enabled;
25728
+ if (this.pointCloudMaterial) {
25729
+ this.pointCloudMaterial.enableDebugFullScreen(enabled);
25730
+ }
25731
+ }
25732
+ /**
25733
+ * Set batch size for instanced rendering
25734
+ * @param batchSize Number of points per draw call
25735
+ */
25736
+ setBatchSize(batchSize) {
25737
+ this._batchSize = Math.max(1, batchSize | 0);
25738
+ if (this.geometry) {
25739
+ const oldGeometry = this.geometry;
25740
+ Reference.getInstance().detached(oldGeometry, this);
25741
+ if (!Reference.getInstance().hasReference(oldGeometry)) {
25742
+ oldGeometry.destroy();
25743
+ }
25744
+ this.geometry = new PointCloudGeometry(this._batchSize);
25745
+ }
25746
+ if (this.pointCloudMaterial) {
25747
+ this.pointCloudMaterial.setBatchSize(this._batchSize);
25748
+ this.pointCloudMaterial.enableDebugFullScreen(this._debugFullScreen);
25749
+ }
25750
+ this.instanceCount = Math.ceil(this.count / this._batchSize);
25751
+ }
25752
+ destroy(force) {
25753
+ if (this.pointColor) {
25754
+ this.pointColor.destroy(force);
25755
+ this.pointColor = null;
25756
+ }
25757
+ if (this.pointPosition) {
25758
+ this.pointPosition.destroy(force);
25759
+ this.pointPosition = null;
25760
+ }
25761
+ if (this.pointOrder) {
25762
+ this.pointOrder.destroy(force);
25763
+ this.pointOrder = null;
25764
+ }
25765
+ this._positions = null;
25766
+ this._colors = null;
25767
+ this._orderData = null;
25768
+ this.texParams = null;
25769
+ super.destroy(force);
25770
+ }
25771
+ };
25772
+ PointCloudRenderer = __decorateClass$j([
25773
+ RegisterComponent(PointCloudRenderer, "PointCloudRenderer")
25774
+ ], PointCloudRenderer);
25775
+
25088
25776
  class BoundUtil {
25089
25777
  static maxVector = new Vector3(
25090
25778
  Number.MAX_VALUE * 0.1,
@@ -25104,6 +25792,36 @@ class BoundUtil {
25104
25792
  new Vector3(),
25105
25793
  new Vector3()
25106
25794
  ];
25795
+ static genPointCloudBounds(obj, bound) {
25796
+ bound ||= new BoundingBox(Vector3.ZERO, Vector3.ZERO);
25797
+ bound.setFromMinMax(this.maxVector, this.minVector);
25798
+ let pointCloudRenderers = obj.getComponents(PointCloudRenderer);
25799
+ if (!pointCloudRenderers) {
25800
+ console.warn("genPointCloudBounds: No PointCloudRenderer found on object");
25801
+ return bound;
25802
+ }
25803
+ for (const pointCloudRenderer of pointCloudRenderers) {
25804
+ const positions = pointCloudRenderer.positions;
25805
+ const count = pointCloudRenderer.fullCount;
25806
+ if (!positions || count === 0) {
25807
+ console.warn("genPointCloudBounds: No position data available");
25808
+ continue;
25809
+ }
25810
+ const matrix = pointCloudRenderer.object3D.transform.worldMatrix;
25811
+ const point = new Vector3();
25812
+ for (let i = 0; i < count; i++) {
25813
+ const idx = i * 3;
25814
+ point.set(
25815
+ positions[idx + 0],
25816
+ positions[idx + 1],
25817
+ positions[idx + 2]
25818
+ );
25819
+ matrix.transformPoint(point, point);
25820
+ bound.expandByPoint(point);
25821
+ }
25822
+ }
25823
+ return bound;
25824
+ }
25107
25825
  static genGSplatBounds(obj, bound) {
25108
25826
  bound ||= new BoundingBox(Vector3.ZERO, Vector3.ZERO);
25109
25827
  bound.setFromMinMax(this.maxVector, this.minVector);
@@ -39081,7 +39799,10 @@ class FeatureTable {
39081
39799
  buffer;
39082
39800
  binOffset;
39083
39801
  binLength;
39084
- header;
39802
+ _header;
39803
+ get header() {
39804
+ return this._header;
39805
+ }
39085
39806
  constructor(buffer, start, headerLength, binLength) {
39086
39807
  this.buffer = buffer;
39087
39808
  this.binOffset = start + headerLength;
@@ -39093,13 +39814,13 @@ class FeatureTable {
39093
39814
  } else {
39094
39815
  header = {};
39095
39816
  }
39096
- this.header = header;
39817
+ this._header = header;
39097
39818
  }
39098
39819
  getKeys() {
39099
- return Object.keys(this.header);
39820
+ return Object.keys(this._header);
39100
39821
  }
39101
39822
  getData(key, count, defaultComponentType = null, defaultType = null) {
39102
- const header = this.header;
39823
+ const header = this._header;
39103
39824
  if (!(key in header)) {
39104
39825
  return null;
39105
39826
  }
@@ -39181,7 +39902,7 @@ class FeatureTable {
39181
39902
  }
39182
39903
  destroy() {
39183
39904
  this.buffer = null;
39184
- this.header = null;
39905
+ this._header = null;
39185
39906
  this.binOffset = null;
39186
39907
  this.binLength = null;
39187
39908
  }
@@ -41425,7 +42146,7 @@ class PostProcessingComponent extends ComponentBase {
41425
42146
  }
41426
42147
  }
41427
42148
 
41428
- const version = "1.0.26";
42149
+ const version = "1.0.28";
41429
42150
 
41430
42151
  class Engine3D {
41431
42152
  /**
@@ -60158,6 +60879,166 @@ function parsePlyMeshASCII(buffer, header) {
60158
60879
  triangleTexnumbers: triangleTexnumbers.length > 0 ? triangleTexnumbers : void 0
60159
60880
  };
60160
60881
  }
60882
+ function parsePlyPointCloud(buffer) {
60883
+ const header = parsePlyHeader(buffer);
60884
+ const { format } = header;
60885
+ if (format === "ascii") {
60886
+ return parsePlyPointCloudASCII(buffer, header);
60887
+ } else {
60888
+ return parsePlyPointCloudBinary(buffer, header);
60889
+ }
60890
+ }
60891
+ function parsePlyPointCloudBinary(buffer, header) {
60892
+ const { vertexCount, properties, headerByteLength } = header;
60893
+ const payload = new DataView(buffer, headerByteLength);
60894
+ const has = (n) => properties.find((p) => p.name === n) != null;
60895
+ const propIndex = (n) => properties.findIndex((p) => p.name === n);
60896
+ const position = new Float32Array(vertexCount * 3);
60897
+ const hasColor = (has("red") || has("r")) && (has("green") || has("g")) && (has("blue") || has("b"));
60898
+ const hasAlpha = has("alpha") || has("a");
60899
+ const color = hasColor ? new Uint8Array(vertexCount * 4) : void 0;
60900
+ const propOffsets = [];
60901
+ let stride = 0;
60902
+ for (const p of properties) {
60903
+ propOffsets.push(stride);
60904
+ stride += byteSizeOfType(p.type);
60905
+ }
60906
+ let base = 0;
60907
+ for (let v = 0; v < vertexCount; v++) {
60908
+ const vOffset = base;
60909
+ const ix = propIndex("x");
60910
+ const iy = propIndex("y");
60911
+ const iz = propIndex("z");
60912
+ if (ix < 0 || iy < 0 || iz < 0) {
60913
+ throw new Error("PLY: Missing x/y/z for vertex");
60914
+ }
60915
+ position[v * 3 + 0] = readByType(payload, vOffset + propOffsets[ix], properties[ix].type);
60916
+ position[v * 3 + 1] = readByType(payload, vOffset + propOffsets[iy], properties[iy].type);
60917
+ position[v * 3 + 2] = readByType(payload, vOffset + propOffsets[iz], properties[iz].type);
60918
+ if (color) {
60919
+ const rIdx = propIndex("red") >= 0 ? propIndex("red") : propIndex("r");
60920
+ const gIdx = propIndex("green") >= 0 ? propIndex("green") : propIndex("g");
60921
+ const bIdx = propIndex("blue") >= 0 ? propIndex("blue") : propIndex("b");
60922
+ const aIdx = hasAlpha ? propIndex("alpha") >= 0 ? propIndex("alpha") : propIndex("a") : -1;
60923
+ if (rIdx >= 0 && gIdx >= 0 && bIdx >= 0) {
60924
+ let r = readByType(payload, vOffset + propOffsets[rIdx], properties[rIdx].type);
60925
+ let g = readByType(payload, vOffset + propOffsets[gIdx], properties[gIdx].type);
60926
+ let b = readByType(payload, vOffset + propOffsets[bIdx], properties[bIdx].type);
60927
+ let a = 255;
60928
+ if (properties[rIdx].type === "float" || properties[rIdx].type === "float32" || properties[rIdx].type === "double" || properties[rIdx].type === "float64") {
60929
+ r = Math.round(r * 255);
60930
+ g = Math.round(g * 255);
60931
+ b = Math.round(b * 255);
60932
+ }
60933
+ if (aIdx >= 0) {
60934
+ a = readByType(payload, vOffset + propOffsets[aIdx], properties[aIdx].type);
60935
+ if (properties[aIdx].type === "float" || properties[aIdx].type === "float32" || properties[aIdx].type === "double" || properties[aIdx].type === "float64") {
60936
+ a = Math.round(a * 255);
60937
+ }
60938
+ }
60939
+ color[v * 4 + 0] = Math.max(0, Math.min(255, r));
60940
+ color[v * 4 + 1] = Math.max(0, Math.min(255, g));
60941
+ color[v * 4 + 2] = Math.max(0, Math.min(255, b));
60942
+ color[v * 4 + 3] = Math.max(0, Math.min(255, a));
60943
+ }
60944
+ }
60945
+ base += stride;
60946
+ }
60947
+ return {
60948
+ vertexCount,
60949
+ position,
60950
+ color
60951
+ };
60952
+ }
60953
+ function parsePlyPointCloudASCII(buffer, header) {
60954
+ const { vertexCount, properties } = header;
60955
+ const text = new TextDecoder("utf-8").decode(buffer);
60956
+ const headerEnd = text.indexOf("end_header");
60957
+ if (headerEnd < 0) {
60958
+ throw new Error("PLY: Invalid PLY header");
60959
+ }
60960
+ let bodyStart = headerEnd + "end_header".length;
60961
+ while (bodyStart < text.length && (text[bodyStart] === " " || text[bodyStart] === "\n" || text[bodyStart] === "\r")) {
60962
+ bodyStart++;
60963
+ }
60964
+ const bodyText = text.substring(bodyStart);
60965
+ const tokens = bodyText.split(/\s+/).filter((token) => token.length > 0);
60966
+ let tokenIndex = 0;
60967
+ const has = (n) => properties.find((p) => p.name === n) != null;
60968
+ const parseASCIINumber = (type) => {
60969
+ if (tokenIndex >= tokens.length) {
60970
+ throw new Error("PLY: Unexpected end of file");
60971
+ }
60972
+ const value = tokens[tokenIndex++];
60973
+ switch (type) {
60974
+ case "char":
60975
+ case "uchar":
60976
+ case "short":
60977
+ case "ushort":
60978
+ case "int":
60979
+ case "uint":
60980
+ case "int8":
60981
+ case "uint8":
60982
+ case "int16":
60983
+ case "uint16":
60984
+ case "int32":
60985
+ case "uint32":
60986
+ return parseInt(value);
60987
+ case "float":
60988
+ case "double":
60989
+ case "float32":
60990
+ case "float64":
60991
+ return parseFloat(value);
60992
+ default:
60993
+ return parseFloat(value);
60994
+ }
60995
+ };
60996
+ const position = new Float32Array(vertexCount * 3);
60997
+ const hasColor = (has("red") || has("r")) && (has("green") || has("g")) && (has("blue") || has("b"));
60998
+ const hasAlpha = has("alpha") || has("a");
60999
+ const color = hasColor ? new Uint8Array(vertexCount * 4) : void 0;
61000
+ const propIndex = (n) => properties.findIndex((p) => p.name === n);
61001
+ const xIdx = propIndex("x");
61002
+ const yIdx = propIndex("y");
61003
+ const zIdx = propIndex("z");
61004
+ const rIdx = hasColor ? propIndex("red") >= 0 ? propIndex("red") : propIndex("r") : -1;
61005
+ const gIdx = hasColor ? propIndex("green") >= 0 ? propIndex("green") : propIndex("g") : -1;
61006
+ const bIdx = hasColor ? propIndex("blue") >= 0 ? propIndex("blue") : propIndex("b") : -1;
61007
+ const aIdx = hasAlpha ? propIndex("alpha") >= 0 ? propIndex("alpha") : propIndex("a") : -1;
61008
+ for (let v = 0; v < vertexCount; v++) {
61009
+ for (let pIdx = 0; pIdx < properties.length; pIdx++) {
61010
+ const prop = properties[pIdx];
61011
+ const value = parseASCIINumber(prop.type);
61012
+ if (pIdx === xIdx) {
61013
+ position[v * 3 + 0] = value;
61014
+ } else if (pIdx === yIdx) {
61015
+ position[v * 3 + 1] = value;
61016
+ } else if (pIdx === zIdx) {
61017
+ position[v * 3 + 2] = value;
61018
+ } else if (pIdx === rIdx && color) {
61019
+ const r = prop.type === "uchar" || prop.type === "uint8" ? value : Math.round(value * 255);
61020
+ color[v * 4 + 0] = Math.max(0, Math.min(255, r));
61021
+ } else if (pIdx === gIdx && color) {
61022
+ const g = prop.type === "uchar" || prop.type === "uint8" ? value : Math.round(value * 255);
61023
+ color[v * 4 + 1] = Math.max(0, Math.min(255, g));
61024
+ } else if (pIdx === bIdx && color) {
61025
+ const b = prop.type === "uchar" || prop.type === "uint8" ? value : Math.round(value * 255);
61026
+ color[v * 4 + 2] = Math.max(0, Math.min(255, b));
61027
+ } else if (pIdx === aIdx && color) {
61028
+ const a = prop.type === "uchar" || prop.type === "uint8" ? value : Math.round(value * 255);
61029
+ color[v * 4 + 3] = Math.max(0, Math.min(255, a));
61030
+ }
61031
+ }
61032
+ if (color && aIdx < 0) {
61033
+ color[v * 4 + 3] = 255;
61034
+ }
61035
+ }
61036
+ return {
61037
+ vertexCount,
61038
+ position,
61039
+ color
61040
+ };
61041
+ }
60161
61042
 
60162
61043
  class GaussianSplatParser extends ParserBase {
60163
61044
  static format = ParserFormat.BIN;
@@ -60290,6 +61171,23 @@ class PlyParser extends ParserBase {
60290
61171
  break;
60291
61172
  }
60292
61173
  case PlyMode.PointCloud: {
61174
+ const plyData = parsePlyPointCloud(buffer);
61175
+ const pointCloudObj = new Object3D();
61176
+ pointCloudObj.name = "PLYPointCloud";
61177
+ const pointCloudObjRoot = new Object3D();
61178
+ pointCloudObjRoot.name = "PLYPointCloudRoot";
61179
+ pointCloudObj.addChild(pointCloudObjRoot);
61180
+ const renderer = pointCloudObjRoot.addComponent(PointCloudRenderer);
61181
+ if (plyData.color) {
61182
+ renderer.initFromData(plyData.position, plyData.color, plyData.vertexCount);
61183
+ } else {
61184
+ const defaultColors = new Uint8Array(plyData.vertexCount * 4);
61185
+ defaultColors.fill(255);
61186
+ renderer.initFromData(plyData.position, defaultColors, plyData.vertexCount);
61187
+ }
61188
+ renderer.setPointShape("circle");
61189
+ renderer.setPointSize(4);
61190
+ this.data = pointCloudObj;
60293
61191
  break;
60294
61192
  }
60295
61193
  case PlyMode.Mesh: {
@@ -60393,6 +61291,274 @@ class PlyParser extends ParserBase {
60393
61291
  }
60394
61292
  }
60395
61293
 
61294
+ class PNTSLoaderBase {
61295
+ async parse(buffer) {
61296
+ const dataView = new DataView(buffer);
61297
+ const magic = readMagicBytes(dataView);
61298
+ console.assert(magic === "pnts");
61299
+ const version = dataView.getUint32(4, true);
61300
+ console.assert(version === 1);
61301
+ const byteLength = dataView.getUint32(8, true);
61302
+ console.assert(byteLength === buffer.byteLength);
61303
+ const featureTableJSONByteLength = dataView.getUint32(12, true);
61304
+ const featureTableBinaryByteLength = dataView.getUint32(16, true);
61305
+ const batchTableJSONByteLength = dataView.getUint32(20, true);
61306
+ const batchTableBinaryByteLength = dataView.getUint32(24, true);
61307
+ const featureTableStart = 28;
61308
+ const featureTable = new FeatureTable(
61309
+ buffer,
61310
+ featureTableStart,
61311
+ featureTableJSONByteLength,
61312
+ featureTableBinaryByteLength
61313
+ );
61314
+ const batchTableStart = featureTableStart + featureTableJSONByteLength + featureTableBinaryByteLength;
61315
+ const pointsLength = featureTable.header.POINTS_LENGTH || 0;
61316
+ const batchTable = new BatchTable(
61317
+ buffer,
61318
+ pointsLength,
61319
+ batchTableStart,
61320
+ batchTableJSONByteLength,
61321
+ batchTableBinaryByteLength
61322
+ );
61323
+ return {
61324
+ version,
61325
+ featureTable,
61326
+ batchTable
61327
+ };
61328
+ }
61329
+ }
61330
+
61331
+ class PNTSLoader extends PNTSLoaderBase {
61332
+ async parse(buffer) {
61333
+ const pnts = await super.parse(buffer);
61334
+ const { featureTable, batchTable } = pnts;
61335
+ const pointsLength = featureTable.header.POINTS_LENGTH;
61336
+ if (!pointsLength || pointsLength <= 0) {
61337
+ throw new Error("PNTSLoader: POINTS_LENGTH must be defined and greater than zero");
61338
+ }
61339
+ const extensions = featureTable.header.extensions;
61340
+ const dracoExtension = extensions?.["3DTILES_draco_point_compression"];
61341
+ let positions;
61342
+ let colors;
61343
+ if (dracoExtension) {
61344
+ const dracoData = await this.parseDraco(
61345
+ featureTable,
61346
+ dracoExtension,
61347
+ pointsLength
61348
+ );
61349
+ positions = dracoData.positions;
61350
+ colors = dracoData.colors;
61351
+ dracoData.normals;
61352
+ } else {
61353
+ positions = this.parsePositions(featureTable, pointsLength);
61354
+ colors = this.parseColors(featureTable, pointsLength);
61355
+ this.parseNormals(featureTable, pointsLength);
61356
+ }
61357
+ const pointCloudObj = new Object3D();
61358
+ const renderer = pointCloudObj.addComponent(PointCloudRenderer);
61359
+ renderer.initFromData(positions, colors, pointsLength);
61360
+ const rtcCenter = featureTable.getData("RTC_CENTER", 1, "FLOAT", "VEC3");
61361
+ if (rtcCenter) {
61362
+ pointCloudObj.transform.localPosition.set(
61363
+ rtcCenter[0],
61364
+ rtcCenter[1],
61365
+ rtcCenter[2]
61366
+ );
61367
+ }
61368
+ pointCloudObj["batchTable"] = batchTable;
61369
+ pointCloudObj["featureTable"] = featureTable;
61370
+ return pointCloudObj;
61371
+ }
61372
+ parsePositions(featureTable, pointsLength) {
61373
+ let positions = featureTable.getData(
61374
+ "POSITION",
61375
+ pointsLength,
61376
+ "FLOAT",
61377
+ "VEC3"
61378
+ );
61379
+ if (positions) {
61380
+ return positions;
61381
+ }
61382
+ const quantized = featureTable.getData(
61383
+ "POSITION_QUANTIZED",
61384
+ pointsLength,
61385
+ "UNSIGNED_SHORT",
61386
+ "VEC3"
61387
+ );
61388
+ if (!quantized) {
61389
+ throw new Error(
61390
+ "PNTSLoader: Either POSITION or POSITION_QUANTIZED must be defined"
61391
+ );
61392
+ }
61393
+ const scale = featureTable.getData(
61394
+ "QUANTIZED_VOLUME_SCALE",
61395
+ 1,
61396
+ "FLOAT",
61397
+ "VEC3"
61398
+ );
61399
+ const offset = featureTable.getData(
61400
+ "QUANTIZED_VOLUME_OFFSET",
61401
+ 1,
61402
+ "FLOAT",
61403
+ "VEC3"
61404
+ );
61405
+ if (!scale || !offset) {
61406
+ throw new Error(
61407
+ "PNTSLoader: QUANTIZED_VOLUME_SCALE and QUANTIZED_VOLUME_OFFSET must be defined for quantized positions"
61408
+ );
61409
+ }
61410
+ const decoded = new Float32Array(pointsLength * 3);
61411
+ const quantizedRange = 65535;
61412
+ for (let i = 0; i < pointsLength; i++) {
61413
+ const idx = i * 3;
61414
+ decoded[idx + 0] = quantized[idx + 0] / quantizedRange * scale[0] + offset[0];
61415
+ decoded[idx + 1] = quantized[idx + 1] / quantizedRange * scale[1] + offset[1];
61416
+ decoded[idx + 2] = quantized[idx + 2] / quantizedRange * scale[2] + offset[2];
61417
+ }
61418
+ return decoded;
61419
+ }
61420
+ parseColors(featureTable, pointsLength) {
61421
+ let colors = featureTable.getData(
61422
+ "RGBA",
61423
+ pointsLength,
61424
+ "UNSIGNED_BYTE",
61425
+ "VEC4"
61426
+ );
61427
+ if (colors) {
61428
+ return colors;
61429
+ }
61430
+ const rgb = featureTable.getData(
61431
+ "RGB",
61432
+ pointsLength,
61433
+ "UNSIGNED_BYTE",
61434
+ "VEC3"
61435
+ );
61436
+ if (rgb) {
61437
+ const rgba2 = new Uint8Array(pointsLength * 4);
61438
+ for (let i = 0; i < pointsLength; i++) {
61439
+ const rgbIdx = i * 3;
61440
+ const rgbaIdx = i * 4;
61441
+ rgba2[rgbaIdx + 0] = rgb[rgbIdx + 0];
61442
+ rgba2[rgbaIdx + 1] = rgb[rgbIdx + 1];
61443
+ rgba2[rgbaIdx + 2] = rgb[rgbIdx + 2];
61444
+ rgba2[rgbaIdx + 3] = 255;
61445
+ }
61446
+ return rgba2;
61447
+ }
61448
+ const rgb565 = featureTable.getData(
61449
+ "RGB565",
61450
+ pointsLength,
61451
+ "UNSIGNED_SHORT",
61452
+ "SCALAR"
61453
+ );
61454
+ if (rgb565) {
61455
+ const rgba2 = new Uint8Array(pointsLength * 4);
61456
+ for (let i = 0; i < pointsLength; i++) {
61457
+ const decoded = this.decodeRGB565(rgb565[i]);
61458
+ const idx = i * 4;
61459
+ rgba2[idx + 0] = decoded[0];
61460
+ rgba2[idx + 1] = decoded[1];
61461
+ rgba2[idx + 2] = decoded[2];
61462
+ rgba2[idx + 3] = 255;
61463
+ }
61464
+ return rgba2;
61465
+ }
61466
+ const constantRGBA = featureTable.getData(
61467
+ "CONSTANT_RGBA",
61468
+ 1,
61469
+ "UNSIGNED_BYTE",
61470
+ "VEC4"
61471
+ );
61472
+ if (constantRGBA) {
61473
+ const rgba2 = new Uint8Array(pointsLength * 4);
61474
+ for (let i = 0; i < pointsLength; i++) {
61475
+ const idx = i * 4;
61476
+ rgba2[idx + 0] = constantRGBA[0];
61477
+ rgba2[idx + 1] = constantRGBA[1];
61478
+ rgba2[idx + 2] = constantRGBA[2];
61479
+ rgba2[idx + 3] = constantRGBA[3];
61480
+ }
61481
+ return rgba2;
61482
+ }
61483
+ const rgba = new Uint8Array(pointsLength * 4);
61484
+ rgba.fill(255);
61485
+ return rgba;
61486
+ }
61487
+ parseNormals(featureTable, pointsLength) {
61488
+ let normals = featureTable.getData(
61489
+ "NORMAL",
61490
+ pointsLength,
61491
+ "FLOAT",
61492
+ "VEC3"
61493
+ );
61494
+ if (normals) {
61495
+ return normals;
61496
+ }
61497
+ const octNormals = featureTable.getData(
61498
+ "NORMAL_OCT16P",
61499
+ pointsLength,
61500
+ "UNSIGNED_BYTE",
61501
+ "VEC2"
61502
+ );
61503
+ if (octNormals) {
61504
+ return this.decodeOctNormals(octNormals, pointsLength);
61505
+ }
61506
+ return null;
61507
+ }
61508
+ decodeRGB565(value) {
61509
+ const r = (value >> 11 & 31) << 3;
61510
+ const g = (value >> 5 & 63) << 2;
61511
+ const b = (value & 31) << 3;
61512
+ return [r, g, b];
61513
+ }
61514
+ decodeOctNormals(octNormals, pointsLength) {
61515
+ const normals = new Float32Array(pointsLength * 3);
61516
+ for (let i = 0; i < pointsLength; i++) {
61517
+ const idx = i * 2;
61518
+ const x = octNormals[idx] / 255;
61519
+ const y = octNormals[idx + 1] / 255;
61520
+ const nx = x * 2 - 1;
61521
+ const ny = y * 2 - 1;
61522
+ const nz = 1 - Math.abs(nx) - Math.abs(ny);
61523
+ let tx, ty;
61524
+ if (nz < 0) {
61525
+ tx = (nx >= 0 ? 1 : -1) * (1 - Math.abs(ny));
61526
+ ty = (ny >= 0 ? 1 : -1) * (1 - Math.abs(nx));
61527
+ } else {
61528
+ tx = nx;
61529
+ ty = ny;
61530
+ }
61531
+ const length = Math.sqrt(tx * tx + ty * ty + nz * nz);
61532
+ const nidx = i * 3;
61533
+ normals[nidx + 0] = tx / length;
61534
+ normals[nidx + 1] = ty / length;
61535
+ normals[nidx + 2] = nz / length;
61536
+ }
61537
+ return normals;
61538
+ }
61539
+ async parseDraco(featureTable, dracoExtension, pointsLength) {
61540
+ throw new Error("Draco compression not yet implemented");
61541
+ }
61542
+ }
61543
+
61544
+ class PNTSParser extends ParserBase {
61545
+ static format = ParserFormat.BIN;
61546
+ async parseBuffer(buffer) {
61547
+ const loader = new PNTSLoader();
61548
+ const pntsRoot = await loader.parse(buffer);
61549
+ const pntsObj = new Object3D();
61550
+ pntsObj.name = "PNTS";
61551
+ pntsObj.addChild(pntsRoot);
61552
+ this.data = pntsObj;
61553
+ }
61554
+ verification() {
61555
+ if (this.data) {
61556
+ return true;
61557
+ }
61558
+ throw new Error("PNTSParser: Parse failed");
61559
+ }
61560
+ }
61561
+
60396
61562
  class PrefabBoneData {
60397
61563
  boneName;
60398
61564
  bonePath;
@@ -63499,9 +64665,9 @@ class TilesRenderer {
63499
64665
  const extension = getUrlExtension(uri);
63500
64666
  const fullUrl = url;
63501
64667
  let scene = null;
64668
+ const loader = new FileLoader();
63502
64669
  switch (extension.toLowerCase()) {
63503
- case "b3dm":
63504
- const loader = new FileLoader();
64670
+ case "b3dm": {
63505
64671
  const parser = await loader.load(fullUrl, B3DMParser, {
63506
64672
  onProgress: (e) => {
63507
64673
  },
@@ -63510,29 +64676,38 @@ class TilesRenderer {
63510
64676
  });
63511
64677
  scene = parser.data;
63512
64678
  break;
63513
- case "i3dm":
63514
- scene = await Engine3D.res.loadI3DM(
63515
- fullUrl,
63516
- {
63517
- onProgress: (e) => {
63518
- },
63519
- onComplete: (e) => {
63520
- }
64679
+ }
64680
+ case "i3dm": {
64681
+ const parser = await loader.load(fullUrl, I3DMParser, {
64682
+ onProgress: (e) => {
64683
+ },
64684
+ onComplete: (e) => {
63521
64685
  }
63522
- );
64686
+ });
64687
+ scene = parser.data;
63523
64688
  break;
64689
+ }
63524
64690
  case "glb":
63525
- case "gltf":
63526
- scene = await Engine3D.res.loadGltf(fullUrl, {
64691
+ case "gltf": {
64692
+ const parser = await loader.load(fullUrl, GLTFParser, {
63527
64693
  onProgress: (e) => {
63528
64694
  },
63529
64695
  onComplete: (e) => {
63530
64696
  }
63531
64697
  });
64698
+ scene = parser.data;
63532
64699
  break;
63533
- case "pnts":
63534
- console.warn("PNTS format not yet supported");
64700
+ }
64701
+ case "pnts": {
64702
+ const parser = await loader.load(fullUrl, PNTSParser, {
64703
+ onProgress: (e) => {
64704
+ },
64705
+ onComplete: (e) => {
64706
+ }
64707
+ });
64708
+ scene = parser.data;
63535
64709
  break;
64710
+ }
63536
64711
  case "json":
63537
64712
  {
63538
64713
  try {
@@ -68529,69 +69704,6 @@ class TriGeometry extends GeometryBase {
68529
69704
  }
68530
69705
  }
68531
69706
 
68532
- class Float32ArrayTexture extends Texture {
68533
- create(width, height, data, filtering = true) {
68534
- let device = webGPUContext.device;
68535
- const bytesPerRow = width * 4 * 4;
68536
- this.format = GPUTextureFormat.rgba32float;
68537
- let mipmapCount = 1;
68538
- this.createTextureDescriptor(width, height, mipmapCount, this.format);
68539
- const textureDataBuffer = device.createBuffer({
68540
- size: data.byteLength,
68541
- usage: GPUBufferUsage.COPY_DST | GPUBufferUsage.COPY_SRC
68542
- });
68543
- device.queue.writeBuffer(textureDataBuffer, 0, data);
68544
- const commandEncoder = GPUContext.beginCommandEncoder();
68545
- commandEncoder.copyBufferToTexture(
68546
- {
68547
- buffer: textureDataBuffer,
68548
- bytesPerRow
68549
- },
68550
- {
68551
- texture: this.getGPUTexture()
68552
- },
68553
- {
68554
- width,
68555
- height,
68556
- depthOrArrayLayers: 1
68557
- }
68558
- );
68559
- GPUContext.endCommandEncoder(commandEncoder);
68560
- if (filtering) {
68561
- this.samplerBindingLayout.type = `non-filtering`;
68562
- this.textureBindingLayout.sampleType = `unfilterable-float`;
68563
- }
68564
- this.gpuSampler = device.createSampler({});
68565
- }
68566
- fromBuffer(width, height, textureDataBuffer) {
68567
- let device = webGPUContext.device;
68568
- const bytesPerRow = width * 4 * 4;
68569
- this.format = GPUTextureFormat.rgba32float;
68570
- this.mipmapCount = 1;
68571
- this.createTextureDescriptor(width, height, this.mipmapCount, this.format);
68572
- const commandEncoder = GPUContext.beginCommandEncoder();
68573
- commandEncoder.copyBufferToTexture(
68574
- {
68575
- buffer: textureDataBuffer,
68576
- bytesPerRow
68577
- },
68578
- {
68579
- texture: this.getGPUTexture()
68580
- },
68581
- {
68582
- width,
68583
- height,
68584
- depthOrArrayLayers: 1
68585
- }
68586
- );
68587
- GPUContext.endCommandEncoder(commandEncoder);
68588
- this.samplerBindingLayout.type = `non-filtering`;
68589
- this.textureBindingLayout.sampleType = `unfilterable-float`;
68590
- this.gpuSampler = device.createSampler({});
68591
- return this;
68592
- }
68593
- }
68594
-
68595
69707
  class SolidColorSky extends LDRTextureCube {
68596
69708
  _internalTexture;
68597
69709
  _minSize = 32;
@@ -69968,4 +71080,4 @@ const __viteBrowserExternal = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.def
69968
71080
  __proto__: null
69969
71081
  }, Symbol.toStringTag, { value: 'Module' }));
69970
71082
 
69971
- 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, 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, ParserBase, ParserFormat, ParticleSystemCurveEvalMode, ParticleSystemRandomnessIds, PassGenerate, PassShader, PassType, PhysicMaterialUniform_frag, PickCompute, PickFire, PickGUIEvent3D, PickResult, Picker_cs, PingPong, PipelinePool, Plane3D, PlaneClassification, PlaneGeometry, PlyMode, PlyParser, PointClassification, 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, 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 };
71083
+ 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, 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 };