@tsparticles/engine 4.0.0-alpha.0 → 4.0.0-alpha.14

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 (429) hide show
  1. package/219.min.js +1 -0
  2. package/README.md +2 -5
  3. package/browser/Core/Canvas.js +238 -154
  4. package/browser/Core/Container.js +111 -227
  5. package/browser/Core/Engine.js +84 -124
  6. package/browser/Core/Particle.js +236 -140
  7. package/browser/Core/Particles.js +212 -123
  8. package/browser/Core/Retina.js +5 -0
  9. package/browser/Core/Utils/Constants.js +2 -2
  10. package/browser/Core/Utils/EventListeners.js +69 -310
  11. package/browser/Core/Utils/Point.js +2 -0
  12. package/browser/Core/Utils/QuadTree.js +13 -8
  13. package/browser/Core/Utils/Ranges.js +4 -0
  14. package/browser/Core/Utils/Vectors.js +7 -4
  15. package/browser/Enums/Types/EasingType.js +18 -3
  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 +1 -0
  20. package/browser/Options/Classes/FullScreen/FullScreen.js +2 -0
  21. package/browser/Options/Classes/HslAnimation.js +3 -5
  22. package/browser/Options/Classes/Options.js +32 -78
  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 +4 -0
  26. package/browser/Options/Classes/Particles/Move/Move.js +18 -0
  27. package/browser/Options/Classes/Particles/Move/MoveAngle.js +2 -0
  28. package/browser/Options/Classes/Particles/Move/MoveAttract.js +3 -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 +19 -11
  40. package/browser/Options/Classes/Particles/Shape/Shape.js +4 -0
  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/{esm/Options/Classes/Interactivity/Events → browser/Options/Classes}/ResizeEvent.js +3 -1
  46. package/browser/Options/Classes/ValueWithRandom.js +3 -4
  47. package/browser/Utils/CanvasUtils.js +31 -106
  48. package/browser/Utils/ColorUtils.js +17 -2
  49. package/browser/Utils/EventDispatcher.js +1 -0
  50. package/browser/Utils/MathUtils.js +3 -2
  51. package/browser/Utils/Utils.js +53 -44
  52. package/browser/exports.js +1 -21
  53. package/cjs/Core/Canvas.js +238 -154
  54. package/cjs/Core/Container.js +111 -227
  55. package/cjs/Core/Engine.js +84 -124
  56. package/cjs/Core/Particle.js +236 -140
  57. package/cjs/Core/Particles.js +212 -123
  58. package/cjs/Core/Retina.js +5 -0
  59. package/cjs/Core/Utils/Constants.js +2 -2
  60. package/cjs/Core/Utils/EventListeners.js +69 -310
  61. package/cjs/Core/Utils/Point.js +2 -0
  62. package/cjs/Core/Utils/QuadTree.js +13 -8
  63. package/cjs/Core/Utils/Ranges.js +4 -0
  64. package/cjs/Core/Utils/Vectors.js +7 -4
  65. package/cjs/Enums/Types/EasingType.js +18 -3
  66. package/cjs/Options/Classes/AnimatableColor.js +1 -0
  67. package/cjs/Options/Classes/AnimationOptions.js +8 -0
  68. package/cjs/Options/Classes/Background/Background.js +6 -0
  69. package/cjs/Options/Classes/ColorAnimation.js +1 -0
  70. package/cjs/Options/Classes/FullScreen/FullScreen.js +2 -0
  71. package/cjs/Options/Classes/HslAnimation.js +3 -5
  72. package/cjs/Options/Classes/Options.js +32 -78
  73. package/cjs/Options/Classes/OptionsColor.js +1 -0
  74. package/cjs/Options/Classes/Particles/Bounce/ParticlesBounce.js +2 -0
  75. package/cjs/Options/Classes/Particles/Effect/Effect.js +4 -0
  76. package/cjs/Options/Classes/Particles/Move/Move.js +18 -0
  77. package/cjs/Options/Classes/Particles/Move/MoveAngle.js +2 -0
  78. package/cjs/Options/Classes/Particles/Move/MoveAttract.js +3 -0
  79. package/cjs/Options/Classes/Particles/Move/MoveCenter.js +4 -0
  80. package/cjs/Options/Classes/Particles/Move/MoveGravity.js +4 -0
  81. package/cjs/Options/Classes/Particles/Move/OutModes.js +5 -0
  82. package/cjs/Options/Classes/Particles/Move/Path/MovePath.js +5 -0
  83. package/cjs/Options/Classes/Particles/Move/Spin.js +3 -0
  84. package/cjs/Options/Classes/Particles/Number/ParticlesDensity.js +3 -0
  85. package/cjs/Options/Classes/Particles/Number/ParticlesNumber.js +3 -0
  86. package/cjs/Options/Classes/Particles/Number/ParticlesNumberLimit.js +2 -0
  87. package/cjs/Options/Classes/Particles/Opacity/Opacity.js +1 -0
  88. package/cjs/Options/Classes/Particles/Opacity/OpacityAnimation.js +1 -0
  89. package/cjs/Options/Classes/Particles/ParticlesOptions.js +19 -11
  90. package/cjs/Options/Classes/Particles/Shape/Shape.js +4 -0
  91. package/cjs/Options/Classes/Particles/Size/Size.js +1 -0
  92. package/cjs/Options/Classes/Particles/Size/SizeAnimation.js +1 -0
  93. package/cjs/Options/Classes/Particles/Stroke.js +3 -0
  94. package/cjs/Options/Classes/Particles/ZIndex/ZIndex.js +3 -0
  95. package/cjs/Options/Classes/{Interactivity/Events/ResizeEvent.js → ResizeEvent.js} +3 -1
  96. package/cjs/Options/Classes/ValueWithRandom.js +3 -4
  97. package/cjs/Utils/CanvasUtils.js +31 -106
  98. package/cjs/Utils/ColorUtils.js +17 -2
  99. package/cjs/Utils/EventDispatcher.js +1 -0
  100. package/cjs/Utils/MathUtils.js +3 -2
  101. package/cjs/Utils/Utils.js +53 -44
  102. package/cjs/exports.js +1 -21
  103. package/dist_browser_Core_Container_js.js +8 -18
  104. package/esm/Core/Canvas.js +238 -154
  105. package/esm/Core/Container.js +111 -227
  106. package/esm/Core/Engine.js +84 -124
  107. package/esm/Core/Particle.js +236 -140
  108. package/esm/Core/Particles.js +212 -123
  109. package/esm/Core/Retina.js +5 -0
  110. package/esm/Core/Utils/Constants.js +2 -2
  111. package/esm/Core/Utils/EventListeners.js +69 -310
  112. package/esm/Core/Utils/Point.js +2 -0
  113. package/esm/Core/Utils/QuadTree.js +13 -8
  114. package/esm/Core/Utils/Ranges.js +4 -0
  115. package/esm/Core/Utils/Vectors.js +7 -4
  116. package/esm/Enums/Types/EasingType.js +18 -3
  117. package/esm/Options/Classes/AnimatableColor.js +1 -0
  118. package/esm/Options/Classes/AnimationOptions.js +8 -0
  119. package/esm/Options/Classes/Background/Background.js +6 -0
  120. package/esm/Options/Classes/ColorAnimation.js +1 -0
  121. package/esm/Options/Classes/FullScreen/FullScreen.js +2 -0
  122. package/esm/Options/Classes/HslAnimation.js +3 -5
  123. package/esm/Options/Classes/Options.js +32 -78
  124. package/esm/Options/Classes/OptionsColor.js +1 -0
  125. package/esm/Options/Classes/Particles/Bounce/ParticlesBounce.js +2 -0
  126. package/esm/Options/Classes/Particles/Effect/Effect.js +4 -0
  127. package/esm/Options/Classes/Particles/Move/Move.js +18 -0
  128. package/esm/Options/Classes/Particles/Move/MoveAngle.js +2 -0
  129. package/esm/Options/Classes/Particles/Move/MoveAttract.js +3 -0
  130. package/esm/Options/Classes/Particles/Move/MoveCenter.js +4 -0
  131. package/esm/Options/Classes/Particles/Move/MoveGravity.js +4 -0
  132. package/esm/Options/Classes/Particles/Move/OutModes.js +5 -0
  133. package/esm/Options/Classes/Particles/Move/Path/MovePath.js +5 -0
  134. package/esm/Options/Classes/Particles/Move/Spin.js +3 -0
  135. package/esm/Options/Classes/Particles/Number/ParticlesDensity.js +3 -0
  136. package/esm/Options/Classes/Particles/Number/ParticlesNumber.js +3 -0
  137. package/esm/Options/Classes/Particles/Number/ParticlesNumberLimit.js +2 -0
  138. package/esm/Options/Classes/Particles/Opacity/Opacity.js +1 -0
  139. package/esm/Options/Classes/Particles/Opacity/OpacityAnimation.js +1 -0
  140. package/esm/Options/Classes/Particles/ParticlesOptions.js +19 -11
  141. package/esm/Options/Classes/Particles/Shape/Shape.js +4 -0
  142. package/esm/Options/Classes/Particles/Size/Size.js +1 -0
  143. package/esm/Options/Classes/Particles/Size/SizeAnimation.js +1 -0
  144. package/esm/Options/Classes/Particles/Stroke.js +3 -0
  145. package/esm/Options/Classes/Particles/ZIndex/ZIndex.js +3 -0
  146. package/{browser/Options/Classes/Interactivity/Events → esm/Options/Classes}/ResizeEvent.js +3 -1
  147. package/esm/Options/Classes/ValueWithRandom.js +3 -4
  148. package/esm/Utils/CanvasUtils.js +31 -106
  149. package/esm/Utils/ColorUtils.js +17 -2
  150. package/esm/Utils/EventDispatcher.js +1 -0
  151. package/esm/Utils/MathUtils.js +3 -2
  152. package/esm/Utils/Utils.js +53 -44
  153. package/esm/exports.js +1 -21
  154. package/package.json +1 -1
  155. package/report.html +3 -3
  156. package/scripts/install.js +219 -195
  157. package/tsparticles.engine.js +67 -247
  158. package/tsparticles.engine.min.js +2 -2
  159. package/types/Core/Canvas.d.ts +15 -4
  160. package/types/Core/Container.d.ts +5 -20
  161. package/types/Core/Engine.d.ts +18 -32
  162. package/types/Core/Interfaces/IColorManager.d.ts +0 -1
  163. package/types/Core/Interfaces/IContainerPlugin.d.ts +12 -2
  164. package/types/Core/Interfaces/IDrawParticleParams.d.ts +1 -1
  165. package/types/Core/Interfaces/IMovePathGenerator.d.ts +1 -2
  166. package/types/Core/Interfaces/IParticleOpacityData.d.ts +4 -0
  167. package/types/Core/Interfaces/IParticleRotateData.d.ts +4 -0
  168. package/types/Core/Interfaces/IParticleTransformValues.d.ts +4 -4
  169. package/types/Core/Interfaces/IParticleUpdater.d.ts +1 -1
  170. package/types/Core/Interfaces/IPlugin.d.ts +5 -1
  171. package/types/Core/Interfaces/IShapeDrawer.d.ts +0 -1
  172. package/types/Core/Particle.d.ts +13 -2
  173. package/types/Core/Particles.d.ts +17 -8
  174. package/types/Core/Utils/Constants.d.ts +2 -2
  175. package/types/Core/Utils/EventListeners.d.ts +0 -14
  176. package/types/Enums/Types/EasingType.d.ts +20 -5
  177. package/types/Options/Classes/HslAnimation.d.ts +3 -4
  178. package/types/Options/Classes/Options.d.ts +2 -11
  179. package/types/Options/Classes/Particles/ParticlesOptions.d.ts +0 -2
  180. package/types/Options/Classes/ResizeEvent.d.ts +9 -0
  181. package/types/Options/Classes/ValueWithRandom.d.ts +0 -1
  182. package/types/Options/Interfaces/IOptions.d.ts +2 -8
  183. package/types/Options/Interfaces/Particles/IParticlesOptions.d.ts +0 -3
  184. package/types/Types/CustomEventListener.d.ts +1 -1
  185. package/types/Types/EngineInitializers.d.ts +19 -0
  186. package/types/Utils/CanvasUtils.d.ts +6 -25
  187. package/types/Utils/EventDispatcher.d.ts +1 -1
  188. package/types/Utils/Utils.d.ts +5 -7
  189. package/types/export-types.d.ts +3 -19
  190. package/types/exports.d.ts +1 -21
  191. package/umd/Core/Canvas.js +236 -152
  192. package/umd/Core/Container.js +111 -227
  193. package/umd/Core/Engine.js +83 -123
  194. package/umd/Core/Particle.js +236 -140
  195. package/umd/Core/Particles.js +213 -124
  196. package/umd/Core/Retina.js +5 -0
  197. package/umd/Core/Utils/Constants.js +3 -3
  198. package/umd/Core/Utils/EventListeners.js +69 -310
  199. package/umd/Core/Utils/Point.js +2 -0
  200. package/umd/Core/Utils/QuadTree.js +13 -8
  201. package/umd/Core/Utils/Ranges.js +4 -0
  202. package/umd/Core/Utils/Vectors.js +7 -4
  203. package/umd/Enums/Types/EasingType.js +18 -3
  204. package/umd/Options/Classes/AnimatableColor.js +1 -0
  205. package/umd/Options/Classes/AnimationOptions.js +8 -0
  206. package/umd/Options/Classes/Background/Background.js +6 -0
  207. package/umd/Options/Classes/ColorAnimation.js +1 -0
  208. package/umd/Options/Classes/FullScreen/FullScreen.js +2 -0
  209. package/umd/Options/Classes/HslAnimation.js +3 -5
  210. package/umd/Options/Classes/Options.js +32 -78
  211. package/umd/Options/Classes/OptionsColor.js +1 -0
  212. package/umd/Options/Classes/Particles/Bounce/ParticlesBounce.js +2 -0
  213. package/umd/Options/Classes/Particles/Effect/Effect.js +4 -0
  214. package/umd/Options/Classes/Particles/Move/Move.js +18 -0
  215. package/umd/Options/Classes/Particles/Move/MoveAngle.js +2 -0
  216. package/umd/Options/Classes/Particles/Move/MoveAttract.js +3 -0
  217. package/umd/Options/Classes/Particles/Move/MoveCenter.js +4 -0
  218. package/umd/Options/Classes/Particles/Move/MoveGravity.js +4 -0
  219. package/umd/Options/Classes/Particles/Move/OutModes.js +5 -0
  220. package/umd/Options/Classes/Particles/Move/Path/MovePath.js +5 -0
  221. package/umd/Options/Classes/Particles/Move/Spin.js +3 -0
  222. package/umd/Options/Classes/Particles/Number/ParticlesDensity.js +3 -0
  223. package/umd/Options/Classes/Particles/Number/ParticlesNumber.js +3 -0
  224. package/umd/Options/Classes/Particles/Number/ParticlesNumberLimit.js +2 -0
  225. package/umd/Options/Classes/Particles/Opacity/Opacity.js +1 -0
  226. package/umd/Options/Classes/Particles/Opacity/OpacityAnimation.js +1 -0
  227. package/umd/Options/Classes/Particles/ParticlesOptions.js +19 -11
  228. package/umd/Options/Classes/Particles/Shape/Shape.js +4 -0
  229. package/umd/Options/Classes/Particles/Size/Size.js +1 -0
  230. package/umd/Options/Classes/Particles/Size/SizeAnimation.js +1 -0
  231. package/umd/Options/Classes/Particles/Stroke.js +3 -0
  232. package/umd/Options/Classes/Particles/ZIndex/ZIndex.js +3 -0
  233. package/umd/Options/Classes/{Interactivity/Events/ResizeEvent.js → ResizeEvent.js} +4 -2
  234. package/umd/Options/Classes/ValueWithRandom.js +3 -4
  235. package/umd/Utils/CanvasUtils.js +30 -108
  236. package/umd/Utils/ColorUtils.js +17 -2
  237. package/umd/Utils/EventDispatcher.js +1 -0
  238. package/umd/Utils/MathUtils.js +3 -2
  239. package/umd/Utils/Utils.js +55 -48
  240. package/umd/exports.js +2 -22
  241. package/638.min.js +0 -2
  242. package/638.min.js.LICENSE.txt +0 -1
  243. package/browser/Core/Utils/ExternalInteractorBase.js +0 -7
  244. package/browser/Core/Utils/InteractionManager.js +0 -60
  245. package/browser/Core/Utils/ParticlesInteractorBase.js +0 -7
  246. package/browser/Enums/InteractivityDetect.js +0 -6
  247. package/browser/Enums/Modes/ResponsiveMode.js +0 -5
  248. package/browser/Enums/Modes/ThemeMode.js +0 -6
  249. package/browser/Enums/Types/DivType.js +0 -5
  250. package/browser/Enums/Types/InteractorType.js +0 -5
  251. package/browser/Options/Classes/Interactivity/Events/ClickEvent.js +0 -18
  252. package/browser/Options/Classes/Interactivity/Events/DivEvent.js +0 -27
  253. package/browser/Options/Classes/Interactivity/Events/Events.js +0 -30
  254. package/browser/Options/Classes/Interactivity/Events/HoverEvent.js +0 -21
  255. package/browser/Options/Classes/Interactivity/Events/Parallax.js +0 -22
  256. package/browser/Options/Classes/Interactivity/Interactivity.js +0 -22
  257. package/browser/Options/Classes/Interactivity/Modes/Modes.js +0 -25
  258. package/browser/Options/Classes/ManualParticle.js +0 -21
  259. package/browser/Options/Classes/Responsive.js +0 -29
  260. package/browser/Options/Classes/Theme/Theme.js +0 -21
  261. package/browser/Options/Classes/Theme/ThemeDefault.js +0 -23
  262. package/browser/Options/Interfaces/Interactivity/Events/IEvents.js +0 -1
  263. package/browser/Options/Interfaces/Interactivity/Events/IHoverEvent.js +0 -1
  264. package/browser/Options/Interfaces/Interactivity/Events/IParallax.js +0 -1
  265. package/browser/Options/Interfaces/Interactivity/IInteractivity.js +0 -1
  266. package/browser/Options/Interfaces/Interactivity/Modes/IModeDiv.js +0 -1
  267. package/browser/Options/Interfaces/Interactivity/Modes/IModes.js +0 -1
  268. package/browser/Options/Interfaces/Theme/ITheme.js +0 -1
  269. package/browser/Options/Interfaces/Theme/IThemeDefault.js +0 -1
  270. package/cjs/Core/Interfaces/IContainerInteractivity.js +0 -1
  271. package/cjs/Core/Interfaces/IExternalInteractor.js +0 -1
  272. package/cjs/Core/Interfaces/IInteractor.js +0 -1
  273. package/cjs/Core/Interfaces/IMouseData.js +0 -1
  274. package/cjs/Core/Interfaces/IParticlesInteractor.js +0 -1
  275. package/cjs/Core/Utils/ExternalInteractorBase.js +0 -7
  276. package/cjs/Core/Utils/InteractionManager.js +0 -60
  277. package/cjs/Core/Utils/ParticlesInteractorBase.js +0 -7
  278. package/cjs/Enums/InteractivityDetect.js +0 -6
  279. package/cjs/Enums/Modes/ResponsiveMode.js +0 -5
  280. package/cjs/Enums/Modes/ThemeMode.js +0 -6
  281. package/cjs/Enums/Types/DivType.js +0 -5
  282. package/cjs/Enums/Types/InteractorType.js +0 -5
  283. package/cjs/Options/Classes/Interactivity/Events/ClickEvent.js +0 -18
  284. package/cjs/Options/Classes/Interactivity/Events/DivEvent.js +0 -27
  285. package/cjs/Options/Classes/Interactivity/Events/Events.js +0 -30
  286. package/cjs/Options/Classes/Interactivity/Events/HoverEvent.js +0 -21
  287. package/cjs/Options/Classes/Interactivity/Events/Parallax.js +0 -22
  288. package/cjs/Options/Classes/Interactivity/Interactivity.js +0 -22
  289. package/cjs/Options/Classes/Interactivity/Modes/Modes.js +0 -25
  290. package/cjs/Options/Classes/ManualParticle.js +0 -21
  291. package/cjs/Options/Classes/Responsive.js +0 -29
  292. package/cjs/Options/Classes/Theme/Theme.js +0 -21
  293. package/cjs/Options/Classes/Theme/ThemeDefault.js +0 -23
  294. package/cjs/Options/Interfaces/IManualParticle.js +0 -1
  295. package/cjs/Options/Interfaces/IResponsive.js +0 -1
  296. package/cjs/Options/Interfaces/Interactivity/Events/IClickEvent.js +0 -1
  297. package/cjs/Options/Interfaces/Interactivity/Events/IDivEvent.js +0 -1
  298. package/cjs/Options/Interfaces/Interactivity/Events/IEvents.js +0 -1
  299. package/cjs/Options/Interfaces/Interactivity/Events/IHoverEvent.js +0 -1
  300. package/cjs/Options/Interfaces/Interactivity/Events/IParallax.js +0 -1
  301. package/cjs/Options/Interfaces/Interactivity/IInteractivity.js +0 -1
  302. package/cjs/Options/Interfaces/Interactivity/Modes/IModeDiv.js +0 -1
  303. package/cjs/Options/Interfaces/Interactivity/Modes/IModes.js +0 -1
  304. package/cjs/Options/Interfaces/Theme/ITheme.js +0 -1
  305. package/cjs/Options/Interfaces/Theme/IThemeDefault.js +0 -1
  306. package/esm/Core/Interfaces/IContainerInteractivity.js +0 -1
  307. package/esm/Core/Interfaces/IExternalInteractor.js +0 -1
  308. package/esm/Core/Interfaces/IInteractor.js +0 -1
  309. package/esm/Core/Interfaces/IMouseData.js +0 -1
  310. package/esm/Core/Interfaces/IParticlesInteractor.js +0 -1
  311. package/esm/Core/Utils/ExternalInteractorBase.js +0 -7
  312. package/esm/Core/Utils/InteractionManager.js +0 -60
  313. package/esm/Core/Utils/ParticlesInteractorBase.js +0 -7
  314. package/esm/Enums/InteractivityDetect.js +0 -6
  315. package/esm/Enums/Modes/ResponsiveMode.js +0 -5
  316. package/esm/Enums/Modes/ThemeMode.js +0 -6
  317. package/esm/Enums/Types/DivType.js +0 -5
  318. package/esm/Enums/Types/InteractorType.js +0 -5
  319. package/esm/Options/Classes/Interactivity/Events/ClickEvent.js +0 -18
  320. package/esm/Options/Classes/Interactivity/Events/DivEvent.js +0 -27
  321. package/esm/Options/Classes/Interactivity/Events/Events.js +0 -30
  322. package/esm/Options/Classes/Interactivity/Events/HoverEvent.js +0 -21
  323. package/esm/Options/Classes/Interactivity/Events/Parallax.js +0 -22
  324. package/esm/Options/Classes/Interactivity/Interactivity.js +0 -22
  325. package/esm/Options/Classes/Interactivity/Modes/Modes.js +0 -25
  326. package/esm/Options/Classes/ManualParticle.js +0 -21
  327. package/esm/Options/Classes/Responsive.js +0 -29
  328. package/esm/Options/Classes/Theme/Theme.js +0 -21
  329. package/esm/Options/Classes/Theme/ThemeDefault.js +0 -23
  330. package/esm/Options/Interfaces/IManualParticle.js +0 -1
  331. package/esm/Options/Interfaces/IResponsive.js +0 -1
  332. package/esm/Options/Interfaces/Interactivity/Events/IClickEvent.js +0 -1
  333. package/esm/Options/Interfaces/Interactivity/Events/IDivEvent.js +0 -1
  334. package/esm/Options/Interfaces/Interactivity/Events/IEvents.js +0 -1
  335. package/esm/Options/Interfaces/Interactivity/Events/IHoverEvent.js +0 -1
  336. package/esm/Options/Interfaces/Interactivity/Events/IParallax.js +0 -1
  337. package/esm/Options/Interfaces/Interactivity/IInteractivity.js +0 -1
  338. package/esm/Options/Interfaces/Interactivity/Modes/IModeDiv.js +0 -1
  339. package/esm/Options/Interfaces/Interactivity/Modes/IModes.js +0 -1
  340. package/esm/Options/Interfaces/Theme/ITheme.js +0 -1
  341. package/esm/Options/Interfaces/Theme/IThemeDefault.js +0 -1
  342. package/tsparticles.engine.min.js.LICENSE.txt +0 -1
  343. package/types/Core/Interfaces/IContainerInteractivity.d.ts +0 -6
  344. package/types/Core/Interfaces/IExternalInteractor.d.ts +0 -12
  345. package/types/Core/Interfaces/IInteractor.d.ts +0 -16
  346. package/types/Core/Interfaces/IMouseData.d.ts +0 -9
  347. package/types/Core/Interfaces/IParticlesInteractor.d.ts +0 -7
  348. package/types/Core/Utils/ExternalInteractorBase.d.ts +0 -15
  349. package/types/Core/Utils/InteractionManager.d.ts +0 -17
  350. package/types/Core/Utils/ParticlesInteractorBase.d.ts +0 -15
  351. package/types/Enums/InteractivityDetect.d.ts +0 -5
  352. package/types/Enums/Modes/ResponsiveMode.d.ts +0 -4
  353. package/types/Enums/Modes/ThemeMode.d.ts +0 -5
  354. package/types/Enums/Types/DivType.d.ts +0 -4
  355. package/types/Enums/Types/InteractorType.d.ts +0 -4
  356. package/types/Options/Classes/Interactivity/Events/ClickEvent.d.ts +0 -10
  357. package/types/Options/Classes/Interactivity/Events/DivEvent.d.ts +0 -13
  358. package/types/Options/Classes/Interactivity/Events/Events.d.ts +0 -16
  359. package/types/Options/Classes/Interactivity/Events/HoverEvent.d.ts +0 -12
  360. package/types/Options/Classes/Interactivity/Events/Parallax.d.ts +0 -10
  361. package/types/Options/Classes/Interactivity/Events/ResizeEvent.d.ts +0 -9
  362. package/types/Options/Classes/Interactivity/Interactivity.d.ts +0 -16
  363. package/types/Options/Classes/Interactivity/Modes/Modes.d.ts +0 -12
  364. package/types/Options/Classes/ManualParticle.d.ts +0 -10
  365. package/types/Options/Classes/Responsive.d.ts +0 -12
  366. package/types/Options/Classes/Theme/Theme.d.ts +0 -12
  367. package/types/Options/Classes/Theme/ThemeDefault.d.ts +0 -11
  368. package/types/Options/Interfaces/IManualParticle.d.ts +0 -7
  369. package/types/Options/Interfaces/IResponsive.d.ts +0 -7
  370. package/types/Options/Interfaces/Interactivity/Events/IClickEvent.d.ts +0 -5
  371. package/types/Options/Interfaces/Interactivity/Events/IDivEvent.d.ts +0 -8
  372. package/types/Options/Interfaces/Interactivity/Events/IEvents.d.ts +0 -11
  373. package/types/Options/Interfaces/Interactivity/Events/IHoverEvent.d.ts +0 -7
  374. package/types/Options/Interfaces/Interactivity/Events/IParallax.d.ts +0 -5
  375. package/types/Options/Interfaces/Interactivity/IInteractivity.d.ts +0 -9
  376. package/types/Options/Interfaces/Interactivity/Modes/IModeDiv.d.ts +0 -4
  377. package/types/Options/Interfaces/Interactivity/Modes/IModes.d.ts +0 -1
  378. package/types/Options/Interfaces/Theme/ITheme.d.ts +0 -7
  379. package/types/Options/Interfaces/Theme/IThemeDefault.d.ts +0 -6
  380. package/umd/Core/Interfaces/IMouseData.js +0 -12
  381. package/umd/Core/Interfaces/IParticlesInteractor.js +0 -12
  382. package/umd/Core/Utils/ExternalInteractorBase.js +0 -21
  383. package/umd/Core/Utils/InteractionManager.js +0 -74
  384. package/umd/Core/Utils/ParticlesInteractorBase.js +0 -21
  385. package/umd/Enums/InteractivityDetect.js +0 -19
  386. package/umd/Enums/Modes/ResponsiveMode.js +0 -18
  387. package/umd/Enums/Modes/ThemeMode.js +0 -19
  388. package/umd/Enums/Types/DivType.js +0 -18
  389. package/umd/Enums/Types/InteractorType.js +0 -18
  390. package/umd/Options/Classes/Interactivity/Events/ClickEvent.js +0 -32
  391. package/umd/Options/Classes/Interactivity/Events/DivEvent.js +0 -41
  392. package/umd/Options/Classes/Interactivity/Events/Events.js +0 -44
  393. package/umd/Options/Classes/Interactivity/Events/HoverEvent.js +0 -35
  394. package/umd/Options/Classes/Interactivity/Events/Parallax.js +0 -36
  395. package/umd/Options/Classes/Interactivity/Interactivity.js +0 -36
  396. package/umd/Options/Classes/Interactivity/Modes/Modes.js +0 -39
  397. package/umd/Options/Classes/ManualParticle.js +0 -35
  398. package/umd/Options/Classes/Responsive.js +0 -43
  399. package/umd/Options/Classes/Theme/Theme.js +0 -35
  400. package/umd/Options/Classes/Theme/ThemeDefault.js +0 -37
  401. package/umd/Options/Interfaces/IManualParticle.js +0 -12
  402. package/umd/Options/Interfaces/IResponsive.js +0 -12
  403. package/umd/Options/Interfaces/Interactivity/Events/IClickEvent.js +0 -12
  404. package/umd/Options/Interfaces/Interactivity/Events/IDivEvent.js +0 -12
  405. package/umd/Options/Interfaces/Interactivity/Events/IEvents.js +0 -12
  406. package/umd/Options/Interfaces/Interactivity/Events/IHoverEvent.js +0 -12
  407. package/umd/Options/Interfaces/Interactivity/Events/IParallax.js +0 -12
  408. package/umd/Options/Interfaces/Interactivity/IInteractivity.js +0 -12
  409. package/umd/Options/Interfaces/Interactivity/Modes/IModeDiv.js +0 -12
  410. package/umd/Options/Interfaces/Interactivity/Modes/IModes.js +0 -12
  411. package/umd/Options/Interfaces/Theme/ITheme.js +0 -12
  412. package/umd/Options/Interfaces/Theme/IThemeDefault.js +0 -12
  413. /package/browser/Core/Interfaces/{IContainerInteractivity.js → IParticleOpacityData.js} +0 -0
  414. /package/browser/Core/Interfaces/{IExternalInteractor.js → IParticleRotateData.js} +0 -0
  415. /package/browser/Options/Interfaces/{Interactivity/Events/IResizeEvent.js → IResizeEvent.js} +0 -0
  416. /package/browser/{Core/Interfaces/IInteractor.js → Types/EngineInitializers.js} +0 -0
  417. /package/{browser/Core/Interfaces/IMouseData.js → cjs/Core/Interfaces/IParticleOpacityData.js} +0 -0
  418. /package/{browser/Core/Interfaces/IParticlesInteractor.js → cjs/Core/Interfaces/IParticleRotateData.js} +0 -0
  419. /package/cjs/Options/Interfaces/{Interactivity/Events/IResizeEvent.js → IResizeEvent.js} +0 -0
  420. /package/{browser/Options/Interfaces/IManualParticle.js → cjs/Types/EngineInitializers.js} +0 -0
  421. /package/{browser/Options/Interfaces/IResponsive.js → esm/Core/Interfaces/IParticleOpacityData.js} +0 -0
  422. /package/{browser/Options/Interfaces/Interactivity/Events/IClickEvent.js → esm/Core/Interfaces/IParticleRotateData.js} +0 -0
  423. /package/esm/Options/Interfaces/{Interactivity/Events/IResizeEvent.js → IResizeEvent.js} +0 -0
  424. /package/{browser/Options/Interfaces/Interactivity/Events/IDivEvent.js → esm/Types/EngineInitializers.js} +0 -0
  425. /package/types/Options/Interfaces/{Interactivity/Events/IResizeEvent.d.ts → IResizeEvent.d.ts} +0 -0
  426. /package/umd/Core/Interfaces/{IContainerInteractivity.js → IParticleOpacityData.js} +0 -0
  427. /package/umd/Core/Interfaces/{IExternalInteractor.js → IParticleRotateData.js} +0 -0
  428. /package/umd/Options/Interfaces/{Interactivity/Events/IResizeEvent.js → IResizeEvent.js} +0 -0
  429. /package/umd/{Core/Interfaces/IInteractor.js → Types/EngineInitializers.js} +0 -0
