tsparticles 1.41.6 → 1.42.0

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 (298) hide show
  1. package/Core/Canvas.js +3 -1
  2. package/Core/Interfaces/ICoordinates.d.ts +8 -0
  3. package/Core/Interfaces/IParticleGravity.d.ts +5 -0
  4. package/Core/Interfaces/IParticleGravity.js +2 -0
  5. package/Core/Interfaces/index.d.ts +1 -0
  6. package/Core/Interfaces/index.js +1 -0
  7. package/Core/Particle.d.ts +2 -1
  8. package/Core/Particle.js +8 -7
  9. package/Core/Retina.js +7 -7
  10. package/Core/Utils/ParticlesMover.js +2 -2
  11. package/Interactions/Particles/Links/LinkInstance.js +1 -1
  12. package/Options/Classes/AnimatableGradient.d.ts +4 -4
  13. package/Options/Classes/AnimatableGradient.js +4 -4
  14. package/Options/Classes/AnimationOptions.d.ts +5 -5
  15. package/Options/Classes/AnimationOptions.js +3 -2
  16. package/Options/Classes/ColorAnimation.d.ts +2 -2
  17. package/Options/Classes/ColorAnimation.js +2 -2
  18. package/Options/Classes/Particles/Move/Attract.d.ts +2 -2
  19. package/Options/Classes/Particles/Move/Attract.js +2 -1
  20. package/Options/Classes/Particles/Move/MoveAngle.d.ts +3 -3
  21. package/Options/Classes/Particles/Move/MoveAngle.js +3 -2
  22. package/Options/Classes/Particles/Move/MoveGravity.d.ts +5 -5
  23. package/Options/Classes/Particles/Move/MoveGravity.js +3 -2
  24. package/Options/Classes/Particles/Orbit/Orbit.d.ts +4 -4
  25. package/Options/Classes/Particles/Orbit/Orbit.js +4 -3
  26. package/Options/Classes/Particles/Repulse/Repulse.d.ts +5 -5
  27. package/Options/Classes/Particles/Repulse/Repulse.js +5 -4
  28. package/Options/Classes/Particles/Roll/RollLight.d.ts +2 -2
  29. package/Options/Classes/Particles/Roll/RollLight.js +2 -1
  30. package/Options/Classes/Particles/Rotate/RotateAnimation.d.ts +2 -2
  31. package/Options/Classes/Particles/Rotate/RotateAnimation.js +2 -1
  32. package/Options/Classes/Particles/Tilt/TiltAnimation.d.ts +2 -2
  33. package/Options/Classes/Particles/Tilt/TiltAnimation.js +2 -1
  34. package/Options/Classes/Particles/Twinkle/TwinkleValues.d.ts +2 -2
  35. package/Options/Classes/Particles/Twinkle/TwinkleValues.js +2 -1
  36. package/Options/Interfaces/IAnimation.d.ts +3 -2
  37. package/Options/Interfaces/Particles/Move/IAttract.d.ts +3 -2
  38. package/Options/Interfaces/Particles/Move/IMoveAngle.d.ts +3 -2
  39. package/Options/Interfaces/Particles/Move/IMoveGravity.d.ts +3 -2
  40. package/Options/Interfaces/Particles/Orbit/IOrbit.d.ts +4 -3
  41. package/Options/Interfaces/Particles/Repulse/IRepulse.d.ts +5 -4
  42. package/Options/Interfaces/Particles/Roll/IRollLight.d.ts +2 -1
  43. package/Options/Interfaces/Particles/Rotate/IRotateAnimation.d.ts +2 -1
  44. package/Options/Interfaces/Particles/Tilt/ITiltAnimation.d.ts +2 -1
  45. package/Options/Interfaces/Particles/Twinkle/ITwinkleValues.d.ts +3 -2
  46. package/Plugins/Absorbers/AbsorberInstance.js +1 -1
  47. package/Plugins/Absorbers/Options/Classes/Absorber.d.ts +2 -2
  48. package/Plugins/Absorbers/Options/Classes/Absorber.js +8 -4
  49. package/Plugins/Absorbers/Options/Interfaces/IAbsorber.d.ts +2 -2
  50. package/Plugins/Emitters/EmitterInstance.js +3 -3
  51. package/Plugins/Emitters/Options/Classes/Emitter.d.ts +2 -2
  52. package/Plugins/Emitters/Options/Classes/Emitter.js +8 -5
  53. package/Plugins/Emitters/Options/Interfaces/IEmitter.d.ts +2 -2
  54. package/Updaters/Angle/AngleUpdater.js +2 -1
  55. package/Updaters/Opacity/OpacityUpdater.js +3 -2
  56. package/Updaters/Roll/RollUpdater.js +3 -3
  57. package/Updaters/Tilt/TiltUpdater.js +1 -1
  58. package/Utils/ColorUtils.js +1 -1
  59. package/browser/Core/Canvas.js +4 -2
  60. package/browser/Core/Interfaces/ICoordinates.d.ts +8 -0
  61. package/browser/Core/Interfaces/IParticleGravity.d.ts +5 -0
  62. package/browser/Core/Interfaces/IParticleGravity.js +1 -0
  63. package/browser/Core/Interfaces/index.d.ts +1 -0
  64. package/browser/Core/Interfaces/index.js +1 -0
  65. package/browser/Core/Particle.d.ts +2 -1
  66. package/browser/Core/Particle.js +8 -7
  67. package/browser/Core/Retina.js +7 -7
  68. package/browser/Core/Utils/ParticlesMover.js +2 -2
  69. package/browser/Interactions/Particles/Links/LinkInstance.js +2 -2
  70. package/browser/Options/Classes/AnimatableGradient.d.ts +4 -4
  71. package/browser/Options/Classes/AnimatableGradient.js +4 -4
  72. package/browser/Options/Classes/AnimationOptions.d.ts +5 -5
  73. package/browser/Options/Classes/AnimationOptions.js +3 -2
  74. package/browser/Options/Classes/ColorAnimation.d.ts +2 -2
  75. package/browser/Options/Classes/ColorAnimation.js +2 -2
  76. package/browser/Options/Classes/Particles/Move/Attract.d.ts +2 -2
  77. package/browser/Options/Classes/Particles/Move/Attract.js +2 -1
  78. package/browser/Options/Classes/Particles/Move/MoveAngle.d.ts +3 -3
  79. package/browser/Options/Classes/Particles/Move/MoveAngle.js +3 -2
  80. package/browser/Options/Classes/Particles/Move/MoveGravity.d.ts +5 -5
  81. package/browser/Options/Classes/Particles/Move/MoveGravity.js +3 -2
  82. package/browser/Options/Classes/Particles/Orbit/Orbit.d.ts +4 -4
  83. package/browser/Options/Classes/Particles/Orbit/Orbit.js +4 -3
  84. package/browser/Options/Classes/Particles/Repulse/Repulse.d.ts +5 -5
  85. package/browser/Options/Classes/Particles/Repulse/Repulse.js +5 -4
  86. package/browser/Options/Classes/Particles/Roll/RollLight.d.ts +2 -2
  87. package/browser/Options/Classes/Particles/Roll/RollLight.js +2 -1
  88. package/browser/Options/Classes/Particles/Rotate/RotateAnimation.d.ts +2 -2
  89. package/browser/Options/Classes/Particles/Rotate/RotateAnimation.js +2 -1
  90. package/browser/Options/Classes/Particles/Tilt/TiltAnimation.d.ts +2 -2
  91. package/browser/Options/Classes/Particles/Tilt/TiltAnimation.js +2 -1
  92. package/browser/Options/Classes/Particles/Twinkle/TwinkleValues.d.ts +2 -2
  93. package/browser/Options/Classes/Particles/Twinkle/TwinkleValues.js +2 -1
  94. package/browser/Options/Interfaces/IAnimation.d.ts +3 -2
  95. package/browser/Options/Interfaces/Particles/Move/IAttract.d.ts +3 -2
  96. package/browser/Options/Interfaces/Particles/Move/IMoveAngle.d.ts +3 -2
  97. package/browser/Options/Interfaces/Particles/Move/IMoveGravity.d.ts +3 -2
  98. package/browser/Options/Interfaces/Particles/Orbit/IOrbit.d.ts +4 -3
  99. package/browser/Options/Interfaces/Particles/Repulse/IRepulse.d.ts +5 -4
  100. package/browser/Options/Interfaces/Particles/Roll/IRollLight.d.ts +2 -1
  101. package/browser/Options/Interfaces/Particles/Rotate/IRotateAnimation.d.ts +2 -1
  102. package/browser/Options/Interfaces/Particles/Tilt/ITiltAnimation.d.ts +2 -1
  103. package/browser/Options/Interfaces/Particles/Twinkle/ITwinkleValues.d.ts +3 -2
  104. package/browser/Plugins/Absorbers/AbsorberInstance.js +1 -1
  105. package/browser/Plugins/Absorbers/Options/Classes/Absorber.d.ts +2 -2
  106. package/browser/Plugins/Absorbers/Options/Classes/Absorber.js +8 -4
  107. package/browser/Plugins/Absorbers/Options/Interfaces/IAbsorber.d.ts +2 -2
  108. package/browser/Plugins/Emitters/EmitterInstance.js +3 -3
  109. package/browser/Plugins/Emitters/Options/Classes/Emitter.d.ts +2 -2
  110. package/browser/Plugins/Emitters/Options/Classes/Emitter.js +8 -5
  111. package/browser/Plugins/Emitters/Options/Interfaces/IEmitter.d.ts +2 -2
  112. package/browser/Updaters/Angle/AngleUpdater.js +2 -1
  113. package/browser/Updaters/Opacity/OpacityUpdater.js +3 -2
  114. package/browser/Updaters/Roll/RollUpdater.js +3 -3
  115. package/browser/Updaters/Tilt/TiltUpdater.js +1 -1
  116. package/browser/Utils/ColorUtils.js +2 -2
  117. package/esm/Core/Canvas.js +4 -2
  118. package/esm/Core/Interfaces/ICoordinates.d.ts +8 -0
  119. package/esm/Core/Interfaces/IParticleGravity.d.ts +5 -0
  120. package/esm/Core/Interfaces/IParticleGravity.js +1 -0
  121. package/esm/Core/Interfaces/index.d.ts +1 -0
  122. package/esm/Core/Interfaces/index.js +1 -0
  123. package/esm/Core/Particle.d.ts +2 -1
  124. package/esm/Core/Particle.js +8 -7
  125. package/esm/Core/Retina.js +7 -7
  126. package/esm/Core/Utils/ParticlesMover.js +2 -2
  127. package/esm/Interactions/Particles/Links/LinkInstance.js +2 -2
  128. package/esm/Options/Classes/AnimatableGradient.d.ts +4 -4
  129. package/esm/Options/Classes/AnimatableGradient.js +4 -4
  130. package/esm/Options/Classes/AnimationOptions.d.ts +5 -5
  131. package/esm/Options/Classes/AnimationOptions.js +3 -2
  132. package/esm/Options/Classes/ColorAnimation.d.ts +2 -2
  133. package/esm/Options/Classes/ColorAnimation.js +2 -2
  134. package/esm/Options/Classes/Particles/Move/Attract.d.ts +2 -2
  135. package/esm/Options/Classes/Particles/Move/Attract.js +2 -1
  136. package/esm/Options/Classes/Particles/Move/MoveAngle.d.ts +3 -3
  137. package/esm/Options/Classes/Particles/Move/MoveAngle.js +3 -2
  138. package/esm/Options/Classes/Particles/Move/MoveGravity.d.ts +5 -5
  139. package/esm/Options/Classes/Particles/Move/MoveGravity.js +3 -2
  140. package/esm/Options/Classes/Particles/Orbit/Orbit.d.ts +4 -4
  141. package/esm/Options/Classes/Particles/Orbit/Orbit.js +4 -3
  142. package/esm/Options/Classes/Particles/Repulse/Repulse.d.ts +5 -5
  143. package/esm/Options/Classes/Particles/Repulse/Repulse.js +5 -4
  144. package/esm/Options/Classes/Particles/Roll/RollLight.d.ts +2 -2
  145. package/esm/Options/Classes/Particles/Roll/RollLight.js +2 -1
  146. package/esm/Options/Classes/Particles/Rotate/RotateAnimation.d.ts +2 -2
  147. package/esm/Options/Classes/Particles/Rotate/RotateAnimation.js +2 -1
  148. package/esm/Options/Classes/Particles/Tilt/TiltAnimation.d.ts +2 -2
  149. package/esm/Options/Classes/Particles/Tilt/TiltAnimation.js +2 -1
  150. package/esm/Options/Classes/Particles/Twinkle/TwinkleValues.d.ts +2 -2
  151. package/esm/Options/Classes/Particles/Twinkle/TwinkleValues.js +2 -1
  152. package/esm/Options/Interfaces/IAnimation.d.ts +3 -2
  153. package/esm/Options/Interfaces/Particles/Move/IAttract.d.ts +3 -2
  154. package/esm/Options/Interfaces/Particles/Move/IMoveAngle.d.ts +3 -2
  155. package/esm/Options/Interfaces/Particles/Move/IMoveGravity.d.ts +3 -2
  156. package/esm/Options/Interfaces/Particles/Orbit/IOrbit.d.ts +4 -3
  157. package/esm/Options/Interfaces/Particles/Repulse/IRepulse.d.ts +5 -4
  158. package/esm/Options/Interfaces/Particles/Roll/IRollLight.d.ts +2 -1
  159. package/esm/Options/Interfaces/Particles/Rotate/IRotateAnimation.d.ts +2 -1
  160. package/esm/Options/Interfaces/Particles/Tilt/ITiltAnimation.d.ts +2 -1
  161. package/esm/Options/Interfaces/Particles/Twinkle/ITwinkleValues.d.ts +3 -2
  162. package/esm/Plugins/Absorbers/AbsorberInstance.js +1 -1
  163. package/esm/Plugins/Absorbers/Options/Classes/Absorber.d.ts +2 -2
  164. package/esm/Plugins/Absorbers/Options/Classes/Absorber.js +8 -4
  165. package/esm/Plugins/Absorbers/Options/Interfaces/IAbsorber.d.ts +2 -2
  166. package/esm/Plugins/Emitters/EmitterInstance.js +3 -3
  167. package/esm/Plugins/Emitters/Options/Classes/Emitter.d.ts +2 -2
  168. package/esm/Plugins/Emitters/Options/Classes/Emitter.js +8 -5
  169. package/esm/Plugins/Emitters/Options/Interfaces/IEmitter.d.ts +2 -2
  170. package/esm/Updaters/Angle/AngleUpdater.js +2 -1
  171. package/esm/Updaters/Opacity/OpacityUpdater.js +3 -2
  172. package/esm/Updaters/Roll/RollUpdater.js +3 -3
  173. package/esm/Updaters/Tilt/TiltUpdater.js +1 -1
  174. package/esm/Utils/ColorUtils.js +2 -2
  175. package/package.json +1 -1
  176. package/report.html +2 -2
  177. package/report.slim.html +2 -2
  178. package/scripts/install.js +11 -2
  179. package/tsparticles.engine.js +43 -42
  180. package/tsparticles.engine.min.js +2 -2
  181. package/tsparticles.interaction.external.attract.js +315 -31
  182. package/tsparticles.interaction.external.attract.min.js +1 -1
  183. package/tsparticles.interaction.external.bounce.js +315 -31
  184. package/tsparticles.interaction.external.bounce.min.js +1 -1
  185. package/tsparticles.interaction.external.bubble.js +315 -31
  186. package/tsparticles.interaction.external.bubble.min.js +1 -1
  187. package/tsparticles.interaction.external.connect.js +315 -31
  188. package/tsparticles.interaction.external.connect.min.js +1 -1
  189. package/tsparticles.interaction.external.grab.js +315 -31
  190. package/tsparticles.interaction.external.grab.min.js +1 -1
  191. package/tsparticles.interaction.external.repulse.js +315 -31
  192. package/tsparticles.interaction.external.repulse.min.js +1 -1
  193. package/tsparticles.interaction.external.trail.js +315 -31
  194. package/tsparticles.interaction.external.trail.min.js +1 -1
  195. package/tsparticles.interaction.particles.attract.js +315 -31
  196. package/tsparticles.interaction.particles.attract.min.js +1 -1
  197. package/tsparticles.interaction.particles.collisions.js +315 -31
  198. package/tsparticles.interaction.particles.collisions.min.js +1 -1
  199. package/tsparticles.interaction.particles.links.js +316 -32
  200. package/tsparticles.interaction.particles.links.min.js +2 -2
  201. package/tsparticles.js +69 -62
  202. package/tsparticles.min.js +2 -2
  203. package/tsparticles.pathseg.min.js +1 -1
  204. package/tsparticles.plugins.absorbers.js +323 -36
  205. package/tsparticles.plugins.absorbers.min.js +2 -2
  206. package/tsparticles.plugins.emitters.js +426 -139
  207. package/tsparticles.plugins.emitters.min.js +2 -2
  208. package/tsparticles.plugins.polygonMask.js +315 -31
  209. package/tsparticles.plugins.polygonMask.min.js +1 -1
  210. package/tsparticles.shape.circle.min.js +1 -1
  211. package/tsparticles.shape.image.js +315 -31
  212. package/tsparticles.shape.image.min.js +1 -1
  213. package/tsparticles.shape.line.min.js +1 -1
  214. package/tsparticles.shape.polygon.min.js +1 -1
  215. package/tsparticles.shape.square.min.js +1 -1
  216. package/tsparticles.shape.star.min.js +1 -1
  217. package/tsparticles.shape.text.js +315 -31
  218. package/tsparticles.shape.text.min.js +1 -1
  219. package/tsparticles.slim.js +47 -46
  220. package/tsparticles.slim.min.js +2 -2
  221. package/tsparticles.updater.angle.js +316 -32
  222. package/tsparticles.updater.angle.min.js +2 -2
  223. package/tsparticles.updater.color.js +315 -31
  224. package/tsparticles.updater.color.min.js +2 -2
  225. package/tsparticles.updater.life.js +315 -31
  226. package/tsparticles.updater.life.min.js +1 -1
  227. package/tsparticles.updater.opacity.js +317 -33
  228. package/tsparticles.updater.opacity.min.js +2 -2
  229. package/tsparticles.updater.outModes.js +315 -31
  230. package/tsparticles.updater.outModes.min.js +1 -1
  231. package/tsparticles.updater.roll.js +318 -34
  232. package/tsparticles.updater.roll.min.js +2 -2
  233. package/tsparticles.updater.size.js +315 -31
  234. package/tsparticles.updater.size.min.js +1 -1
  235. package/tsparticles.updater.strokeColor.js +315 -31
  236. package/tsparticles.updater.strokeColor.min.js +2 -2
  237. package/tsparticles.updater.tilt.js +316 -32
  238. package/tsparticles.updater.tilt.min.js +2 -2
  239. package/tsparticles.updater.wobble.js +315 -31
  240. package/tsparticles.updater.wobble.min.js +1 -1
  241. package/umd/Core/Canvas.js +3 -1
  242. package/umd/Core/Interfaces/ICoordinates.d.ts +8 -0
  243. package/umd/Core/Interfaces/IParticleGravity.d.ts +5 -0
  244. package/umd/Core/Interfaces/IParticleGravity.js +12 -0
  245. package/umd/Core/Interfaces/index.d.ts +1 -0
  246. package/umd/Core/Interfaces/index.js +2 -1
  247. package/umd/Core/Particle.d.ts +2 -1
  248. package/umd/Core/Particle.js +8 -7
  249. package/umd/Core/Retina.js +7 -7
  250. package/umd/Core/Utils/ParticlesMover.js +2 -2
  251. package/umd/Interactions/Particles/Links/LinkInstance.js +1 -1
  252. package/umd/Options/Classes/AnimatableGradient.d.ts +4 -4
  253. package/umd/Options/Classes/AnimatableGradient.js +4 -4
  254. package/umd/Options/Classes/AnimationOptions.d.ts +5 -5
  255. package/umd/Options/Classes/AnimationOptions.js +4 -3
  256. package/umd/Options/Classes/ColorAnimation.d.ts +2 -2
  257. package/umd/Options/Classes/ColorAnimation.js +2 -2
  258. package/umd/Options/Classes/Particles/Move/Attract.d.ts +2 -2
  259. package/umd/Options/Classes/Particles/Move/Attract.js +3 -2
  260. package/umd/Options/Classes/Particles/Move/MoveAngle.d.ts +3 -3
  261. package/umd/Options/Classes/Particles/Move/MoveAngle.js +4 -3
  262. package/umd/Options/Classes/Particles/Move/MoveGravity.d.ts +5 -5
  263. package/umd/Options/Classes/Particles/Move/MoveGravity.js +4 -3
  264. package/umd/Options/Classes/Particles/Orbit/Orbit.d.ts +4 -4
  265. package/umd/Options/Classes/Particles/Orbit/Orbit.js +5 -4
  266. package/umd/Options/Classes/Particles/Repulse/Repulse.d.ts +5 -5
  267. package/umd/Options/Classes/Particles/Repulse/Repulse.js +6 -5
  268. package/umd/Options/Classes/Particles/Roll/RollLight.d.ts +2 -2
  269. package/umd/Options/Classes/Particles/Roll/RollLight.js +3 -2
  270. package/umd/Options/Classes/Particles/Rotate/RotateAnimation.d.ts +2 -2
  271. package/umd/Options/Classes/Particles/Rotate/RotateAnimation.js +3 -2
  272. package/umd/Options/Classes/Particles/Tilt/TiltAnimation.d.ts +2 -2
  273. package/umd/Options/Classes/Particles/Tilt/TiltAnimation.js +3 -2
  274. package/umd/Options/Classes/Particles/Twinkle/TwinkleValues.d.ts +2 -2
  275. package/umd/Options/Classes/Particles/Twinkle/TwinkleValues.js +3 -2
  276. package/umd/Options/Interfaces/IAnimation.d.ts +3 -2
  277. package/umd/Options/Interfaces/Particles/Move/IAttract.d.ts +3 -2
  278. package/umd/Options/Interfaces/Particles/Move/IMoveAngle.d.ts +3 -2
  279. package/umd/Options/Interfaces/Particles/Move/IMoveGravity.d.ts +3 -2
  280. package/umd/Options/Interfaces/Particles/Orbit/IOrbit.d.ts +4 -3
  281. package/umd/Options/Interfaces/Particles/Repulse/IRepulse.d.ts +5 -4
  282. package/umd/Options/Interfaces/Particles/Roll/IRollLight.d.ts +2 -1
  283. package/umd/Options/Interfaces/Particles/Rotate/IRotateAnimation.d.ts +2 -1
  284. package/umd/Options/Interfaces/Particles/Tilt/ITiltAnimation.d.ts +2 -1
  285. package/umd/Options/Interfaces/Particles/Twinkle/ITwinkleValues.d.ts +3 -2
  286. package/umd/Plugins/Absorbers/AbsorberInstance.js +1 -1
  287. package/umd/Plugins/Absorbers/Options/Classes/Absorber.d.ts +2 -2
  288. package/umd/Plugins/Absorbers/Options/Classes/Absorber.js +9 -5
  289. package/umd/Plugins/Absorbers/Options/Interfaces/IAbsorber.d.ts +2 -2
  290. package/umd/Plugins/Emitters/EmitterInstance.js +3 -3
  291. package/umd/Plugins/Emitters/Options/Classes/Emitter.d.ts +2 -2
  292. package/umd/Plugins/Emitters/Options/Classes/Emitter.js +9 -6
  293. package/umd/Plugins/Emitters/Options/Interfaces/IEmitter.d.ts +2 -2
  294. package/umd/Updaters/Angle/AngleUpdater.js +2 -1
  295. package/umd/Updaters/Opacity/OpacityUpdater.js +3 -2
  296. package/umd/Updaters/Roll/RollUpdater.js +3 -3
  297. package/umd/Updaters/Tilt/TiltUpdater.js +1 -1
  298. package/umd/Utils/ColorUtils.js +1 -1
