@tsparticles/engine 4.0.0-alpha.8 → 4.0.0-beta.1

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 (307) hide show
  1. package/155.min.js +1 -0
  2. package/README.md +41 -28
  3. package/browser/Core/CanvasManager.js +303 -0
  4. package/browser/Core/Container.js +134 -101
  5. package/browser/Core/Engine.js +29 -162
  6. package/browser/Core/Particle.js +197 -183
  7. package/browser/Core/ParticlesManager.js +363 -0
  8. package/browser/Core/RenderManager.js +303 -0
  9. package/browser/Core/Retina.js +6 -6
  10. package/browser/Core/Utils/Constants.js +2 -2
  11. package/browser/Core/Utils/EventListeners.js +67 -63
  12. package/browser/Core/Utils/PluginManager.js +145 -0
  13. package/browser/Core/Utils/Ranges.js +29 -10
  14. package/browser/Core/Utils/SpatialHashGrid.js +102 -0
  15. package/browser/Core/Utils/Vectors.js +17 -18
  16. package/browser/Options/Classes/AnimatableColor.js +1 -0
  17. package/browser/Options/Classes/AnimationOptions.js +8 -0
  18. package/browser/Options/Classes/Background/Background.js +6 -0
  19. package/browser/Options/Classes/ColorAnimation.js +12 -1
  20. package/browser/Options/Classes/FullScreen/FullScreen.js +2 -0
  21. package/browser/Options/Classes/HslAnimation.js +4 -5
  22. package/browser/Options/Classes/Options.js +67 -8
  23. package/browser/Options/Classes/OptionsColor.js +1 -0
  24. package/browser/Options/Classes/Particles/Bounce/ParticlesBounce.js +2 -0
  25. package/browser/Options/Classes/Particles/Effect/Effect.js +3 -4
  26. package/browser/Options/Classes/Particles/Fill.js +28 -0
  27. package/browser/Options/Classes/Particles/Move/Move.js +17 -3
  28. package/browser/Options/Classes/Particles/Move/MoveAngle.js +2 -0
  29. package/browser/Options/Classes/Particles/Move/MoveCenter.js +4 -0
  30. package/browser/Options/Classes/Particles/Move/MoveGravity.js +4 -0
  31. package/browser/Options/Classes/Particles/Move/OutModes.js +5 -0
  32. package/browser/Options/Classes/Particles/Move/Path/MovePath.js +5 -0
  33. package/browser/Options/Classes/Particles/Move/Spin.js +3 -0
  34. package/browser/Options/Classes/Particles/Number/ParticlesDensity.js +3 -0
  35. package/browser/Options/Classes/Particles/Number/ParticlesNumber.js +3 -0
  36. package/browser/Options/Classes/Particles/Number/ParticlesNumberLimit.js +2 -0
  37. package/browser/Options/Classes/Particles/Opacity/Opacity.js +1 -0
  38. package/browser/Options/Classes/Particles/Opacity/OpacityAnimation.js +1 -0
  39. package/browser/Options/Classes/Particles/ParticlesOptions.js +29 -9
  40. package/browser/Options/Classes/Particles/Shape/Shape.js +3 -4
  41. package/browser/Options/Classes/Particles/Size/Size.js +1 -0
  42. package/browser/Options/Classes/Particles/Size/SizeAnimation.js +1 -0
  43. package/browser/Options/Classes/Particles/Stroke.js +3 -0
  44. package/browser/Options/Classes/Particles/ZIndex/ZIndex.js +3 -0
  45. package/browser/Options/Classes/ResizeEvent.js +2 -0
  46. package/browser/Options/Classes/ValueWithRandom.js +3 -4
  47. package/browser/Utils/CanvasUtils.js +44 -51
  48. package/browser/Utils/ColorUtils.js +51 -40
  49. package/browser/Utils/EventDispatcher.js +1 -0
  50. package/browser/Utils/LogUtils.js +1 -0
  51. package/browser/Utils/MathUtils.js +12 -7
  52. package/browser/Utils/OptionsUtils.js +2 -2
  53. package/browser/Utils/Utils.js +109 -31
  54. package/browser/exports.js +1 -2
  55. package/cjs/Core/CanvasManager.js +303 -0
  56. package/cjs/Core/Container.js +134 -101
  57. package/cjs/Core/Engine.js +29 -162
  58. package/cjs/Core/Particle.js +197 -183
  59. package/cjs/Core/ParticlesManager.js +363 -0
  60. package/cjs/Core/RenderManager.js +303 -0
  61. package/cjs/Core/Retina.js +6 -6
  62. package/cjs/Core/Utils/Constants.js +2 -2
  63. package/cjs/Core/Utils/EventListeners.js +67 -63
  64. package/cjs/Core/Utils/PluginManager.js +145 -0
  65. package/cjs/Core/Utils/Ranges.js +29 -10
  66. package/cjs/Core/Utils/SpatialHashGrid.js +102 -0
  67. package/cjs/Core/Utils/Vectors.js +17 -18
  68. package/cjs/Options/Classes/AnimatableColor.js +1 -0
  69. package/cjs/Options/Classes/AnimationOptions.js +8 -0
  70. package/cjs/Options/Classes/Background/Background.js +6 -0
  71. package/cjs/Options/Classes/ColorAnimation.js +12 -1
  72. package/cjs/Options/Classes/FullScreen/FullScreen.js +2 -0
  73. package/cjs/Options/Classes/HslAnimation.js +4 -5
  74. package/cjs/Options/Classes/Options.js +67 -8
  75. package/cjs/Options/Classes/OptionsColor.js +1 -0
  76. package/cjs/Options/Classes/Particles/Bounce/ParticlesBounce.js +2 -0
  77. package/cjs/Options/Classes/Particles/Effect/Effect.js +3 -4
  78. package/cjs/Options/Classes/Particles/Fill.js +28 -0
  79. package/cjs/Options/Classes/Particles/Move/Move.js +17 -3
  80. package/cjs/Options/Classes/Particles/Move/MoveAngle.js +2 -0
  81. package/cjs/Options/Classes/Particles/Move/MoveCenter.js +4 -0
  82. package/cjs/Options/Classes/Particles/Move/MoveGravity.js +4 -0
  83. package/cjs/Options/Classes/Particles/Move/OutModes.js +5 -0
  84. package/cjs/Options/Classes/Particles/Move/Path/MovePath.js +5 -0
  85. package/cjs/Options/Classes/Particles/Move/Spin.js +3 -0
  86. package/cjs/Options/Classes/Particles/Number/ParticlesDensity.js +3 -0
  87. package/cjs/Options/Classes/Particles/Number/ParticlesNumber.js +3 -0
  88. package/cjs/Options/Classes/Particles/Number/ParticlesNumberLimit.js +2 -0
  89. package/cjs/Options/Classes/Particles/Opacity/Opacity.js +1 -0
  90. package/cjs/Options/Classes/Particles/Opacity/OpacityAnimation.js +1 -0
  91. package/cjs/Options/Classes/Particles/ParticlesOptions.js +29 -9
  92. package/cjs/Options/Classes/Particles/Shape/Shape.js +3 -4
  93. package/cjs/Options/Classes/Particles/Size/Size.js +1 -0
  94. package/cjs/Options/Classes/Particles/Size/SizeAnimation.js +1 -0
  95. package/cjs/Options/Classes/Particles/Stroke.js +3 -0
  96. package/cjs/Options/Classes/Particles/ZIndex/ZIndex.js +3 -0
  97. package/cjs/Options/Classes/ResizeEvent.js +2 -0
  98. package/cjs/Options/Classes/ValueWithRandom.js +3 -4
  99. package/cjs/Utils/CanvasUtils.js +44 -51
  100. package/cjs/Utils/ColorUtils.js +51 -40
  101. package/cjs/Utils/EventDispatcher.js +1 -0
  102. package/cjs/Utils/LogUtils.js +1 -0
  103. package/cjs/Utils/MathUtils.js +12 -7
  104. package/cjs/Utils/OptionsUtils.js +2 -2
  105. package/cjs/Utils/Utils.js +109 -31
  106. package/cjs/exports.js +1 -2
  107. package/dist_browser_Core_Container_js.js +30 -20
  108. package/esm/Core/CanvasManager.js +303 -0
  109. package/esm/Core/Container.js +134 -101
  110. package/esm/Core/Engine.js +29 -162
  111. package/esm/Core/Particle.js +197 -183
  112. package/esm/Core/ParticlesManager.js +363 -0
  113. package/esm/Core/RenderManager.js +303 -0
  114. package/esm/Core/Retina.js +6 -6
  115. package/esm/Core/Utils/Constants.js +2 -2
  116. package/esm/Core/Utils/EventListeners.js +67 -63
  117. package/esm/Core/Utils/PluginManager.js +145 -0
  118. package/esm/Core/Utils/Ranges.js +29 -10
  119. package/esm/Core/Utils/SpatialHashGrid.js +102 -0
  120. package/esm/Core/Utils/Vectors.js +17 -18
  121. package/esm/Options/Classes/AnimatableColor.js +1 -0
  122. package/esm/Options/Classes/AnimationOptions.js +8 -0
  123. package/esm/Options/Classes/Background/Background.js +6 -0
  124. package/esm/Options/Classes/ColorAnimation.js +12 -1
  125. package/esm/Options/Classes/FullScreen/FullScreen.js +2 -0
  126. package/esm/Options/Classes/HslAnimation.js +4 -5
  127. package/esm/Options/Classes/Options.js +67 -8
  128. package/esm/Options/Classes/OptionsColor.js +1 -0
  129. package/esm/Options/Classes/Particles/Bounce/ParticlesBounce.js +2 -0
  130. package/esm/Options/Classes/Particles/Effect/Effect.js +3 -4
  131. package/esm/Options/Classes/Particles/Fill.js +28 -0
  132. package/esm/Options/Classes/Particles/Move/Move.js +17 -3
  133. package/esm/Options/Classes/Particles/Move/MoveAngle.js +2 -0
  134. package/esm/Options/Classes/Particles/Move/MoveCenter.js +4 -0
  135. package/esm/Options/Classes/Particles/Move/MoveGravity.js +4 -0
  136. package/esm/Options/Classes/Particles/Move/OutModes.js +5 -0
  137. package/esm/Options/Classes/Particles/Move/Path/MovePath.js +5 -0
  138. package/esm/Options/Classes/Particles/Move/Spin.js +3 -0
  139. package/esm/Options/Classes/Particles/Number/ParticlesDensity.js +3 -0
  140. package/esm/Options/Classes/Particles/Number/ParticlesNumber.js +3 -0
  141. package/esm/Options/Classes/Particles/Number/ParticlesNumberLimit.js +2 -0
  142. package/esm/Options/Classes/Particles/Opacity/Opacity.js +1 -0
  143. package/esm/Options/Classes/Particles/Opacity/OpacityAnimation.js +1 -0
  144. package/esm/Options/Classes/Particles/ParticlesOptions.js +29 -9
  145. package/esm/Options/Classes/Particles/Shape/Shape.js +3 -4
  146. package/esm/Options/Classes/Particles/Size/Size.js +1 -0
  147. package/esm/Options/Classes/Particles/Size/SizeAnimation.js +1 -0
  148. package/esm/Options/Classes/Particles/Stroke.js +3 -0
  149. package/esm/Options/Classes/Particles/ZIndex/ZIndex.js +3 -0
  150. package/esm/Options/Classes/ResizeEvent.js +2 -0
  151. package/esm/Options/Classes/ValueWithRandom.js +3 -4
  152. package/esm/Utils/CanvasUtils.js +44 -51
  153. package/esm/Utils/ColorUtils.js +51 -40
  154. package/esm/Utils/EventDispatcher.js +1 -0
  155. package/esm/Utils/LogUtils.js +1 -0
  156. package/esm/Utils/MathUtils.js +12 -7
  157. package/esm/Utils/OptionsUtils.js +2 -2
  158. package/esm/Utils/Utils.js +109 -31
  159. package/esm/exports.js +1 -2
  160. package/package.json +1 -1
  161. package/report.html +84 -29
  162. package/scripts/install.js +4 -20
  163. package/tsparticles.engine.js +98 -86
  164. package/tsparticles.engine.min.js +2 -2
  165. package/types/Core/CanvasManager.d.ts +39 -0
  166. package/types/Core/Container.d.ts +29 -14
  167. package/types/Core/Engine.d.ts +2 -61
  168. package/types/Core/Interfaces/IColorManager.d.ts +0 -1
  169. package/types/Core/Interfaces/IContainerPlugin.d.ts +10 -8
  170. package/types/Core/Interfaces/IDrawParticleParams.d.ts +2 -1
  171. package/types/Core/Interfaces/IPalette.d.ts +7 -0
  172. package/types/Core/Interfaces/IParticleOpacityData.d.ts +1 -0
  173. package/types/Core/Interfaces/IParticleRetinaProps.d.ts +4 -4
  174. package/types/Core/Interfaces/IParticleUpdater.d.ts +2 -1
  175. package/types/Core/Interfaces/IParticleValueAnimation.d.ts +3 -3
  176. package/types/Core/Interfaces/IShapeDrawData.d.ts +10 -1
  177. package/types/Core/Interfaces/IShapeDrawer.d.ts +0 -1
  178. package/types/Core/Interfaces/IShapeValues.d.ts +0 -1
  179. package/types/Core/Particle.d.ts +7 -11
  180. package/types/Core/{Particles.d.ts → ParticlesManager.d.ts} +15 -14
  181. package/types/Core/RenderManager.d.ts +49 -0
  182. package/types/Core/Retina.d.ts +0 -2
  183. package/types/Core/Utils/Constants.d.ts +2 -2
  184. package/types/Core/Utils/PluginManager.d.ts +62 -0
  185. package/types/Core/Utils/Ranges.d.ts +4 -1
  186. package/types/Core/Utils/SpatialHashGrid.d.ts +25 -0
  187. package/types/Core/Utils/Vectors.d.ts +8 -10
  188. package/types/Options/Classes/ColorAnimation.d.ts +3 -1
  189. package/types/Options/Classes/HslAnimation.d.ts +3 -4
  190. package/types/Options/Classes/Options.d.ts +5 -3
  191. package/types/Options/Classes/Particles/Effect/Effect.d.ts +0 -1
  192. package/types/Options/Classes/Particles/Fill.d.ts +12 -0
  193. package/types/Options/Classes/Particles/Move/Move.d.ts +0 -2
  194. package/types/Options/Classes/Particles/ParticlesOptions.d.ts +5 -5
  195. package/types/Options/Classes/Particles/Shape/Shape.d.ts +0 -1
  196. package/types/Options/Classes/ValueWithRandom.d.ts +0 -1
  197. package/types/Options/Interfaces/IColorAnimation.d.ts +2 -0
  198. package/types/Options/Interfaces/IOptions.d.ts +1 -0
  199. package/types/Options/Interfaces/Particles/Effect/IEffect.d.ts +0 -1
  200. package/types/Options/Interfaces/Particles/IFill.d.ts +9 -0
  201. package/types/Options/Interfaces/Particles/IParticlesOptions.d.ts +2 -2
  202. package/types/Options/Interfaces/Particles/IStroke.d.ts +2 -2
  203. package/types/Options/Interfaces/Particles/Move/IMove.d.ts +0 -2
  204. package/types/Options/Interfaces/Particles/Shape/IShape.d.ts +0 -1
  205. package/types/Types/CanvasContextType.d.ts +1 -0
  206. package/types/Types/EngineInitializers.d.ts +6 -3
  207. package/types/Utils/CanvasUtils.d.ts +13 -16
  208. package/types/Utils/ColorUtils.d.ts +11 -10
  209. package/types/Utils/LogUtils.d.ts +1 -0
  210. package/types/Utils/MathUtils.d.ts +2 -0
  211. package/types/Utils/OptionsUtils.d.ts +2 -2
  212. package/types/Utils/Utils.d.ts +8 -1
  213. package/types/export-types.d.ts +7 -7
  214. package/types/exports.d.ts +1 -2
  215. package/umd/Core/CanvasManager.js +317 -0
  216. package/umd/Core/Container.js +134 -101
  217. package/umd/Core/Engine.js +28 -161
  218. package/umd/Core/Particle.js +198 -184
  219. package/umd/Core/{Particles.js → ParticlesManager.js} +186 -167
  220. package/umd/Core/RenderManager.js +317 -0
  221. package/umd/Core/Retina.js +6 -6
  222. package/umd/Core/Utils/Constants.js +3 -3
  223. package/umd/Core/Utils/EventListeners.js +67 -63
  224. package/umd/Core/Utils/PluginManager.js +159 -0
  225. package/umd/Core/Utils/Ranges.js +28 -9
  226. package/umd/Core/Utils/SpatialHashGrid.js +116 -0
  227. package/umd/Core/Utils/Vectors.js +17 -18
  228. package/umd/Options/Classes/AnimatableColor.js +1 -0
  229. package/umd/Options/Classes/AnimationOptions.js +8 -0
  230. package/umd/Options/Classes/Background/Background.js +6 -0
  231. package/umd/Options/Classes/ColorAnimation.js +12 -1
  232. package/umd/Options/Classes/FullScreen/FullScreen.js +2 -0
  233. package/umd/Options/Classes/HslAnimation.js +5 -6
  234. package/umd/Options/Classes/Options.js +67 -8
  235. package/umd/Options/Classes/OptionsColor.js +1 -0
  236. package/umd/Options/Classes/Particles/Bounce/ParticlesBounce.js +2 -0
  237. package/umd/Options/Classes/Particles/Effect/Effect.js +3 -4
  238. package/umd/Options/Classes/Particles/Fill.js +42 -0
  239. package/umd/Options/Classes/Particles/Move/Move.js +18 -4
  240. package/umd/Options/Classes/Particles/Move/MoveAngle.js +2 -0
  241. package/umd/Options/Classes/Particles/Move/MoveCenter.js +4 -0
  242. package/umd/Options/Classes/Particles/Move/MoveGravity.js +4 -0
  243. package/umd/Options/Classes/Particles/Move/OutModes.js +5 -0
  244. package/umd/Options/Classes/Particles/Move/Path/MovePath.js +5 -0
  245. package/umd/Options/Classes/Particles/Move/Spin.js +3 -0
  246. package/umd/Options/Classes/Particles/Number/ParticlesDensity.js +3 -0
  247. package/umd/Options/Classes/Particles/Number/ParticlesNumber.js +3 -0
  248. package/umd/Options/Classes/Particles/Number/ParticlesNumberLimit.js +2 -0
  249. package/umd/Options/Classes/Particles/Opacity/Opacity.js +1 -0
  250. package/umd/Options/Classes/Particles/Opacity/OpacityAnimation.js +1 -0
  251. package/umd/Options/Classes/Particles/ParticlesOptions.js +30 -10
  252. package/umd/Options/Classes/Particles/Shape/Shape.js +3 -4
  253. package/umd/Options/Classes/Particles/Size/Size.js +1 -0
  254. package/umd/Options/Classes/Particles/Size/SizeAnimation.js +1 -0
  255. package/umd/Options/Classes/Particles/Stroke.js +3 -0
  256. package/umd/Options/Classes/Particles/ZIndex/ZIndex.js +3 -0
  257. package/umd/Options/Classes/ResizeEvent.js +2 -0
  258. package/umd/Options/Classes/ValueWithRandom.js +3 -4
  259. package/umd/Utils/CanvasUtils.js +44 -53
  260. package/umd/Utils/ColorUtils.js +51 -39
  261. package/umd/Utils/EventDispatcher.js +1 -0
  262. package/umd/Utils/LogUtils.js +1 -0
  263. package/umd/Utils/MathUtils.js +14 -7
  264. package/umd/Utils/OptionsUtils.js +2 -2
  265. package/umd/Utils/Utils.js +111 -32
  266. package/umd/exports.js +2 -3
  267. package/794.min.js +0 -2
  268. package/794.min.js.LICENSE.txt +0 -1
  269. package/browser/Core/Canvas.js +0 -469
  270. package/browser/Core/Particles.js +0 -344
  271. package/browser/Core/Utils/Point.js +0 -6
  272. package/browser/Core/Utils/QuadTree.js +0 -59
  273. package/browser/Options/Classes/Particles/Move/MoveAttract.js +0 -33
  274. package/cjs/Core/Canvas.js +0 -469
  275. package/cjs/Core/Particles.js +0 -344
  276. package/cjs/Core/Utils/Point.js +0 -6
  277. package/cjs/Core/Utils/QuadTree.js +0 -59
  278. package/cjs/Options/Classes/Particles/Move/MoveAttract.js +0 -33
  279. package/esm/Core/Canvas.js +0 -469
  280. package/esm/Core/Particles.js +0 -344
  281. package/esm/Core/Utils/Point.js +0 -6
  282. package/esm/Core/Utils/QuadTree.js +0 -59
  283. package/esm/Options/Classes/Particles/Move/MoveAttract.js +0 -33
  284. package/tsparticles.engine.min.js.LICENSE.txt +0 -1
  285. package/types/Core/Canvas.d.ts +0 -55
  286. package/types/Core/Interfaces/IMovePathGenerator.d.ts +0 -10
  287. package/types/Core/Interfaces/IParticleMover.d.ts +0 -7
  288. package/types/Core/Utils/Point.d.ts +0 -7
  289. package/types/Core/Utils/QuadTree.d.ts +0 -18
  290. package/types/Options/Classes/Particles/Move/MoveAttract.d.ts +0 -12
  291. package/types/Options/Interfaces/Particles/Move/IMoveAttract.d.ts +0 -7
  292. package/umd/Core/Canvas.js +0 -483
  293. package/umd/Core/Utils/Point.js +0 -20
  294. package/umd/Core/Utils/QuadTree.js +0 -73
  295. package/umd/Options/Classes/Particles/Move/MoveAttract.js +0 -47
  296. /package/browser/Core/Interfaces/{IMovePathGenerator.js → IPalette.js} +0 -0
  297. /package/browser/{Core/Interfaces/IParticleMover.js → Options/Interfaces/Particles/IFill.js} +0 -0
  298. /package/browser/{Options/Interfaces/Particles/Move/IMoveAttract.js → Types/CanvasContextType.js} +0 -0
  299. /package/cjs/Core/Interfaces/{IMovePathGenerator.js → IPalette.js} +0 -0
  300. /package/cjs/{Core/Interfaces/IParticleMover.js → Options/Interfaces/Particles/IFill.js} +0 -0
  301. /package/cjs/{Options/Interfaces/Particles/Move/IMoveAttract.js → Types/CanvasContextType.js} +0 -0
  302. /package/esm/Core/Interfaces/{IMovePathGenerator.js → IPalette.js} +0 -0
  303. /package/esm/{Core/Interfaces/IParticleMover.js → Options/Interfaces/Particles/IFill.js} +0 -0
  304. /package/esm/{Options/Interfaces/Particles/Move/IMoveAttract.js → Types/CanvasContextType.js} +0 -0
  305. /package/umd/Core/Interfaces/{IMovePathGenerator.js → IPalette.js} +0 -0
  306. /package/umd/{Core/Interfaces/IParticleMover.js → Options/Interfaces/Particles/IFill.js} +0 -0
  307. /package/umd/{Options/Interfaces/Particles/Move/IMoveAttract.js → Types/CanvasContextType.js} +0 -0
