@quake2ts/engine 0.0.767 → 0.0.770

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.
package/dist/esm/index.js CHANGED
@@ -6765,7 +6765,6 @@ var Md3Pipeline = class {
6765
6765
  // src/render/particleSystem.ts
6766
6766
  var DEFAULT_COLOR = [1, 1, 1, 1];
6767
6767
  var ParticleSystem = class {
6768
- // 0 alpha, 1 additive
6769
6768
  constructor(maxParticles, rng) {
6770
6769
  this.maxParticles = maxParticles;
6771
6770
  this.rng = rng;
@@ -6788,6 +6787,7 @@ var ParticleSystem = class {
6788
6787
  this.bounce = new Float32Array(maxParticles);
6789
6788
  this.fade = new Uint8Array(maxParticles);
6790
6789
  this.blendMode = new Uint8Array(maxParticles);
6790
+ this.textureIndex = new Int16Array(maxParticles);
6791
6791
  }
6792
6792
  spawn(options) {
6793
6793
  const index = this.findFreeSlot();
@@ -6815,6 +6815,7 @@ var ParticleSystem = class {
6815
6815
  this.bounce[index] = options.bounce ?? 0.25;
6816
6816
  this.fade[index] = options.fade ? 1 : 0;
6817
6817
  this.blendMode[index] = options.blendMode === "additive" ? 1 : 0;
6818
+ this.textureIndex[index] = options.textureIndex ?? 0;
6818
6819
  return index;
6819
6820
  }
6820
6821
  update(dt, options = {}) {
@@ -6871,7 +6872,8 @@ var ParticleSystem = class {
6871
6872
  remaining: this.remaining[index],
6872
6873
  color: [this.colorR[index], this.colorG[index], this.colorB[index], this.colorA[index]],
6873
6874
  size: this.size[index],
6874
- blendMode: this.blendMode[index] === 1 ? "additive" : "alpha"
6875
+ blendMode: this.blendMode[index] === 1 ? "additive" : "alpha",
6876
+ textureIndex: this.textureIndex[index]
6875
6877
  };
6876
6878
  }
6877
6879
  buildMesh(viewRight, viewUp) {