@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.
@@ -25040,30 +25040,32 @@ class BoundUtil {
25040
25040
  static genGSplatBounds(obj, bound) {
25041
25041
  bound ||= new BoundingBox(Vector3.ZERO, Vector3.ZERO);
25042
25042
  bound.setFromMinMax(this.maxVector, this.minVector);
25043
- let gsplatRenderer = obj.getComponent(GSplatRenderer);
25044
- if (!gsplatRenderer) {
25043
+ let gsplatRenderers = obj.getComponents(GSplatRenderer);
25044
+ if (!gsplatRenderers) {
25045
25045
  console.warn("genGSplatBounds: No GSplatRenderer found on object");
25046
25046
  return bound;
25047
25047
  }
25048
- const positions = gsplatRenderer.positions;
25049
- const count = gsplatRenderer.fullCount;
25050
- if (!positions || count === 0) {
25051
- console.warn("genGSplatBounds: No position data available");
25052
- return bound;
25053
- }
25054
- const matrix = obj.transform.worldMatrix;
25055
- const point = new Vector3();
25056
- for (let i = 0; i < count; i++) {
25057
- const idx = i * 3;
25058
- point.set(
25059
- positions[idx + 0],
25060
- positions[idx + 1],
25061
- positions[idx + 2]
25062
- );
25063
- matrix.transformPoint(point, point);
25064
- bound.expandByPoint(point);
25048
+ for (const gsplatRenderer of gsplatRenderers) {
25049
+ const positions = gsplatRenderer.positions;
25050
+ const count = gsplatRenderer.fullCount;
25051
+ if (!positions || count === 0) {
25052
+ console.warn("genGSplatBounds: No position data available");
25053
+ return bound;
25054
+ }
25055
+ const matrix = obj.transform.worldMatrix;
25056
+ const point = new Vector3();
25057
+ for (let i = 0; i < count; i++) {
25058
+ const idx = i * 3;
25059
+ point.set(
25060
+ positions[idx + 0],
25061
+ positions[idx + 1],
25062
+ positions[idx + 2]
25063
+ );
25064
+ matrix.transformPoint(point, point);
25065
+ bound.expandByPoint(point);
25066
+ }
25067
+ bound.setFromMinMax(bound.min, bound.max);
25065
25068
  }
25066
- bound.setFromMinMax(bound.min, bound.max);
25067
25069
  return bound;
25068
25070
  }
25069
25071
  static genMeshBounds(obj, bound) {
@@ -41251,7 +41253,7 @@ class PostProcessingComponent extends ComponentBase {
41251
41253
  }
41252
41254
  }
41253
41255
 
41254
- const version = "1.0.19";
41256
+ const version = "1.0.20";
41255
41257
 
41256
41258
  class Engine3D {
41257
41259
  /**