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
@@ -638,7 +638,7 @@
638
638
  }
639
639
  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;
640
640
  this.applyPath(particle, delta);
641
- const gravityOptions = moveOptions.gravity;
641
+ const gravityOptions = particle.gravity;
642
642
  const gravityFactor = gravityOptions.enable && gravityOptions.inverse ? -1 : 1;
643
643
  if (gravityOptions.enable && moveSpeed) {
644
644
  particle.velocity.y += gravityFactor * (gravityOptions.acceleration * delta.factor) / (60 * moveSpeed);
@@ -652,7 +652,7 @@
652
652
  }
653
653
  const velocity = particle.velocity.mult(moveSpeed);
654
654
  const maxSpeed = (_c = particle.retina.maxSpeed) !== null && _c !== void 0 ? _c : container.retina.maxSpeed;
655
- if (gravityOptions.enable && gravityOptions.maxSpeed > 0 && (!gravityOptions.inverse && velocity.y >= 0 && velocity.y >= maxSpeed || gravityOptions.inverse && velocity.y <= 0 && velocity.y <= -maxSpeed)) {
655
+ if (gravityOptions.enable && maxSpeed > 0 && (!gravityOptions.inverse && velocity.y >= 0 && velocity.y >= maxSpeed || gravityOptions.inverse && velocity.y <= 0 && velocity.y <= -maxSpeed)) {
656
656
  velocity.y = gravityFactor * maxSpeed;
657
657
  if (moveSpeed) {
658
658
  particle.velocity.y = velocity.y / moveSpeed;
@@ -966,9 +966,9 @@
966
966
  paint() {
967
967
  const options = this.container.actualOptions;
968
968
  this.draw((ctx => {
969
- if (options.backgroundMask.enable && options.backgroundMask.cover && this.coverColor) {
969
+ if (options.backgroundMask.enable && options.backgroundMask.cover) {
970
970
  clear(ctx, this.size);
971
- this.paintBase(getStyleFromRgb(this.coverColor, this.coverColor.a));
971
+ this.paintBase(this.coverColorStyle);
972
972
  } else {
973
973
  this.paintBase();
974
974
  }
@@ -1070,7 +1070,7 @@
1070
1070
  const zIndexOptions = particle.options.zIndex;
1071
1071
  const zOpacityFactor = (1 - particle.zIndexFactor) ** zIndexOptions.opacityRate;
1072
1072
  const radius = particle.getRadius();
1073
- 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;
1073
+ 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;
1074
1074
  const strokeOpacity = (_f = (_e = particle.stroke) === null || _e === void 0 ? void 0 : _e.opacity) !== null && _f !== void 0 ? _f : opacity;
1075
1075
  const zOpacity = opacity * zOpacityFactor;
1076
1076
  const fillColorValue = fColor ? getStyleFromHsl(fColor, zOpacity) : undefined;
@@ -1139,12 +1139,14 @@
1139
1139
  const color = cover.color;
1140
1140
  const coverRgb = colorToRgb(color);
1141
1141
  if (coverRgb) {
1142
- this.coverColor = {
1142
+ const coverColor = {
1143
1143
  r: coverRgb.r,
1144
1144
  g: coverRgb.g,
1145
1145
  b: coverRgb.b,
1146
1146
  a: cover.opacity
1147
1147
  };
1148
+ this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
1149
+ console.log(this.coverColorStyle);
1148
1150
  }
1149
1151
  }
1150
1152
  initTrail() {
@@ -1328,6 +1330,109 @@
1328
1330
  }
1329
1331
  }
1330
1332
  }
1333
+ class ColorAnimation {
1334
+ constructor() {
1335
+ this.count = 0;
1336
+ this.enable = false;
1337
+ this.offset = 0;
1338
+ this.speed = 1;
1339
+ this.sync = true;
1340
+ }
1341
+ load(data) {
1342
+ if (data === undefined) {
1343
+ return;
1344
+ }
1345
+ if (data.count !== undefined) {
1346
+ this.count = NumberUtils_setRangeValue(data.count);
1347
+ }
1348
+ if (data.enable !== undefined) {
1349
+ this.enable = data.enable;
1350
+ }
1351
+ if (data.offset !== undefined) {
1352
+ this.offset = NumberUtils_setRangeValue(data.offset);
1353
+ }
1354
+ if (data.speed !== undefined) {
1355
+ this.speed = NumberUtils_setRangeValue(data.speed);
1356
+ }
1357
+ if (data.sync !== undefined) {
1358
+ this.sync = data.sync;
1359
+ }
1360
+ }
1361
+ }
1362
+ class HslAnimation {
1363
+ constructor() {
1364
+ this.h = new ColorAnimation;
1365
+ this.s = new ColorAnimation;
1366
+ this.l = new ColorAnimation;
1367
+ }
1368
+ load(data) {
1369
+ if (!data) {
1370
+ return;
1371
+ }
1372
+ this.h.load(data.h);
1373
+ this.s.load(data.s);
1374
+ this.l.load(data.l);
1375
+ }
1376
+ }
1377
+ class OptionsColor_OptionsColor {
1378
+ constructor() {
1379
+ this.value = "#fff";
1380
+ }
1381
+ static create(source, data) {
1382
+ const color = new OptionsColor_OptionsColor;
1383
+ color.load(source);
1384
+ if (data !== undefined) {
1385
+ if (typeof data === "string" || data instanceof Array) {
1386
+ color.load({
1387
+ value: data
1388
+ });
1389
+ } else {
1390
+ color.load(data);
1391
+ }
1392
+ }
1393
+ return color;
1394
+ }
1395
+ load(data) {
1396
+ if ((data === null || data === void 0 ? void 0 : data.value) === undefined) {
1397
+ return;
1398
+ }
1399
+ this.value = data.value;
1400
+ }
1401
+ }
1402
+ class AnimatableColor_AnimatableColor extends OptionsColor_OptionsColor {
1403
+ constructor() {
1404
+ super();
1405
+ this.animation = new HslAnimation;
1406
+ }
1407
+ static create(source, data) {
1408
+ const color = new AnimatableColor_AnimatableColor;
1409
+ color.load(source);
1410
+ if (data !== undefined) {
1411
+ if (typeof data === "string" || data instanceof Array) {
1412
+ color.load({
1413
+ value: data
1414
+ });
1415
+ } else {
1416
+ color.load(data);
1417
+ }
1418
+ }
1419
+ return color;
1420
+ }
1421
+ load(data) {
1422
+ super.load(data);
1423
+ if (!data) {
1424
+ return;
1425
+ }
1426
+ const colorAnimation = data.animation;
1427
+ if (colorAnimation !== undefined) {
1428
+ if (colorAnimation.enable !== undefined) {
1429
+ this.animation.h.load(colorAnimation);
1430
+ } else {
1431
+ this.animation.load(data.animation);
1432
+ }
1433
+ }
1434
+ }
1435
+ }
1331
1436
  class AnimatableGradient_AnimatableGradient {
1332
1437
  constructor() {
1333
1438
  this.angle = new GradientAngle;
@@ -1420,13 +1525,13 @@
1420
1525
  return;
1421
1526
  }
1422
1527
  if (data.count !== undefined) {
1423
- this.count = data.count;
1528
+ this.count = setRangeValue(data.count);
1424
1529
  }
1425
1530
  if (data.enable !== undefined) {
1426
1531
  this.enable = data.enable;
1427
1532
  }
1428
1533
  if (data.speed !== undefined) {
1429
- this.speed = data.speed;
1534
+ this.speed = setRangeValue(data.speed);
1430
1535
  }
1431
1536
  if (data.sync !== undefined) {
1432
1537
  this.sync = data.sync;
@@ -1446,13 +1551,13 @@
1446
1551
  return;
1447
1552
  }
1448
1553
  if (data.count !== undefined) {
1449
- this.count = data.count;
1554
+ this.count = setRangeValue(data.count);
1450
1555
  }
1451
1556
  if (data.enable !== undefined) {
1452
1557
  this.enable = data.enable;
1453
1558
  }
1454
1559
  if (data.speed !== undefined) {
1455
- this.speed = data.speed;
1560
+ this.speed = setRangeValue(data.speed);
1456
1561
  }
1457
1562
  if (data.sync !== undefined) {
1458
1563
  this.sync = data.sync;
@@ -1624,6 +1729,90 @@
1624
1729
  this.duration.load(data.duration);
1625
1730
  }
1626
1731
  }
1732
+ class Attract_Attract {
1733
+ constructor() {
1734
+ this.distance = 200;
1735
+ this.enable = false;
1736
+ this.rotate = {
1737
+ x: 3e3,
1738
+ y: 3e3
1739
+ };
1740
+ }
1741
+ get rotateX() {
1742
+ return this.rotate.x;
1743
+ }
1744
+ set rotateX(value) {
1745
+ this.rotate.x = value;
1746
+ }
1747
+ get rotateY() {
1748
+ return this.rotate.y;
1749
+ }
1750
+ set rotateY(value) {
1751
+ this.rotate.y = value;
1752
+ }
1753
+ load(data) {
1754
+ var _a, _b, _c, _d;
1755
+ if (!data) {
1756
+ return;
1757
+ }
1758
+ if (data.distance !== undefined) {
1759
+ this.distance = setRangeValue(data.distance);
1760
+ }
1761
+ if (data.enable !== undefined) {
1762
+ this.enable = data.enable;
1763
+ }
1764
+ const rotateX = (_b = (_a = data.rotate) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : data.rotateX;
1765
+ if (rotateX !== undefined) {
1766
+ this.rotate.x = rotateX;
1767
+ }
1768
+ const rotateY = (_d = (_c = data.rotate) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : data.rotateY;
1769
+ if (rotateY !== undefined) {
1770
+ this.rotate.y = rotateY;
1771
+ }
1772
+ }
1773
+ }
1774
+ class MoveAngle_MoveAngle {
1775
+ constructor() {
1776
+ this.offset = 0;
1777
+ this.value = 90;
1778
+ }
1779
+ load(data) {
1780
+ if (data === undefined) {
1781
+ return;
1782
+ }
1783
+ if (data.offset !== undefined) {
1784
+ this.offset = setRangeValue(data.offset);
1785
+ }
1786
+ if (data.value !== undefined) {
1787
+ this.value = setRangeValue(data.value);
1788
+ }
1789
+ }
1790
+ }
1791
+ class MoveGravity_MoveGravity {
1792
+ constructor() {
1793
+ this.acceleration = 9.81;
1794
+ this.enable = false;
1795
+ this.inverse = false;
1796
+ this.maxSpeed = 50;
1797
+ }
1798
+ load(data) {
1799
+ if (!data) {
1800
+ return;
1801
+ }
1802
+ if (data.acceleration !== undefined) {
1803
+ this.acceleration = setRangeValue(data.acceleration);
1804
+ }
1805
+ if (data.enable !== undefined) {
1806
+ this.enable = data.enable;
1807
+ }
1808
+ if (data.inverse !== undefined) {
1809
+ this.inverse = data.inverse;
1810
+ }
1811
+ if (data.maxSpeed !== undefined) {
1812
+ this.maxSpeed = setRangeValue(data.maxSpeed);
1813
+ }
1814
+ }
1815
+ }
1627
1816
  class PathDelay_PathDelay extends(null && ValueWithRandom){
1628
1817
  constructor() {
1629
1818
  super();
@@ -1785,6 +1974,70 @@
1785
1974
  }
1786
1975
  }
1787
1976
  }
1977
+ class AnimationOptions_AnimationOptions {
1978
+ constructor() {
1979
+ this.count = 0;
1980
+ this.enable = false;
1981
+ this.speed = 1;
1982
+ this.sync = false;
1983
+ }
1984
+ load(data) {
1985
+ if (!data) {
1986
+ return;
1987
+ }
1988
+ if (data.count !== undefined) {
1989
+ this.count = setRangeValue(data.count);
1990
+ }
1991
+ if (data.enable !== undefined) {
1992
+ this.enable = data.enable;
1993
+ }
1994
+ if (data.speed !== undefined) {
1995
+ this.speed = setRangeValue(data.speed);
1996
+ }
1997
+ if (data.sync !== undefined) {
1998
+ this.sync = data.sync;
1999
+ }
2000
+ }
2001
+ }
2002
+ class OpacityAnimation_OpacityAnimation extends(null && AnimationOptions){
2003
+ constructor() {
2004
+ super();
2005
+ this.destroy = "none";
2006
+ this.enable = false;
2007
+ this.speed = 2;
2008
+ this.startValue = "random";
2009
+ this.sync = false;
2010
+ }
2011
+ get opacity_min() {
2012
+ return this.minimumValue;
2013
+ }
2014
+ set opacity_min(value) {
2015
+ this.minimumValue = value;
2016
+ }
2017
+ load(data) {
2018
+ var _a;
2019
+ if (data === undefined) {
2020
+ return;
2021
+ }
2022
+ super.load(data);
2023
+ if (data.destroy !== undefined) {
2024
+ this.destroy = data.destroy;
2025
+ }
2026
+ if (data.enable !== undefined) {
2027
+ this.enable = data.enable;
2028
+ }
2029
+ this.minimumValue = (_a = data.minimumValue) !== null && _a !== void 0 ? _a : data.opacity_min;
2030
+ if (data.speed !== undefined) {
2031
+ this.speed = data.speed;
2032
+ }
2033
+ if (data.startValue !== undefined) {
2034
+ this.startValue = data.startValue;
2035
+ }
2036
+ if (data.sync !== undefined) {
2037
+ this.sync = data.sync;
2038
+ }
2039
+ }
2040
+ }
1788
2041
  class Opacity_Opacity extends(null && ValueWithRandom){
1789
2042
  constructor() {
1790
2043
  super();
@@ -1843,13 +2096,13 @@
1843
2096
  this.enable = data.enable;
1844
2097
  }
1845
2098
  if (data.opacity !== undefined) {
1846
- this.opacity = data.opacity;
2099
+ this.opacity = setRangeValue(data.opacity);
1847
2100
  }
1848
2101
  if (data.width !== undefined) {
1849
- this.width = data.width;
2102
+ this.width = setRangeValue(data.width);
1850
2103
  }
1851
2104
  if (data.radius !== undefined) {
1852
- this.radius = data.radius;
2105
+ this.radius = setRangeValue(data.radius);
1853
2106
  }
1854
2107
  if (data.color !== undefined) {
1855
2108
  this.color = OptionsColor.create(this.color, data.color);
@@ -1874,16 +2127,33 @@
1874
2127
  this.enabled = data.enabled;
1875
2128
  }
1876
2129
  if (data.distance !== undefined) {
1877
- this.distance = data.distance;
2130
+ this.distance = setRangeValue(data.distance);
1878
2131
  }
1879
2132
  if (data.duration !== undefined) {
1880
- this.duration = data.duration;
2133
+ this.duration = setRangeValue(data.duration);
1881
2134
  }
1882
2135
  if (data.factor !== undefined) {
1883
- this.factor = data.factor;
2136
+ this.factor = setRangeValue(data.factor);
1884
2137
  }
1885
2138
  if (data.speed !== undefined) {
1886
- this.speed = data.speed;
2139
+ this.speed = setRangeValue(data.speed);
2140
+ }
2141
+ }
2142
+ }
2143
+ class RollLight_RollLight {
2144
+ constructor() {
2145
+ this.enable = false;
2146
+ this.value = 0;
2147
+ }
2148
+ load(data) {
2149
+ if (!data) {
2150
+ return;
2151
+ }
2152
+ if (data.enable !== undefined) {
2153
+ this.enable = data.enable;
2154
+ }
2155
+ if (data.value !== undefined) {
2156
+ this.value = setRangeValue(data.value);
1887
2157
  }
1888
2158
  }
1889
2159
  }
@@ -1915,6 +2185,27 @@
1915
2185
  }
1916
2186
  }
1917
2187
  }
2188
+ class RotateAnimation_RotateAnimation {
2189
+ constructor() {
2190
+ this.enable = false;
2191
+ this.speed = 0;
2192
+ this.sync = false;
2193
+ }
2194
+ load(data) {
2195
+ if (data === undefined) {
2196
+ return;
2197
+ }
2198
+ if (data.enable !== undefined) {
2199
+ this.enable = data.enable;
2200
+ }
2201
+ if (data.speed !== undefined) {
2202
+ this.speed = setRangeValue(data.speed);
2203
+ }
2204
+ if (data.sync !== undefined) {
2205
+ this.sync = data.sync;
2206
+ }
2207
+ }
2208
+ }
1918
2209
  class Rotate_Rotate extends(null && ValueWithRandom){
1919
2210
  constructor() {
1920
2211
  super();
@@ -2033,6 +2324,45 @@
2033
2324
  }
2034
2325
  }
2035
2326
  }
2327
+ class SizeAnimation_SizeAnimation extends(null && AnimationOptions){
2328
+ constructor() {
2329
+ super();
2330
+ this.destroy = "none";
2331
+ this.enable = false;
2332
+ this.speed = 5;
2333
+ this.startValue = "random";
2334
+ this.sync = false;
2335
+ }
2336
+ get size_min() {
2337
+ return this.minimumValue;
2338
+ }
2339
+ set size_min(value) {
2340
+ this.minimumValue = value;
2341
+ }
2342
+ load(data) {
2343
+ var _a;
2344
+ if (data === undefined) {
2345
+ return;
2346
+ }
2347
+ super.load(data);
2348
+ if (data.destroy !== undefined) {
2349
+ this.destroy = data.destroy;
2350
+ }
2351
+ if (data.enable !== undefined) {
2352
+ this.enable = data.enable;
2353
+ }
2354
+ this.minimumValue = (_a = data.minimumValue) !== null && _a !== void 0 ? _a : data.size_min;
2355
+ if (data.speed !== undefined) {
2356
+ this.speed = data.speed;
2357
+ }
2358
+ if (data.startValue !== undefined) {
2359
+ this.startValue = data.startValue;
2360
+ }
2361
+ if (data.sync !== undefined) {
2362
+ this.sync = data.sync;
2363
+ }
2364
+ }
2365
+ }
2036
2366
  class Size_Size extends(null && ValueWithRandom){
2037
2367
  constructor() {
2038
2368
  super();
@@ -2078,6 +2408,27 @@
2078
2408
  }
2079
2409
  }
2080
2410
  }
2411
+ class TiltAnimation_TiltAnimation {
2412
+ constructor() {
2413
+ this.enable = false;
2414
+ this.speed = 0;
2415
+ this.sync = false;
2416
+ }
2417
+ load(data) {
2418
+ if (data === undefined) {
2419
+ return;
2420
+ }
2421
+ if (data.enable !== undefined) {
2422
+ this.enable = data.enable;
2423
+ }
2424
+ if (data.speed !== undefined) {
2425
+ this.speed = setRangeValue(data.speed);
2426
+ }
2427
+ if (data.sync !== undefined) {
2428
+ this.sync = data.sync;
2429
+ }
2430
+ }
2431
+ }
2081
2432
  class Tilt_Tilt extends(null && ValueWithRandom){
2082
2433
  constructor() {
2083
2434
  super();
@@ -2100,6 +2451,43 @@
2100
2451
  }
2101
2452
  }
2102
2453
  }