@@ -11,5 +11,4 @@ export interface IShapeDrawer<TParticle extends Particle = Particle> {
11
11
  loadShape?: (particle: TParticle) => void;
12
12
  particleDestroy?: (particle: TParticle) => void;
13
13
  particleInit?: (container: Container, particle: TParticle) => void;
14
- readonly validTypes: readonly string[];
15
14
  }
@@ -3,6 +3,5 @@ import type { RecursivePartial } from "../../Types/RecursivePartial.js";
3
3
  export interface IShapeValues {
4
4
  [key: string]: unknown;
5
5
  close?: boolean;
6
- fill?: boolean;
7
6
  particles?: RecursivePartial<IParticlesOptions>;
8
7
  }
@@ -1,11 +1,9 @@
1
1
  import type { ICenterCoordinates, ICoordinates, ICoordinates3d } from "./Interfaces/ICoordinates.js";
2
2
  import { Vector, Vector3d } from "./Utils/Vectors.js";
3
3
  import type { Container } from "./Container.js";
4
- import type { Engine } from "./Engine.js";
5
4
  import type { IBubbleParticleData } from "./Interfaces/IBubbleParticleData.js";
6
5
  import type { IDelta } from "./Interfaces/IDelta.js";
7
6
  import type { IHsl } from "./Interfaces/Colors.js";
