@rings-webgpu/core 1.0.18 → 1.0.19

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.
@@ -41057,7 +41057,7 @@ class PostProcessingComponent extends ComponentBase {
41057
41057
  }
41058
41058
  }
41059
41059
 
41060
- const version = "1.0.18";
41060
+ const version = "1.0.19";
41061
41061
 
41062
41062
  class Engine3D {
41063
41063
  /**
@@ -61382,12 +61382,16 @@ function toggleTiles(tile, renderer) {
61382
61382
  }
61383
61383
 
61384
61384
  class BoundingVolume {
61385
+ static s_tmpMatrix = null;
61385
61386
  _type;
61386
61387
  _data;
61387
61388
  _box;
61388
61389
  _sphere;
61389
61390
  _matrix;
61390
61391
  constructor(data) {
61392
+ if (!BoundingVolume.s_tmpMatrix) {
61393
+ BoundingVolume.s_tmpMatrix = new Matrix4();
61394
+ }
61391
61395
  this._data = data;
61392
61396
  if (data.box) {
61393
61397
  this._type = "box";
@@ -61511,7 +61515,8 @@ class BoundingVolume {
61511
61515
  }
61512
61516
  return target;
61513
61517
  } else if (this._box) {
61514
- const worldMatrix = new Matrix4();
61518
+ const worldMatrix = BoundingVolume.s_tmpMatrix;
61519
+ worldMatrix.identity();
61515
61520
  if (this._matrix) {
61516
61521
  if (parentTransform) {
61517
61522
  worldMatrix.multiplyMatrices(parentTransform, this._matrix);