tsparticles 1.41.6 → 1.42.2

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 (302) hide show
  1. package/Core/Canvas.d.ts +1 -1
  2. package/Core/Canvas.js +8 -4
  3. package/Core/Interfaces/ICoordinates.d.ts +8 -0
  4. package/Core/Interfaces/IParticleGravity.d.ts +5 -0
  5. package/Core/Interfaces/IParticleGravity.js +2 -0
  6. package/Core/Interfaces/index.d.ts +1 -0
  7. package/Core/Interfaces/index.js +1 -0
  8. package/Core/Particle.d.ts +2 -1
  9. package/Core/Particle.js +8 -7
  10. package/Core/Retina.js +7 -7
  11. package/Core/Utils/ParticlesMover.js +2 -2
  12. package/Interactions/Particles/Links/LinkInstance.js +1 -1
  13. package/Options/Classes/AnimatableGradient.d.ts +4 -4
  14. package/Options/Classes/AnimatableGradient.js +4 -4
  15. package/Options/Classes/AnimationOptions.d.ts +5 -5
  16. package/Options/Classes/AnimationOptions.js +3 -2
  17. package/Options/Classes/ColorAnimation.d.ts +2 -2
  18. package/Options/Classes/ColorAnimation.js +2 -2
  19. package/Options/Classes/Particles/Move/Attract.d.ts +2 -2
  20. package/Options/Classes/Particles/Move/Attract.js +2 -1
  21. package/Options/Classes/Particles/Move/MoveAngle.d.ts +3 -3
  22. package/Options/Classes/Particles/Move/MoveAngle.js +3 -2
  23. package/Options/Classes/Particles/Move/MoveGravity.d.ts +5 -5
  24. package/Options/Classes/Particles/Move/MoveGravity.js +3 -2
  25. package/Options/Classes/Particles/Orbit/Orbit.d.ts +4 -4
  26. package/Options/Classes/Particles/Orbit/Orbit.js +4 -3
  27. package/Options/Classes/Particles/Repulse/Repulse.d.ts +5 -5
  28. package/Options/Classes/Particles/Repulse/Repulse.js +5 -4
  29. package/Options/Classes/Particles/Roll/RollLight.d.ts +2 -2
  30. package/Options/Classes/Particles/Roll/RollLight.js +2 -1
  31. package/Options/Classes/Particles/Rotate/RotateAnimation.d.ts +2 -2
  32. package/Options/Classes/Particles/Rotate/RotateAnimation.js +2 -1
  33. package/Options/Classes/Particles/Tilt/TiltAnimation.d.ts +2 -2
  34. package/Options/Classes/Particles/Tilt/TiltAnimation.js +2 -1
  35. package/Options/Classes/Particles/Twinkle/TwinkleValues.d.ts +2 -2
  36. package/Options/Classes/Particles/Twinkle/TwinkleValues.js +2 -1
  37. package/Options/Interfaces/IAnimation.d.ts +3 -2
  38. package/Options/Interfaces/Particles/Move/IAttract.d.ts +3 -2
  39. package/Options/Interfaces/Particles/Move/IMoveAngle.d.ts +3 -2
  40. package/Options/Interfaces/Particles/Move/IMoveGravity.d.ts +3 -2
  41. package/Options/Interfaces/Particles/Orbit/IOrbit.d.ts +4 -3
  42. package/Options/Interfaces/Particles/Repulse/IRepulse.d.ts +5 -4
  43. package/Options/Interfaces/Particles/Roll/IRollLight.d.ts +2 -1
  44. package/Options/Interfaces/Particles/Rotate/IRotateAnimation.d.ts +2 -1
  45. package/Options/Interfaces/Particles/Tilt/ITiltAnimation.d.ts +2 -1
  46. package/Options/Interfaces/Particles/Twinkle/ITwinkleValues.d.ts +3 -2
  47. package/Plugins/Absorbers/AbsorberInstance.js +1 -1
  48. package/Plugins/Absorbers/Options/Classes/Absorber.d.ts +2 -2
  49. package/Plugins/Absorbers/Options/Classes/Absorber.js +8 -4
  50. package/Plugins/Absorbers/Options/Interfaces/IAbsorber.d.ts +2 -2
  51. package/Plugins/Emitters/EmitterInstance.js +3 -3
  52. package/Plugins/Emitters/Options/Classes/Emitter.d.ts +2 -2
  53. package/Plugins/Emitters/Options/Classes/Emitter.js +8 -5
  54. package/Plugins/Emitters/Options/Interfaces/IEmitter.d.ts +2 -2
  55. package/Updaters/Angle/AngleUpdater.js +2 -1
  56. package/Updaters/Opacity/OpacityUpdater.js +3 -2
  57. package/Updaters/Roll/RollUpdater.js +3 -3
  58. package/Updaters/Tilt/TiltUpdater.js +1 -1
  59. package/Utils/ColorUtils.js +1 -1
  60. package/browser/Core/Canvas.d.ts +1 -1
  61. package/browser/Core/Canvas.js +9 -5
  62. package/browser/Core/Interfaces/ICoordinates.d.ts +8 -0
  63. package/browser/Core/Interfaces/IParticleGravity.d.ts +5 -0
  64. package/browser/Core/Interfaces/IParticleGravity.js +1 -0
  65. package/browser/Core/Interfaces/index.d.ts +1 -0
  66. package/browser/Core/Interfaces/index.js +1 -0
  67. package/browser/Core/Particle.d.ts +2 -1
  68. package/browser/Core/Particle.js +8 -7
  69. package/browser/Core/Retina.js +7 -7
  70. package/browser/Core/Utils/ParticlesMover.js +2 -2
  71. package/browser/Interactions/Particles/Links/LinkInstance.js +2 -2
  72. package/browser/Options/Classes/AnimatableGradient.d.ts +4 -4
  73. package/browser/Options/Classes/AnimatableGradient.js +4 -4
  74. package/browser/Options/Classes/AnimationOptions.d.ts +5 -5
  75. package/browser/Options/Classes/AnimationOptions.js +3 -2
  76. package/browser/Options/Classes/ColorAnimation.d.ts +2 -2
  77. package/browser/Options/Classes/ColorAnimation.js +2 -2
  78. package/browser/Options/Classes/Particles/Move/Attract.d.ts +2 -2
  79. package/browser/Options/Classes/Particles/Move/Attract.js +2 -1
  80. package/browser/Options/Classes/Particles/Move/MoveAngle.d.ts +3 -3
  81. package/browser/Options/Classes/Particles/Move/MoveAngle.js +3 -2
  82. package/browser/Options/Classes/Particles/Move/MoveGravity.d.ts +5 -5
  83. package/browser/Options/Classes/Particles/Move/MoveGravity.js +3 -2
  84. package/browser/Options/Classes/Particles/Orbit/Orbit.d.ts +4 -4
  85. package/browser/Options/Classes/Particles/Orbit/Orbit.js +4 -3
  86. package/browser/Options/Classes/Particles/Repulse/Repulse.d.ts +5 -5
  87. package/browser/Options/Classes/Particles/Repulse/Repulse.js +5 -4
  88. package/browser/Options/Classes/Particles/Roll/RollLight.d.ts +2 -2
  89. package/browser/Options/Classes/Particles/Roll/RollLight.js +2 -1
  90. package/browser/Options/Classes/Particles/Rotate/RotateAnimation.d.ts +2 -2
  91. package/browser/Options/Classes/Particles/Rotate/RotateAnimation.js +2 -1
  92. package/browser/Options/Classes/Particles/Tilt/TiltAnimation.d.ts +2 -2
  93. package/browser/Options/Classes/Particles/Tilt/TiltAnimation.js +2 -1
  94. package/browser/Options/Classes/Particles/Twinkle/TwinkleValues.d.ts +2 -2
  95. package/browser/Options/Classes/Particles/Twinkle/TwinkleValues.js +2 -1
  96. package/browser/Options/Interfaces/IAnimation.d.ts +3 -2
  97. package/browser/Options/Interfaces/Particles/Move/IAttract.d.ts +3 -2
  98. package/browser/Options/Interfaces/Particles/Move/IMoveAngle.d.ts +3 -2
  99. package/browser/Options/Interfaces/Particles/Move/IMoveGravity.d.ts +3 -2
  100. package/browser/Options/Interfaces/Particles/Orbit/IOrbit.d.ts +4 -3
  101. package/browser/Options/Interfaces/Particles/Repulse/IRepulse.d.ts +5 -4
  102. package/browser/Options/Interfaces/Particles/Roll/IRollLight.d.ts +2 -1
  103. package/browser/Options/Interfaces/Particles/Rotate/IRotateAnimation.d.ts +2 -1
  104. package/browser/Options/Interfaces/Particles/Tilt/ITiltAnimation.d.ts +2 -1
  105. package/browser/Options/Interfaces/Particles/Twinkle/ITwinkleValues.d.ts +3 -2
  106. package/browser/Plugins/Absorbers/AbsorberInstance.js +1 -1
  107. package/browser/Plugins/Absorbers/Options/Classes/Absorber.d.ts +2 -2
  108. package/browser/Plugins/Absorbers/Options/Classes/Absorber.js +8 -4
  109. package/browser/Plugins/Absorbers/Options/Interfaces/IAbsorber.d.ts +2 -2
  110. package/browser/Plugins/Emitters/EmitterInstance.js +3 -3
  111. package/browser/Plugins/Emitters/Options/Classes/Emitter.d.ts +2 -2
  112. package/browser/Plugins/Emitters/Options/Classes/Emitter.js +8 -5
  113. package/browser/Plugins/Emitters/Options/Interfaces/IEmitter.d.ts +2 -2
  114. package/browser/Updaters/Angle/AngleUpdater.js +2 -1
  115. package/browser/Updaters/Opacity/OpacityUpdater.js +3 -2
  116. package/browser/Updaters/Roll/RollUpdater.js +3 -3
  117. package/browser/Updaters/Tilt/TiltUpdater.js +1 -1
  118. package/browser/Utils/ColorUtils.js +2 -2
  119. package/esm/Core/Canvas.d.ts +1 -1
  120. package/esm/Core/Canvas.js +9 -5
  121. package/esm/Core/Interfaces/ICoordinates.d.ts +8 -0
  122. package/esm/Core/Interfaces/IParticleGravity.d.ts +5 -0
  123. package/esm/Core/Interfaces/IParticleGravity.js +1 -0
  124. package/esm/Core/Interfaces/index.d.ts +1 -0
  125. package/esm/Core/Interfaces/index.js +1 -0
  126. package/esm/Core/Particle.d.ts +2 -1
  127. package/esm/Core/Particle.js +8 -7
  128. package/esm/Core/Retina.js +7 -7
  129. package/esm/Core/Utils/ParticlesMover.js +2 -2
  130. package/esm/Interactions/Particles/Links/LinkInstance.js +2 -2
  131. package/esm/Options/Classes/AnimatableGradient.d.ts +4 -4
  132. package/esm/Options/Classes/AnimatableGradient.js +4 -4
  133. package/esm/Options/Classes/AnimationOptions.d.ts +5 -5
  134. package/esm/Options/Classes/AnimationOptions.js +3 -2
  135. package/esm/Options/Classes/ColorAnimation.d.ts +2 -2
  136. package/esm/Options/Classes/ColorAnimation.js +2 -2
  137. package/esm/Options/Classes/Particles/Move/Attract.d.ts +2 -2
  138. package/esm/Options/Classes/Particles/Move/Attract.js +2 -1
  139. package/esm/Options/Classes/Particles/Move/MoveAngle.d.ts +3 -3
  140. package/esm/Options/Classes/Particles/Move/MoveAngle.js +3 -2
  141. package/esm/Options/Classes/Particles/Move/MoveGravity.d.ts +5 -5
  142. package/esm/Options/Classes/Particles/Move/MoveGravity.js +3 -2
  143. package/esm/Options/Classes/Particles/Orbit/Orbit.d.ts +4 -4
  144. package/esm/Options/Classes/Particles/Orbit/Orbit.js +4 -3
  145. package/esm/Options/Classes/Particles/Repulse/Repulse.d.ts +5 -5
  146. package/esm/Options/Classes/Particles/Repulse/Repulse.js +5 -4
  147. package/esm/Options/Classes/Particles/Roll/RollLight.d.ts +2 -2
  148. package/esm/Options/Classes/Particles/Roll/RollLight.js +2 -1
  149. package/esm/Options/Classes/Particles/Rotate/RotateAnimation.d.ts +2 -2
  150. package/esm/Options/Classes/Particles/Rotate/RotateAnimation.js +2 -1
  151. package/esm/Options/Classes/Particles/Tilt/TiltAnimation.d.ts +2 -2
  152. package/esm/Options/Classes/Particles/Tilt/TiltAnimation.js +2 -1
  153. package/esm/Options/Classes/Particles/Twinkle/TwinkleValues.d.ts +2 -2
  154. package/esm/Options/Classes/Particles/Twinkle/TwinkleValues.js +2 -1
  155. package/esm/Options/Interfaces/IAnimation.d.ts +3 -2
  156. package/esm/Options/Interfaces/Particles/Move/IAttract.d.ts +3 -2
  157. package/esm/Options/Interfaces/Particles/Move/IMoveAngle.d.ts +3 -2
  158. package/esm/Options/Interfaces/Particles/Move/IMoveGravity.d.ts +3 -2
  159. package/esm/Options/Interfaces/Particles/Orbit/IOrbit.d.ts +4 -3
  160. package/esm/Options/Interfaces/Particles/Repulse/IRepulse.d.ts +5 -4
  161. package/esm/Options/Interfaces/Particles/Roll/IRollLight.d.ts +2 -1
  162. package/esm/Options/Interfaces/Particles/Rotate/IRotateAnimation.d.ts +2 -1
  163. package/esm/Options/Interfaces/Particles/Tilt/ITiltAnimation.d.ts +2 -1
  164. package/esm/Options/Interfaces/Particles/Twinkle/ITwinkleValues.d.ts +3 -2
  165. package/esm/Plugins/Absorbers/AbsorberInstance.js +1 -1
  166. package/esm/Plugins/Absorbers/Options/Classes/Absorber.d.ts +2 -2
  167. package/esm/Plugins/Absorbers/Options/Classes/Absorber.js +8 -4
  168. package/esm/Plugins/Absorbers/Options/Interfaces/IAbsorber.d.ts +2 -2
  169. package/esm/Plugins/Emitters/EmitterInstance.js +3 -3
  170. package/esm/Plugins/Emitters/Options/Classes/Emitter.d.ts +2 -2
  171. package/esm/Plugins/Emitters/Options/Classes/Emitter.js +8 -5
  172. package/esm/Plugins/Emitters/Options/Interfaces/IEmitter.d.ts +2 -2
  173. package/esm/Updaters/Angle/AngleUpdater.js +2 -1
  174. package/esm/Updaters/Opacity/OpacityUpdater.js +3 -2
  175. package/esm/Updaters/Roll/RollUpdater.js +3 -3
  176. package/esm/Updaters/Tilt/TiltUpdater.js +1 -1
  177. package/esm/Utils/ColorUtils.js +2 -2
  178. package/package.json +15 -3
  179. package/report.html +2 -2
  180. package/report.slim.html +2 -2
  181. package/scripts/install.js +11 -2
  182. package/tsparticles.engine.js +48 -45
  183. package/tsparticles.engine.min.js +2 -2
  184. package/tsparticles.interaction.external.attract.js +320 -34
  185. package/tsparticles.interaction.external.attract.min.js +1 -1
  186. package/tsparticles.interaction.external.bounce.js +320 -34
  187. package/tsparticles.interaction.external.bounce.min.js +1 -1
  188. package/tsparticles.interaction.external.bubble.js +320 -34
  189. package/tsparticles.interaction.external.bubble.min.js +1 -1
  190. package/tsparticles.interaction.external.connect.js +320 -34
  191. package/tsparticles.interaction.external.connect.min.js +1 -1
  192. package/tsparticles.interaction.external.grab.js +320 -34
  193. package/tsparticles.interaction.external.grab.min.js +1 -1
  194. package/tsparticles.interaction.external.repulse.js +320 -34
  195. package/tsparticles.interaction.external.repulse.min.js +1 -1
  196. package/tsparticles.interaction.external.trail.js +320 -34
  197. package/tsparticles.interaction.external.trail.min.js +1 -1
  198. package/tsparticles.interaction.particles.attract.js +320 -34
  199. package/tsparticles.interaction.particles.attract.min.js +1 -1
  200. package/tsparticles.interaction.particles.collisions.js +320 -34
  201. package/tsparticles.interaction.particles.collisions.min.js +1 -1
  202. package/tsparticles.interaction.particles.links.js +321 -35
  203. package/tsparticles.interaction.particles.links.min.js +2 -2
  204. package/tsparticles.js +74 -65
  205. package/tsparticles.min.js +2 -2
  206. package/tsparticles.pathseg.min.js +1 -1
  207. package/tsparticles.plugins.absorbers.js +328 -39
  208. package/tsparticles.plugins.absorbers.min.js +2 -2
  209. package/tsparticles.plugins.emitters.js +431 -142
  210. package/tsparticles.plugins.emitters.min.js +2 -2
  211. package/tsparticles.plugins.polygonMask.js +320 -34
  212. package/tsparticles.plugins.polygonMask.min.js +1 -1
  213. package/tsparticles.shape.circle.min.js +1 -1
  214. package/tsparticles.shape.image.js +320 -34
  215. package/tsparticles.shape.image.min.js +1 -1
  216. package/tsparticles.shape.line.min.js +1 -1
  217. package/tsparticles.shape.polygon.min.js +1 -1
  218. package/tsparticles.shape.square.min.js +1 -1
  219. package/tsparticles.shape.star.min.js +1 -1
  220. package/tsparticles.shape.text.js +320 -34
  221. package/tsparticles.shape.text.min.js +1 -1
  222. package/tsparticles.slim.js +52 -49
  223. package/tsparticles.slim.min.js +2 -2
  224. package/tsparticles.updater.angle.js +321 -35
  225. package/tsparticles.updater.angle.min.js +2 -2
  226. package/tsparticles.updater.color.js +320 -34
  227. package/tsparticles.updater.color.min.js +2 -2
  228. package/tsparticles.updater.life.js +320 -34
  229. package/tsparticles.updater.life.min.js +1 -1
  230. package/tsparticles.updater.opacity.js +322 -36
  231. package/tsparticles.updater.opacity.min.js +2 -2
  232. package/tsparticles.updater.outModes.js +320 -34
  233. package/tsparticles.updater.outModes.min.js +1 -1
  234. package/tsparticles.updater.roll.js +323 -37
  235. package/tsparticles.updater.roll.min.js +2 -2
  236. package/tsparticles.updater.size.js +320 -34
  237. package/tsparticles.updater.size.min.js +1 -1
  238. package/tsparticles.updater.strokeColor.js +320 -34
  239. package/tsparticles.updater.strokeColor.min.js +2 -2
  240. package/tsparticles.updater.tilt.js +321 -35
  241. package/tsparticles.updater.tilt.min.js +2 -2
  242. package/tsparticles.updater.wobble.js +320 -34
  243. package/tsparticles.updater.wobble.min.js +1 -1
  244. package/umd/Core/Canvas.d.ts +1 -1
  245. package/umd/Core/Canvas.js +8 -4
  246. package/umd/Core/Interfaces/ICoordinates.d.ts +8 -0
  247. package/umd/Core/Interfaces/IParticleGravity.d.ts +5 -0
  248. package/umd/Core/Interfaces/IParticleGravity.js +12 -0
  249. package/umd/Core/Interfaces/index.d.ts +1 -0
  250. package/umd/Core/Interfaces/index.js +2 -1
  251. package/umd/Core/Particle.d.ts +2 -1
  252. package/umd/Core/Particle.js +8 -7
  253. package/umd/Core/Retina.js +7 -7
  254. package/umd/Core/Utils/ParticlesMover.js +2 -2
  255. package/umd/Interactions/Particles/Links/LinkInstance.js +1 -1
  256. package/umd/Options/Classes/AnimatableGradient.d.ts +4 -4
  257. package/umd/Options/Classes/AnimatableGradient.js +4 -4
  258. package/umd/Options/Classes/AnimationOptions.d.ts +5 -5
  259. package/umd/Options/Classes/AnimationOptions.js +4 -3
  260. package/umd/Options/Classes/ColorAnimation.d.ts +2 -2
  261. package/umd/Options/Classes/ColorAnimation.js +2 -2
  262. package/umd/Options/Classes/Particles/Move/Attract.d.ts +2 -2
  263. package/umd/Options/Classes/Particles/Move/Attract.js +3 -2
  264. package/umd/Options/Classes/Particles/Move/MoveAngle.d.ts +3 -3
  265. package/umd/Options/Classes/Particles/Move/MoveAngle.js +4 -3
  266. package/umd/Options/Classes/Particles/Move/MoveGravity.d.ts +5 -5
  267. package/umd/Options/Classes/Particles/Move/MoveGravity.js +4 -3
  268. package/umd/Options/Classes/Particles/Orbit/Orbit.d.ts +4 -4
  269. package/umd/Options/Classes/Particles/Orbit/Orbit.js +5 -4
  270. package/umd/Options/Classes/Particles/Repulse/Repulse.d.ts +5 -5
  271. package/umd/Options/Classes/Particles/Repulse/Repulse.js +6 -5
  272. package/umd/Options/Classes/Particles/Roll/RollLight.d.ts +2 -2
  273. package/umd/Options/Classes/Particles/Roll/RollLight.js +3 -2
  274. package/umd/Options/Classes/Particles/Rotate/RotateAnimation.d.ts +2 -2
  275. package/umd/Options/Classes/Particles/Rotate/RotateAnimation.js +3 -2
  276. package/umd/Options/Classes/Particles/Tilt/TiltAnimation.d.ts +2 -2
  277. package/umd/Options/Classes/Particles/Tilt/TiltAnimation.js +3 -2
  278. package/umd/Options/Classes/Particles/Twinkle/TwinkleValues.d.ts +2 -2
  279. package/umd/Options/Classes/Particles/Twinkle/TwinkleValues.js +3 -2
  280. package/umd/Options/Interfaces/IAnimation.d.ts +3 -2
  281. package/umd/Options/Interfaces/Particles/Move/IAttract.d.ts +3 -2
  282. package/umd/Options/Interfaces/Particles/Move/IMoveAngle.d.ts +3 -2
  283. package/umd/Options/Interfaces/Particles/Move/IMoveGravity.d.ts +3 -2
  284. package/umd/Options/Interfaces/Particles/Orbit/IOrbit.d.ts +4 -3
  285. package/umd/Options/Interfaces/Particles/Repulse/IRepulse.d.ts +5 -4
  286. package/umd/Options/Interfaces/Particles/Roll/IRollLight.d.ts +2 -1
  287. package/umd/Options/Interfaces/Particles/Rotate/IRotateAnimation.d.ts +2 -1
  288. package/umd/Options/Interfaces/Particles/Tilt/ITiltAnimation.d.ts +2 -1
  289. package/umd/Options/Interfaces/Particles/Twinkle/ITwinkleValues.d.ts +3 -2
  290. package/umd/Plugins/Absorbers/AbsorberInstance.js +1 -1
  291. package/umd/Plugins/Absorbers/Options/Classes/Absorber.d.ts +2 -2
  292. package/umd/Plugins/Absorbers/Options/Classes/Absorber.js +9 -5
  293. package/umd/Plugins/Absorbers/Options/Interfaces/IAbsorber.d.ts +2 -2
  294. package/umd/Plugins/Emitters/EmitterInstance.js +3 -3
  295. package/umd/Plugins/Emitters/Options/Classes/Emitter.d.ts +2 -2
  296. package/umd/Plugins/Emitters/Options/Classes/Emitter.js +9 -6
  297. package/umd/Plugins/Emitters/Options/Interfaces/IEmitter.d.ts +2 -2
  298. package/umd/Updaters/Angle/AngleUpdater.js +2 -1
  299. package/umd/Updaters/Opacity/OpacityUpdater.js +3 -2
  300. package/umd/Updaters/Roll/RollUpdater.js +3 -3
  301. package/umd/Updaters/Tilt/TiltUpdater.js +1 -1
  302. package/umd/Utils/ColorUtils.js +1 -1