@@ -1,10 +1,10 @@
1
- import { IAnimation } from "../Interfaces/IAnimation";
2
- import { IOptionLoader } from "../Interfaces/IOptionLoader";
3
- import { RecursivePartial } from "../../Types";
1
+ import type { RangeValue, RecursivePartial } from "../../Types";
2
+ import type { IAnimation } from "../Interfaces/IAnimation";
3
+ import type { IOptionLoader } from "../Interfaces/IOptionLoader";
4
4
  export declare class AnimationOptions implements IAnimation, IOptionLoader<IAnimation> {
5
- count: number;
5
+ count: RangeValue;
6
6
  enable: boolean;
7
- speed: number;
7
+ speed: RangeValue;
8
8
  sync: boolean;
9
9
  constructor();
10
10
  load(data?: RecursivePartial<IAnimation>): void;
@@ -1,3 +1,4 @@
1
+ import { setRangeValue } from "../../Utils";
1
2
  export class AnimationOptions {
2
3
  constructor() {
3
4
  this.count = 0;
@@ -10,13 +11,13 @@ export class AnimationOptions {
10
11
  return;
11
12
  }
12
13
  if (data.count !== undefined) {
13
- this.count = data.count;
14
+ this.count = setRangeValue(data.count);
14
15
  }
15
16
  if (data.enable !== undefined) {
16
17
  this.enable = data.enable;
17
18
  }
18
19
  if (data.speed !== undefined) {
19
- this.speed = data.speed;
20
+ this.speed = setRangeValue(data.speed);
20
21
  }
21
22
  if (data.sync !== undefined) {
22
23
  this.sync = data.sync;
@@ -5,10 +5,10 @@ import type { IOptionLoader } from "../Interfaces/IOptionLoader";
5
5
  * @category Options
6
6
  */
7
7
  export declare class ColorAnimation implements IColorAnimation, IOptionLoader<IColorAnimation> {
8
- count: number;
8
+ count: RangeValue;
9
9
  enable: boolean;
10
10
  offset: RangeValue;
11
- speed: number;
11
+ speed: RangeValue;
12
12
  sync: boolean;
13
13
  constructor();
14
14
  load(data?: RecursivePartial<IColorAnimation>): void;
@@ -15,7 +15,7 @@ export class ColorAnimation {
15
15
  return;
16
16
  }
17
17
  if (data.count !== undefined) {
18
- this.count = data.count;
18
+ this.count = setRangeValue(data.count);
19
19
  }
20
20
  if (data.enable !== undefined) {
21
21
  this.enable = data.enable;
@@ -24,7 +24,7 @@ export class ColorAnimation {
24
24
  this.offset = setRangeValue(data.offset);
25
25
  }
26
26
  if (data.speed !== undefined) {
27
- this.speed = data.speed;
27
+ this.speed = setRangeValue(data.speed);
28
28
  }
29
29
  if (data.sync !== undefined) {
30
30
  this.sync = data.sync;
@@ -1,7 +1,7 @@
1
+ import type { RangeValue, RecursivePartial } from "../../../../Types";
1
2
  import type { IAttract } from "../../../Interfaces/Particles/Move/IAttract";
2
3
  import type { ICoordinates } from "../../../../Core";
3
4
  import type { IOptionLoader } from "../../../Interfaces/IOptionLoader";
4
- import type { RecursivePartial } from "../../../../Types";
5
5
  /**
6
6
  * @category Options
7
7
  */
@@ -28,7 +28,7 @@ export declare class Attract implements IAttract, IOptionLoader<IAttract> {
28
28
  * @param value
29
29
  */
30
30
  set rotateY(value: number);
31
- distance: number;
31
+ distance: RangeValue;
32
32
  enable: boolean;
33
33
  rotate: ICoordinates;
34
34
  constructor();
@@ -1,3 +1,4 @@
1
+ import { setRangeValue } from "../../../../Utils";
1
2
  /**
2
3
  * @category Options
3
4
  */
@@ -46,7 +47,7 @@ export class Attract {
46
47
  return;
47
48
  }
48
49
  if (data.distance !== undefined) {
49
- this.distance = data.distance;
50
+ this.distance = setRangeValue(data.distance);
50
51
  }
51
52
  if (data.enable !== undefined) {
52
53
  this.enable = data.enable;
@@ -1,12 +1,12 @@
1
+ import type { RangeValue, RecursivePartial } from "../../../../Types";
1
2
  import type { IMoveAngle } from "../../../Interfaces/Particles/Move/IMoveAngle";
2
3
  import type { IOptionLoader } from "../../../Interfaces/IOptionLoader";
3
- import type { RecursivePartial } from "../../../../Types";
4
4
  /**
5
5
  * @category Options
6
6
  */
7
7
  export declare class MoveAngle implements IMoveAngle, IOptionLoader<IMoveAngle> {
8
- offset: number;
9
- value: number;
8
+ offset: RangeValue;
9
+ value: RangeValue;
10
10
  constructor();
11
11
  load(data?: RecursivePartial<IMoveAngle>): void;
12
12
  }
@@ -1,3 +1,4 @@
1
+ import { setRangeValue } from "../../../../Utils";
1
2
  /**
2
3
  * @category Options
3
4
  */
@@ -11,10 +12,10 @@ export class MoveAngle {
11
12
  return;
12
13
  }
13
14
  if (data.offset !== undefined) {
14
- this.offset = data.offset;
15
+ this.offset = setRangeValue(data.offset);
15
16
  }
16
17
  if (data.value !== undefined) {
17
- this.value = data.value;
18
+ this.value = setRangeValue(data.value);
18
19
  }
19
20
  }
20
21
  }
@@ -1,11 +1,11 @@
1
- import { IMoveGravity } from "../../../Interfaces/Particles/Move/IMoveGravity";
2
- import { IOptionLoader } from "../../../Interfaces/IOptionLoader";
3
- import { RecursivePartial } from "../../../../Types";
1
+ import type { RangeValue, RecursivePartial } from "../../../../Types";
2
+ import type { IMoveGravity } from "../../../Interfaces/Particles/Move/IMoveGravity";
3
+ import type { IOptionLoader } from "../../../Interfaces/IOptionLoader";
4
4
  export declare class MoveGravity implements IMoveGravity, IOptionLoader<IMoveGravity> {
5
- acceleration: number;
5
+ acceleration: RangeValue;
6
6
  enable: boolean;
7
7
  inverse: boolean;
8
- maxSpeed: number;
8
+ maxSpeed: RangeValue;
9
9
  constructor();
10
10
  load(data?: RecursivePartial<IMoveGravity>): void;
11
11
  }
@@ -1,3 +1,4 @@
1
+ import { setRangeValue } from "../../../../Utils";
1
2
  export class MoveGravity {
2
3
  constructor() {
3
4
  this.acceleration = 9.81;
@@ -10,7 +11,7 @@ export class MoveGravity {
10
11
  return;
11
12
  }
12
13
  if (data.acceleration !== undefined) {
13
- this.acceleration = data.acceleration;
14
+ this.acceleration = setRangeValue(data.acceleration);
14
15
  }
15
16
  if (data.enable !== undefined) {
16
17
  this.enable = data.enable;
@@ -19,7 +20,7 @@ export class MoveGravity {
19
20
  this.inverse = data.inverse;
20
21
  }
21
22
  if (data.maxSpeed !== undefined) {
22
- this.maxSpeed = data.maxSpeed;
23
+ this.maxSpeed = setRangeValue(data.maxSpeed);
23
24
  }
24
25
  }
25
26
  }
@@ -1,10 +1,10 @@
1
+ import type { RangeValue, RecursivePartial } from "../../../../Types";
1
2
  import { AnimationOptions } from "../../AnimationOptions";
2
3
  import type { IAnimatable } from "../../../Interfaces/IAnimatable";
3
4
  import type { IOptionLoader } from "../../../Interfaces/IOptionLoader";
4
5
  import type { IOrbit } from "../../../Interfaces/Particles/Orbit/IOrbit";
5
6
  import { OptionsColor } from "../../OptionsColor";
6
7
  import { OrbitRotation } from "./OrbitRotation";
7
- import type { RecursivePartial } from "../../../../Types";
8
8
  /**
9
9
  * [[include:Options/Particles/Orbit.md]]
10
10
  * @category Options
@@ -12,10 +12,10 @@ import type { RecursivePartial } from "../../../../Types";
12
12
  export declare class Orbit implements IOrbit, IOptionLoader<IOrbit>, IAnimatable<AnimationOptions> {
13
13
  animation: AnimationOptions;
14
14
  enable: boolean;
15
- opacity: number;
16
- width: number;
15
+ opacity: RangeValue;
16
+ width: RangeValue;
17
17
  color?: OptionsColor;
18
- radius?: number;
18
+ radius?: RangeValue;
19
19
  rotation: OrbitRotation;
20
20
  constructor();
21
21
  load(data?: RecursivePartial<IOrbit>): void;
@@ -1,6 +1,7 @@
1
1
  import { AnimationOptions } from "../../AnimationOptions";
2
2
  import { OptionsColor } from "../../OptionsColor";
3
3
  import { OrbitRotation } from "./OrbitRotation";
4
+ import { setRangeValue } from "../../../../Utils";
4
5
  /**
5
6
  * [[include:Options/Particles/Orbit.md]]
6
7
  * @category Options
@@ -23,13 +24,13 @@ export class Orbit {
23
24
  this.enable = data.enable;
24
25
  }
25
26
  if (data.opacity !== undefined) {
26
- this.opacity = data.opacity;
27
+ this.opacity = setRangeValue(data.opacity);
27
28
  }
28
29
  if (data.width !== undefined) {
29
- this.width = data.width;
30
+ this.width = setRangeValue(data.width);
30
31
  }
31
32
  if (data.radius !== undefined) {
32
- this.radius = data.radius;
33
+ this.radius = setRangeValue(data.radius);
33
34
  }
34
35
  if (data.color !== undefined) {
35
36
  this.color = OptionsColor.create(this.color, data.color);
@@ -1,16 +1,16 @@
1
+ import type { RangeValue, RecursivePartial } from "../../../../Types";
1
2
  import type { IOptionLoader } from "../../../Interfaces/IOptionLoader";
2
3
  import type { IRepulse } from "../../../Interfaces/Particles/Repulse/IRepulse";
3
- import type { RecursivePartial } from "../../../../Types";
4
4
  import { ValueWithRandom } from "../../ValueWithRandom";
5
5
  /**
6
6
  * @category Options
7
7
  */
8
8
  export declare class Repulse extends ValueWithRandom implements IRepulse, IOptionLoader<IRepulse> {
9
9
  enabled: boolean;
10
- distance: number;
11
- duration: number;
12
- factor: number;
13
- speed: number;
10
+ distance: RangeValue;
11
+ duration: RangeValue;
12
+ factor: RangeValue;
13
+ speed: RangeValue;
14
14
  constructor();
15
15
  load(data?: RecursivePartial<IRepulse>): void;
16
16
  }
@@ -1,4 +1,5 @@
1
1
  import { ValueWithRandom } from "../../ValueWithRandom";
2
+ import { setRangeValue } from "../../../../Utils";
2
3
  /**
3
4
  * @category Options
4
5
  */
@@ -20,16 +21,16 @@ export class Repulse extends ValueWithRandom {
20
21
  this.enabled = data.enabled;
21
22
  }
22
23
  if (data.distance !== undefined) {
23
- this.distance = data.distance;
24
+ this.distance = setRangeValue(data.distance);
24
25
  }
25
26
  if (data.duration !== undefined) {
26
- this.duration = data.duration;
27
+ this.duration = setRangeValue(data.duration);
27
28
  }
28
29
  if (data.factor !== undefined) {
29
- this.factor = data.factor;
30
+ this.factor = setRangeValue(data.factor);
30
31
  }
31
32
  if (data.speed !== undefined) {
32
- this.speed = data.speed;
33
+ this.speed = setRangeValue(data.speed);
33
34
  }
34
35
  }
35
36
  }
@@ -1,9 +1,9 @@
1
+ import type { RangeValue, RecursivePartial } from "../../../../Types";
1
2
  import type { IOptionLoader } from "../../../Interfaces/IOptionLoader";
2
3
  import type { IRollLight } from "../../../Interfaces/Particles/Roll/IRollLight";
3
- import type { RecursivePartial } from "../../../../Types";
4
4
  export declare class RollLight implements IRollLight, IOptionLoader<IRollLight> {
5
5
  enable: boolean;
6
- value: number;
6
+ value: RangeValue;
7
7
  constructor();
8
8
  load(data?: RecursivePartial<IRollLight>): void;
9
9
  }
@@ -1,3 +1,4 @@
1
+ import { setRangeValue } from "../../../../Utils";
1
2
  export class RollLight {
2
3
  constructor() {
3
4
  this.enable = false;
@@ -11,7 +12,7 @@ export class RollLight {
11
12
  this.enable = data.enable;
12
13
  }
13
14
  if (data.value !== undefined) {
14
- this.value = data.value;
15
+ this.value = setRangeValue(data.value);
15
16
  }
16
17
  }
17
18
  }
@@ -1,12 +1,12 @@
1
+ import type { RangeValue, RecursivePartial } from "../../../../Types";
1
2
  import type { IOptionLoader } from "../../../Interfaces/IOptionLoader";
2
3
  import type { IRotateAnimation } from "../../../Interfaces/Particles/Rotate/IRotateAnimation";
3
- import type { RecursivePartial } from "../../../../Types";
4
4
  /**
5
5
  * @category Options
6
6
  */
7
7
  export declare class RotateAnimation implements IRotateAnimation, IOptionLoader<IRotateAnimation> {
8
8
  enable: boolean;
9
- speed: number;
9
+ speed: RangeValue;
10
10
  sync: boolean;
11
11
  constructor();
12
12
  load(data?: RecursivePartial<IRotateAnimation>): void;
@@ -1,3 +1,4 @@
1
+ import { setRangeValue } from "../../../../Utils";
1
2
  /**
2
3
  * @category Options
3
4
  */
@@ -15,7 +16,7 @@ export class RotateAnimation {
15
16
  this.enable = data.enable;
16
17
  }
17
18
  if (data.speed !== undefined) {
18
- this.speed = data.speed;
19
+ this.speed = setRangeValue(data.speed);
19
20
  }
20
21
  if (data.sync !== undefined) {
21
22
  this.sync = data.sync;
@@ -1,12 +1,12 @@
1
+ import type { RangeValue, RecursivePartial } from "../../../../Types";
1
2
  import type { IOptionLoader } from "../../../Interfaces/IOptionLoader";
2
3
  import type { ITiltAnimation } from "../../../Interfaces/Particles/Tilt/ITiltAnimation";
3
- import type { RecursivePartial } from "../../../../Types";
4
4
  /**
5
5
  * @category Options
6
6
  */
7
7
  export declare class TiltAnimation implements ITiltAnimation, IOptionLoader<ITiltAnimation> {
8
8
  enable: boolean;
9
- speed: number;
9
+ speed: RangeValue;
10
10
  sync: boolean;
11
11
  constructor();
12
12
  load(data?: RecursivePartial<ITiltAnimation>): void;
@@ -1,3 +1,4 @@
1
+ import { setRangeValue } from "../../../../Utils";
1
2
  /**
2
3
  * @category Options
3
4
  */
@@ -15,7 +16,7 @@ export class TiltAnimation {
15
16
  this.enable = data.enable;
16
17
  }
17
18
  if (data.speed !== undefined) {
18
- this.speed = data.speed;
19
+ this.speed = setRangeValue(data.speed);
19
20
  }
20
21
  if (data.sync !== undefined) {
21
22
  this.sync = data.sync;
@@ -1,7 +1,7 @@
1
+ import type { RangeValue, RecursivePartial } from "../../../../Types";
1
2
  import type { IOptionLoader } from "../../../Interfaces/IOptionLoader";
2
3
  import type { ITwinkleValues } from "../../../Interfaces/Particles/Twinkle/ITwinkleValues";
3
4
  import { OptionsColor } from "../../OptionsColor";
4
- import type { RecursivePartial } from "../../../../Types";
5
5
  /**
6
6
  * @category Options
7
7
  */
@@ -9,7 +9,7 @@ export declare class TwinkleValues implements ITwinkleValues, IOptionLoader<ITwi
9
9
  color?: OptionsColor;
10
10
  enable: boolean;
11
11
  frequency: number;
12
- opacity: number;
12
+ opacity: RangeValue;
13
13
  constructor();
14
14
  load(data?: RecursivePartial<ITwinkleValues>): void;
15
15
  }
@@ -1,4 +1,5 @@
1
1
  import { OptionsColor } from "../../OptionsColor";
2
+ import { setRangeValue } from "../../../../Utils";
2
3
  /**
3
4
  * @category Options
4
5
  */
@@ -22,7 +23,7 @@ export class TwinkleValues {
22
23
  this.frequency = data.frequency;
23
24
  }
24
25
  if (data.opacity !== undefined) {
25
- this.opacity = data.opacity;
26
+ this.opacity = setRangeValue(data.opacity);
26
27
  }
27
28
  }
28
29
  }
@@ -1,5 +1,6 @@
1
+ import { RangeValue } from "../../Types";
1
2
  export interface IAnimation {
2
- count: number;
3
+ count: RangeValue;
3
4
  /**
4
5
  * Enables/disables the animation
5
6
  */
@@ -7,7 +8,7 @@ export interface IAnimation {
7
8
  /**
8
9
  * Speed animation
9
10
  */
10
- speed: number;
11
+ speed: RangeValue;
11
12
  /**
12
13
  * Enables the sync animations for the particles created at the same time
13
14
  * pushed or emitter particles will be out of sync
@@ -1,9 +1,10 @@
1
- import type { ICoordinates } from "../../../../Core/Interfaces/ICoordinates";
1
+ import type { ICoordinates } from "../../../../Core";
2
+ import type { RangeValue } from "../../../../Types";
2
3
  /**
3
4
  * @category Options
4
5
  */
5
6
  export interface IAttract {
6
- distance: number;
7
+ distance: RangeValue;
7
8
  enable: boolean;
8
9
  /**
9
10
  * @deprecated use the new rotate.x instead
@@ -1,7 +1,8 @@
1
+ import type { RangeValue } from "../../../../Types";
1
2
  /**
2
3
  * @category Options
3
4
  */
4
5
  export interface IMoveAngle {
5
- offset: number;
6
- value: number;
6
+ offset: RangeValue;
7
+ value: RangeValue;
7
8
  }
@@ -1,6 +1,7 @@
1
+ import type { RangeValue } from "../../../../Types";
1
2
  export interface IMoveGravity {
2
- acceleration: number;
3
+ acceleration: RangeValue;
3
4
  enable: boolean;
4
5
  inverse: boolean;
5
- maxSpeed: number;
6
+ maxSpeed: RangeValue;
6
7
  }
@@ -2,6 +2,7 @@ import type { IAnimatable } from "../../IAnimatable";
2
2
  import type { IAnimation } from "../../IAnimation";
3
3
  import type { IColor } from "../../../../Core";
4
4
  import type { IValueWithRandom } from "../../IValueWithRandom";
5
+ import type { RangeValue } from "../../../../Types";
5
6
  /**
6
7
  * @category Options
7
8
  * [[include:Options/Particles/Orbit.md]]
@@ -12,8 +13,8 @@ export interface IOrbit extends IAnimatable<IAnimation> {
12
13
  * Enables/disables the animation
13
14
  */
14
15
  enable: boolean;
15
- radius?: number;
16
+ radius?: RangeValue;
16
17
  rotation: IValueWithRandom;
17
- opacity: number;
18
- width: number;
18
+ opacity: RangeValue;
19
+ width: RangeValue;
19
20
  }
@@ -1,12 +1,13 @@
1
1
  import type { IValueWithRandom } from "../../IValueWithRandom";
2
+ import type { RangeValue } from "../../../../Types";
2
3
  /**
3
4
  * @category Options
4
5
  * [[include:Options/Particles/Repulse.md]]
5
6
  */
6
7
  export interface IRepulse extends IValueWithRandom {
7
8
  enabled: boolean;
8
- distance: number;
9
- duration: number;
10
- factor: number;
11
- speed: number;
9
+ distance: RangeValue;
10
+ duration: RangeValue;
11
+ factor: RangeValue;
12
+ speed: RangeValue;
12
13
  }
@@ -1,4 +1,5 @@
1
+ import type { RangeValue } from "../../../../Types";
1
2
  export interface IRollLight {
2
3
  enable: boolean;
3
- value: number;
4
+ value: RangeValue;
4
5
  }
@@ -1,8 +1,9 @@
1
+ import type { RangeValue } from "../../../../Types";
1
2
  /**
2
3
  * @category Options
3
4
  */
4
5
  export interface IRotateAnimation {
5
6
  enable: boolean;
6
- speed: number;
7
+ speed: RangeValue;
7
8
  sync: boolean;
8
9
  }
@@ -1,8 +1,9 @@
1
+ import type { RangeValue } from "../../../../Types";
1
2
  /**
2
3
  * @category Options
3
4
  */
4
5
  export interface ITiltAnimation {
5
6
  enable: boolean;
6
- speed: number;
7
+ speed: RangeValue;
7
8
  sync: boolean;
8
9
  }
@@ -1,4 +1,5 @@
1
- import type { IColor } from "../../../../Core/Interfaces/Colors";
1
+ import type { IColor } from "../../../../Core";
2
+ import type { RangeValue } from "../../../../Types";
2
3
  /**
3
4
  * @category Options
4
5
  */
@@ -6,5 +7,5 @@ export interface ITwinkleValues {
6
7
  color?: string | IColor;
7
8
  enable: boolean;
8
9
  frequency: number;
9
- opacity: number;
10
+ opacity: RangeValue;
10
11
  }
@@ -105,7 +105,7 @@ export class AbsorberInstance {
105
105
  var _a, _b;
106
106
  const container = this.container;
107
107
  const percentPosition = this.options.position;
108
- return Vector.create((((_a = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.x) !== null && _a !== void 0 ? _a : Math.random() * 100) / 100) * container.canvas.size.width, (((_b = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.y) !== null && _b !== void 0 ? _b : Math.random() * 100) / 100) * container.canvas.size.height);
108
+ return Vector.create((getRangeValue((_a = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.x) !== null && _a !== void 0 ? _a : Math.random() * 100) / 100) * container.canvas.size.width, (getRangeValue((_b = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.y) !== null && _b !== void 0 ? _b : Math.random() * 100) / 100) * container.canvas.size.height);
109
109
  }
110
110
  updateParticlePosition(particle, v) {
111
111
  var _a;
@@ -1,7 +1,7 @@
1
1
  import { AbsorberSize } from "./AbsorberSize";
2
2
  import type { IAbsorber } from "../Interfaces/IAbsorber";
3
- import type { ICoordinates } from "../../../../Core";
4
3
  import type { IOptionLoader } from "../../../../Options/Interfaces/IOptionLoader";
4
+ import type { IRangedCoordinates } from "../../../../Core";
5
5
  import { OptionsColor } from "../../../../Options/Classes/OptionsColor";
6
6
  import type { RecursivePartial } from "../../../../Types";
7
7
  /**
@@ -13,7 +13,7 @@ export declare class Absorber implements IAbsorber, IOptionLoader<IAbsorber> {
13
13
  draggable: boolean;
14
14
  name?: string;
15
15
  opacity: number;
16
- position?: RecursivePartial<ICoordinates>;
16
+ position?: RecursivePartial<IRangedCoordinates>;
17
17
  size: AbsorberSize;
18
18
  destroy: boolean;
19
19
  orbits: boolean;
@@ -1,5 +1,6 @@
1
1
  import { AbsorberSize } from "./AbsorberSize";
2
2
  import { OptionsColor } from "../../../../Options/Classes/OptionsColor";
3
+ import { setRangeValue } from "../../../../Utils";
3
4
  /**
4
5
  * [[include:Options/Plugins/Absorbers.md]]
5
6
  * @category Absorbers Plugin
@@ -29,10 +30,13 @@ export class Absorber {
29
30
  this.opacity = data.opacity;
30
31
  }
31
32
  if (data.position !== undefined) {
32
- this.position = {
33
- x: data.position.x,
34
- y: data.position.y,
35
- };
33
+ this.position = {};
34
+ if (data.position.x !== undefined) {
35
+ this.position.x = setRangeValue(data.position.x);
36
+ }
37
+ if (data.position.y !== undefined) {
38
+ this.position.y = setRangeValue(data.position.y);
39
+ }
36
40
  }
37
41
  if (data.size !== undefined) {
38
42
  this.size.load(data.size);
@@ -1,4 +1,4 @@
1
- import type { IColor, ICoordinates } from "../../../../Core";
1
+ import type { IColor, IRangedCoordinates } from "../../../../Core";
2
2
  import type { IAbsorberSize } from "./IAbsorberSize";
3
3
  import { RecursivePartial } from "../../../../Types";
4
4
  /**
@@ -22,7 +22,7 @@ export interface IAbsorber {
22
22
  /**
23
23
  * Absorber position, percent values calculated on canvas size
24
24
  */
25
- position?: RecursivePartial<ICoordinates>;
25
+ position?: RecursivePartial<IRangedCoordinates>;
26
26
  /**
27
27
  * Absorber size, these values will be used as pixels
28
28
  */
@@ -211,8 +211,8 @@ export class EmitterInstance {
211
211
  const container = this.container;
212
212
  const percentPosition = this.options.position;
213
213
  return {
214
- x: (((_a = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.x) !== null && _a !== void 0 ? _a : Math.random() * 100) / 100) * container.canvas.size.width,
215
- y: (((_b = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.y) !== null && _b !== void 0 ? _b : Math.random() * 100) / 100) * container.canvas.size.height,
214
+ x: (getRangeValue((_a = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.x) !== null && _a !== void 0 ? _a : Math.random() * 100) / 100) * container.canvas.size.width,
215
+ y: (getRangeValue((_b = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.y) !== null && _b !== void 0 ? _b : Math.random() * 100) / 100) * container.canvas.size.height,
216
216
  };
217
217
  }
218
218
  emit() {
@@ -261,7 +261,7 @@ export class EmitterInstance {
261
261
  const colorOffset = randomInRange(animation.offset);
262
262
  const delay = getRangeValue(this.options.rate.delay);
263
263
  const emitFactor = (1000 * delay) / container.retina.reduceFactor;
264
- const colorSpeed = (_a = animation.speed) !== null && _a !== void 0 ? _a : 0;
264
+ const colorSpeed = getRangeValue((_a = animation.speed) !== null && _a !== void 0 ? _a : 0);
265
265
  return (initValue + (colorSpeed * container.fpsLimit) / emitFactor + colorOffset * 3.6) % maxValue;
266
266
  }
267
267
  }