@tsparticles/engine 4.0.0-alpha.8 → 4.0.0-beta.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 (274) hide show
  1. package/164.min.js +1 -0
  2. package/README.md +41 -7
  3. package/browser/Core/Canvas.js +238 -137
  4. package/browser/Core/Container.js +80 -74
  5. package/browser/Core/Engine.js +43 -64
  6. package/browser/Core/Particle.js +182 -169
  7. package/browser/Core/Particles.js +187 -138
  8. package/browser/Core/Retina.js +5 -0
  9. package/browser/Core/Utils/Constants.js +2 -2
  10. package/browser/Core/Utils/EventListeners.js +67 -63
  11. package/browser/Core/Utils/Ranges.js +29 -10
  12. package/browser/Core/Utils/SpatialHashGrid.js +102 -0
  13. package/browser/Core/Utils/Vectors.js +17 -18
  14. package/browser/Options/Classes/AnimatableColor.js +1 -0
  15. package/browser/Options/Classes/AnimationOptions.js +8 -0
  16. package/browser/Options/Classes/Background/Background.js +6 -0
  17. package/browser/Options/Classes/ColorAnimation.js +12 -1
  18. package/browser/Options/Classes/FullScreen/FullScreen.js +2 -0
  19. package/browser/Options/Classes/HslAnimation.js +4 -5
  20. package/browser/Options/Classes/Options.js +63 -4
  21. package/browser/Options/Classes/OptionsColor.js +1 -0
  22. package/browser/Options/Classes/Particles/Bounce/ParticlesBounce.js +2 -0
  23. package/browser/Options/Classes/Particles/Effect/Effect.js +3 -4
  24. package/browser/Options/Classes/Particles/Fill.js +28 -0
  25. package/browser/Options/Classes/Particles/Move/Move.js +17 -3
  26. package/browser/Options/Classes/Particles/Move/MoveAngle.js +2 -0
  27. package/browser/Options/Classes/Particles/Move/MoveCenter.js +4 -0
  28. package/browser/Options/Classes/Particles/Move/MoveGravity.js +4 -0
  29. package/browser/Options/Classes/Particles/Move/OutModes.js +5 -0
  30. package/browser/Options/Classes/Particles/Move/Path/MovePath.js +5 -0
  31. package/browser/Options/Classes/Particles/Move/Spin.js +3 -0
  32. package/browser/Options/Classes/Particles/Number/ParticlesDensity.js +3 -0
  33. package/browser/Options/Classes/Particles/Number/ParticlesNumber.js +3 -0
  34. package/browser/Options/Classes/Particles/Number/ParticlesNumberLimit.js +2 -0
  35. package/browser/Options/Classes/Particles/Opacity/Opacity.js +1 -0
  36. package/browser/Options/Classes/Particles/Opacity/OpacityAnimation.js +1 -0
  37. package/browser/Options/Classes/Particles/ParticlesOptions.js +25 -5
  38. package/browser/Options/Classes/Particles/Shape/Shape.js +3 -4
  39. package/browser/Options/Classes/Particles/Size/Size.js +1 -0
  40. package/browser/Options/Classes/Particles/Size/SizeAnimation.js +1 -0
  41. package/browser/Options/Classes/Particles/Stroke.js +3 -0
  42. package/browser/Options/Classes/Particles/ZIndex/ZIndex.js +3 -0
  43. package/browser/Options/Classes/ResizeEvent.js +2 -0
  44. package/browser/Options/Classes/ValueWithRandom.js +3 -4
  45. package/browser/Utils/CanvasUtils.js +44 -51
  46. package/browser/Utils/ColorUtils.js +30 -19
  47. package/browser/Utils/EventDispatcher.js +1 -0
  48. package/browser/Utils/MathUtils.js +12 -7
  49. package/browser/Utils/Utils.js +109 -31
  50. package/browser/exports.js +1 -2
  51. package/cjs/Core/Canvas.js +238 -137
  52. package/cjs/Core/Container.js +80 -74
  53. package/cjs/Core/Engine.js +43 -64
  54. package/cjs/Core/Particle.js +182 -169
  55. package/cjs/Core/Particles.js +187 -138
  56. package/cjs/Core/Retina.js +5 -0
  57. package/cjs/Core/Utils/Constants.js +2 -2
  58. package/cjs/Core/Utils/EventListeners.js +67 -63
  59. package/cjs/Core/Utils/Ranges.js +29 -10
  60. package/cjs/Core/Utils/SpatialHashGrid.js +102 -0
  61. package/cjs/Core/Utils/Vectors.js +17 -18
  62. package/cjs/Options/Classes/AnimatableColor.js +1 -0
  63. package/cjs/Options/Classes/AnimationOptions.js +8 -0
  64. package/cjs/Options/Classes/Background/Background.js +6 -0
  65. package/cjs/Options/Classes/ColorAnimation.js +12 -1
  66. package/cjs/Options/Classes/FullScreen/FullScreen.js +2 -0
  67. package/cjs/Options/Classes/HslAnimation.js +4 -5
  68. package/cjs/Options/Classes/Options.js +63 -4
  69. package/cjs/Options/Classes/OptionsColor.js +1 -0
  70. package/cjs/Options/Classes/Particles/Bounce/ParticlesBounce.js +2 -0
  71. package/cjs/Options/Classes/Particles/Effect/Effect.js +3 -4
  72. package/cjs/Options/Classes/Particles/Fill.js +28 -0
  73. package/cjs/Options/Classes/Particles/Move/Move.js +17 -3
  74. package/cjs/Options/Classes/Particles/Move/MoveAngle.js +2 -0
  75. package/cjs/Options/Classes/Particles/Move/MoveCenter.js +4 -0
  76. package/cjs/Options/Classes/Particles/Move/MoveGravity.js +4 -0
  77. package/cjs/Options/Classes/Particles/Move/OutModes.js +5 -0
  78. package/cjs/Options/Classes/Particles/Move/Path/MovePath.js +5 -0
  79. package/cjs/Options/Classes/Particles/Move/Spin.js +3 -0
  80. package/cjs/Options/Classes/Particles/Number/ParticlesDensity.js +3 -0
  81. package/cjs/Options/Classes/Particles/Number/ParticlesNumber.js +3 -0
  82. package/cjs/Options/Classes/Particles/Number/ParticlesNumberLimit.js +2 -0
  83. package/cjs/Options/Classes/Particles/Opacity/Opacity.js +1 -0
  84. package/cjs/Options/Classes/Particles/Opacity/OpacityAnimation.js +1 -0
  85. package/cjs/Options/Classes/Particles/ParticlesOptions.js +25 -5
  86. package/cjs/Options/Classes/Particles/Shape/Shape.js +3 -4
  87. package/cjs/Options/Classes/Particles/Size/Size.js +1 -0
  88. package/cjs/Options/Classes/Particles/Size/SizeAnimation.js +1 -0
  89. package/cjs/Options/Classes/Particles/Stroke.js +3 -0
  90. package/cjs/Options/Classes/Particles/ZIndex/ZIndex.js +3 -0
  91. package/cjs/Options/Classes/ResizeEvent.js +2 -0
  92. package/cjs/Options/Classes/ValueWithRandom.js +3 -4
  93. package/cjs/Utils/CanvasUtils.js +44 -51
  94. package/cjs/Utils/ColorUtils.js +30 -19
  95. package/cjs/Utils/EventDispatcher.js +1 -0
  96. package/cjs/Utils/MathUtils.js +12 -7
  97. package/cjs/Utils/Utils.js +109 -31
  98. package/cjs/exports.js +1 -2
  99. package/dist_browser_Core_Container_js.js +12 -12
  100. package/esm/Core/Canvas.js +238 -137
  101. package/esm/Core/Container.js +80 -74
  102. package/esm/Core/Engine.js +43 -64
  103. package/esm/Core/Particle.js +182 -169
  104. package/esm/Core/Particles.js +187 -138
  105. package/esm/Core/Retina.js +5 -0
  106. package/esm/Core/Utils/Constants.js +2 -2
  107. package/esm/Core/Utils/EventListeners.js +67 -63
  108. package/esm/Core/Utils/Ranges.js +29 -10
  109. package/esm/Core/Utils/SpatialHashGrid.js +102 -0
  110. package/esm/Core/Utils/Vectors.js +17 -18
  111. package/esm/Options/Classes/AnimatableColor.js +1 -0
  112. package/esm/Options/Classes/AnimationOptions.js +8 -0
  113. package/esm/Options/Classes/Background/Background.js +6 -0
  114. package/esm/Options/Classes/ColorAnimation.js +12 -1
  115. package/esm/Options/Classes/FullScreen/FullScreen.js +2 -0
  116. package/esm/Options/Classes/HslAnimation.js +4 -5
  117. package/esm/Options/Classes/Options.js +63 -4
  118. package/esm/Options/Classes/OptionsColor.js +1 -0
  119. package/esm/Options/Classes/Particles/Bounce/ParticlesBounce.js +2 -0
  120. package/esm/Options/Classes/Particles/Effect/Effect.js +3 -4
  121. package/esm/Options/Classes/Particles/Fill.js +28 -0
  122. package/esm/Options/Classes/Particles/Move/Move.js +17 -3
  123. package/esm/Options/Classes/Particles/Move/MoveAngle.js +2 -0
  124. package/esm/Options/Classes/Particles/Move/MoveCenter.js +4 -0
  125. package/esm/Options/Classes/Particles/Move/MoveGravity.js +4 -0
  126. package/esm/Options/Classes/Particles/Move/OutModes.js +5 -0
  127. package/esm/Options/Classes/Particles/Move/Path/MovePath.js +5 -0
  128. package/esm/Options/Classes/Particles/Move/Spin.js +3 -0
  129. package/esm/Options/Classes/Particles/Number/ParticlesDensity.js +3 -0
  130. package/esm/Options/Classes/Particles/Number/ParticlesNumber.js +3 -0
  131. package/esm/Options/Classes/Particles/Number/ParticlesNumberLimit.js +2 -0
  132. package/esm/Options/Classes/Particles/Opacity/Opacity.js +1 -0
  133. package/esm/Options/Classes/Particles/Opacity/OpacityAnimation.js +1 -0
  134. package/esm/Options/Classes/Particles/ParticlesOptions.js +25 -5
  135. package/esm/Options/Classes/Particles/Shape/Shape.js +3 -4
  136. package/esm/Options/Classes/Particles/Size/Size.js +1 -0
  137. package/esm/Options/Classes/Particles/Size/SizeAnimation.js +1 -0
  138. package/esm/Options/Classes/Particles/Stroke.js +3 -0
  139. package/esm/Options/Classes/Particles/ZIndex/ZIndex.js +3 -0
  140. package/esm/Options/Classes/ResizeEvent.js +2 -0
  141. package/esm/Options/Classes/ValueWithRandom.js +3 -4
  142. package/esm/Utils/CanvasUtils.js +44 -51
  143. package/esm/Utils/ColorUtils.js +30 -19
  144. package/esm/Utils/EventDispatcher.js +1 -0
  145. package/esm/Utils/MathUtils.js +12 -7
  146. package/esm/Utils/Utils.js +109 -31
  147. package/esm/exports.js +1 -2
  148. package/package.json +1 -1
  149. package/report.html +1 -1
  150. package/scripts/install.js +4 -20
  151. package/tsparticles.engine.js +93 -91
  152. package/tsparticles.engine.min.js +2 -2
  153. package/types/Core/Canvas.d.ts +17 -2
  154. package/types/Core/Container.d.ts +3 -7
  155. package/types/Core/Engine.d.ts +13 -20
  156. package/types/Core/Interfaces/IColorManager.d.ts +0 -1
  157. package/types/Core/Interfaces/IContainerPlugin.d.ts +2 -1
  158. package/types/Core/Interfaces/IPalette.d.ts +7 -0
  159. package/types/Core/Interfaces/IParticleOpacityData.d.ts +1 -0
  160. package/types/Core/Interfaces/IParticleValueAnimation.d.ts +3 -3
  161. package/types/Core/Interfaces/IShapeDrawData.d.ts +8 -0
  162. package/types/Core/Interfaces/IShapeDrawer.d.ts +0 -1
  163. package/types/Core/Interfaces/IShapeValues.d.ts +0 -1
  164. package/types/Core/Particle.d.ts +3 -7
  165. package/types/Core/Particles.d.ts +15 -7
  166. package/types/Core/Utils/Constants.d.ts +2 -2
  167. package/types/Core/Utils/Ranges.d.ts +4 -1
  168. package/types/Core/Utils/SpatialHashGrid.d.ts +25 -0
  169. package/types/Core/Utils/Vectors.d.ts +8 -10
  170. package/types/Options/Classes/ColorAnimation.d.ts +3 -1
  171. package/types/Options/Classes/HslAnimation.d.ts +3 -4
  172. package/types/Options/Classes/Options.d.ts +2 -0
  173. package/types/Options/Classes/Particles/Effect/Effect.d.ts +0 -1
  174. package/types/Options/Classes/Particles/Fill.d.ts +12 -0
  175. package/types/Options/Classes/Particles/Move/Move.d.ts +0 -2
  176. package/types/Options/Classes/Particles/ParticlesOptions.d.ts +2 -2
  177. package/types/Options/Classes/Particles/Shape/Shape.d.ts +0 -1
  178. package/types/Options/Classes/ValueWithRandom.d.ts +0 -1
  179. package/types/Options/Interfaces/IColorAnimation.d.ts +2 -0
  180. package/types/Options/Interfaces/IOptions.d.ts +1 -0
  181. package/types/Options/Interfaces/Particles/Effect/IEffect.d.ts +0 -1
  182. package/types/Options/Interfaces/Particles/IFill.d.ts +9 -0
  183. package/types/Options/Interfaces/Particles/IParticlesOptions.d.ts +2 -2
  184. package/types/Options/Interfaces/Particles/IStroke.d.ts +2 -2
  185. package/types/Options/Interfaces/Particles/Move/IMove.d.ts +0 -2
  186. package/types/Options/Interfaces/Particles/Shape/IShape.d.ts +0 -1
  187. package/types/Types/EngineInitializers.d.ts +6 -3
  188. package/types/Utils/CanvasUtils.d.ts +6 -12
  189. package/types/Utils/ColorUtils.d.ts +3 -2
  190. package/types/Utils/MathUtils.d.ts +2 -0
  191. package/types/Utils/Utils.d.ts +8 -1
  192. package/types/export-types.d.ts +3 -5
  193. package/types/exports.d.ts +1 -2
  194. package/umd/Core/Canvas.js +237 -136
  195. package/umd/Core/Container.js +80 -74
  196. package/umd/Core/Engine.js +42 -63
  197. package/umd/Core/Particle.js +183 -170
  198. package/umd/Core/Particles.js +187 -138
  199. package/umd/Core/Retina.js +5 -0
  200. package/umd/Core/Utils/Constants.js +3 -3
  201. package/umd/Core/Utils/EventListeners.js +67 -63
  202. package/umd/Core/Utils/Ranges.js +28 -9
  203. package/umd/Core/Utils/SpatialHashGrid.js +116 -0
  204. package/umd/Core/Utils/Vectors.js +17 -18
  205. package/umd/Options/Classes/AnimatableColor.js +1 -0
  206. package/umd/Options/Classes/AnimationOptions.js +8 -0
  207. package/umd/Options/Classes/Background/Background.js +6 -0
  208. package/umd/Options/Classes/ColorAnimation.js +12 -1
  209. package/umd/Options/Classes/FullScreen/FullScreen.js +2 -0
  210. package/umd/Options/Classes/HslAnimation.js +5 -6
  211. package/umd/Options/Classes/Options.js +63 -4
  212. package/umd/Options/Classes/OptionsColor.js +1 -0
  213. package/umd/Options/Classes/Particles/Bounce/ParticlesBounce.js +2 -0
  214. package/umd/Options/Classes/Particles/Effect/Effect.js +3 -4
  215. package/umd/Options/Classes/Particles/Fill.js +42 -0
  216. package/umd/Options/Classes/Particles/Move/Move.js +18 -4
  217. package/umd/Options/Classes/Particles/Move/MoveAngle.js +2 -0
  218. package/umd/Options/Classes/Particles/Move/MoveCenter.js +4 -0
  219. package/umd/Options/Classes/Particles/Move/MoveGravity.js +4 -0
  220. package/umd/Options/Classes/Particles/Move/OutModes.js +5 -0
  221. package/umd/Options/Classes/Particles/Move/Path/MovePath.js +5 -0
  222. package/umd/Options/Classes/Particles/Move/Spin.js +3 -0
  223. package/umd/Options/Classes/Particles/Number/ParticlesDensity.js +3 -0
  224. package/umd/Options/Classes/Particles/Number/ParticlesNumber.js +3 -0
  225. package/umd/Options/Classes/Particles/Number/ParticlesNumberLimit.js +2 -0
  226. package/umd/Options/Classes/Particles/Opacity/Opacity.js +1 -0
  227. package/umd/Options/Classes/Particles/Opacity/OpacityAnimation.js +1 -0
  228. package/umd/Options/Classes/Particles/ParticlesOptions.js +26 -6
  229. package/umd/Options/Classes/Particles/Shape/Shape.js +3 -4
  230. package/umd/Options/Classes/Particles/Size/Size.js +1 -0
  231. package/umd/Options/Classes/Particles/Size/SizeAnimation.js +1 -0
  232. package/umd/Options/Classes/Particles/Stroke.js +3 -0
  233. package/umd/Options/Classes/Particles/ZIndex/ZIndex.js +3 -0
  234. package/umd/Options/Classes/ResizeEvent.js +2 -0
  235. package/umd/Options/Classes/ValueWithRandom.js +3 -4
  236. package/umd/Utils/CanvasUtils.js +44 -53
  237. package/umd/Utils/ColorUtils.js +30 -18
  238. package/umd/Utils/EventDispatcher.js +1 -0
  239. package/umd/Utils/MathUtils.js +14 -7
  240. package/umd/Utils/Utils.js +111 -32
  241. package/umd/exports.js +2 -3
  242. package/794.min.js +0 -2
  243. package/794.min.js.LICENSE.txt +0 -1
  244. package/browser/Core/Utils/Point.js +0 -6
  245. package/browser/Core/Utils/QuadTree.js +0 -59
  246. package/browser/Options/Classes/Particles/Move/MoveAttract.js +0 -33
  247. package/cjs/Core/Utils/Point.js +0 -6
  248. package/cjs/Core/Utils/QuadTree.js +0 -59
  249. package/cjs/Options/Classes/Particles/Move/MoveAttract.js +0 -33
  250. package/esm/Core/Interfaces/IMovePathGenerator.js +0 -1
  251. package/esm/Core/Interfaces/IParticleMover.js +0 -1
  252. package/esm/Core/Utils/Point.js +0 -6
  253. package/esm/Core/Utils/QuadTree.js +0 -59
  254. package/esm/Options/Classes/Particles/Move/MoveAttract.js +0 -33
  255. package/esm/Options/Interfaces/Particles/Move/IMoveAttract.js +0 -1
  256. package/tsparticles.engine.min.js.LICENSE.txt +0 -1
  257. package/types/Core/Interfaces/IMovePathGenerator.d.ts +0 -10
  258. package/types/Core/Interfaces/IParticleMover.d.ts +0 -7
  259. package/types/Core/Utils/Point.d.ts +0 -7
  260. package/types/Core/Utils/QuadTree.d.ts +0 -18
  261. package/types/Options/Classes/Particles/Move/MoveAttract.d.ts +0 -12
  262. package/types/Options/Interfaces/Particles/Move/IMoveAttract.d.ts +0 -7
  263. package/umd/Core/Utils/Point.js +0 -20
  264. package/umd/Core/Utils/QuadTree.js +0 -73
  265. package/umd/Options/Classes/Particles/Move/MoveAttract.js +0 -47
  266. package/umd/Options/Interfaces/Particles/Move/IMoveAttract.js +0 -12
  267. /package/browser/Core/Interfaces/{IMovePathGenerator.js → IPalette.js} +0 -0
  268. /package/browser/{Core/Interfaces/IParticleMover.js → Options/Interfaces/Particles/IFill.js} +0 -0
  269. /package/{browser/Options/Interfaces/Particles/Move/IMoveAttract.js → cjs/Core/Interfaces/IPalette.js} +0 -0
  270. /package/cjs/{Core/Interfaces/IMovePathGenerator.js → Options/Interfaces/Particles/IFill.js} +0 -0
  271. /package/{cjs/Core/Interfaces/IParticleMover.js → esm/Core/Interfaces/IPalette.js} +0 -0
  272. /package/{cjs/Options/Interfaces/Particles/Move/IMoveAttract.js → esm/Options/Interfaces/Particles/IFill.js} +0 -0
  273. /package/umd/Core/Interfaces/{IMovePathGenerator.js → IPalette.js} +0 -0
  274. /package/umd/{Core/Interfaces/IParticleMover.js → Options/Interfaces/Particles/IFill.js} +0 -0
