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