@rings-webgpu/core 1.0.20 → 1.0.21

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.
@@ -25047,30 +25047,32 @@ struct InstanceData {
25047
25047
  static genGSplatBounds(obj, bound) {
25048
25048
  bound ||= new BoundingBox(Vector3.ZERO, Vector3.ZERO);
25049
25049
  bound.setFromMinMax(this.maxVector, this.minVector);
25050
- let gsplatRenderer = obj.getComponent(exports.GSplatRenderer);
25051
- if (!gsplatRenderer) {
25050
+ let gsplatRenderers = obj.getComponents(exports.GSplatRenderer);
25051
+ if (!gsplatRenderers) {
25052
25052
  console.warn("genGSplatBounds: No GSplatRenderer found on object");
25053
25053
  return bound;
25054
25054
  }
25055
- const positions = gsplatRenderer.positions;
25056
- const count = gsplatRenderer.fullCount;
25057
- if (!positions || count === 0) {
25058
- console.warn("genGSplatBounds: No position data available");
25059
- return bound;
25060
- }
25061
- const matrix = obj.transform.worldMatrix;
25062
- const point = new Vector3();
25063
- for (let i = 0; i < count; i++) {
25064
- const idx = i * 3;
25065
- point.set(
25066
- positions[idx + 0],
25067
- positions[idx + 1],
25068
- positions[idx + 2]
25069
- );
25070
- matrix.transformPoint(point, point);
25071
- bound.expandByPoint(point);
25055
+ for (const gsplatRenderer of gsplatRenderers) {
25056
+ const positions = gsplatRenderer.positions;
25057
+ const count = gsplatRenderer.fullCount;
25058
+ if (!positions || count === 0) {
25059
+ console.warn("genGSplatBounds: No position data available");
25060
+ return bound;
25061
+ }
25062
+ const matrix = obj.transform.worldMatrix;
25063
+ const point = new Vector3();
25064
+ for (let i = 0; i < count; i++) {
25065
+ const idx = i * 3;
25066
+ point.set(
25067
+ positions[idx + 0],
25068
+ positions[idx + 1],
25069
+ positions[idx + 2]
25070
+ );
25071
+ matrix.transformPoint(point, point);
25072
+ bound.expandByPoint(point);
25073
+ }
25074
+ bound.setFromMinMax(bound.min, bound.max);
25072
25075
  }
25073
- bound.setFromMinMax(bound.min, bound.max);
25074
25076
  return bound;
25075
25077
  }
25076
25078
  static genMeshBounds(obj, bound) {
@@ -41258,7 +41260,7 @@ else if (typeof exports === 'object')
41258
41260
  }
41259
41261
  }
41260
41262
 
41261
- const version = "1.0.19";
41263
+ const version = "1.0.20";
41262
41264
 
41263
41265
  class Engine3D {
41264
41266
  /**
@@ -381,9 +381,6 @@ export * from "./loader/LoaderManager";
381
381
  export * from "./loader/parser/3dgs/GaussianSplatAsset";
382
382
  export * from "./loader/parser/3dgs/GaussianSplatParser";
383
383
  export * from "./loader/parser/3dgs/loaders/FormatDetector";
384
- export * from "./loader/parser/3dgs/loaders/ply/PlyLoader";
385
- export * from "./loader/parser/3dgs/loaders/ply/PlyTypes";
386
- export * from "./loader/parser/3dgs/loaders/ply/PlyUtils";
387
384
  export * from "./loader/parser/AtlasParser";
388
385
  export * from "./loader/parser/B3DMParser";
389
386
  export * from "./loader/parser/FontParser";
@@ -429,6 +426,9 @@ export * from "./loader/parser/kmz/dataDef/global";
429
426
  export * from "./loader/parser/kmz/dataDef/point";
430
427
  export * from "./loader/parser/kmz/dataDef/template";
431
428
  export * from "./loader/parser/kmz/dataDef/wayline";
429
+ export * from "./loader/parser/ply/PlyLoader";
430
+ export * from "./loader/parser/ply/PlyTypes";
431
+ export * from "./loader/parser/ply/PlyUtils";
432
432
  export * from "./loader/parser/prefab/PrefabAvatarParser";
433
433
  export * from "./loader/parser/prefab/PrefabMaterialParser";
434
434
  export * from "./loader/parser/prefab/PrefabMeshParser";
@@ -7,4 +7,3 @@
7
7
  * - KSPLAT: Compressed format (TODO)
8
8
  */
9
9
  export * from './FormatDetector';
10
- export * from './ply';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rings-webgpu/core",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "Rings webgpu Engine",
5
5
  "main": "index.js",
6
6
  "exports": {