8
- import type { IMovePathGenerator } from "./Interfaces/IMovePathGenerator.js";
9
7
  import type { IParticleHslAnimation } from "./Interfaces/IParticleHslAnimation.js";
10
8
  import type { IParticleNumericValueAnimation } from "./Interfaces/IParticleValueAnimation.js";
11
9
  import type { IParticleOpacityData } from "./Interfaces/IParticleOpacityData.js";
@@ -18,18 +16,19 @@ import type { IShapeValues } from "./Interfaces/IShapeValues.js";
18
16
  import type { ISlowParticleData } from "./Interfaces/ISlowParticleData.js";
19
17
  import { ParticleOutType } from "../Enums/Types/ParticleOutType.js";
20
18
  import type { ParticlesOptions } from "../Options/Classes/Particles/ParticlesOptions.js";
19
+ import type { PluginManager } from "./Utils/PluginManager.js";
21
20
  import type { RecursivePartial } from "../Types/RecursivePartial.js";
22
21
  export declare class Particle {
23
- readonly container: Container;
24
22
  backColor?: IHsl;
25
23
  bubble: IBubbleParticleData;
26
- color?: IParticleHslAnimation;
27
24
  destroyed: boolean;
28
25
  direction: number;
29
26
  effect?: string;
30
27
  effectClose: boolean;
31
28
  effectData?: IShapeValues;
32
- effectFill: boolean;
29
+ fillColor?: IParticleHslAnimation;
30
+ fillEnabled?: boolean;
31
+ fillOpacity?: number;
33
32
  group?: string;
34
33
  id: number;
35
34
  ignoresResizeRatio: boolean;
@@ -39,13 +38,10 @@ export declare class Particle {
39
38
  lastPathTime: number;
40
39
  misplaced: boolean;
41
40
  moveCenter: ICenterCoordinates;
42
- moveDecay: number;
43
41
  offset: Vector;
44
42
  opacity?: IParticleNumericValueAnimation;
45
43
  options: ParticlesOptions;
46
44
  outType: ParticleOutType;
47
- pathDelay: number;
48
- pathGenerator?: IMovePathGenerator;
49
45
  pathRotation: boolean;
50
46
  position: Vector3d;
51
47
  randomIndexData?: number;
@@ -55,7 +51,6 @@ export declare class Particle {
55
51
  shape?: string;
56
52
  shapeClose: boolean;
57
53
  shapeData?: IShapeValues;
58
- shapeFill: boolean;
59
54
  sides: number;
60
55
  size: IParticleNumericValueAnimation;
61
56
  slow: ISlowParticleData;
@@ -70,8 +65,9 @@ export declare class Particle {
70
65
  private readonly _cachedPosition;
71
66
  private readonly _cachedRotateData;
72
67
  private readonly _cachedTransform;
73
- private readonly _engine;
74
- constructor(engine: Engine, container: Container);
68
+ private readonly _container;
69
+ private readonly _pluginManager;
70
+ constructor(pluginManager: PluginManager, container: Container);
75
71
  destroy(override?: boolean): void;
76
72
  draw(delta: IDelta): void;
77
73
  getAngle(): number;
@@ -1,31 +1,34 @@
1
1
  import type { Container } from "./Container.js";
2
- import type { Engine } from "./Engine.js";
2
+ import type { IContainerPlugin } from "./Interfaces/IContainerPlugin.js";
3
3
  import type { ICoordinates } from "./Interfaces/ICoordinates.js";
4
4
  import type { IDelta } from "./Interfaces/IDelta.js";
5
5
  import type { IDimension } from "./Interfaces/IDimension.js";
6
- import type { IParticleMover } from "./Interfaces/IParticleMover.js";
7
- import type { IParticleUpdater } from "./Interfaces/IParticleUpdater.js";
8
6
  import type { IParticlesOptions } from "../Options/Interfaces/Particles/IParticlesOptions.js";
9
7
  import { Particle } from "./Particle.js";
10
- import { QuadTree } from "./Utils/QuadTree.js";
8
+ import type { PluginManager } from "./Utils/PluginManager.js";
11
9
  import type { RecursivePartial } from "../Types/RecursivePartial.js";
12
- export declare class Particles {
13
- movers: IParticleMover[];
14
- quadTree: QuadTree;
15
- updaters: IParticleUpdater[];
10
+ import { SpatialHashGrid } from "./Utils/SpatialHashGrid.js";
11
+ export declare class ParticlesManager {
12
+ checkParticlePositionPlugins: IContainerPlugin[];
13
+ grid: SpatialHashGrid;
16
14
  private _array;
17
15
  private readonly _container;
18
- private readonly _engine;
19
16
  private readonly _groupLimits;
20
- private _lastZIndex;
21
17
  private _limit;
18
+ private _maxZIndex;
19
+ private _minZIndex;
22
20
  private _needsSort;
23
21
  private _nextId;
24
- private _pluginsInitialized;
22
+ private _particleResetPlugins;
23
+ private _particleUpdatePlugins;
24
+ private readonly _pluginManager;
25
25
  private readonly _pool;
26
+ private _postParticleUpdatePlugins;
27
+ private _postUpdatePlugins;
26
28
  private _resizeFactor?;
29
+ private _updatePlugins;
27
30
  private _zArray;
28
- constructor(engine: Engine, container: Container);
31
+ constructor(pluginManager: PluginManager, container: Container);
29
32
  get count(): number;
30
33
  addParticle(position?: ICoordinates, overrideOptions?: RecursivePartial<IParticlesOptions>, group?: string, initializer?: (particle: Particle) => boolean): Particle | undefined;
31
34
  clear(): void;
@@ -35,7 +38,6 @@ export declare class Particles {
35
38
  find(condition: (particle: Particle) => boolean): Particle | undefined;
36
39
  get(index: number): Particle | undefined;
37
40
  init(): Promise<void>;
38
- initPlugins(): Promise<void>;
39
41
  push(nb: number, position?: ICoordinates, overrideOptions?: RecursivePartial<IParticlesOptions>, group?: string): void;
40
42
  redraw(): Promise<void>;
41
43
  remove(particle: Particle, group?: string, override?: boolean): void;
@@ -48,6 +50,5 @@ export declare class Particles {
48
50
  private readonly _addToPool;
49
51
  private readonly _applyDensity;
50
52
  private readonly _initDensityFactor;
51
- private readonly _pushParticle;
52
53
  private readonly _removeParticle;
53
54
  }
@@ -0,0 +1,49 @@
1
+ import type { CanvasContextType } from "../Types/CanvasContextType.js";
2
+ import type { CanvasManager } from "./CanvasManager.js";
3
+ import type { Container } from "./Container.js";
4
+ import type { IDelta } from "./Interfaces/IDelta.js";
5
+ import type { Particle } from "./Particle.js";
6
+ import type { PluginManager } from "./Utils/PluginManager.js";
7
+ export declare class RenderManager {
8
+ private _canvasClearPlugins;
9
+ private readonly _canvasManager;
10
+ private _canvasPaintPlugins;
11
+ private _clearDrawPlugins;
12
+ private _colorPlugins;
13
+ private readonly _container;
14
+ private _context;
15
+ private _contextSettings?;
16
+ private _drawParticlePlugins;
17
+ private _drawParticlesCleanupPlugins;
18
+ private _drawParticlesSetupPlugins;
19
+ private _drawPlugins;
20
+ private _drawSettingsCleanupPlugins;
21
+ private _drawSettingsSetupPlugins;
22
+ private readonly _pluginManager;
23
+ private _postDrawUpdaters;
24
+ private _preDrawUpdaters;
25
+ private readonly _reusableColorStyles;
26
+ private readonly _reusablePluginColors;
27
+ private readonly _reusableTransform;
28
+ constructor(pluginManager: PluginManager, container: Container, canvasManager: CanvasManager);
29
+ get settings(): CanvasRenderingContext2DSettings | undefined;
30
+ canvasClear(): void;
31
+ clear(): void;
32
+ destroy(): void;
33
+ draw<T>(cb: (context: CanvasContextType) => T): T | undefined;
34
+ drawParticle(particle: Particle, delta: IDelta): void;
35
+ drawParticlePlugins(particle: Particle, delta: IDelta): void;
36
+ drawParticles(delta: IDelta): void;
37
+ init(): void;
38
+ initPlugins(): void;
39
+ initUpdaters(): void;
40
+ paint(): void;
41
+ paintBase(baseColor?: string): void;
42
+ paintImage(image: HTMLImageElement, opacity: number): void;
43
+ setContext(context: CanvasContextType | null): void;
44
+ setContextSettings(settings: CanvasRenderingContext2DSettings): void;
45
+ stop(): void;
46
+ private readonly _applyPostDrawUpdaters;
47
+ private readonly _applyPreDrawUpdaters;
48
+ private readonly _getPluginParticleColors;
49
+ }
@@ -2,10 +2,8 @@ import type { Container } from "./Container.js";
2
2
  import type { Particle } from "./Particle.js";
3
3
  export declare class Retina {
4
4
  private readonly container;
5
- maxSpeed: number;
6
5
  pixelRatio: number;
7
6
  reduceFactor: number;
8
- sizeAnimationSpeed: number;
9
7
  constructor(container: Container);
10
8
  init(): void;
11
9
  initParticle(particle: Particle): void;
@@ -1,7 +1,7 @@
1
1
  import type { ICoordinates3d } from "../Interfaces/ICoordinates.js";
2
- export declare const generatedAttribute = "generated", resizeEvent = "resize", visibilityChangeEvent = "visibilitychange", percentDenominator = 100, half = 0.5, millisecondsToSeconds = 1000, originPoint: ICoordinates3d, defaultTransform: {
2
+ export declare const generatedAttribute = "generated", defaultCompositeValue: GlobalCompositeOperation, resizeEvent = "resize", visibilityChangeEvent = "visibilitychange", percentDenominator = 100, half = 0.5, millisecondsToSeconds = 1000, originPoint: ICoordinates3d, defaultTransform: {
3
3
  a: number;
4
4
  b: number;
5
5
  c: number;
6
6
  d: number;
7
- }, randomColorValue = "random", midColorValue = "mid", double = 2, doublePI: number, defaultFps = 60, defaultAlpha = 1, generatedTrue = "true", generatedFalse = "false", canvasTag = "canvas", defaultRetryCount = 0, squareExp = 2, qTreeCapacity = 4, defaultRemoveQuantity = 1, defaultRatio = 1, defaultReduceFactor = 1, subdivideCount = 4, inverseFactorNumerator = 1, rgbMax = 255, hMax = 360, sMax = 100, lMax = 100, hMin = 0, sMin = 0, hPhase = 60, empty = 0, quarter = 0.25, threeQuarter: number, minVelocity = 0, defaultTransformValue = 1, minimumSize = 0, minimumLength = 0, zIndexFactorOffset = 1, defaultOpacity = 1, clickRadius = 1, touchEndLengthOffset = 1, minCoordinate = 0, removeDeleteCount = 1, removeMinIndex = 0, defaultFpsLimit = 120, minFpsLimit = 0, canvasFirstIndex = 0, loadRandomFactor = 10000, loadMinIndex = 0, one = 1, none = 0, decayOffset = 1, tryCountIncrement = 1, minRetries = 0, minZ = 0, defaultRadius = 0, posOffset: number, sizeFactor = 1.5, minLimit = 0, countOffset = 1, minCount = 0, minIndex = 0, lengthOffset = 1, defaultDensityFactor = 1, deleteCount = 1, touchDelay = 500, manualDefaultPosition = 50, defaultAngle = 0, identity = 1, minStrokeWidth = 0, lFactor = 1, lMin = 0, triple = 3, sextuple = 6, sNormalizedOffset = 1, phaseNumerator = 1, defaultRgbMin = 0, defaultVelocity = 0, defaultLoops = 0, defaultTime = 0;
7
+ }, randomColorValue = "random", midColorValue = "mid", double = 2, doublePI: number, defaultFps = 60, defaultAlpha = 1, generatedTrue = "true", generatedFalse = "false", canvasTag = "canvas", defaultRetryCount = 0, squareExp = 2, spatialHashGridCellSize = 100, defaultRemoveQuantity = 1, defaultRatio = 1, defaultReduceFactor = 1, inverseFactorNumerator = 1, rgbMax = 255, hMax = 360, sMax = 100, lMax = 100, hMin = 0, sMin = 0, hPhase = 60, empty = 0, quarter = 0.25, threeQuarter: number, minVelocity = 0, defaultTransformValue = 1, minimumSize = 0, zIndexFactorOffset = 1, defaultOpacity = 1, removeDeleteCount = 1, removeMinIndex = 0, defaultFpsLimit = 120, minFpsLimit = 0, canvasFirstIndex = 0, loadRandomFactor = 10000, loadMinIndex = 0, one = 1, none = 0, decayOffset = 1, tryCountIncrement = 1, minZ = 0, minLimit = 0, countOffset = 1, minCount = 0, minIndex = 0, lengthOffset = 1, defaultDensityFactor = 1, deleteCount = 1, defaultAngle = 0, identity = 1, minStrokeWidth = 0, lFactor = 1, lMin = 0, triple = 3, sextuple = 6, sNormalizedOffset = 1, phaseNumerator = 1, defaultRgbMin = 0, defaultVelocity = 0, defaultLoops = 0, defaultTime = 0, defaultZoom = 1;
@@ -0,0 +1,62 @@
1
+ import type { EasingType, EasingTypeAlt } from "../../Enums/Types/EasingType.js";
2
+ import type { EffectInitializer, Initializers, ShapeInitializer, UpdaterInitializer } from "../../Types/EngineInitializers.js";
3
+ import type { Container } from "../Container.js";
4
+ import type { EasingFunction } from "../../Types/EasingFunction.js";
5
+ import type { Engine } from "../Engine.js";
6
+ import type { IColorManager } from "../Interfaces/IColorManager.js";
7
+ import type { IEffectDrawer } from "../Interfaces/IEffectDrawer.js";
8
+ import type { IPalette } from "../Interfaces/IPalette.js";
9
+ import type { IParticleUpdater } from "../Interfaces/IParticleUpdater.js";
10
+ import type { IParticlesOptions } from "../../Options/Interfaces/Particles/IParticlesOptions.js";
11
+ import type { IPlugin } from "../Interfaces/IPlugin.js";
12
+ import type { IShapeDrawer } from "../Interfaces/IShapeDrawer.js";
13
+ import type { ISourceOptions } from "../../Types/ISourceOptions.js";
14
+ import type { ParticlesOptions } from "../../Options/Classes/Particles/ParticlesOptions.js";
15
+ import type { RecursivePartial } from "../../Types/RecursivePartial.js";
16
+ type AsyncLoadPluginFunction = (engine: Engine) => Promise<void>;
17
+ type SyncLoadPluginFunction = (engine: Engine) => void;
18
+ type AsyncLoadPluginNoEngine = () => Promise<void>;
19
+ type SyncLoadPluginNoEngine = () => void;
20
+ type LoadPluginFunction = AsyncLoadPluginFunction | SyncLoadPluginFunction | AsyncLoadPluginNoEngine | SyncLoadPluginNoEngine;
21
+ export declare class PluginManager {
22
+ readonly colorManagers: Map<string, IColorManager>;
23
+ readonly easingFunctions: Map<EasingTypeAlt | EasingType, EasingFunction>;
24
+ readonly effectDrawers: Map<Container, Map<string, IEffectDrawer<import("../Particle.js").Particle>>>;
25
+ readonly initializers: Initializers;
26
+ readonly palettes: Map<string, IPalette>;
27
+ readonly plugins: IPlugin[];
28
+ readonly presets: Map<string, RecursivePartial<import("../../export-types.js").IOptions>>;
29
+ readonly shapeDrawers: Map<Container, Map<string, IShapeDrawer<import("../Particle.js").Particle>>>;
30
+ readonly updaters: Map<Container, IParticleUpdater[]>;
31
+ private _allLoadersSet;
32
+ private readonly _configs;
33
+ private readonly _engine;
34
+ private _executedSet;
35
+ private _initialized;
36
+ private _isRunningLoaders;
37
+ private readonly _loadPromises;
38
+ constructor(engine: Engine);
39
+ get configs(): Record<string, ISourceOptions>;
40
+ addColorManager(name: string, manager: IColorManager): void;
41
+ addConfig(config: ISourceOptions): void;
42
+ addEasing(name: EasingType | EasingTypeAlt, easing: EasingFunction): void;
43
+ addEffect(effect: string, drawer: EffectInitializer): void;
44
+ addPalette(name: string, palette: IPalette): void;
45
+ addParticleUpdater(name: string, updaterInitializer: UpdaterInitializer): void;
46
+ addPlugin(plugin: IPlugin): void;
47
+ addPreset(preset: string, options: Readonly<ISourceOptions>, override?: boolean): void;
48
+ addShape(shapes: string[], drawer: ShapeInitializer): void;
49
+ clearPlugins(container: Container): void;
50
+ getEasing(name: EasingType | EasingTypeAlt): EasingFunction;
51
+ getEffectDrawers(container: Container, force?: boolean): Promise<Map<string, IEffectDrawer>>;
52
+ getPalette(name: string): IPalette | undefined;
53
+ getPlugin(plugin: string): IPlugin | undefined;
54
+ getPreset(preset: string): ISourceOptions | undefined;
55
+ getShapeDrawers(container: Container, force?: boolean): Promise<Map<string, IShapeDrawer>>;
56
+ getUpdaters(container: Container, force?: boolean): Promise<IParticleUpdater[]>;
57
+ init(): Promise<void>;
58
+ loadParticlesOptions(container: Container, options: ParticlesOptions, ...sourceOptions: (RecursivePartial<IParticlesOptions> | undefined)[]): void;
59
+ register(...loaders: LoadPluginFunction[]): Promise<void>;
60
+ private _runLoader;
61
+ }
62
+ export {};
@@ -4,18 +4,21 @@ export declare abstract class BaseRange {
4
4
  readonly position: ICoordinates;
5
5
  readonly type: string;
6
6
  protected constructor(x: number, y: number, type: string);
7
+ protected _resetPosition(x: number, y: number): void;
7
8
  abstract contains(point: ICoordinates): boolean;
8
9
  abstract intersects(range: BaseRange): boolean;
9
10
  }
10
11
  export declare class Circle extends BaseRange {
11
- readonly radius: number;
12
+ radius: number;
12
13
  constructor(x: number, y: number, radius: number);
13
14
  contains(point: ICoordinates): boolean;
14
15
  intersects(range: BaseRange): boolean;
16
+ reset(x: number, y: number, radius: number): this;
15
17
  }
16
18
  export declare class Rectangle extends BaseRange {
17
19
  readonly size: IDimension;
18
20
  constructor(x: number, y: number, width: number, height: number);
19
21
  contains(point: ICoordinates): boolean;
20
22
  intersects(range: BaseRange): boolean;
23
+ reset(x: number, y: number, width: number, height: number): this;
21
24
  }
@@ -0,0 +1,25 @@
1
+ import { type BaseRange } from "./Ranges.js";
2
+ import type { ICoordinates } from "../Interfaces/ICoordinates.js";
3
+ import type { IDimension } from "../Interfaces/IDimension.js";
4
+ import type { Particle } from "../Particle.js";
5
+ export declare class SpatialHashGrid {
6
+ private _cellSize;
7
+ private readonly _cells;
8
+ private readonly _circlePool;
9
+ private _circlePoolIdx;
10
+ private _pendingCellSize?;
11
+ private readonly _rectanglePool;
12
+ private _rectanglePoolIdx;
13
+ constructor(cellSize: number);
14
+ clear(): void;
15
+ insert(particle: Particle): void;
16
+ query(range: BaseRange, check?: (particle: Particle) => boolean, out?: Particle[]): Particle[];
17
+ queryCircle(position: ICoordinates, radius: number, check?: (particle: Particle) => boolean, out?: Particle[]): Particle[];
18
+ queryRectangle(position: ICoordinates, size: IDimension, check?: (particle: Particle) => boolean, out?: Particle[]): Particle[];
19
+ setCellSize(cellSize: number): void;
20
+ private _acquireCircle;
21
+ private _acquireRectangle;
22
+ private _cellKeyFromCoords;
23
+ private _getRangeBounds;
24
+ private _releaseShapes;
25
+ }
@@ -9,13 +9,11 @@ export declare class Vector3d implements ICoordinates3d {
9
9
  set angle(angle: number);
10
10
  get length(): number;
11
11
  set length(length: number);
12
- static clone(source: Vector3d): Vector3d;
12
+ static clone(source: ICoordinates | ICoordinates3d): Vector3d;
13
13
  static create(x: number | ICoordinates | ICoordinates3d, y?: number, z?: number): Vector3d;
14
- add(v: Vector3d): Vector3d;
15
- addTo(v: Vector3d): void;
14
+ add(v: ICoordinates | ICoordinates3d): Vector3d;
15
+ addTo(v: ICoordinates | ICoordinates3d): void;
16
16
  copy(): Vector3d;
17
- distanceTo(v: Vector3d): number;
18
- distanceToSq(v: Vector3d): number;
19
17
  div(n: number): Vector3d;
20
18
  divTo(n: number): void;
21
19
  getLengthSq(): number;
@@ -23,14 +21,14 @@ export declare class Vector3d implements ICoordinates3d {
23
21
  multTo(n: number): void;
24
22
  normalize(): void;
25
23
  rotate(angle: number): Vector3d;
26
- setTo(c: ICoordinates): void;
27
- sub(v: Vector3d): Vector3d;
28
- subFrom(v: Vector3d): void;
29
- private readonly _updateFromAngle;
24
+ setTo(c: ICoordinates | ICoordinates3d): void;
25
+ sub(v: ICoordinates | ICoordinates3d): Vector3d;
26
+ subFrom(v: ICoordinates | ICoordinates3d): void;
27
+ private _updateFromAngle;
30
28
  }
31
29
  export declare class Vector extends Vector3d {
32
30
  protected constructor(x?: number, y?: number);
33
31
  static get origin(): Vector;
34
- static clone(source: Vector): Vector;
32
+ static clone(source: ICoordinates): Vector;
35
33
  static create(x: number | ICoordinates, y?: number): Vector;
36
34
  }
@@ -4,7 +4,9 @@ import type { IOptionLoader } from "../Interfaces/IOptionLoader.js";
4
4
  import type { RangeValue } from "../../Types/RangeValue.js";
5
5
  import type { RecursivePartial } from "../../Types/RecursivePartial.js";
6
6
  export declare class ColorAnimation extends AnimationOptions implements IColorAnimation, IOptionLoader<IColorAnimation> {
7
+ max: number;
8
+ min: number;
7
9
  offset: RangeValue;
8
- constructor();
10
+ constructor(min: number, max: number);
9
11
  load(data?: RecursivePartial<IColorAnimation>): void;
10
12
  }
@@ -3,9 +3,8 @@ import type { IHslAnimation } from "../Interfaces/IHslAnimation.js";
3
3
  import type { IOptionLoader } from "../Interfaces/IOptionLoader.js";
4
4
  import type { RecursivePartial } from "../../Types/RecursivePartial.js";
5
5
  export declare class HslAnimation implements IHslAnimation, IOptionLoader<IHslAnimation> {
6
- h: ColorAnimation;
7
- l: ColorAnimation;
8
- s: ColorAnimation;
9
- constructor();
6
+ readonly h: ColorAnimation;
7
+ readonly l: ColorAnimation;
8
+ readonly s: ColorAnimation;
10
9
  load(data?: RecursivePartial<IHslAnimation>): void;
11
10
  }
@@ -1,10 +1,10 @@
1
1
  import { Background } from "./Background/Background.js";
2
2
  import type { Container } from "../../Core/Container.js";
3
- import type { Engine } from "../../Core/Engine.js";
4
3
  import { FullScreen } from "./FullScreen/FullScreen.js";
5
4
  import type { IOptionLoader } from "../Interfaces/IOptionLoader.js";
6
5
  import type { IOptions } from "../Interfaces/IOptions.js";
7
6
  import type { ISourceOptions } from "../../Types/ISourceOptions.js";
7
+ import type { PluginManager } from "../../Core/Utils/PluginManager.js";
8
8
  import type { RangeValue } from "../../Types/RangeValue.js";
9
9
  import type { RecursivePartial } from "../../Types/RecursivePartial.js";
10
10
  import { ResizeEvent } from "./ResizeEvent.js";
@@ -27,6 +27,7 @@ export declare class Options implements IOptions, IOptionLoader<IOptions> {
27
27
  hdr: boolean;
28
28
  key?: string;
29
29
  name?: string;
30
+ palette?: string;
30
31
  readonly particles: import("./Particles/ParticlesOptions.js").ParticlesOptions;
31
32
  pauseOnBlur: boolean;
32
33
  pauseOnOutsideViewport: boolean;
@@ -36,9 +37,10 @@ export declare class Options implements IOptions, IOptionLoader<IOptions> {
36
37
  style: RecursivePartial<CSSStyleDeclaration>;
37
38
  zLayers: number;
38
39
  private readonly _container;
39
- private readonly _engine;
40
- constructor(engine: Engine, container: Container);
40
+ private readonly _pluginManager;
41
+ constructor(pluginManager: PluginManager, container: Container);
41
42
  load(data?: ISourceOptions): void;
43
+ private readonly _importPalette;
42
44
  private readonly _importPreset;
43
45
  }
44
46
  export {};
@@ -5,7 +5,6 @@ import type { ShapeData } from "../../../../Types/ShapeData.js";
5
5
  import type { SingleOrMultiple } from "../../../../Types/SingleOrMultiple.js";
6
6
  export declare class Effect implements IEffect, IOptionLoader<IEffect> {
7
7
  close: boolean;
8
- fill: boolean;
9
8
  options: ShapeData;
10
9
  type: SingleOrMultiple<string>;
11
10
  constructor();
@@ -0,0 +1,12 @@
1
+ import { AnimatableColor } from "../AnimatableColor.js";
2
+ import type { IFill } from "../../Interfaces/Particles/IFill.js";
3
+ import type { IOptionLoader } from "../../Interfaces/IOptionLoader.js";
4
+ import type { RangeValue } from "../../../Types/RangeValue.js";
5
+ import type { RecursivePartial } from "../../../Types/RecursivePartial.js";
6
+ export declare class Fill implements IFill, IOptionLoader<IFill> {
7
+ color: AnimatableColor;
8
+ enable: boolean;
9
+ opacity: RangeValue;
10
+ constructor();
11
+ load(data?: RecursivePartial<IFill>): void;
12
+ }
@@ -3,7 +3,6 @@ import type { IDistance } from "../../../../Core/Interfaces/IDistance.js";
3
3
  import type { IMove } from "../../../Interfaces/Particles/Move/IMove.js";
4
4
  import type { IOptionLoader } from "../../../Interfaces/IOptionLoader.js";
5
5
  import { MoveAngle } from "./MoveAngle.js";
6
- import { MoveAttract } from "./MoveAttract.js";
7
6
  import { MoveCenter } from "./MoveCenter.js";
8
7
  import { MoveGravity } from "./MoveGravity.js";
9
8
  import { MovePath } from "./Path/MovePath.js";
@@ -13,7 +12,6 @@ import type { RecursivePartial } from "../../../../Types/RecursivePartial.js";
13
12
  import { Spin } from "./Spin.js";
14
13
  export declare class Move implements IMove, IOptionLoader<IMove> {
15
14
  readonly angle: MoveAngle;
16
- readonly attract: MoveAttract;
17
15
  readonly center: MoveCenter;
18
16
  decay: RangeValue;
19
17
  direction: MoveDirection | keyof typeof MoveDirection | MoveDirectionAlt | number;
@@ -1,7 +1,6 @@
1
- import { AnimatableColor } from "../AnimatableColor.js";
2
1
  import type { Container } from "../../../Core/Container.js";
3
2
  import { Effect } from "./Effect/Effect.js";
4
- import type { Engine } from "../../../Core/Engine.js";
3
+ import { Fill } from "./Fill.js";
5
4
  import type { IOptionLoader } from "../../Interfaces/IOptionLoader.js";
6
5
  import type { IParticlesOptions } from "../../Interfaces/Particles/IParticlesOptions.js";
7
6
  import { Move } from "./Move/Move.js";
@@ -9,6 +8,7 @@ import { Opacity } from "./Opacity/Opacity.js";
9
8
  import { ParticlesBounce } from "./Bounce/ParticlesBounce.js";
10
9
  import type { ParticlesGroups } from "../../../Types/ParticlesGroups.js";
11
10
  import { ParticlesNumber } from "./Number/ParticlesNumber.js";
11
+ import type { PluginManager } from "../../../Core/Utils/PluginManager.js";
12
12
  import type { RecursivePartial } from "../../../Types/RecursivePartial.js";
13
13
  import { Shape } from "./Shape/Shape.js";
14
14
  import type { SingleOrMultiple } from "../../../Types/SingleOrMultiple.js";
@@ -18,8 +18,8 @@ import { ZIndex } from "./ZIndex/ZIndex.js";
18
18
  export declare class ParticlesOptions implements IParticlesOptions, IOptionLoader<IParticlesOptions> {
19
19
  [name: string]: unknown;
20
20
  readonly bounce: ParticlesBounce;
21
- color: AnimatableColor;
22
21
  readonly effect: Effect;
22
+ fill: SingleOrMultiple<Fill>;
23
23
  readonly groups: ParticlesGroups;
24
24
  readonly move: Move;
25
25
  readonly number: ParticlesNumber;
@@ -30,7 +30,7 @@ export declare class ParticlesOptions implements IParticlesOptions, IOptionLoade
30
30
  stroke: SingleOrMultiple<Stroke>;
31
31
  readonly zIndex: ZIndex;
32
32
  private readonly _container;
33
- private readonly _engine;
34
- constructor(engine: Engine, container?: Container);
33
+ private readonly _pluginManager;
34
+ constructor(pluginManager: PluginManager, container?: Container);
35
35
  load(data?: RecursivePartial<IParticlesOptions>): void;
36
36
  }
@@ -5,7 +5,6 @@ import type { ShapeData } from "../../../../Types/ShapeData.js";
5
5
  import type { SingleOrMultiple } from "../../../../Types/SingleOrMultiple.js";
6
6
  export declare class Shape implements IShape, IOptionLoader<IShape> {
7
7
  close: boolean;
8
- fill: boolean;
9
8
  options: ShapeData;
10
9
  type: SingleOrMultiple<string>;
11
10
  constructor();
@@ -10,7 +10,6 @@ export declare class ValueWithRandom implements IValueWithRandom, IOptionLoader<
10
10
  }
11
11
  export declare class AnimationValueWithRandom extends ValueWithRandom implements IOptionLoader<IAnimationValueWithRandom> {
12
12
  readonly animation: AnimationOptions;
13
- constructor();
14
13
  load(data?: RecursivePartial<IAnimationValueWithRandom>): void;
15
14
  }
16
15
  export declare class RangedAnimationValueWithRandom extends AnimationValueWithRandom implements IOptionLoader<IRangedAnimationValueWithRandom> {
@@ -1,5 +1,7 @@
1
1
  import type { IAnimation } from "./IAnimation.js";
2
2
  import type { RangeValue } from "../../Types/RangeValue.js";
3
3
  export interface IColorAnimation extends IAnimation {
4
+ max: number;
5
+ min: number;
4
6
  offset: RangeValue;
5
7
  }
@@ -18,6 +18,7 @@ export interface IOptions {
18
18
  hdr: boolean;
19
19
  key?: string;
20
20
  name?: string;
21
+ palette?: string;
21
22
  particles: IParticlesOptions;
22
23
  pauseOnBlur: boolean;
23
24
  pauseOnOutsideViewport: boolean;
@@ -2,7 +2,6 @@ import type { ShapeData } from "../../../../Types/ShapeData.js";
2
2
  import type { SingleOrMultiple } from "../../../../Types/SingleOrMultiple.js";
3
3
  export interface IEffect {
4
4
  close: boolean;
5
- fill: boolean;
6
5
  options: ShapeData;
7
6
  type: SingleOrMultiple<string>;
8
7
  }
@@ -0,0 +1,9 @@
1
+ import type { IAnimatableColor } from "../IAnimatableColor.js";
2
+ import type { IRangeColor } from "../../../Core/Interfaces/Colors.js";
3
+ import type { RangeValue } from "../../../Types/RangeValue.js";
4
+ import type { RecursivePartial } from "../../../Types/RecursivePartial.js";
5
+ export interface IFill {
6
+ color?: RecursivePartial<IAnimatableColor> | RecursivePartial<IRangeColor>;
7
+ enable: boolean;
8
+ opacity?: RangeValue;
9
+ }
@@ -1,5 +1,5 @@
1
- import type { IAnimatableColor } from "../IAnimatableColor.js";
2
1
  import type { IEffect } from "./Effect/IEffect.js";
2
+ import type { IFill } from "./IFill.js";
3
3
  import type { IMove } from "./Move/IMove.js";
4
4
  import type { IOpacity } from "./Opacity/IOpacity.js";
5
5
  import type { IParticlesBounce } from "./Bounce/IParticlesBounce.js";
@@ -13,8 +13,8 @@ import type { SingleOrMultiple } from "../../../Types/SingleOrMultiple.js";
13
13
  export interface IParticlesOptions {
14
14
  [name: string]: unknown;
15
15
  bounce: IParticlesBounce;
16
- color: IAnimatableColor;
17
16
  effect: IEffect;
17
+ fill: SingleOrMultiple<IFill>;
18
18
  groups: ParticlesGroups;
19
19
  move: IMove;
20
20
  number: IParticlesNumber;
@@ -1,9 +1,9 @@
1
1
  import type { IAnimatableColor } from "../IAnimatableColor.js";
2
- import type { IColor } from "../../../Core/Interfaces/Colors.js";
2
+ import type { IRangeColor } from "../../../Core/Interfaces/Colors.js";
3
3
  import type { RangeValue } from "../../../Types/RangeValue.js";
4
4
  import type { RecursivePartial } from "../../../Types/RecursivePartial.js";
5
5
  export interface IStroke {
6
- color?: string | RecursivePartial<IAnimatableColor> | RecursivePartial<IColor>;
6
+ color?: RecursivePartial<IAnimatableColor> | RecursivePartial<IRangeColor>;
7
7
  opacity?: RangeValue;
8
8
  width: RangeValue;
9
9
  }
@@ -1,7 +1,6 @@
1
1
  import type { MoveDirection, MoveDirectionAlt } from "../../../../Enums/Directions/MoveDirection.js";
2
2
  import type { IDistance } from "../../../../Core/Interfaces/IDistance.js";
3
3
  import type { IMoveAngle } from "./IMoveAngle.js";
4
- import type { IMoveAttract } from "./IMoveAttract.js";
5
4
  import type { IMoveCenter } from "./IMoveCenter.js";
6
5
  import type { IMoveGravity } from "./IMoveGravity.js";
7
6
  import type { IMovePath } from "./Path/IMovePath.js";
@@ -11,7 +10,6 @@ import type { OutMode } from "../../../../Enums/Modes/OutMode.js";
11
10
  import type { RangeValue } from "../../../../Types/RangeValue.js";
12
11
  export interface IMove {
13
12
  angle: number | IMoveAngle;
14
- attract: IMoveAttract;
15
13
  center: IMoveCenter;
16
14
  decay: RangeValue;
17
15
  direction: MoveDirection | keyof typeof MoveDirection | MoveDirectionAlt | number;
@@ -2,7 +2,6 @@ import type { ShapeData } from "../../../../Types/ShapeData.js";
2
2
  import type { SingleOrMultiple } from "../../../../Types/SingleOrMultiple.js";
3
3
  export interface IShape {
4
4
  close: boolean;
5
- fill: boolean;
6
5
  options: ShapeData;
7
6
  type: SingleOrMultiple<string>;
8
7
  }
@@ -0,0 +1 @@
1
+ export type CanvasContextType = CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D;