@@ -799,7 +799,7 @@
799
799
  function setColorAnimation(colorValue, colorAnimation, reduceFactor) {
800
800
  colorValue.enable = colorAnimation.enable;
801
801
  if (colorValue.enable) {
802
- colorValue.velocity = colorAnimation.speed / 100 * reduceFactor;
802
+ colorValue.velocity = getRangeValue(colorAnimation.speed) / 100 * reduceFactor;
803
803
  if (colorAnimation.sync) {
804
804
  return;
805
805
  }
@@ -1674,7 +1674,7 @@
1674
1674
  }
1675
1675
  const container = this.container, slowFactor = this.getProximitySpeedFactor(particle), baseSpeed = ((_a = (_d = particle.retina).moveSpeed) !== null && _a !== void 0 ? _a : _d.moveSpeed = getRangeValue(moveOptions.speed) * container.retina.pixelRatio) * container.retina.reduceFactor, moveDrift = (_b = (_e = particle.retina).moveDrift) !== null && _b !== void 0 ? _b : _e.moveDrift = getRangeValue(particle.options.move.drift) * container.retina.pixelRatio, maxSize = getRangeMax(particleOptions.size.value) * container.retina.pixelRatio, sizeFactor = moveOptions.size ? particle.getRadius() / maxSize : 1, diffFactor = 2, speedFactor = sizeFactor * slowFactor * (delta.factor || 1) / diffFactor, moveSpeed = baseSpeed * speedFactor;
1676
1676
  this.applyPath(particle, delta);
1677
- const gravityOptions = moveOptions.gravity;
1677
+ const gravityOptions = particle.gravity;
1678
1678
  const gravityFactor = gravityOptions.enable && gravityOptions.inverse ? -1 : 1;
1679
1679
  if (gravityOptions.enable && moveSpeed) {
1680
1680
  particle.velocity.y += gravityFactor * (gravityOptions.acceleration * delta.factor) / (60 * moveSpeed);
@@ -1688,7 +1688,7 @@
1688
1688
  }
1689
1689
  const velocity = particle.velocity.mult(moveSpeed);
1690
1690
  const maxSpeed = (_c = particle.retina.maxSpeed) !== null && _c !== void 0 ? _c : container.retina.maxSpeed;
1691
- if (gravityOptions.enable && gravityOptions.maxSpeed > 0 && (!gravityOptions.inverse && velocity.y >= 0 && velocity.y >= maxSpeed || gravityOptions.inverse && velocity.y <= 0 && velocity.y <= -maxSpeed)) {
1691
+ if (gravityOptions.enable && maxSpeed > 0 && (!gravityOptions.inverse && velocity.y >= 0 && velocity.y >= maxSpeed || gravityOptions.inverse && velocity.y <= 0 && velocity.y <= -maxSpeed)) {
1692
1692
  velocity.y = gravityFactor * maxSpeed;
1693
1693
  if (moveSpeed) {
1694
1694
  particle.velocity.y = velocity.y / moveSpeed;
@@ -2093,9 +2093,9 @@
2093
2093
  paint() {
2094
2094
  const options = this.container.actualOptions;
2095
2095
  this.draw((ctx => {
2096
- if (options.backgroundMask.enable && options.backgroundMask.cover && this.coverColor) {
2096
+ if (options.backgroundMask.enable && options.backgroundMask.cover) {
2097
2097
  clear(ctx, this.size);
2098
- this.paintBase(getStyleFromRgb(this.coverColor, this.coverColor.a));
2098
+ this.paintBase(this.coverColorStyle);
2099
2099
  } else {
2100
2100
  this.paintBase();
2101
2101
  }
@@ -2197,7 +2197,7 @@
2197
2197
  const zIndexOptions = particle.options.zIndex;
2198
2198
  const zOpacityFactor = (1 - particle.zIndexFactor) ** zIndexOptions.opacityRate;
2199
2199
  const radius = particle.getRadius();
2200
- const opacity = twinkling ? twinkle.opacity : (_d = (_b = particle.bubble.opacity) !== null && _b !== void 0 ? _b : (_c = particle.opacity) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : 1;
2200
+ const opacity = twinkling ? getRangeValue(twinkle.opacity) : (_d = (_b = particle.bubble.opacity) !== null && _b !== void 0 ? _b : (_c = particle.opacity) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : 1;
2201
2201
  const strokeOpacity = (_f = (_e = particle.stroke) === null || _e === void 0 ? void 0 : _e.opacity) !== null && _f !== void 0 ? _f : opacity;
2202
2202
  const zOpacity = opacity * zOpacityFactor;
2203
2203
  const fillColorValue = fColor ? getStyleFromHsl(fColor, zOpacity) : undefined;
@@ -2266,12 +2266,14 @@
2266
2266
  const color = cover.color;
2267
2267
  const coverRgb = colorToRgb(color);
2268
2268
  if (coverRgb) {
2269
- this.coverColor = {
2269
+ const coverColor = {
2270
2270
  r: coverRgb.r,
2271
2271
  g: coverRgb.g,
2272
2272
  b: coverRgb.b,
2273
2273
  a: cover.opacity
2274
2274
  };
2275
+ this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
2276
+ console.log(this.coverColorStyle);
2275
2277
  }
2276
2278
  }
2277
2279
  initTrail() {
@@ -2468,7 +2470,7 @@
2468
2470
  return;
2469
2471
  }
2470
2472
  if (data.count !== undefined) {
2471
- this.count = data.count;
2473
+ this.count = setRangeValue(data.count);
2472
2474
  }
2473
2475
  if (data.enable !== undefined) {
2474
2476
  this.enable = data.enable;
@@ -2477,7 +2479,7 @@
2477
2479
  this.offset = setRangeValue(data.offset);
2478
2480
  }
2479
2481
  if (data.speed !== undefined) {
2480
- this.speed = data.speed;
2482
+ this.speed = setRangeValue(data.speed);
2481
2483
  }
2482
2484
  if (data.sync !== undefined) {
2483
2485
  this.sync = data.sync;
@@ -2625,13 +2627,13 @@
2625
2627
  return;
2626
2628
  }
2627
2629
  if (data.count !== undefined) {
2628
- this.count = data.count;
2630
+ this.count = setRangeValue(data.count);
2629
2631
  }
2630
2632
  if (data.enable !== undefined) {
2631
2633
  this.enable = data.enable;
2632
2634
  }
2633
2635
  if (data.speed !== undefined) {
2634
- this.speed = data.speed;
2636
+ this.speed = setRangeValue(data.speed);
2635
2637
  }
2636
2638
  if (data.sync !== undefined) {
2637
2639
  this.sync = data.sync;
@@ -2651,13 +2653,13 @@
2651
2653
  return;
2652
2654
  }
2653
2655
  if (data.count !== undefined) {
2654
- this.count = data.count;
2656
+ this.count = setRangeValue(data.count);
2655
2657
  }
2656
2658
  if (data.enable !== undefined) {
2657
2659
  this.enable = data.enable;
2658
2660
  }
2659
2661
  if (data.speed !== undefined) {
2660
- this.speed = data.speed;
2662
+ this.speed = setRangeValue(data.speed);
2661
2663
  }
2662
2664
  if (data.sync !== undefined) {
2663
2665
  this.sync = data.sync;
@@ -2829,6 +2831,90 @@
2829
2831
  this.duration.load(data.duration);
2830
2832
  }
2831
2833
  }
2834
+ class Attract_Attract {
2835
+ constructor() {
2836
+ this.distance = 200;
2837
+ this.enable = false;
2838
+ this.rotate = {
2839
+ x: 3e3,
2840
+ y: 3e3
2841
+ };
2842
+ }
2843
+ get rotateX() {
2844
+ return this.rotate.x;
2845
+ }
2846
+ set rotateX(value) {
2847
+ this.rotate.x = value;
2848
+ }
2849
+ get rotateY() {
2850
+ return this.rotate.y;
2851
+ }
2852
+ set rotateY(value) {
2853
+ this.rotate.y = value;
2854
+ }
2855
+ load(data) {
2856
+ var _a, _b, _c, _d;
2857
+ if (!data) {
2858
+ return;
2859
+ }
2860
+ if (data.distance !== undefined) {
2861
+ this.distance = setRangeValue(data.distance);
2862
+ }
2863
+ if (data.enable !== undefined) {
2864
+ this.enable = data.enable;
2865
+ }
2866
+ const rotateX = (_b = (_a = data.rotate) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : data.rotateX;
2867
+ if (rotateX !== undefined) {
2868
+ this.rotate.x = rotateX;
2869
+ }
2870
+ const rotateY = (_d = (_c = data.rotate) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : data.rotateY;
2871
+ if (rotateY !== undefined) {
2872
+ this.rotate.y = rotateY;
2873
+ }
2874
+ }
2875
+ }
2876
+ class MoveAngle_MoveAngle {
2877
+ constructor() {
2878
+ this.offset = 0;
2879
+ this.value = 90;
2880
+ }
2881
+ load(data) {
2882
+ if (data === undefined) {
2883
+ return;
2884
+ }
2885
+ if (data.offset !== undefined) {
2886
+ this.offset = setRangeValue(data.offset);
2887
+ }
2888
+ if (data.value !== undefined) {
2889
+ this.value = setRangeValue(data.value);
2890
+ }
2891
+ }
2892
+ }
2893
+ class MoveGravity_MoveGravity {
2894
+ constructor() {
2895
+ this.acceleration = 9.81;
2896
+ this.enable = false;
2897
+ this.inverse = false;
2898
+ this.maxSpeed = 50;
2899
+ }
2900
+ load(data) {
2901
+ if (!data) {
2902
+ return;
2903
+ }
2904
+ if (data.acceleration !== undefined) {
2905
+ this.acceleration = setRangeValue(data.acceleration);
2906
+ }
2907
+ if (data.enable !== undefined) {
2908
+ this.enable = data.enable;
2909
+ }
2910
+ if (data.inverse !== undefined) {
2911
+ this.inverse = data.inverse;
2912
+ }
2913
+ if (data.maxSpeed !== undefined) {
2914
+ this.maxSpeed = setRangeValue(data.maxSpeed);
2915
+ }
2916
+ }
2917
+ }
2832
2918
  class PathDelay_PathDelay extends(null && ValueWithRandom){
2833
2919
  constructor() {
2834
2920
  super();
@@ -2990,6 +3076,70 @@
2990
3076
  }
2991
3077
  }
2992
3078
  }
3079
+ class AnimationOptions_AnimationOptions {
3080
+ constructor() {
3081
+ this.count = 0;
3082
+ this.enable = false;
3083
+ this.speed = 1;
3084
+ this.sync = false;
3085
+ }
3086
+ load(data) {
3087
+ if (!data) {
3088
+ return;
3089
+ }
3090
+ if (data.count !== undefined) {
3091
+ this.count = setRangeValue(data.count);
3092
+ }
3093
+ if (data.enable !== undefined) {
3094
+ this.enable = data.enable;
3095
+ }
3096
+ if (data.speed !== undefined) {
3097
+ this.speed = setRangeValue(data.speed);
3098
+ }
3099
+ if (data.sync !== undefined) {
3100
+ this.sync = data.sync;
3101
+ }
3102
+ }
3103
+ }
3104
+ class OpacityAnimation_OpacityAnimation extends(null && AnimationOptions){
3105
+ constructor() {
3106
+ super();
3107
+ this.destroy = "none";
3108
+ this.enable = false;
3109
+ this.speed = 2;
3110
+ this.startValue = "random";
3111
+ this.sync = false;
3112
+ }
3113
+ get opacity_min() {
3114
+ return this.minimumValue;
3115
+ }
3116
+ set opacity_min(value) {
3117
+ this.minimumValue = value;
3118
+ }
3119
+ load(data) {
3120
+ var _a;
3121
+ if (data === undefined) {
3122
+ return;
3123
+ }
3124
+ super.load(data);
3125
+ if (data.destroy !== undefined) {
3126
+ this.destroy = data.destroy;
3127
+ }
3128
+ if (data.enable !== undefined) {
3129
+ this.enable = data.enable;
3130
+ }
3131
+ this.minimumValue = (_a = data.minimumValue) !== null && _a !== void 0 ? _a : data.opacity_min;
3132
+ if (data.speed !== undefined) {
3133
+ this.speed = data.speed;
3134
+ }
3135
+ if (data.startValue !== undefined) {
3136
+ this.startValue = data.startValue;
3137
+ }
3138
+ if (data.sync !== undefined) {
3139
+ this.sync = data.sync;
3140
+ }
3141
+ }
3142
+ }
2993
3143
  class Opacity_Opacity extends(null && ValueWithRandom){
2994
3144
  constructor() {
2995
3145
  super();
@@ -3048,13 +3198,13 @@
3048
3198
  this.enable = data.enable;
3049
3199
  }
3050
3200
  if (data.opacity !== undefined) {
3051
- this.opacity = data.opacity;
3201
+ this.opacity = setRangeValue(data.opacity);
3052
3202
  }
3053
3203
  if (data.width !== undefined) {
3054
- this.width = data.width;
3204
+ this.width = setRangeValue(data.width);
3055
3205
  }
3056
3206
  if (data.radius !== undefined) {
3057
- this.radius = data.radius;
3207
+ this.radius = setRangeValue(data.radius);
3058
3208
  }
3059
3209
  if (data.color !== undefined) {
3060
3210
  this.color = OptionsColor.create(this.color, data.color);
@@ -3079,16 +3229,33 @@
3079
3229
  this.enabled = data.enabled;
3080
3230
  }
3081
3231
  if (data.distance !== undefined) {
3082
- this.distance = data.distance;
3232
+ this.distance = setRangeValue(data.distance);
3083
3233
  }
3084
3234
  if (data.duration !== undefined) {
3085
- this.duration = data.duration;
3235
+ this.duration = setRangeValue(data.duration);
3086
3236
  }
3087
3237
  if (data.factor !== undefined) {
3088
- this.factor = data.factor;
3238
+ this.factor = setRangeValue(data.factor);
3089
3239
  }
3090
3240
  if (data.speed !== undefined) {
3091
- this.speed = data.speed;
3241
+ this.speed = setRangeValue(data.speed);
3242
+ }
3243
+ }
3244
+ }
3245
+ class RollLight_RollLight {
3246
+ constructor() {
3247
+ this.enable = false;
3248
+ this.value = 0;
3249
+ }
3250
+ load(data) {
3251
+ if (!data) {
3252
+ return;
3253
+ }
3254
+ if (data.enable !== undefined) {
3255
+ this.enable = data.enable;
3256
+ }
3257
+ if (data.value !== undefined) {
3258
+ this.value = setRangeValue(data.value);
3092
3259
  }
3093
3260
  }
3094
3261
  }
@@ -3120,6 +3287,27 @@
3120
3287
  }
3121
3288
  }
3122
3289
  }
3290
+ class RotateAnimation_RotateAnimation {
3291
+ constructor() {
3292
+ this.enable = false;
3293
+ this.speed = 0;
3294
+ this.sync = false;
3295
+ }
3296
+ load(data) {
3297
+ if (data === undefined) {
3298
+ return;
3299
+ }
3300
+ if (data.enable !== undefined) {
3301
+ this.enable = data.enable;
3302
+ }
3303
+ if (data.speed !== undefined) {
3304
+ this.speed = setRangeValue(data.speed);
3305
+ }
3306
+ if (data.sync !== undefined) {
3307
+ this.sync = data.sync;
3308
+ }
3309
+ }
3310
+ }
3123
3311
  class Rotate_Rotate extends(null && ValueWithRandom){
3124
3312
  constructor() {
3125
3313
  super();
@@ -3238,6 +3426,45 @@
3238
3426
  }
3239
3427
  }
3240
3428
  }
3429
+ class SizeAnimation_SizeAnimation extends(null && AnimationOptions){
3430
+ constructor() {
3431
+ super();
3432
+ this.destroy = "none";
3433
+ this.enable = false;
3434
+ this.speed = 5;
3435
+ this.startValue = "random";
3436
+ this.sync = false;
3437
+ }
3438
+ get size_min() {
3439
+ return this.minimumValue;
3440
+ }
3441
+ set size_min(value) {
3442
+ this.minimumValue = value;
3443
+ }
3444
+ load(data) {
3445
+ var _a;
3446
+ if (data === undefined) {
3447
+ return;
3448
+ }
3449
+ super.load(data);
3450
+ if (data.destroy !== undefined) {
3451
+ this.destroy = data.destroy;
3452
+ }
3453
+ if (data.enable !== undefined) {
3454
+ this.enable = data.enable;
3455
+ }
3456
+ this.minimumValue = (_a = data.minimumValue) !== null && _a !== void 0 ? _a : data.size_min;
3457
+ if (data.speed !== undefined) {
3458
+ this.speed = data.speed;
3459
+ }
3460
+ if (data.startValue !== undefined) {
3461
+ this.startValue = data.startValue;
3462
+ }
3463
+ if (data.sync !== undefined) {
3464
+ this.sync = data.sync;
3465
+ }
3466
+ }
3467
+ }
3241
3468
  class Size_Size extends(null && ValueWithRandom){
3242
3469
  constructor() {
3243
3470
  super();
@@ -3283,6 +3510,27 @@
3283
3510
  }
3284
3511
  }
3285
3512
  }
3513
+ class TiltAnimation_TiltAnimation {
3514
+ constructor() {
3515
+ this.enable = false;
3516
+ this.speed = 0;
3517
+ this.sync = false;
3518
+ }
3519
+ load(data) {
3520
+ if (data === undefined) {
3521
+ return;
3522
+ }
3523
+ if (data.enable !== undefined) {
3524
+ this.enable = data.enable;
3525
+ }
3526
+ if (data.speed !== undefined) {
3527
+ this.speed = setRangeValue(data.speed);
3528
+ }
3529
+ if (data.sync !== undefined) {
3530
+ this.sync = data.sync;
3531
+ }
3532
+ }
3533
+ }
3286
3534
  class Tilt_Tilt extends(null && ValueWithRandom){
3287
3535
  constructor() {
3288
3536
  super();
@@ -3305,6 +3553,43 @@
3305
3553
  }
3306
3554
  }
3307
3555
  }
3556
+ class TwinkleValues_TwinkleValues {
3557
+ constructor() {
3558
+ this.enable = false;
3559
+ this.frequency = .05;
3560
+ this.opacity = 1;
3561
+ }
3562
+ load(data) {
3563
+ if (data === undefined) {
3564
+ return;
3565
+ }
3566
+ if (data.color !== undefined) {
3567
+ this.color = OptionsColor.create(this.color, data.color);
3568
+ }
3569
+ if (data.enable !== undefined) {
3570
+ this.enable = data.enable;
3571
+ }
3572
+ if (data.frequency !== undefined) {
3573
+ this.frequency = data.frequency;
3574
+ }
3575
+ if (data.opacity !== undefined) {
3576
+ this.opacity = setRangeValue(data.opacity);
3577
+ }
3578
+ }
3579
+ }
3580
+ class Twinkle_Twinkle {
3581
+ constructor() {
3582
+ this.lines = new TwinkleValues;
3583
+ this.particles = new TwinkleValues;
3584
+ }
3585
+ load(data) {
3586
+ if (data === undefined) {
3587
+ return;
3588
+ }
3589
+ this.lines.load(data.lines);
3590
+ this.particles.load(data.particles);
3591
+ }
3592
+ }
3308
3593
  class Wobble_Wobble {
3309
3594
  constructor() {
3310
3595
  this.distance = 5;
@@ -3742,7 +4027,7 @@
3742
4027
  max: getRangeMax(sizeRange) * pxRatio,
3743
4028
  min: getRangeMin(sizeRange) * pxRatio,
3744
4029
  loops: 0,
3745
- maxLoops: sizeOptions.animation.count
4030
+ maxLoops: getRangeValue(sizeOptions.animation.count)
3746
4031
  };
3747
4032
  const sizeAnimation = sizeOptions.animation;
3748
4033
  if (sizeAnimation.enable) {
@@ -3776,6 +4061,12 @@
3776
4061
  this.initialVelocity = this.calculateVelocity();
3777
4062
  this.velocity = this.initialVelocity.copy();
3778
4063
  this.moveDecay = 1 - getRangeValue(this.options.move.decay);
4064
+ const gravityOptions = this.options.move.gravity;
4065
+ this.gravity = {
4066
+ enable: gravityOptions.enable,
4067
+ acceleration: getRangeValue(gravityOptions.acceleration),
4068
+ inverse: gravityOptions.inverse
4069
+ };
3779
4070
  this.position = this.calcPosition(container, position, clamp(zIndexValue, 0, container.zLayers));
3780
4071
  this.initialPosition = this.position.copy();
3781
4072
  this.offset = Vector.origin;
@@ -3983,12 +4274,7 @@
3983
4274
  return overlaps;
3984
4275
  }
3985
4276
  calculateVelocity() {
3986
- const baseVelocity = getParticleBaseVelocity(this.direction);
3987
- const res = baseVelocity.copy();
3988
- const moveOptions = this.options.move;
3989
- const rad = Math.PI / 180 * moveOptions.angle.value;
3990
- const radOffset = Math.PI / 180 * moveOptions.angle.offset;
3991
- const range = {
4277
+ const baseVelocity = getParticleBaseVelocity(this.direction), res = baseVelocity.copy(), moveOptions = this.options.move, rad = Math.PI / 180 * getRangeValue(moveOptions.angle.value), radOffset = Math.PI / 180 * getRangeValue(moveOptions.angle.offset), range = {
3992
4278
  left: radOffset - rad / 2,
3993
4279
  right: radOffset + rad / 2
3994
4280
  };
@@ -4378,13 +4664,13 @@
4378
4664
  container.canvas.size.height = element.offsetHeight * ratio;
4379
4665
  }
4380
4666
  const particles = options.particles;
4381
- this.attractDistance = particles.move.attract.distance * ratio;
4667
+ this.attractDistance = getRangeValue(particles.move.attract.distance) * ratio;
4382
4668
  this.linksDistance = particles.links.distance * ratio;
4383
4669
  this.linksWidth = particles.links.width * ratio;
4384
- this.sizeAnimationSpeed = particles.size.animation.speed * ratio;
4385
- this.maxSpeed = particles.move.gravity.maxSpeed * ratio;
4670
+ this.sizeAnimationSpeed = getRangeValue(particles.size.animation.speed) * ratio;
4671
+ this.maxSpeed = getRangeValue(particles.move.gravity.maxSpeed) * ratio;
4386
4672
  if (particles.orbit.radius !== undefined) {
4387
- this.orbitRadius = particles.orbit.radius * this.container.retina.pixelRatio;
4673
+ this.orbitRadius = getRangeValue(particles.orbit.radius) * this.container.retina.pixelRatio;
4388
4674
  }
4389
4675
  const modes = options.interactivity.modes;
4390
4676
  this.connectModeDistance = modes.connect.distance * ratio;
@@ -4404,19 +4690,19 @@
4404
4690
  const ratio = this.pixelRatio;
4405
4691
  const moveDistance = options.move.distance;
4406
4692
  const props = particle.retina;
4407
- props.attractDistance = options.move.attract.distance * ratio;
4693
+ props.attractDistance = getRangeValue(options.move.attract.distance) * ratio;
4408
4694
  props.linksDistance = options.links.distance * ratio;
4409
4695
  props.linksWidth = options.links.width * ratio;
4410
4696
  props.moveDrift = getRangeValue(options.move.drift) * ratio;
4411
4697
  props.moveSpeed = getRangeValue(options.move.speed) * ratio;
4412
- props.sizeAnimationSpeed = options.size.animation.speed * ratio;
4698
+ props.sizeAnimationSpeed = getRangeValue(options.size.animation.speed) * ratio;
4413
4699
  if (particle.spin) {
4414
4700
  props.spinAcceleration = getRangeValue(options.move.spin.acceleration) * ratio;
4415
4701
  }
4416
4702
  const maxDistance = props.maxDistance;
4417
4703
  maxDistance.horizontal = moveDistance.horizontal !== undefined ? moveDistance.horizontal * ratio : undefined;
4418
4704
  maxDistance.vertical = moveDistance.vertical !== undefined ? moveDistance.vertical * ratio : undefined;
4419
- props.maxSpeed = options.move.gravity.maxSpeed * ratio;
4705
+ props.maxSpeed = getRangeValue(options.move.gravity.maxSpeed) * ratio;
4420
4706
  }
4421
4707
  handleMotionChange(mediaQuery) {
4422
4708
  const options = this.container.actualOptions;
@@ -1,2 +1,2 @@
1
- /*! tsParticles v1.41.6 by Matteo Bruni */
1
+ /*! tsParticles v1.42.2 by Matteo Bruni */
2
2
  !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(window,(function(){return function(){"use strict";var t={d:function(e,n){for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t,e){const n=t.x-e.x,o=t.y-e.y;return{dx:n,dy:o,distance:Math.sqrt(n*n+o*o)}}function o(t,e){switch(e){case"ease-out-quad":return 1-(1-t)**2;case"ease-out-cubic":return 1-(1-t)**3;case"ease-out-quart":return 1-(1-t)**4;case"ease-out-quint":return 1-(1-t)**5;case"ease-out-expo":return 1===t?1:1-Math.pow(2,-10*t);case"ease-out-sine":return Math.sin(t*Math.PI/2);case"ease-out-back":{const e=1.70158;return 1+(e+1)*Math.pow(t-1,3)+e*Math.pow(t-1,2)}case"ease-out-circ":return Math.sqrt(1-Math.pow(t-1,2));default:return t}}function a(t,e){return t===e||e instanceof Array&&e.indexOf(t)>-1}t.r(e),t.d(e,{loadExternalAttractInteraction:function(){return u}});class i extends class{constructor(t,e){this.position={x:t,y:e}}}{constructor(t,e,n){super(t,e),this.radius=n}contains(t){return e=t,o=this.position,n(e,o).distance<=this.radius;var e,o}intersects(t){const e=t,n=t,o=this.position,a=t.position,i=Math.abs(a.x-o.x),r=Math.abs(a.y-o.y),s=this.radius;if(void 0!==n.radius){return s+n.radius>Math.sqrt(i*i+r+r)}if(void 0!==e.size){const t=e.size.width,n=e.size.height,o=Math.pow(i-t,2)+Math.pow(r-n,2);return!(i>s+t||r>s+n)&&(i<=t||r<=n||o<=s*s)}return!1}}class r{}r.generatedAttribute="generated",r.randomColorValue="random",r.midColorValue="mid",r.touchEndEvent="touchend",r.mouseDownEvent="mousedown",r.mouseUpEvent="mouseup",r.mouseMoveEvent="mousemove",r.touchStartEvent="touchstart",r.touchMoveEvent="touchmove",r.mouseLeaveEvent="mouseleave",r.mouseOutEvent="mouseout",r.touchCancelEvent="touchcancel",r.resizeEvent="resize",r.visibilityChangeEvent="visibilitychange",r.noPolygonDataLoaded="No polygon data loaded.",r.noPolygonFound="No polygon found, you need to specify SVG url in config.";new WeakMap;new WeakMap;class s{constructor(t,e){let n,o;if(void 0===e){if("number"==typeof t)throw new Error("tsParticles - Vector not initialized correctly");const e=t;[n,o]=[e.x,e.y]}else[n,o]=[t,e];this.x=n,this.y=o}static clone(t){return s.create(t.x,t.y)}static create(t,e){return new s(t,e)}static get origin(){return s.create(0,0)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.updateFromAngle(t,this.length)}get length(){return Math.sqrt(this.x**2+this.y**2)}set length(t){this.updateFromAngle(this.angle,t)}add(t){return s.create(this.x+t.x,this.y+t.y)}addTo(t){this.x+=t.x,this.y+=t.y}sub(t){return s.create(this.x-t.x,this.y-t.y)}subFrom(t){this.x-=t.x,this.y-=t.y}mult(t){return s.create(this.x*t,this.y*t)}multTo(t){this.x*=t,this.y*=t}div(t){return s.create(this.x/t,this.y/t)}divTo(t){this.x/=t,this.y/=t}distanceTo(t){return this.sub(t).length}getLengthSq(){return this.x**2+this.y**2}distanceToSq(t){return this.sub(t).getLengthSq()}manhattanDistanceTo(t){return Math.abs(t.x-this.x)+Math.abs(t.y-this.y)}copy(){return s.clone(this)}setTo(t){this.x=t.x,this.y=t.y}rotate(t){return s.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t))}updateFromAngle(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}new WeakMap,new WeakSet;new WeakMap;new WeakMap;new WeakMap;new WeakMap;class c extends class{constructor(t){this.container=t,this.type=0}}{constructor(t){super(t)}isEnabled(){const t=this.container,e=t.actualOptions,n=t.interactivity.mouse,o=e.interactivity.events;if(!(n.position&&o.onHover.enable||n.clickPosition&&o.onClick.enable))return!1;const i=o.onHover.mode,r=o.onClick.mode;return a("attract",i)||a("attract",r)}reset(){}async interact(){const t=this.container,e=t.actualOptions,n=t.interactivity.status===r.mouseMoveEvent,o=e.interactivity.events,i=o.onHover.enable,s=o.onHover.mode,c=o.onClick.enable,u=o.onClick.mode;n&&i&&a("attract",s)?this.hoverAttract():c&&a("attract",u)&&this.clickAttract()}hoverAttract(){const t=this.container,e=t.interactivity.mouse.position;if(!e)return;const n=t.retina.attractModeDistance;this.processAttract(e,n,new i(e.x,e.y,n))}processAttract(t,e,a){const i=this.container,r=i.actualOptions.interactivity.modes.attract,c=i.particles.quadTree.query(a);for(const a of c){const{dx:i,dy:c,distance:l}=n(a.position,t),y=r.speed*r.factor,p=(u=o(1-l/e,r.easing)*y,h=0,d=r.maxSpeed,Math.min(Math.max(u,h),d)),v=s.create(0===l?y:i/l*p,0===l?y:c/l*p);a.position.subFrom(v)}var u,h,d}clickAttract(){const t=this.container;if(t.attract.finish||(t.attract.count||(t.attract.count=0),t.attract.count++,t.attract.count===t.particles.count&&(t.attract.finish=!0)),t.attract.clicking){const e=t.interactivity.mouse.clickPosition;if(!e)return;const n=t.retina.attractModeDistance;this.processAttract(e,n,new i(e.x,e.y,n))}else!1===t.attract.clicking&&(t.attract.particles=[])}}async function u(t){await t.addInteractor("externalAttract",(t=>new c(t)))}return e}()}));