tsparticles 1.41.3 → 1.41.6

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.
Files changed (89) hide show
  1. package/Core/Canvas.js +1 -4
  2. package/Core/Particle.d.ts +1 -0
  3. package/Core/Particle.js +1 -0
  4. package/Core/Particles.js +2 -1
  5. package/Plugins/Emitters/EmitterInstance.js +8 -7
  6. package/Updaters/Size/SizeUpdater.js +0 -1
  7. package/browser/Core/Canvas.js +1 -4
  8. package/browser/Core/Particle.d.ts +1 -0
  9. package/browser/Core/Particle.js +1 -0
  10. package/browser/Core/Particles.js +2 -1
  11. package/browser/Plugins/Emitters/EmitterInstance.js +8 -7
  12. package/browser/Updaters/Size/SizeUpdater.js +0 -1
  13. package/esm/Core/Canvas.js +1 -4
  14. package/esm/Core/Particle.d.ts +1 -0
  15. package/esm/Core/Particle.js +1 -0
  16. package/esm/Core/Particles.js +2 -1
  17. package/esm/Plugins/Emitters/EmitterInstance.js +8 -7
  18. package/esm/Updaters/Size/SizeUpdater.js +0 -1
  19. package/package.json +1 -1
  20. package/report.html +2 -2
  21. package/report.slim.html +2 -2
  22. package/tsparticles.engine.js +4 -5
  23. package/tsparticles.engine.min.js +2 -2
  24. package/tsparticles.interaction.external.attract.js +4 -5
  25. package/tsparticles.interaction.external.attract.min.js +1 -1
  26. package/tsparticles.interaction.external.bounce.js +4 -5
  27. package/tsparticles.interaction.external.bounce.min.js +1 -1
  28. package/tsparticles.interaction.external.bubble.js +4 -5
  29. package/tsparticles.interaction.external.bubble.min.js +1 -1
  30. package/tsparticles.interaction.external.connect.js +4 -5
  31. package/tsparticles.interaction.external.connect.min.js +1 -1
  32. package/tsparticles.interaction.external.grab.js +4 -5
  33. package/tsparticles.interaction.external.grab.min.js +1 -1
  34. package/tsparticles.interaction.external.repulse.js +4 -5
  35. package/tsparticles.interaction.external.repulse.min.js +1 -1
  36. package/tsparticles.interaction.external.trail.js +4 -5
  37. package/tsparticles.interaction.external.trail.min.js +1 -1
  38. package/tsparticles.interaction.particles.attract.js +4 -5
  39. package/tsparticles.interaction.particles.attract.min.js +1 -1
  40. package/tsparticles.interaction.particles.collisions.js +4 -5
  41. package/tsparticles.interaction.particles.collisions.min.js +1 -1
  42. package/tsparticles.interaction.particles.links.js +4 -5
  43. package/tsparticles.interaction.particles.links.min.js +1 -1
  44. package/tsparticles.js +12 -13
  45. package/tsparticles.min.js +2 -2
  46. package/tsparticles.pathseg.min.js +1 -1
  47. package/tsparticles.plugins.absorbers.js +4 -5
  48. package/tsparticles.plugins.absorbers.min.js +1 -1
  49. package/tsparticles.plugins.emitters.js +12 -12
  50. package/tsparticles.plugins.emitters.min.js +2 -2
  51. package/tsparticles.plugins.polygonMask.js +4 -5
  52. package/tsparticles.plugins.polygonMask.min.js +1 -1
  53. package/tsparticles.shape.circle.min.js +1 -1
  54. package/tsparticles.shape.image.js +4 -5
  55. package/tsparticles.shape.image.min.js +1 -1
  56. package/tsparticles.shape.line.min.js +1 -1
  57. package/tsparticles.shape.polygon.min.js +1 -1
  58. package/tsparticles.shape.square.min.js +1 -1
  59. package/tsparticles.shape.star.min.js +1 -1
  60. package/tsparticles.shape.text.js +4 -5
  61. package/tsparticles.shape.text.min.js +1 -1
  62. package/tsparticles.slim.js +4 -6
  63. package/tsparticles.slim.min.js +2 -2
  64. package/tsparticles.updater.angle.js +4 -5
  65. package/tsparticles.updater.angle.min.js +1 -1
  66. package/tsparticles.updater.color.js +4 -5
  67. package/tsparticles.updater.color.min.js +1 -1
  68. package/tsparticles.updater.life.js +4 -5
  69. package/tsparticles.updater.life.min.js +1 -1
  70. package/tsparticles.updater.opacity.js +4 -5
  71. package/tsparticles.updater.opacity.min.js +1 -1
  72. package/tsparticles.updater.outModes.js +4 -5
  73. package/tsparticles.updater.outModes.min.js +1 -1
  74. package/tsparticles.updater.roll.js +4 -5
  75. package/tsparticles.updater.roll.min.js +1 -1
  76. package/tsparticles.updater.size.js +4 -6
  77. package/tsparticles.updater.size.min.js +2 -2
  78. package/tsparticles.updater.strokeColor.js +4 -5
  79. package/tsparticles.updater.strokeColor.min.js +1 -1
  80. package/tsparticles.updater.tilt.js +4 -5
  81. package/tsparticles.updater.tilt.min.js +1 -1
  82. package/tsparticles.updater.wobble.js +4 -5
  83. package/tsparticles.updater.wobble.min.js +1 -1
  84. package/umd/Core/Canvas.js +1 -4
  85. package/umd/Core/Particle.d.ts +1 -0
  86. package/umd/Core/Particle.js +1 -0
  87. package/umd/Core/Particles.js +2 -1
  88. package/umd/Plugins/Emitters/EmitterInstance.js +8 -7
  89. package/umd/Updaters/Size/SizeUpdater.js +0 -1
@@ -2560,10 +2560,7 @@
2560
2560
  const container = this.container;
2561
2561
  const pxRatio = container.retina.pixelRatio;
2562
2562
  const size = container.canvas.size;
2563
- const oldSize = {
2564
- width: size.width,
2565
- height: size.height
2566
- };
2563
+ const oldSize = Object.assign({}, size);
2567
2564
  size.width = this.element.offsetWidth * pxRatio;
2568
2565
  size.height = this.element.offsetHeight * pxRatio;
2569
2566
  this.element.width = size.width;
@@ -5432,6 +5429,7 @@
5432
5429
  this.retina = {
5433
5430
  maxDistance: {}
5434
5431
  };
5432
+ this.ignoresResizeRatio = true;
5435
5433
  const pxRatio = container.retina.pixelRatio;
5436
5434
  const mainOptions = container.actualOptions;
5437
5435
  const particlesOptions = new ParticlesOptions;
@@ -5867,10 +5865,11 @@
5867
5865
  }
5868
5866
  for (const particle of this.array) {
5869
5867
  const resizeFactor = container.canvas.resizeFactor;
5870
- if (resizeFactor) {
5868
+ if (resizeFactor && !particle.ignoresResizeRatio) {
5871
5869
  particle.position.x *= resizeFactor.width;
5872
5870
  particle.position.y *= resizeFactor.height;
5873
5871
  }
5872
+ particle.ignoresResizeRatio = false;
5874
5873
  particle.bubble.inRange = false;
5875
5874
  for (const [, plugin] of this.container.plugins) {
5876
5875
  if (particle.destroyed) {
@@ -8584,7 +8583,6 @@
8584
8583
  }
8585
8584
  particle.size.loops++;
8586
8585
  } else {
8587
- console.log("decreasing");
8588
8586
  particle.size.value -= sizeVelocity;
8589
8587
  }
8590
8588
  }