@neutrinoparticles/js-v1.1-phaser 1.1.2 → 1.1.3

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.
@@ -1741,9 +1741,12 @@ class DataTextureManager {
1741
1741
  `NeutrinoParticles: data texture ${a}x${r} exceeds GL MAX_TEXTURE_SIZE (${o}). Reduce effect particle capacity.`
1742
1742
  );
1743
1743
  this._gl = e, this.textureWidth = a, this.textureHeight = r, this._data = t;
1744
- for (let l = 0; l < RING_BUFFER_SIZE$1; l++) {
1745
- const d = e.createTexture();
1746
- e.bindTexture(e.TEXTURE_2D, d), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, e.NEAREST), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, e.NEAREST), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S, e.CLAMP_TO_EDGE), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_T, e.CLAMP_TO_EDGE), e.texImage2D(
1744
+ const l = e.getParameter(e.ACTIVE_TEXTURE);
1745
+ e.activeTexture(e.TEXTURE0);
1746
+ const d = e.getParameter(e.TEXTURE_BINDING_2D);
1747
+ for (let i = 0; i < RING_BUFFER_SIZE$1; i++) {
1748
+ const c = e.createTexture();
1749
+ e.bindTexture(e.TEXTURE_2D, c), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, e.NEAREST), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, e.NEAREST), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S, e.CLAMP_TO_EDGE), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_T, e.CLAMP_TO_EDGE), e.texImage2D(
1747
1750
  e.TEXTURE_2D,
1748
1751
  0,
1749
1752
  e.RGBA32UI,
@@ -1753,9 +1756,9 @@ class DataTextureManager {
1753
1756
  e.RGBA_INTEGER,
1754
1757
  e.UNSIGNED_INT,
1755
1758
  null
1756
- ), this._textures.push(d);
1759
+ ), this._textures.push(c);
1757
1760
  }
1758
- e.bindTexture(e.TEXTURE_2D, null);
1761
+ e.bindTexture(e.TEXTURE_2D, d), e.activeTexture(l);
1759
1762
  }
1760
1763
  get currentTexture() {
1761
1764
  return this._textures[this._currentIndex];