@@ -1,9 +1,11 @@
1
1
  import { deepExtend } from "../../../../Utils/Utils.js";
2
2
  import { isNull } from "../../../../Utils/TypeUtils.js";
3
3
  export class Shape {
4
+ close;
5
+ options;
6
+ type;
4
7
  constructor() {
5
8
  this.close = true;
6
- this.fill = true;
7
9
  this.options = {};
8
10
  this.type = "circle";
9
11
  }
@@ -23,9 +25,6 @@ export class Shape {
23
25
  if (data.close !== undefined) {
24
26
  this.close = data.close;
25
27
  }
26
- if (data.fill !== undefined) {
27
- this.fill = data.fill;
28
- }
29
28
  if (data.type !== undefined) {
30
29
  this.type = data.type;
31
30
  }
@@ -2,6 +2,7 @@ import { RangedAnimationValueWithRandom } from "../../ValueWithRandom.js";
2
2
  import { SizeAnimation } from "./SizeAnimation.js";
3
3
  import { isNull } from "../../../../Utils/TypeUtils.js";
4
4
  export class Size extends RangedAnimationValueWithRandom {
5
+ animation;
5
6
  constructor() {
6
7
  super();
7
8
  this.animation = new SizeAnimation();
@@ -2,6 +2,7 @@ import { DestroyType } from "../../../../Enums/Types/DestroyType.js";
2
2
  import { RangedAnimationOptions } from "../../AnimationOptions.js";
3
3
  import { isNull } from "../../../../Utils/TypeUtils.js";
4
4
  export class SizeAnimation extends RangedAnimationOptions {
5
+ destroy;
5
6
  constructor() {
6
7
  super();
7
8
  this.destroy = DestroyType.none;
@@ -2,6 +2,9 @@ import { AnimatableColor } from "../AnimatableColor.js";
2
2
  import { isNull } from "../../../Utils/TypeUtils.js";
3
3
  import { setRangeValue } from "../../../Utils/MathUtils.js";
4
4
  export class Stroke {
5
+ color;
6
+ opacity;
7
+ width;
5
8
  constructor() {
6
9
  this.width = 0;
7
10
  }
@@ -1,6 +1,9 @@
1
1
  import { ValueWithRandom } from "../../ValueWithRandom.js";
2
2
  import { isNull } from "../../../../Utils/TypeUtils.js";
3
3
  export class ZIndex extends ValueWithRandom {
4
+ opacityRate;
5
+ sizeRate;
6
+ velocityRate;
4
7
  constructor() {
5
8
  super();
6
9
  this.opacityRate = 1;
@@ -1,5 +1,7 @@
1
1
  import { isNull } from "../../Utils/TypeUtils.js";
2
2
  export class ResizeEvent {
3
+ delay;
4
+ enable;
3
5
  constructor() {
4
6
  this.delay = 0.5;
5
7
  this.enable = true;
@@ -2,6 +2,7 @@ import { AnimationOptions, RangedAnimationOptions } from "./AnimationOptions.js"
2
2
  import { isNull } from "../../Utils/TypeUtils.js";
3
3
  import { setRangeValue } from "../../Utils/MathUtils.js";
4
4
  export class ValueWithRandom {
5
+ value;
5
6
  constructor() {
6
7
  this.value = 0;
7
8
  }
@@ -15,10 +16,7 @@ export class ValueWithRandom {
15
16
  }
16
17
  }
17
18
  export class AnimationValueWithRandom extends ValueWithRandom {
18
- constructor() {
19
- super();
20
- this.animation = new AnimationOptions();
21
- }
19
+ animation = new AnimationOptions();
22
20
  load(data) {
23
21
  super.load(data);
24
22
  if (isNull(data)) {
@@ -31,6 +29,7 @@ export class AnimationValueWithRandom extends ValueWithRandom {
31
29
  }
32
30
  }
33
31
  export class RangedAnimationValueWithRandom extends AnimationValueWithRandom {
32
+ animation;
34
33
  constructor() {
35
34
  super();
36
35
  this.animation = new RangedAnimationOptions();
@@ -1,11 +1,4 @@
1
- import { lFactor, minStrokeWidth, originPoint } from "../Core/Utils/Constants.js";
2
- import { AlterType } from "../Enums/Types/AlterType.js";
3
- export function drawLine(context, begin, end) {
4
- context.beginPath();
5
- context.moveTo(begin.x, begin.y);
6
- context.lineTo(end.x, end.y);
7
- context.closePath();
8
- }
1
+ import { defaultZoom, minStrokeWidth, originPoint } from "../Core/Utils/Constants.js";
9
2
  export function paintBase(context, dimension, baseColor) {
10
3
  context.fillStyle = baseColor ?? "rgba(0,0,0,0)";
11
4
  context.fillRect(originPoint.x, originPoint.y, dimension.width, dimension.height);
@@ -14,20 +7,24 @@ export function paintImage(context, dimension, image, opacity) {
14
7
  if (!image) {
15
8
  return;
16
9
  }
10
+ const prevAlpha = context.globalAlpha;
17
11
  context.globalAlpha = opacity;
18
12
  context.drawImage(image, originPoint.x, originPoint.y, dimension.width, dimension.height);
19
- context.globalAlpha = 1;
13
+ context.globalAlpha = prevAlpha;
20
14
  }
21
15
  export function clear(context, dimension) {
22
16
  context.clearRect(originPoint.x, originPoint.y, dimension.width, dimension.height);
23
17
  }
24
18
  export function drawParticle(data) {
25
- const { container, context, particle, delta, colorStyles, radius, opacity, transform } = data, pos = particle.getPosition(), transformData = particle.getTransformData(transform);
19
+ const { container, context, particle, delta, colorStyles, radius, opacity, transform } = data, { effectDrawers, shapeDrawers } = container.particles, pos = particle.getPosition(), transformData = particle.getTransformData(transform), drawScale = defaultZoom, drawPosition = {
20
+ x: pos.x,
21
+ y: pos.y,
22
+ };
26
23
  context.setTransform(transformData.a, transformData.b, transformData.c, transformData.d, pos.x, pos.y);
27
24
  if (colorStyles.fill) {
28
25
  context.fillStyle = colorStyles.fill;
29
26
  }
30
- const strokeWidth = particle.strokeWidth ?? minStrokeWidth;
27
+ const fillEnabled = !!particle.fillEnabled, strokeWidth = particle.strokeWidth ?? minStrokeWidth;
31
28
  context.lineWidth = strokeWidth;
32
29
  if (colorStyles.stroke) {
33
30
  context.strokeStyle = colorStyles.stroke;
@@ -36,49 +33,54 @@ export function drawParticle(data) {
36
33
  context,
37
34
  particle,
38
35
  radius,
36
+ drawRadius: radius * drawScale,
39
37
  opacity,
40
38
  delta,
41
39
  pixelRatio: container.retina.pixelRatio,
42
- fill: particle.shapeFill,
43
- stroke: strokeWidth > minStrokeWidth || !particle.shapeFill,
40
+ fill: fillEnabled,
41
+ stroke: strokeWidth > minStrokeWidth,
44
42
  transformData,
43
+ position: { ...pos },
44
+ drawPosition,
45
+ drawScale,
45
46
  };
46
- drawBeforeEffect(container, drawData);
47
- drawShapeBeforeDraw(container, drawData);
48
- drawShape(container, drawData);
49
- drawShapeAfterDraw(container, drawData);
50
- drawAfterEffect(container, drawData);
47
+ for (const plugin of container.plugins) {
48
+ plugin.drawParticleTransform?.(drawData);
49
+ }
50
+ const effect = particle.effect ? effectDrawers.get(particle.effect) : undefined, shape = particle.shape ? shapeDrawers.get(particle.shape) : undefined;
51
+ drawBeforeEffect(effect, drawData);
52
+ drawShapeBeforeDraw(shape, drawData);
53
+ drawShape(shape, drawData);
54
+ drawShapeAfterDraw(shape, drawData);
55
+ drawAfterEffect(effect, drawData);
51
56
  context.resetTransform();
52
57
  }
53
- export function drawAfterEffect(container, data) {
58
+ export function drawAfterEffect(drawer, data) {
59
+ if (!drawer?.drawAfter) {
60
+ return;
61
+ }
54
62
  const { particle } = data;
55
63
  if (!particle.effect) {
56
64
  return;
57
65
  }
58
- const drawer = container.effectDrawers.get(particle.effect), drawFunc = drawer?.drawAfter;
59
- if (!drawFunc) {
66
+ drawer.drawAfter(data);
67
+ }
68
+ export function drawBeforeEffect(drawer, data) {
69
+ if (!drawer?.drawBefore) {
60
70
  return;
61
71
  }
62
- drawFunc(data);
63
- }
64
- export function drawBeforeEffect(container, data) {
65
72
  const { particle } = data;
66
73
  if (!particle.effect) {
67
74
  return;
68
75
  }
69
- const drawer = container.effectDrawers.get(particle.effect);
70
- if (!drawer?.drawBefore) {
71
- return;
72
- }
73
76
  drawer.drawBefore(data);
74
77
  }
75
- export function drawShape(container, data) {
76
- const { context, particle, stroke } = data;
77
- if (!particle.shape) {
78
+ export function drawShape(drawer, data) {
79
+ if (!drawer) {
78
80
  return;
79
81
  }
80
- const drawer = container.shapeDrawers.get(particle.shape);
81
- if (!drawer) {
82
+ const { context, fill, particle, stroke } = data;
83
+ if (!particle.shape) {
82
84
  return;
83
85
  }
84
86
  context.beginPath();
@@ -89,30 +91,28 @@ export function drawShape(container, data) {
89
91
  if (stroke) {
90
92
  context.stroke();
91
93
  }
92
- if (particle.shapeFill) {
94
+ if (fill) {
93
95
  context.fill();
94
96
  }
95
97
  }
96
- export function drawShapeAfterDraw(container, data) {
97
- const { particle } = data;
98
- if (!particle.shape) {
99
- return;
100
- }
101
- const drawer = container.shapeDrawers.get(particle.shape);
98
+ export function drawShapeAfterDraw(drawer, data) {
102
99
  if (!drawer?.afterDraw) {
103
100
  return;
104
101
  }
105
- drawer.afterDraw(data);
106
- }
107
- export function drawShapeBeforeDraw(container, data) {
108
102
  const { particle } = data;
109
103
  if (!particle.shape) {
110
104
  return;
111
105
  }
112
- const drawer = container.shapeDrawers.get(particle.shape);
106
+ drawer.afterDraw(data);
107
+ }
108
+ export function drawShapeBeforeDraw(drawer, data) {
113
109
  if (!drawer?.beforeDraw) {
114
110
  return;
115
111
  }
112
+ const { particle } = data;
113
+ if (!particle.shape) {
114
+ return;
115
+ }
116
116
  drawer.beforeDraw(data);
117
117
  }
118
118
  export function drawParticlePlugin(context, plugin, particle, delta) {
@@ -121,10 +121,3 @@ export function drawParticlePlugin(context, plugin, particle, delta) {
121
121
  }
122
122
  plugin.drawParticle(context, particle, delta);
123
123
  }
124
- export function alterHsl(color, type, value) {
125
- return {
126
- h: color.h,
127
- s: color.s,
128
- l: color.l + (type === AlterType.darken ? -lFactor : lFactor) * value,
129
- };
130
- }
@@ -1,6 +1,7 @@
1
- import { clamp, getRandom, getRandomInRange, getRangeMax, getRangeMin, getRangeValue, mix, randomInRangeValue, setRangeValue, } from "./MathUtils.js";
2
- import { decayOffset, defaultLoops, defaultOpacity, defaultRgbMin, defaultTime, defaultVelocity, double, hMax, hMin, hPhase, half, identity, lMax, lMin, midColorValue, millisecondsToSeconds, percentDenominator, phaseNumerator, randomColorValue, rgbMax, sMax, sMin, sNormalizedOffset, sextuple, triple, } from "../Core/Utils/Constants.js";
1
+ import { clamp, getRandom, getRandomInRange, getRangeValue, mix, randomInRangeValue, setRangeValue, } from "./MathUtils.js";
2
+ import { decayOffset, defaultLoops, defaultOpacity, defaultRgbMin, defaultTime, defaultVelocity, double, hMax, hMin, hPhase, half, identity, lFactor, lMax, lMin, midColorValue, millisecondsToSeconds, percentDenominator, phaseNumerator, randomColorValue, rgbMax, sMax, sMin, sNormalizedOffset, sextuple, triple, } from "../Core/Utils/Constants.js";
3
3
  import { isArray, isString } from "./TypeUtils.js";
4
+ import { AlterType } from "../Enums/Types/AlterType.js";
4
5
  import { AnimationStatus } from "../Enums/AnimationStatus.js";
5
6
  import { itemFromArray } from "./Utils.js";
6
7
  const styleCache = new Map(), maxCacheSize = 1000, firstIndex = 0, rgbFixedPrecision = 2, hslFixedPrecision = 2;
@@ -189,10 +190,10 @@ function getSdrStyleFromHsl(color, opacity) {
189
190
  }
190
191
  export function colorMix(color1, color2, size1, size2) {
191
192
  let rgb1 = color1, rgb2 = color2;
192
- if (!Object.hasOwn(rgb1, "r")) {
193
+ if (!("r" in rgb1)) {
193
194
  rgb1 = hslToRgb(color1);
194
195
  }
195
- if (!Object.hasOwn(rgb2, "r")) {
196
+ if (!("r" in rgb2)) {
196
197
  rgb2 = hslToRgb(color2);
197
198
  }
198
199
  return {
@@ -245,27 +246,33 @@ export function getLinkRandomColor(engine, optColor, blink, consent) {
245
246
  }
246
247
  }
247
248
  export function getHslFromAnimation(animation) {
248
- return animation !== undefined
249
- ? {
249
+ return animation === undefined
250
+ ? undefined
251
+ : {
250
252
  h: animation.h.value,
251
253
  s: animation.s.value,
252
254
  l: animation.l.value,
253
- }
254
- : undefined;
255
+ };
255
256
  }
256
257
  export function getHslAnimationFromHsl(hsl, animationOptions, reduceFactor) {
257
258
  const resColor = {
258
259
  h: {
259
260
  enable: false,
260
261
  value: hsl.h,
262
+ min: hMin,
263
+ max: hMax,
261
264
  },
262
265
  s: {
263
266
  enable: false,
264
267
  value: hsl.s,
268
+ min: sMin,
269
+ max: sMax,
265
270
  },
266
271
  l: {
267
272
  enable: false,
268
273
  value: hsl.l,
274
+ min: lMin,
275
+ max: lMax,
269
276
  },
270
277
  };
271
278
  if (animationOptions) {
@@ -277,6 +284,8 @@ export function getHslAnimationFromHsl(hsl, animationOptions, reduceFactor) {
277
284
  }
278
285
  function setColorAnimation(colorValue, colorAnimation, reduceFactor) {
279
286
  colorValue.enable = colorAnimation.enable;
287
+ colorValue.min = colorAnimation.min;
288
+ colorValue.max = colorAnimation.max;
280
289
  if (colorValue.enable) {
281
290
  colorValue.velocity = (getRangeValue(colorAnimation.speed) / percentDenominator) * reduceFactor;
282
291
  colorValue.decay = decayOffset - getRangeValue(colorAnimation.decay);
@@ -296,7 +305,7 @@ function setColorAnimation(colorValue, colorAnimation, reduceFactor) {
296
305
  colorValue.velocity = defaultVelocity;
297
306
  }
298
307
  }
299
- export function updateColorValue(data, range, decrease, delta) {
308
+ export function updateColorValue(data, decrease, delta) {
300
309
  const minLoops = 0, minDelay = 0, identity = 1, minVelocity = 0, minOffset = 0, velocityFactor = 3.6;
301
310
  if (!data.enable ||
302
311
  ((data.maxLoops ?? minLoops) > minLoops && (data.loops ?? minLoops) > (data.maxLoops ?? minLoops))) {
@@ -309,7 +318,7 @@ export function updateColorValue(data, range, decrease, delta) {
309
318
  if ((data.delayTime ?? minDelay) > minDelay && data.time < (data.delayTime ?? minDelay)) {
310
319
  return;
311
320
  }
312
- const offset = data.offset ? randomInRangeValue(data.offset) : minOffset, velocity = (data.velocity ?? minVelocity) * delta.factor + offset * velocityFactor, decay = data.decay ?? identity, max = getRangeMax(range), min = getRangeMin(range);
321
+ const offset = data.offset ? randomInRangeValue(data.offset) : minOffset, velocity = (data.velocity ?? minVelocity) * delta.factor + offset * velocityFactor, decay = data.decay ?? identity, max = data.max, min = data.min;
313
322
  if (!decrease || data.status === AnimationStatus.increasing) {
314
323
  data.value += velocity;
315
324
  if (data.value > max) {
@@ -325,8 +334,7 @@ export function updateColorValue(data, range, decrease, delta) {
325
334
  }
326
335
  else {
327
336
  data.value -= velocity;
328
- const minValue = 0;
329
- if (data.value < minValue) {
337
+ if (data.value < min) {
330
338
  data.loops ??= 0;
331
339
  data.loops++;
332
340
  data.status = AnimationStatus.increasing;
@@ -341,12 +349,15 @@ export function updateColor(color, delta) {
341
349
  if (!color) {
342
350
  return;
343
351
  }
344
- const { h, s, l } = color, ranges = {
345
- h: { min: hMin, max: hMax },
346
- s: { min: sMin, max: sMax },
347
- l: { min: lMin, max: lMax },
352
+ const { h, s, l } = color;
353
+ updateColorValue(h, false, delta);
354
+ updateColorValue(s, true, delta);
355
+ updateColorValue(l, true, delta);
356
+ }
357
+ export function alterHsl(color, type, value) {
358
+ return {
359
+ h: color.h,
360
+ s: color.s,
361
+ l: color.l + (type === AlterType.darken ? -lFactor : lFactor) * value,
348
362
  };
349
- updateColorValue(h, ranges.h, false, delta);
350
- updateColorValue(s, ranges.s, true, delta);
351
- updateColorValue(l, ranges.l, true, delta);
352
363
  }
@@ -1,5 +1,6 @@
1
1
  import { deleteCount, minIndex } from "../Core/Utils/Constants.js";
2
2
  export class EventDispatcher {
3
+ _listeners;
3
4
  constructor() {
4
5
  this._listeners = new Map();
5
6
  }
@@ -21,10 +21,8 @@ export function getRandomInRange(min, max) {
21
21
  return getRandom() * (max - min) + min;
22
22
  }
23
23
  export function setAnimationFunctions(nextFrame, cancel) {
24
- _animationLoop.nextFrame = (callback) => nextFrame(callback);
25
- _animationLoop.cancel = (handle) => {
26
- cancel(handle);
27
- };
24
+ _animationLoop.nextFrame = nextFrame;
25
+ _animationLoop.cancel = cancel;
28
26
  }
29
27
  export function animate(fn) {
30
28
  return _animationLoop.nextFrame(fn);
@@ -68,11 +66,18 @@ export function setRangeValue(source, value) {
68
66
  : setRangeValue(min, max);
69
67
  }
70
68
  export function getDistances(pointA, pointB) {
71
- const dx = pointA.x - pointB.x, dy = pointA.y - pointB.y, squareExp = 2;
72
- return { dx: dx, dy: dy, distance: Math.sqrt(dx ** squareExp + dy ** squareExp) };
69
+ const dx = pointA.x - pointB.x, dy = pointA.y - pointB.y;
70
+ return { dx: dx, dy: dy, distance: Math.hypot(dx, dy) };
71
+ }
72
+ export function getDistanceSq(pointA, pointB) {
73
+ const dx = pointA.x - pointB.x, dy = pointA.y - pointB.y;
74
+ return dx * dx + dy * dy;
73
75
  }
74
76
  export function getDistance(pointA, pointB) {
75
- return getDistances(pointA, pointB).distance;
77
+ return Math.sqrt(getDistanceSq(pointA, pointB));
78
+ }
79
+ export function checkDistance(pointA, pointB, distance) {
80
+ return getDistanceSq(pointA, pointB) <= distance * distance;
76
81
  }
77
82
  export function degToRad(degrees) {
78
83
  return degrees * degToRadFactor;
@@ -8,16 +8,70 @@ import { OutModeDirection } from "../Enums/Directions/OutModeDirection.js";
8
8
  import { PixelMode } from "../Enums/Modes/PixelMode.js";
9
9
  import { StartValueType } from "../Enums/Types/StartValueType.js";
10
10
  import { Vector } from "../Core/Utils/Vectors.js";
11
- const minRadius = 0;
12
- function memoize(fn) {
13
- const cache = new Map();
11
+ const minRadius = 0, minMemoizeSize = 0;
12
+ export function memoize(fn, options) {
13
+ const cache = new Map(), maxSize = options?.maxSize, ttlMs = options?.ttlMs, keyFn = options?.keyFn, stableStringify = (obj, seen = new WeakSet()) => {
14
+ if (obj === null) {
15
+ return "null";
16
+ }
17
+ const t = typeof obj;
18
+ if (t === "undefined") {
19
+ return "undefined";
20
+ }
21
+ if (t === "number" || t === "boolean" || t === "string") {
22
+ return JSON.stringify(obj);
23
+ }
24
+ if (t === "function") {
25
+ try {
26
+ const fn = obj;
27
+ return fn.toString();
28
+ }
29
+ catch {
30
+ return '"[Function]"';
31
+ }
32
+ }
33
+ if (t === "symbol") {
34
+ try {
35
+ return obj.toString();
36
+ }
37
+ catch {
38
+ return '"[Symbol]"';
39
+ }
40
+ }
41
+ if (Array.isArray(obj)) {
42
+ return `[${obj.map(i => stableStringify(i, seen)).join(",")}]`;
43
+ }
44
+ if (seen.has(obj)) {
45
+ return '"[Circular]"';
46
+ }
47
+ seen.add(obj);
48
+ const keys = Object.keys(obj).sort();
49
+ return `{${keys.map(k => `${JSON.stringify(k)}:${stableStringify(obj[k], seen)}`).join(",")}}`;
50
+ }, defaultKeyer = (args) => stableStringify(args), makeKey = (args) => (keyFn ? keyFn(args) : defaultKeyer(args)), ensureBounds = () => {
51
+ if (typeof maxSize === "number" && maxSize >= minMemoizeSize) {
52
+ while (cache.size > maxSize) {
53
+ const firstKey = cache.keys().next().value;
54
+ if (firstKey === undefined)
55
+ break;
56
+ cache.delete(firstKey);
57
+ }
58
+ }
59
+ };
14
60
  return (...args) => {
15
- const key = JSON.stringify(args);
16
- if (cache.has(key)) {
17
- return cache.get(key);
61
+ const key = makeKey(args), now = Date.now(), entry = cache.get(key);
62
+ if (entry !== undefined) {
63
+ if (ttlMs && now - entry.ts > ttlMs) {
64
+ cache.delete(key);
65
+ }
66
+ else {
67
+ cache.delete(key);
68
+ cache.set(key, { value: entry.value, ts: entry.ts });
69
+ return entry.value;
70
+ }
18
71
  }
19
72
  const result = fn(...args);
20
- cache.set(key, result);
73
+ cache.set(key, { value: result, ts: now });
74
+ ensureBounds();
21
75
  return result;
22
76
  };
23
77
  }
@@ -48,13 +102,6 @@ export function safeMutationObserver(callback) {
48
102
  export function isInArray(value, array) {
49
103
  return value === array || (isArray(array) && array.includes(value));
50
104
  }
51
- export async function loadFont(font, weight) {
52
- try {
53
- await safeDocument().fonts.load(`${weight ?? "400"} 36px '${font ?? "Verdana"}'`);
54
- }
55
- catch {
56
- }
57
- }
58
105
  export function arrayRandomIndex(array) {
59
106
  return Math.floor(getRandom() * array.length);
60
107
  }
@@ -90,33 +137,48 @@ export function calculateBounds(point, radius) {
90
137
  }
91
138
  export function deepExtend(destination, ...sources) {
92
139
  for (const source of sources) {
93
- if (source === undefined || source === null) {
140
+ if (isNull(source)) {
94
141
  continue;
95
142
  }
96
143
  if (!isObject(source)) {
97
144
  destination = source;
98
145
  continue;
99
146
  }
100
- const sourceIsArray = Array.isArray(source);
101
- if (sourceIsArray) {
147
+ if (Array.isArray(source)) {
102
148
  if (!Array.isArray(destination)) {
103
149
  destination = [];
104
150
  }
105
151
  }
106
- else {
107
- if (!isObject(destination) || Array.isArray(destination)) {
108
- destination = {};
152
+ else if (!isObject(destination) || Array.isArray(destination)) {
153
+ destination = {};
154
+ }
155
+ const sourceKeys = Object.keys(source), dangerousKeys = new Set(["__proto__", "constructor", "prototype"]), hasNested = sourceKeys.some(k => {
156
+ const v = source[k];
157
+ return isObject(v) || Array.isArray(v);
158
+ });
159
+ if (!hasNested) {
160
+ const sourceDict = source, destDict = destination;
161
+ for (const key of sourceKeys) {
162
+ if (dangerousKeys.has(key)) {
163
+ continue;
164
+ }
165
+ if (key in sourceDict) {
166
+ const v = sourceDict[key];
167
+ if (v !== undefined) {
168
+ destDict[key] = v;
169
+ }
170
+ }
109
171
  }
172
+ continue;
110
173
  }
111
- for (const key in source) {
112
- if (key === "__proto__") {
174
+ for (const key of sourceKeys) {
175
+ if (dangerousKeys.has(key)) {
113
176
  continue;
114
177
  }
115
- const sourceDict = source, value = sourceDict[key], destDict = destination;
116
- destDict[key] =
117
- isObject(value) && Array.isArray(value)
118
- ? value.map(v => deepExtend(destDict[key], v))
119
- : deepExtend(destDict[key], value);
178
+ const sourceDict = source, destDict = destination, value = sourceDict[key];
179
+ destDict[key] = Array.isArray(value)
180
+ ? value.map(v => deepExtend(undefined, v))
181
+ : deepExtend(destDict[key], value);
120
182
  }
121
183
  }
122
184
  return destination;
@@ -178,6 +240,8 @@ export function initParticleNumericAnimationValue(options, pxRatio) {
178
240
  case AnimationMode.random:
179
241
  res.status = getRandom() >= half ? AnimationStatus.increasing : AnimationStatus.decreasing;
180
242
  break;
243
+ default:
244
+ break;
181
245
  }
182
246
  const autoStatus = animationOptions.mode === AnimationMode.auto;
183
247
  switch (animationOptions.startValue) {
@@ -243,6 +307,8 @@ function checkDestroy(particle, destroyType, value, minValue, maxValue) {
243
307
  particle.destroy();
244
308
  }
245
309
  break;
310
+ default:
311
+ break;
246
312
  }
247
313
  }
248
314
  export function updateAnimation(particle, data, changeDirection, destroyType, delta) {
@@ -290,6 +356,9 @@ export function updateAnimation(particle, data, changeDirection, destroyType, de
290
356
  else {
291
357
  data.value -= velocity;
292
358
  }
359
+ break;
360
+ default:
361
+ break;
293
362
  }
294
363
  if (data.velocity && decay !== identity) {
295
364
  data.velocity *= decay;
@@ -301,7 +370,7 @@ export function cloneStyle(style) {
301
370
  const clonedStyle = safeDocument().createElement("div").style;
302
371
  for (const key in style) {
303
372
  const styleKey = style[key];
304
- if (!Object.hasOwn(style, key) || isNull(styleKey)) {
373
+ if (!(key in style) || isNull(styleKey)) {
305
374
  continue;
306
375
  }
307
376
  const styleValue = style.getPropertyValue?.(styleKey);
@@ -309,11 +378,11 @@ export function cloneStyle(style) {
309
378
  continue;
310
379
  }
311
380
  const stylePriority = style.getPropertyPriority?.(styleKey);
312
- if (!stylePriority) {
313
- clonedStyle.setProperty(styleKey, styleValue);
381
+ if (stylePriority) {
382
+ clonedStyle.setProperty(styleKey, styleValue, stylePriority);
314
383
  }
315
384
  else {
316
- clonedStyle.setProperty(styleKey, styleValue, stylePriority);
385
+ clonedStyle.setProperty(styleKey, styleValue);
317
386
  }
318
387
  }
319
388
  return clonedStyle;
@@ -365,3 +434,12 @@ export async function getItemsFromInitializer(container, map, initializers, forc
365
434
  }
366
435
  return res;
367
436
  }
437
+ export async function getItemMapFromInitializer(container, map, initializers, force = false) {
438
+ let res = map.get(container);
439
+ if (!res || force) {
440
+ const entries = await Promise.all([...initializers.entries()].map(([key, initializer]) => initializer(container).then(item => [key, item])));
441
+ res = new Map(entries);
442
+ map.set(container, res);
443
+ }
444
+ return res;
445
+ }
package/cjs/exports.js CHANGED
@@ -1,5 +1,4 @@
1
1
  export * from "./Core/Utils/Constants.js";
2
- export * from "./Core/Utils/Point.js";
3
2
  export * from "./Core/Utils/Ranges.js";
4
3
  export * from "./Core/Utils/Vectors.js";
5
4
  export * from "./Enums/Directions/MoveDirection.js";
@@ -28,8 +27,8 @@ export * from "./Options/Classes/OptionsColor.js";
28
27
  export * from "./Options/Classes/Particles/Bounce/ParticlesBounce.js";
29
28
  export * from "./Options/Classes/Particles/Bounce/ParticlesBounceFactor.js";
30
29
  export * from "./Options/Classes/Particles/ParticlesOptions.js";
30
+ export * from "./Options/Classes/Particles/Fill.js";
31
31
  export * from "./Options/Classes/Particles/Stroke.js";
32
- export * from "./Options/Classes/Particles/Move/MoveAttract.js";
33
32
  export * from "./Options/Classes/Particles/Move/Move.js";
34
33
  export * from "./Options/Classes/Particles/Move/MoveAngle.js";
35
34
  export * from "./Options/Classes/Particles/Move/MoveCenter.js";