@@ -1,22 +0,0 @@
1
- import { Events } from "./Events/Events.js";
2
- import { InteractivityDetect } from "../../../Enums/InteractivityDetect.js";
3
- import { Modes } from "./Modes/Modes.js";
4
- import { isNull } from "../../../Utils/TypeUtils.js";
5
- export class Interactivity {
6
- constructor(engine, container) {
7
- this.detectsOn = InteractivityDetect.window;
8
- this.events = new Events();
9
- this.modes = new Modes(engine, container);
10
- }
11
- load(data) {
12
- if (isNull(data)) {
13
- return;
14
- }
15
- const detectsOn = data.detectsOn;
16
- if (detectsOn !== undefined) {
17
- this.detectsOn = detectsOn;
18
- }
19
- this.events.load(data.events);
20
- this.modes.load(data.modes);
21
- }
22
- }
@@ -1,25 +0,0 @@
1
- import { isNull } from "../../../../Utils/TypeUtils.js";
2
- export class Modes {
3
- constructor(engine, container) {
4
- this._engine = engine;
5
- this._container = container;
6
- }
7
- load(data) {
8
- if (isNull(data)) {
9
- return;
10
- }
11
- if (!this._container) {
12
- return;
13
- }
14
- const interactors = this._engine.interactors.get(this._container);
15
- if (!interactors) {
16
- return;
17
- }
18
- for (const interactor of interactors) {
19
- if (!interactor.loadModeOptions) {
20
- continue;
21
- }
22
- interactor.loadModeOptions(this, data);
23
- }
24
- }
25
- }
@@ -1,21 +0,0 @@
1
- import { PixelMode } from "../../Enums/Modes/PixelMode.js";
2
- import { deepExtend } from "../../Utils/Utils.js";
3
- import { isNull } from "../../Utils/TypeUtils.js";
4
- import { manualDefaultPosition } from "../../Core/Utils/Constants.js";
5
- export class ManualParticle {
6
- load(data) {
7
- if (isNull(data)) {
8
- return;
9
- }
10
- if (data.position) {
11
- this.position = {
12
- x: data.position.x ?? manualDefaultPosition,
13
- y: data.position.y ?? manualDefaultPosition,
14
- mode: data.position.mode ?? PixelMode.percent,
15
- };
16
- }
17
- if (data.options) {
18
- this.options = deepExtend({}, data.options);
19
- }
20
- }
21
- }
@@ -1,29 +0,0 @@
1
- import { ResponsiveMode } from "../../Enums/Modes/ResponsiveMode.js";
2
- import { deepExtend } from "../../Utils/Utils.js";
3
- import { isNull } from "../../Utils/TypeUtils.js";
4
- export class Responsive {
5
- constructor() {
6
- this.maxWidth = Infinity;
7
- this.options = {};
8
- this.mode = ResponsiveMode.canvas;
9
- }
10
- load(data) {
11
- if (isNull(data)) {
12
- return;
13
- }
14
- if (!isNull(data.maxWidth)) {
15
- this.maxWidth = data.maxWidth;
16
- }
17
- if (!isNull(data.mode)) {
18
- if (data.mode === ResponsiveMode.screen) {
19
- this.mode = ResponsiveMode.screen;
20
- }
21
- else {
22
- this.mode = ResponsiveMode.canvas;
23
- }
24
- }
25
- if (!isNull(data.options)) {
26
- this.options = deepExtend({}, data.options);
27
- }
28
- }
29
- }
@@ -1,21 +0,0 @@
1
- import { ThemeDefault } from "./ThemeDefault.js";
2
- import { deepExtend } from "../../../Utils/Utils.js";
3
- import { isNull } from "../../../Utils/TypeUtils.js";
4
- export class Theme {
5
- constructor() {
6
- this.name = "";
7
- this.default = new ThemeDefault();
8
- }
9
- load(data) {
10
- if (isNull(data)) {
11
- return;
12
- }
13
- if (data.name !== undefined) {
14
- this.name = data.name;
15
- }
16
- this.default.load(data.default);
17
- if (data.options !== undefined) {
18
- this.options = deepExtend({}, data.options);
19
- }
20
- }
21
- }
@@ -1,23 +0,0 @@
1
- import { ThemeMode } from "../../../Enums/Modes/ThemeMode.js";
2
- import { isNull } from "../../../Utils/TypeUtils.js";
3
- export class ThemeDefault {
4
- constructor() {
5
- this.auto = false;
6
- this.mode = ThemeMode.any;
7
- this.value = false;
8
- }
9
- load(data) {
10
- if (isNull(data)) {
11
- return;
12
- }
13
- if (data.auto !== undefined) {
14
- this.auto = data.auto;
15
- }
16
- if (data.mode !== undefined) {
17
- this.mode = data.mode;
18
- }
19
- if (data.value !== undefined) {
20
- this.value = data.value;
21
- }
22
- }
23
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,7 +0,0 @@
1
- import { InteractorType } from "../../Enums/Types/InteractorType.js";
2
- export class ExternalInteractorBase {
3
- constructor(container) {
4
- this.type = InteractorType.external;
5
- this.container = container;
6
- }
7
- }
@@ -1,60 +0,0 @@
1
- import { InteractorType } from "../../Enums/Types/InteractorType.js";
2
- export class InteractionManager {
3
- constructor(engine, container) {
4
- this.container = container;
5
- this._engine = engine;
6
- this._interactors = [];
7
- this._externalInteractors = [];
8
- this._particleInteractors = [];
9
- }
10
- externalInteract(delta) {
11
- for (const interactor of this._externalInteractors) {
12
- if (interactor.isEnabled()) {
13
- interactor.interact(delta);
14
- }
15
- }
16
- }
17
- handleClickMode(mode) {
18
- for (const interactor of this._externalInteractors) {
19
- interactor.handleClickMode?.(mode);
20
- }
21
- }
22
- async init() {
23
- this._interactors = await this._engine.getInteractors(this.container, true);
24
- this._externalInteractors = [];
25
- this._particleInteractors = [];
26
- for (const interactor of this._interactors) {
27
- switch (interactor.type) {
28
- case InteractorType.external:
29
- this._externalInteractors.push(interactor);
30
- break;
31
- case InteractorType.particles:
32
- this._particleInteractors.push(interactor);
33
- break;
34
- }
35
- interactor.init();
36
- }
37
- }
38
- particlesInteract(particle, delta) {
39
- for (const interactor of this._externalInteractors) {
40
- interactor.clear(particle, delta);
41
- }
42
- for (const interactor of this._particleInteractors) {
43
- if (interactor.isEnabled(particle)) {
44
- interactor.interact(particle, delta);
45
- }
46
- }
47
- }
48
- reset(particle) {
49
- for (const interactor of this._externalInteractors) {
50
- if (interactor.isEnabled()) {
51
- interactor.reset(particle);
52
- }
53
- }
54
- for (const interactor of this._particleInteractors) {
55
- if (interactor.isEnabled(particle)) {
56
- interactor.reset(particle);
57
- }
58
- }
59
- }
60
- }
@@ -1,7 +0,0 @@
1
- import { InteractorType } from "../../Enums/Types/InteractorType.js";
2
- export class ParticlesInteractorBase {
3
- constructor(container) {
4
- this.type = InteractorType.particles;
5
- this.container = container;
6
- }
7
- }
@@ -1,6 +0,0 @@
1
- export var InteractivityDetect;
2
- (function (InteractivityDetect) {
3
- InteractivityDetect["canvas"] = "canvas";
4
- InteractivityDetect["parent"] = "parent";
5
- InteractivityDetect["window"] = "window";
6
- })(InteractivityDetect || (InteractivityDetect = {}));
@@ -1,5 +0,0 @@
1
- export var ResponsiveMode;
2
- (function (ResponsiveMode) {
3
- ResponsiveMode["screen"] = "screen";
4
- ResponsiveMode["canvas"] = "canvas";
5
- })(ResponsiveMode || (ResponsiveMode = {}));
@@ -1,6 +0,0 @@
1
- export var ThemeMode;
2
- (function (ThemeMode) {
3
- ThemeMode["any"] = "any";
4
- ThemeMode["dark"] = "dark";
5
- ThemeMode["light"] = "light";
6
- })(ThemeMode || (ThemeMode = {}));
@@ -1,5 +0,0 @@
1
- export var DivType;
2
- (function (DivType) {
3
- DivType["circle"] = "circle";
4
- DivType["rectangle"] = "rectangle";
5
- })(DivType || (DivType = {}));
@@ -1,5 +0,0 @@
1
- export var InteractorType;
2
- (function (InteractorType) {
3
- InteractorType["external"] = "external";
4
- InteractorType["particles"] = "particles";
5
- })(InteractorType || (InteractorType = {}));
@@ -1,18 +0,0 @@
1
- import { isNull } from "../../../../Utils/TypeUtils.js";
2
- export class ClickEvent {
3
- constructor() {
4
- this.enable = false;
5
- this.mode = [];
6
- }
7
- load(data) {
8
- if (isNull(data)) {
9
- return;
10
- }
11
- if (data.enable !== undefined) {
12
- this.enable = data.enable;
13
- }
14
- if (data.mode !== undefined) {
15
- this.mode = data.mode;
16
- }
17
- }
18
- }
@@ -1,27 +0,0 @@
1
- import { DivType } from "../../../../Enums/Types/DivType.js";
2
- import { isNull } from "../../../../Utils/TypeUtils.js";
3
- export class DivEvent {
4
- constructor() {
5
- this.selectors = [];
6
- this.enable = false;
7
- this.mode = [];
8
- this.type = DivType.circle;
9
- }
10
- load(data) {
11
- if (isNull(data)) {
12
- return;
13
- }
14
- if (data.selectors !== undefined) {
15
- this.selectors = data.selectors;
16
- }
17
- if (data.enable !== undefined) {
18
- this.enable = data.enable;
19
- }
20
- if (data.mode !== undefined) {
21
- this.mode = data.mode;
22
- }
23
- if (data.type !== undefined) {
24
- this.type = data.type;
25
- }
26
- }
27
- }
@@ -1,30 +0,0 @@
1
- import { ClickEvent } from "./ClickEvent.js";
2
- import { DivEvent } from "./DivEvent.js";
3
- import { HoverEvent } from "./HoverEvent.js";
4
- import { ResizeEvent } from "./ResizeEvent.js";
5
- import { executeOnSingleOrMultiple } from "../../../../Utils/Utils.js";
6
- import { isNull } from "../../../../Utils/TypeUtils.js";
7
- export class Events {
8
- constructor() {
9
- this.onClick = new ClickEvent();
10
- this.onDiv = new DivEvent();
11
- this.onHover = new HoverEvent();
12
- this.resize = new ResizeEvent();
13
- }
14
- load(data) {
15
- if (isNull(data)) {
16
- return;
17
- }
18
- this.onClick.load(data.onClick);
19
- const onDiv = data.onDiv;
20
- if (onDiv !== undefined) {
21
- this.onDiv = executeOnSingleOrMultiple(onDiv, t => {
22
- const tmp = new DivEvent();
23
- tmp.load(t);
24
- return tmp;
25
- });
26
- }
27
- this.onHover.load(data.onHover);
28
- this.resize.load(data.resize);
29
- }
30
- }
@@ -1,21 +0,0 @@
1
- import { Parallax } from "./Parallax.js";
2
- import { isNull } from "../../../../Utils/TypeUtils.js";
3
- export class HoverEvent {
4
- constructor() {
5
- this.enable = false;
6
- this.mode = [];
7
- this.parallax = new Parallax();
8
- }
9
- load(data) {
10
- if (isNull(data)) {
11
- return;
12
- }
13
- if (data.enable !== undefined) {
14
- this.enable = data.enable;
15
- }
16
- if (data.mode !== undefined) {
17
- this.mode = data.mode;
18
- }
19
- this.parallax.load(data.parallax);
20
- }
21
- }
@@ -1,22 +0,0 @@
1
- import { isNull } from "../../../../Utils/TypeUtils.js";
2
- export class Parallax {
3
- constructor() {
4
- this.enable = false;
5
- this.force = 2;
6
- this.smooth = 10;
7
- }
8
- load(data) {
9
- if (isNull(data)) {
10
- return;
11
- }
12
- if (data.enable !== undefined) {
13
- this.enable = data.enable;
14
- }
15
- if (data.force !== undefined) {
16
- this.force = data.force;
17
- }
18
- if (data.smooth !== undefined) {
19
- this.smooth = data.smooth;
20
- }
21
- }
22
- }
@@ -1,22 +0,0 @@
1
- import { Events } from "./Events/Events.js";
2
- import { InteractivityDetect } from "../../../Enums/InteractivityDetect.js";
3
- import { Modes } from "./Modes/Modes.js";
4
- import { isNull } from "../../../Utils/TypeUtils.js";
5
- export class Interactivity {
6
- constructor(engine, container) {
7
- this.detectsOn = InteractivityDetect.window;
8
- this.events = new Events();
9
- this.modes = new Modes(engine, container);
10
- }
11
- load(data) {
12
- if (isNull(data)) {
13
- return;
14
- }
15
- const detectsOn = data.detectsOn;
16
- if (detectsOn !== undefined) {
17
- this.detectsOn = detectsOn;
18
- }
19
- this.events.load(data.events);
20
- this.modes.load(data.modes);
21
- }
22
- }
@@ -1,25 +0,0 @@
1
- import { isNull } from "../../../../Utils/TypeUtils.js";
2
- export class Modes {
3
- constructor(engine, container) {
4
- this._engine = engine;
5
- this._container = container;
6
- }
7
- load(data) {
8
- if (isNull(data)) {
9
- return;
10
- }
11
- if (!this._container) {
12
- return;
13
- }
14
- const interactors = this._engine.interactors.get(this._container);
15
- if (!interactors) {
16
- return;
17
- }
18
- for (const interactor of interactors) {
19
- if (!interactor.loadModeOptions) {
20
- continue;
21
- }
22
- interactor.loadModeOptions(this, data);
23
- }
24
- }
25
- }
@@ -1,21 +0,0 @@
1
- import { PixelMode } from "../../Enums/Modes/PixelMode.js";
2
- import { deepExtend } from "../../Utils/Utils.js";
3
- import { isNull } from "../../Utils/TypeUtils.js";
4
- import { manualDefaultPosition } from "../../Core/Utils/Constants.js";
5
- export class ManualParticle {
6
- load(data) {
7
- if (isNull(data)) {
8
- return;
9
- }
10
- if (data.position) {
11
- this.position = {
12
- x: data.position.x ?? manualDefaultPosition,
13
- y: data.position.y ?? manualDefaultPosition,
14
- mode: data.position.mode ?? PixelMode.percent,
15
- };
16
- }
17
- if (data.options) {
18
- this.options = deepExtend({}, data.options);
19
- }
20
- }
21
- }
@@ -1,29 +0,0 @@
1
- import { ResponsiveMode } from "../../Enums/Modes/ResponsiveMode.js";
2
- import { deepExtend } from "../../Utils/Utils.js";
3
- import { isNull } from "../../Utils/TypeUtils.js";
4
- export class Responsive {
5
- constructor() {
6
- this.maxWidth = Infinity;
7
- this.options = {};
8
- this.mode = ResponsiveMode.canvas;
9
- }
10
- load(data) {
11
- if (isNull(data)) {
12
- return;
13
- }
14
- if (!isNull(data.maxWidth)) {
15
- this.maxWidth = data.maxWidth;
16
- }
17
- if (!isNull(data.mode)) {
18
- if (data.mode === ResponsiveMode.screen) {
19
- this.mode = ResponsiveMode.screen;
20
- }
21
- else {
22
- this.mode = ResponsiveMode.canvas;
23
- }
24
- }
25
- if (!isNull(data.options)) {
26
- this.options = deepExtend({}, data.options);
27
- }
28
- }
29
- }
@@ -1,21 +0,0 @@
1
- import { ThemeDefault } from "./ThemeDefault.js";
2
- import { deepExtend } from "../../../Utils/Utils.js";
3
- import { isNull } from "../../../Utils/TypeUtils.js";
4
- export class Theme {
5
- constructor() {
6
- this.name = "";
7
- this.default = new ThemeDefault();
8
- }
9
- load(data) {
10
- if (isNull(data)) {
11
- return;
12
- }
13
- if (data.name !== undefined) {
14
- this.name = data.name;
15
- }
16
- this.default.load(data.default);
17
- if (data.options !== undefined) {
18
- this.options = deepExtend({}, data.options);
19
- }
20
- }
21
- }
@@ -1,23 +0,0 @@
1
- import { ThemeMode } from "../../../Enums/Modes/ThemeMode.js";
2
- import { isNull } from "../../../Utils/TypeUtils.js";
3
- export class ThemeDefault {
4
- constructor() {
5
- this.auto = false;
6
- this.mode = ThemeMode.any;
7
- this.value = false;
8
- }
9
- load(data) {
10
- if (isNull(data)) {
11
- return;
12
- }
13
- if (data.auto !== undefined) {
14
- this.auto = data.auto;
15
- }
16
- if (data.mode !== undefined) {
17
- this.mode = data.mode;
18
- }
19
- if (data.value !== undefined) {
20
- this.value = data.value;
21
- }
22
- }
23
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- /*! tsParticles Engine v4.0.0-alpha.0 by Matteo Bruni */
@@ -1,6 +0,0 @@
1
- import type { IMouseData } from "./IMouseData.js";
2
- export interface IContainerInteractivity {
3
- element?: HTMLElement | Window | Node | null;
4
- mouse: IMouseData;
5
- status?: string;
6
- }