2454
+ class TwinkleValues_TwinkleValues {
2455
+ constructor() {
2456
+ this.enable = false;
2457
+ this.frequency = .05;
2458
+ this.opacity = 1;
2459
+ }
2460
+ load(data) {
2461
+ if (data === undefined) {
2462
+ return;
2463
+ }
2464
+ if (data.color !== undefined) {
2465
+ this.color = OptionsColor.create(this.color, data.color);
2466
+ }
2467
+ if (data.enable !== undefined) {
2468
+ this.enable = data.enable;
2469
+ }
2470
+ if (data.frequency !== undefined) {
2471
+ this.frequency = data.frequency;
2472
+ }
2473
+ if (data.opacity !== undefined) {
2474
+ this.opacity = setRangeValue(data.opacity);
2475
+ }
2476
+ }
2477
+ }
2478
+ class Twinkle_Twinkle {
2479
+ constructor() {
2480
+ this.lines = new TwinkleValues;
2481
+ this.particles = new TwinkleValues;
2482
+ }
2483
+ load(data) {
2484
+ if (data === undefined) {
2485
+ return;
2486
+ }
2487
+ this.lines.load(data.lines);
2488
+ this.particles.load(data.particles);
2489
+ }
2490
+ }
2103
2491
  class Wobble_Wobble {
2104
2492
  constructor() {
2105
2493
  this.distance = 5;
@@ -2537,7 +2925,7 @@
2537
2925
  max: getRangeMax(sizeRange) * pxRatio,
2538
2926
  min: getRangeMin(sizeRange) * pxRatio,
2539
2927
  loops: 0,
2540
- maxLoops: sizeOptions.animation.count
2928
+ maxLoops: getRangeValue(sizeOptions.animation.count)
2541
2929
  };
2542
2930
  const sizeAnimation = sizeOptions.animation;
2543
2931
  if (sizeAnimation.enable) {
@@ -2571,6 +2959,12 @@
2571
2959
  this.initialVelocity = this.calculateVelocity();
2572
2960
  this.velocity = this.initialVelocity.copy();
2573
2961
  this.moveDecay = 1 - getRangeValue(this.options.move.decay);
2962
+ const gravityOptions = this.options.move.gravity;
2963
+ this.gravity = {
2964
+ enable: gravityOptions.enable,
2965
+ acceleration: getRangeValue(gravityOptions.acceleration),
2966
+ inverse: gravityOptions.inverse
2967
+ };
2574
2968
  this.position = this.calcPosition(container, position, clamp(zIndexValue, 0, container.zLayers));
2575
2969
  this.initialPosition = this.position.copy();
2576
2970
  this.offset = Vector.origin;
@@ -2778,12 +3172,7 @@
2778
3172
  return overlaps;
2779
3173
  }
2780
3174
  calculateVelocity() {
2781
- const baseVelocity = getParticleBaseVelocity(this.direction);
2782
- const res = baseVelocity.copy();
2783
- const moveOptions = this.options.move;
2784
- const rad = Math.PI / 180 * moveOptions.angle.value;
2785
- const radOffset = Math.PI / 180 * moveOptions.angle.offset;
2786
- const range = {
3175
+ 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 = {
2787
3176
  left: radOffset - rad / 2,
2788
3177
  right: radOffset + rad / 2
2789
3178
  };
@@ -3173,13 +3562,13 @@
3173
3562
  container.canvas.size.height = element.offsetHeight * ratio;
3174
3563
  }
3175
3564
  const particles = options.particles;
3176
- this.attractDistance = particles.move.attract.distance * ratio;
3565
+ this.attractDistance = getRangeValue(particles.move.attract.distance) * ratio;
3177
3566
  this.linksDistance = particles.links.distance * ratio;
3178
3567
  this.linksWidth = particles.links.width * ratio;
3179
- this.sizeAnimationSpeed = particles.size.animation.speed * ratio;
3180
- this.maxSpeed = particles.move.gravity.maxSpeed * ratio;
3568
+ this.sizeAnimationSpeed = getRangeValue(particles.size.animation.speed) * ratio;
3569
+ this.maxSpeed = getRangeValue(particles.move.gravity.maxSpeed) * ratio;
3181
3570
  if (particles.orbit.radius !== undefined) {
3182
- this.orbitRadius = particles.orbit.radius * this.container.retina.pixelRatio;
3571
+ this.orbitRadius = getRangeValue(particles.orbit.radius) * this.container.retina.pixelRatio;
3183
3572
  }
3184
3573
  const modes = options.interactivity.modes;
3185
3574
  this.connectModeDistance = modes.connect.distance * ratio;
@@ -3199,19 +3588,19 @@
3199
3588
  const ratio = this.pixelRatio;
3200
3589
  const moveDistance = options.move.distance;
3201
3590
  const props = particle.retina;
3202
- props.attractDistance = options.move.attract.distance * ratio;
3591
+ props.attractDistance = getRangeValue(options.move.attract.distance) * ratio;
3203
3592
  props.linksDistance = options.links.distance * ratio;
3204
3593
  props.linksWidth = options.links.width * ratio;
3205
3594
  props.moveDrift = getRangeValue(options.move.drift) * ratio;
3206
3595
  props.moveSpeed = getRangeValue(options.move.speed) * ratio;
3207
- props.sizeAnimationSpeed = options.size.animation.speed * ratio;
3596
+ props.sizeAnimationSpeed = getRangeValue(options.size.animation.speed) * ratio;
3208
3597
  if (particle.spin) {
3209
3598
  props.spinAcceleration = getRangeValue(options.move.spin.acceleration) * ratio;
3210
3599
  }
3211
3600
  const maxDistance = props.maxDistance;
3212
3601
  maxDistance.horizontal = moveDistance.horizontal !== undefined ? moveDistance.horizontal * ratio : undefined;
3213
3602
  maxDistance.vertical = moveDistance.vertical !== undefined ? moveDistance.vertical * ratio : undefined;
3214
- props.maxSpeed = options.move.gravity.maxSpeed * ratio;
3603
+ props.maxSpeed = getRangeValue(options.move.gravity.maxSpeed) * ratio;
3215
3604
  }
3216
3605
  handleMotionChange(mediaQuery) {
3217
3606
  const options = this.container.actualOptions;
@@ -4543,7 +4932,7 @@
4543
4932
  function setColorAnimation(colorValue, colorAnimation, reduceFactor) {
4544
4933
  colorValue.enable = colorAnimation.enable;
4545
4934
  if (colorValue.enable) {
4546
- colorValue.velocity = colorAnimation.speed / 100 * reduceFactor;
4935
+ colorValue.velocity = getRangeValue(colorAnimation.speed) / 100 * reduceFactor;
4547
4936
  if (colorAnimation.sync) {
4548
4937
  return;
4549
4938
  }
@@ -4834,109 +5223,6 @@
4834
5223
  l: color.l + (type === "darken" ? -1 : 1) * value
4835
5224
  };
4836
5225
  }
4837
- class ColorAnimation {
4838
- constructor() {
4839
- this.count = 0;
4840
- this.enable = false;
4841
- this.offset = 0;
4842
- this.speed = 1;
4843
- this.sync = true;
4844
- }
4845
- load(data) {
4846
- if (data === undefined) {
4847
- return;
4848
- }
4849
- if (data.count !== undefined) {
4850
- this.count = data.count;
4851
- }
4852
- if (data.enable !== undefined) {
4853
- this.enable = data.enable;
4854
- }
4855
- if (data.offset !== undefined) {
4856
- this.offset = NumberUtils_setRangeValue(data.offset);
4857
- }
4858
- if (data.speed !== undefined) {
4859
- this.speed = data.speed;
4860
- }
4861
- if (data.sync !== undefined) {
4862
- this.sync = data.sync;
4863
- }
4864
- }
4865
- }
4866
- class HslAnimation {
4867
- constructor() {
4868
- this.h = new ColorAnimation;
4869
- this.s = new ColorAnimation;
4870
- this.l = new ColorAnimation;
4871
- }
4872
- load(data) {
4873
- if (!data) {
4874
- return;
4875
- }
4876
- this.h.load(data.h);
4877
- this.s.load(data.s);
4878
- this.l.load(data.l);
4879
- }
4880
- }
4881
- class OptionsColor_OptionsColor {
4882
- constructor() {
4883
- this.value = "#fff";
4884
- }
4885
- static create(source, data) {
4886
- const color = new OptionsColor_OptionsColor;
4887
- color.load(source);
4888
- if (data !== undefined) {
4889
- if (typeof data === "string" || data instanceof Array) {
4890
- color.load({
4891
- value: data
4892
- });
4893
- } else {
4894
- color.load(data);
4895
- }
4896
- }
4897
- return color;
4898
- }
4899
- load(data) {
4900
- if ((data === null || data === void 0 ? void 0 : data.value) === undefined) {
4901
- return;
4902
- }
4903
- this.value = data.value;
4904
- }
4905
- }
4906
- class AnimatableColor_AnimatableColor extends OptionsColor_OptionsColor {
4907
- constructor() {
4908
- super();
4909
- this.animation = new HslAnimation;
4910
- }
4911
- static create(source, data) {
4912
- const color = new AnimatableColor_AnimatableColor;
4913
- color.load(source);
4914
- if (data !== undefined) {
4915
- if (typeof data === "string" || data instanceof Array) {
4916
- color.load({
4917
- value: data
4918
- });
4919
- } else {
4920
- color.load(data);
4921
- }
4922
- }
4923
- return color;
4924
- }
4925
- load(data) {
4926
- super.load(data);
4927
- if (!data) {
4928
- return;
4929
- }
4930
- const colorAnimation = data.animation;
4931
- if (colorAnimation !== undefined) {
4932
- if (colorAnimation.enable !== undefined) {
4933
- this.animation.h.load(colorAnimation);
4934
- } else {
4935
- this.animation.load(data.animation);
4936
- }
4937
- }
4938
- }
4939
- }
4940
5226
  class EmitterLife {
4941
5227
  constructor() {
4942
5228
  this.wait = false;
@@ -5036,10 +5322,13 @@
5036
5322
  this.shape = data.shape;
5037
5323
  }
5038
5324
  if (data.position !== undefined) {
5039
- this.position = {
5040
- x: data.position.x,
5041
- y: data.position.y
5042
- };
5325
+ this.position = {};
5326
+ if (data.position.x !== undefined) {
5327
+ this.position.x = NumberUtils_setRangeValue(data.position.x);
5328
+ }
5329
+ if (data.position.y !== undefined) {
5330
+ this.position.y = NumberUtils_setRangeValue(data.position.y);
5331
+ }
5043
5332
  }
5044
5333
  if (data.spawnColor !== undefined) {
5045
5334
  if (this.spawnColor === undefined) {
@@ -5245,8 +5534,8 @@
5245
5534
  const container = this.container;
5246
5535
  const percentPosition = this.options.position;
5247
5536
  return {
5248
- x: ((_a = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.x) !== null && _a !== void 0 ? _a : Math.random() * 100) / 100 * container.canvas.size.width,
5249
- y: ((_b = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.y) !== null && _b !== void 0 ? _b : Math.random() * 100) / 100 * container.canvas.size.height
5537
+ x: NumberUtils_getRangeValue((_a = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.x) !== null && _a !== void 0 ? _a : Math.random() * 100) / 100 * container.canvas.size.width,
5538
+ y: NumberUtils_getRangeValue((_b = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.y) !== null && _b !== void 0 ? _b : Math.random() * 100) / 100 * container.canvas.size.height
5250
5539
  };
5251
5540
  }
5252
5541
  emit() {
@@ -5294,7 +5583,7 @@
5294
5583
  const colorOffset = NumberUtils_randomInRange(animation.offset);
5295
5584
  const delay = NumberUtils_getRangeValue(this.options.rate.delay);
5296
5585
  const emitFactor = 1e3 * delay / container.retina.reduceFactor;
5297
- const colorSpeed = (_a = animation.speed) !== null && _a !== void 0 ? _a : 0;
5586
+ const colorSpeed = NumberUtils_getRangeValue((_a = animation.speed) !== null && _a !== void 0 ? _a : 0);
5298
5587
  return (initValue + colorSpeed * container.fpsLimit / emitFactor + colorOffset * 3.6) % maxValue;
5299
5588
  }
5300
5589
  }