tsparticles 1.36.0 → 1.37.3

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 (299) hide show
  1. package/Core/Container.d.ts +3 -1
  2. package/Core/Container.js +16 -11
  3. package/Core/InteractionManager.d.ts +1 -0
  4. package/Core/InteractionManager.js +4 -1
  5. package/Core/Particles.d.ts +1 -1
  6. package/Core/Particles.js +3 -1
  7. package/Enums/Modes/ResponsiveMode.d.ts +4 -0
  8. package/Enums/Modes/ResponsiveMode.js +8 -0
  9. package/Enums/Modes/index.d.ts +1 -0
  10. package/Enums/Modes/index.js +1 -0
  11. package/Interactions/External/Attract/index.d.ts +1 -1
  12. package/Interactions/External/Attract/index.js +2 -2
  13. package/Interactions/External/Bounce/index.d.ts +1 -1
  14. package/Interactions/External/Bounce/index.js +2 -2
  15. package/Interactions/External/Bubble/index.d.ts +1 -1
  16. package/Interactions/External/Bubble/index.js +2 -2
  17. package/Interactions/External/Connect/index.d.ts +1 -1
  18. package/Interactions/External/Connect/index.js +2 -2
  19. package/Interactions/External/Grab/index.d.ts +1 -1
  20. package/Interactions/External/Grab/index.js +2 -2
  21. package/Interactions/External/Repulse/index.d.ts +1 -1
  22. package/Interactions/External/Repulse/index.js +2 -2
  23. package/Interactions/External/Trail/index.d.ts +1 -1
  24. package/Interactions/External/Trail/index.js +2 -2
  25. package/Interactions/Particles/Attract/index.d.ts +1 -1
  26. package/Interactions/Particles/Attract/index.js +2 -2
  27. package/Interactions/Particles/Collisions/index.d.ts +1 -1
  28. package/Interactions/Particles/Collisions/index.js +2 -2
  29. package/Interactions/Particles/Links/index.d.ts +2 -2
  30. package/Interactions/Particles/Links/index.js +5 -5
  31. package/Interactions/Particles/Links/plugin.d.ts +1 -1
  32. package/Interactions/Particles/Links/plugin.js +2 -2
  33. package/Options/Classes/FullScreen/FullScreen.js +2 -2
  34. package/Options/Classes/Interactivity/Interactivity.js +1 -1
  35. package/Options/Classes/Options.js +3 -1
  36. package/Options/Classes/Responsive.d.ts +2 -0
  37. package/Options/Classes/Responsive.js +10 -0
  38. package/Options/Interfaces/IResponsive.d.ts +2 -0
  39. package/Plugins/Absorbers/AbsorberInstance.d.ts +2 -1
  40. package/Plugins/Absorbers/AbsorberInstance.js +21 -9
  41. package/Plugins/Absorbers/Options/Classes/AbsorberSize.d.ts +2 -1
  42. package/Plugins/Absorbers/Options/Classes/AbsorberSize.js +6 -4
  43. package/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.d.ts +9 -0
  44. package/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.js +21 -0
  45. package/Plugins/Absorbers/Options/Interfaces/IAbsorberSize.d.ts +3 -2
  46. package/Plugins/Absorbers/Options/Interfaces/IAbsorberSizeLimit.d.ts +4 -0
  47. package/Plugins/Absorbers/Options/Interfaces/IAbsorberSizeLimit.js +2 -0
  48. package/Plugins/Absorbers/plugin.d.ts +1 -1
  49. package/Plugins/Absorbers/plugin.js +2 -2
  50. package/Plugins/Emitters/plugin.d.ts +1 -1
  51. package/Plugins/Emitters/plugin.js +2 -2
  52. package/Plugins/PolygonMask/plugin.js +1 -1
  53. package/Shapes/Circle/index.d.ts +1 -1
  54. package/Shapes/Circle/index.js +2 -2
  55. package/Shapes/Image/index.d.ts +1 -1
  56. package/Shapes/Image/index.js +3 -3
  57. package/Shapes/Line/index.d.ts +1 -1
  58. package/Shapes/Line/index.js +2 -2
  59. package/Shapes/Polygon/index.d.ts +3 -3
  60. package/Shapes/Polygon/index.js +7 -7
  61. package/Shapes/Square/index.d.ts +1 -1
  62. package/Shapes/Square/index.js +3 -3
  63. package/Shapes/Star/index.d.ts +1 -1
  64. package/Shapes/Star/index.js +2 -2
  65. package/Shapes/Text/index.d.ts +1 -1
  66. package/Shapes/Text/index.js +2 -2
  67. package/Updaters/Angle/index.d.ts +1 -1
  68. package/Updaters/Angle/index.js +2 -2
  69. package/Updaters/Color/index.d.ts +1 -1
  70. package/Updaters/Color/index.js +2 -2
  71. package/Updaters/Life/index.d.ts +1 -1
  72. package/Updaters/Life/index.js +2 -2
  73. package/Updaters/Opacity/index.d.ts +1 -1
  74. package/Updaters/Opacity/index.js +2 -2
  75. package/Updaters/OutModes/index.d.ts +1 -1
  76. package/Updaters/OutModes/index.js +2 -2
  77. package/Updaters/Roll/index.d.ts +1 -1
  78. package/Updaters/Roll/index.js +2 -2
  79. package/Updaters/Size/index.d.ts +1 -1
  80. package/Updaters/Size/index.js +2 -2
  81. package/Updaters/StrokeColor/index.d.ts +1 -1
  82. package/Updaters/StrokeColor/index.js +2 -2
  83. package/Updaters/Tilt/index.d.ts +1 -1
  84. package/Updaters/Tilt/index.js +2 -2
  85. package/Updaters/Wobble/index.d.ts +1 -1
  86. package/Updaters/Wobble/index.js +2 -2
  87. package/Utils/Plugins.d.ts +2 -2
  88. package/Utils/Plugins.js +4 -4
  89. package/Utils/Utils.d.ts +1 -2
  90. package/browser/Core/Container.d.ts +3 -1
  91. package/browser/Core/Container.js +17 -12
  92. package/browser/Core/InteractionManager.d.ts +1 -0
  93. package/browser/Core/InteractionManager.js +4 -1
  94. package/browser/Core/Particles.d.ts +1 -1
  95. package/browser/Core/Particles.js +3 -1
  96. package/browser/Enums/Modes/ResponsiveMode.d.ts +4 -0
  97. package/browser/Enums/Modes/ResponsiveMode.js +5 -0
  98. package/browser/Enums/Modes/index.d.ts +1 -0
  99. package/browser/Enums/Modes/index.js +1 -0
  100. package/browser/Interactions/External/Attract/index.d.ts +1 -1
  101. package/browser/Interactions/External/Attract/index.js +2 -2
  102. package/browser/Interactions/External/Bounce/index.d.ts +1 -1
  103. package/browser/Interactions/External/Bounce/index.js +2 -2
  104. package/browser/Interactions/External/Bubble/index.d.ts +1 -1
  105. package/browser/Interactions/External/Bubble/index.js +2 -2
  106. package/browser/Interactions/External/Connect/index.d.ts +1 -1
  107. package/browser/Interactions/External/Connect/index.js +2 -2
  108. package/browser/Interactions/External/Grab/index.d.ts +1 -1
  109. package/browser/Interactions/External/Grab/index.js +2 -2
  110. package/browser/Interactions/External/Repulse/index.d.ts +1 -1
  111. package/browser/Interactions/External/Repulse/index.js +2 -2
  112. package/browser/Interactions/External/Trail/index.d.ts +1 -1
  113. package/browser/Interactions/External/Trail/index.js +2 -2
  114. package/browser/Interactions/Particles/Attract/index.d.ts +1 -1
  115. package/browser/Interactions/Particles/Attract/index.js +2 -2
  116. package/browser/Interactions/Particles/Collisions/index.d.ts +1 -1
  117. package/browser/Interactions/Particles/Collisions/index.js +2 -2
  118. package/browser/Interactions/Particles/Links/index.d.ts +2 -2
  119. package/browser/Interactions/Particles/Links/index.js +5 -5
  120. package/browser/Interactions/Particles/Links/plugin.d.ts +1 -1
  121. package/browser/Interactions/Particles/Links/plugin.js +2 -2
  122. package/browser/Options/Classes/FullScreen/FullScreen.js +2 -2
  123. package/browser/Options/Classes/Interactivity/Interactivity.js +1 -1
  124. package/browser/Options/Classes/Options.js +4 -2
  125. package/browser/Options/Classes/Responsive.d.ts +2 -0
  126. package/browser/Options/Classes/Responsive.js +11 -0
  127. package/browser/Options/Interfaces/IResponsive.d.ts +2 -0
  128. package/browser/Plugins/Absorbers/AbsorberInstance.d.ts +2 -1
  129. package/browser/Plugins/Absorbers/AbsorberInstance.js +21 -9
  130. package/browser/Plugins/Absorbers/Options/Classes/AbsorberSize.d.ts +2 -1
  131. package/browser/Plugins/Absorbers/Options/Classes/AbsorberSize.js +6 -4
  132. package/browser/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.d.ts +9 -0
  133. package/browser/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.js +17 -0
  134. package/browser/Plugins/Absorbers/Options/Interfaces/IAbsorberSize.d.ts +3 -2
  135. package/browser/Plugins/Absorbers/Options/Interfaces/IAbsorberSizeLimit.d.ts +4 -0
  136. package/browser/Plugins/Absorbers/Options/Interfaces/IAbsorberSizeLimit.js +1 -0
  137. package/browser/Plugins/Absorbers/plugin.d.ts +1 -1
  138. package/browser/Plugins/Absorbers/plugin.js +2 -2
  139. package/browser/Plugins/Emitters/plugin.d.ts +1 -1
  140. package/browser/Plugins/Emitters/plugin.js +2 -2
  141. package/browser/Plugins/PolygonMask/plugin.js +4 -2
  142. package/browser/Shapes/Circle/index.d.ts +1 -1
  143. package/browser/Shapes/Circle/index.js +2 -2
  144. package/browser/Shapes/Image/index.d.ts +1 -1
  145. package/browser/Shapes/Image/index.js +3 -3
  146. package/browser/Shapes/Line/index.d.ts +1 -1
  147. package/browser/Shapes/Line/index.js +2 -2
  148. package/browser/Shapes/Polygon/index.d.ts +3 -3
  149. package/browser/Shapes/Polygon/index.js +7 -7
  150. package/browser/Shapes/Square/index.d.ts +1 -1
  151. package/browser/Shapes/Square/index.js +3 -3
  152. package/browser/Shapes/Star/index.d.ts +1 -1
  153. package/browser/Shapes/Star/index.js +2 -2
  154. package/browser/Shapes/Text/index.d.ts +1 -1
  155. package/browser/Shapes/Text/index.js +2 -2
  156. package/browser/Updaters/Angle/index.d.ts +1 -1
  157. package/browser/Updaters/Angle/index.js +2 -2
  158. package/browser/Updaters/Color/index.d.ts +1 -1
  159. package/browser/Updaters/Color/index.js +2 -2
  160. package/browser/Updaters/Life/index.d.ts +1 -1
  161. package/browser/Updaters/Life/index.js +2 -2
  162. package/browser/Updaters/Opacity/index.d.ts +1 -1
  163. package/browser/Updaters/Opacity/index.js +2 -2
  164. package/browser/Updaters/OutModes/index.d.ts +1 -1
  165. package/browser/Updaters/OutModes/index.js +2 -2
  166. package/browser/Updaters/Roll/index.d.ts +1 -1
  167. package/browser/Updaters/Roll/index.js +2 -2
  168. package/browser/Updaters/Size/index.d.ts +1 -1
  169. package/browser/Updaters/Size/index.js +2 -2
  170. package/browser/Updaters/StrokeColor/index.d.ts +1 -1
  171. package/browser/Updaters/StrokeColor/index.js +2 -2
  172. package/browser/Updaters/Tilt/index.d.ts +1 -1
  173. package/browser/Updaters/Tilt/index.js +2 -2
  174. package/browser/Updaters/Wobble/index.d.ts +1 -1
  175. package/browser/Updaters/Wobble/index.js +2 -2
  176. package/browser/Utils/Plugins.d.ts +2 -2
  177. package/browser/Utils/Plugins.js +4 -4
  178. package/browser/Utils/Utils.d.ts +1 -2
  179. package/browser/full.d.ts +1 -1
  180. package/browser/full.js +9 -9
  181. package/browser/index.js +1 -1
  182. package/browser/index.slim.js +1 -1
  183. package/browser/main.d.ts +10 -6
  184. package/browser/main.js +20 -6
  185. package/browser/slim.d.ts +1 -1
  186. package/browser/slim.js +24 -24
  187. package/esm/Core/Container.d.ts +3 -1
  188. package/esm/Core/Container.js +16 -11
  189. package/esm/Core/InteractionManager.d.ts +1 -0
  190. package/esm/Core/InteractionManager.js +4 -1
  191. package/esm/Core/Particles.d.ts +1 -1
  192. package/esm/Core/Particles.js +3 -1
  193. package/esm/Enums/Modes/ResponsiveMode.d.ts +4 -0
  194. package/esm/Enums/Modes/ResponsiveMode.js +5 -0
  195. package/esm/Enums/Modes/index.d.ts +1 -0
  196. package/esm/Enums/Modes/index.js +1 -0
  197. package/esm/Interactions/External/Attract/index.d.ts +1 -1
  198. package/esm/Interactions/External/Attract/index.js +2 -2
  199. package/esm/Interactions/External/Bounce/index.d.ts +1 -1
  200. package/esm/Interactions/External/Bounce/index.js +2 -2
  201. package/esm/Interactions/External/Bubble/index.d.ts +1 -1
  202. package/esm/Interactions/External/Bubble/index.js +2 -2
  203. package/esm/Interactions/External/Connect/index.d.ts +1 -1
  204. package/esm/Interactions/External/Connect/index.js +2 -2
  205. package/esm/Interactions/External/Grab/index.d.ts +1 -1
  206. package/esm/Interactions/External/Grab/index.js +2 -2
  207. package/esm/Interactions/External/Repulse/index.d.ts +1 -1
  208. package/esm/Interactions/External/Repulse/index.js +2 -2
  209. package/esm/Interactions/External/Trail/index.d.ts +1 -1
  210. package/esm/Interactions/External/Trail/index.js +2 -2
  211. package/esm/Interactions/Particles/Attract/index.d.ts +1 -1
  212. package/esm/Interactions/Particles/Attract/index.js +2 -2
  213. package/esm/Interactions/Particles/Collisions/index.d.ts +1 -1
  214. package/esm/Interactions/Particles/Collisions/index.js +2 -2
  215. package/esm/Interactions/Particles/Links/index.d.ts +2 -2
  216. package/esm/Interactions/Particles/Links/index.js +5 -5
  217. package/esm/Interactions/Particles/Links/plugin.d.ts +1 -1
  218. package/esm/Interactions/Particles/Links/plugin.js +2 -2
  219. package/esm/Options/Classes/FullScreen/FullScreen.js +2 -2
  220. package/esm/Options/Classes/Interactivity/Interactivity.js +1 -1
  221. package/esm/Options/Classes/Options.js +4 -2
  222. package/esm/Options/Classes/Responsive.d.ts +2 -0
  223. package/esm/Options/Classes/Responsive.js +10 -0
  224. package/esm/Options/Interfaces/IResponsive.d.ts +2 -0
  225. package/esm/Plugins/Absorbers/AbsorberInstance.d.ts +2 -1
  226. package/esm/Plugins/Absorbers/AbsorberInstance.js +21 -9
  227. package/esm/Plugins/Absorbers/Options/Classes/AbsorberSize.d.ts +2 -1
  228. package/esm/Plugins/Absorbers/Options/Classes/AbsorberSize.js +6 -4
  229. package/esm/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.d.ts +9 -0
  230. package/esm/Plugins/Absorbers/Options/Classes/AbsorberSizeLimit.js +17 -0
  231. package/esm/Plugins/Absorbers/Options/Interfaces/IAbsorberSize.d.ts +3 -2
  232. package/esm/Plugins/Absorbers/Options/Interfaces/IAbsorberSizeLimit.d.ts +4 -0
  233. package/esm/Plugins/Absorbers/Options/Interfaces/IAbsorberSizeLimit.js +1 -0
  234. package/esm/Plugins/Absorbers/plugin.d.ts +1 -1
  235. package/esm/Plugins/Absorbers/plugin.js +2 -2
  236. package/esm/Plugins/Emitters/plugin.d.ts +1 -1
  237. package/esm/Plugins/Emitters/plugin.js +2 -2
  238. package/esm/Plugins/PolygonMask/plugin.js +1 -1
  239. package/esm/Shapes/Circle/index.d.ts +1 -1
  240. package/esm/Shapes/Circle/index.js +2 -2
  241. package/esm/Shapes/Image/index.d.ts +1 -1
  242. package/esm/Shapes/Image/index.js +3 -3
  243. package/esm/Shapes/Line/index.d.ts +1 -1
  244. package/esm/Shapes/Line/index.js +2 -2
  245. package/esm/Shapes/Polygon/index.d.ts +3 -3
  246. package/esm/Shapes/Polygon/index.js +7 -7
  247. package/esm/Shapes/Square/index.d.ts +1 -1
  248. package/esm/Shapes/Square/index.js +3 -3
  249. package/esm/Shapes/Star/index.d.ts +1 -1
  250. package/esm/Shapes/Star/index.js +2 -2
  251. package/esm/Shapes/Text/index.d.ts +1 -1
  252. package/esm/Shapes/Text/index.js +2 -2
  253. package/esm/Updaters/Angle/index.d.ts +1 -1
  254. package/esm/Updaters/Angle/index.js +2 -2
  255. package/esm/Updaters/Color/index.d.ts +1 -1
  256. package/esm/Updaters/Color/index.js +2 -2
  257. package/esm/Updaters/Life/index.d.ts +1 -1
  258. package/esm/Updaters/Life/index.js +2 -2
  259. package/esm/Updaters/Opacity/index.d.ts +1 -1
  260. package/esm/Updaters/Opacity/index.js +2 -2
  261. package/esm/Updaters/OutModes/index.d.ts +1 -1
  262. package/esm/Updaters/OutModes/index.js +2 -2
  263. package/esm/Updaters/Roll/index.d.ts +1 -1
  264. package/esm/Updaters/Roll/index.js +2 -2
  265. package/esm/Updaters/Size/index.d.ts +1 -1
  266. package/esm/Updaters/Size/index.js +2 -2
  267. package/esm/Updaters/StrokeColor/index.d.ts +1 -1
  268. package/esm/Updaters/StrokeColor/index.js +2 -2
  269. package/esm/Updaters/Tilt/index.d.ts +1 -1
  270. package/esm/Updaters/Tilt/index.js +2 -2
  271. package/esm/Updaters/Wobble/index.d.ts +1 -1
  272. package/esm/Updaters/Wobble/index.js +2 -2
  273. package/esm/Utils/Plugins.d.ts +2 -2
  274. package/esm/Utils/Plugins.js +4 -4
  275. package/esm/Utils/Utils.d.ts +1 -2
  276. package/esm/full.d.ts +1 -1
  277. package/esm/full.js +9 -9
  278. package/esm/index.js +1 -1
  279. package/esm/index.slim.js +1 -1
  280. package/esm/main.d.ts +7 -6
  281. package/esm/main.js +17 -6
  282. package/esm/slim.d.ts +1 -1
  283. package/esm/slim.js +24 -24
  284. package/full.d.ts +1 -1
  285. package/full.js +9 -9
  286. package/index.js +1 -1
  287. package/index.slim.js +1 -1
  288. package/main.d.ts +7 -6
  289. package/main.js +17 -6
  290. package/package.json +1 -1
  291. package/report.html +2 -2
  292. package/report.slim.html +2 -2
  293. package/slim.d.ts +1 -1
  294. package/slim.js +24 -24
  295. package/tsparticles.js +743 -363
  296. package/tsparticles.min.js +2 -2
  297. package/tsparticles.pathseg.js +2 -2
  298. package/tsparticles.slim.js +539 -284
  299. package/tsparticles.slim.min.js +2 -2
@@ -74,8 +74,8 @@ class Plugin {
74
74
  }
75
75
  }
76
76
  }
77
- function loadAbsorbersPlugin(tsParticles) {
77
+ async function loadAbsorbersPlugin(tsParticles) {
78
78
  const plugin = new Plugin();
79
- tsParticles.addPlugin(plugin);
79
+ await tsParticles.addPlugin(plugin);
80
80
  }
81
81
  exports.loadAbsorbersPlugin = loadAbsorbersPlugin;
@@ -1,3 +1,3 @@
1
1
  import { EmittersMain } from "./EmittersMain";
2
- export declare function loadEmittersPlugin(tsParticles: EmittersMain): void;
2
+ export declare function loadEmittersPlugin(tsParticles: EmittersMain): Promise<void>;
3
3
  export * from "./EmittersMain";
@@ -77,9 +77,9 @@ class EmittersPlugin {
77
77
  }
78
78
  }
79
79
  }
80
- function loadEmittersPlugin(tsParticles) {
80
+ async function loadEmittersPlugin(tsParticles) {
81
81
  const plugin = new EmittersPlugin();
82
- tsParticles.addPlugin(plugin);
82
+ await tsParticles.addPlugin(plugin);
83
83
  if (!tsParticles.addEmitterShape) {
84
84
  tsParticles.addEmitterShape = (name, shape) => {
85
85
  ShapeManager_1.ShapeManager.addShape(name, shape);
@@ -52,6 +52,6 @@ async function loadPolygonMaskPlugin(tsParticles) {
52
52
  await Promise.resolve().then(() => __importStar(require("./pathseg")));
53
53
  }
54
54
  const plugin = new Plugin();
55
- tsParticles.addPlugin(plugin);
55
+ await tsParticles.addPlugin(plugin);
56
56
  }
57
57
  exports.loadPolygonMaskPlugin = loadPolygonMaskPlugin;
@@ -1,2 +1,2 @@
1
1
  import type { Main } from "../../main";
2
- export declare function loadCircleShape(tsParticles: Main): void;
2
+ export declare function loadCircleShape(tsParticles: Main): Promise<void>;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.loadCircleShape = void 0;
4
4
  const CircleDrawer_1 = require("./CircleDrawer");
5
- function loadCircleShape(tsParticles) {
6
- tsParticles.addShape("circle", new CircleDrawer_1.CircleDrawer());
5
+ async function loadCircleShape(tsParticles) {
6
+ await tsParticles.addShape("circle", new CircleDrawer_1.CircleDrawer());
7
7
  }
8
8
  exports.loadCircleShape = loadCircleShape;
@@ -1,2 +1,2 @@
1
1
  import type { Main } from "../../main";
2
- export declare function loadImageShape(tsParticles: Main): void;
2
+ export declare function loadImageShape(tsParticles: Main): Promise<void>;
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.loadImageShape = void 0;
4
4
  const ImageDrawer_1 = require("./ImageDrawer");
5
- function loadImageShape(tsParticles) {
5
+ async function loadImageShape(tsParticles) {
6
6
  const imageDrawer = new ImageDrawer_1.ImageDrawer();
7
- tsParticles.addShape("image", imageDrawer);
8
- tsParticles.addShape("images", imageDrawer);
7
+ await tsParticles.addShape("image", imageDrawer);
8
+ await tsParticles.addShape("images", imageDrawer);
9
9
  }
10
10
  exports.loadImageShape = loadImageShape;
@@ -1,2 +1,2 @@
1
1
  import type { Main } from "../../main";
2
- export declare function loadLineShape(tsParticles: Main): void;
2
+ export declare function loadLineShape(tsParticles: Main): Promise<void>;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.loadLineShape = void 0;
4
4
  const LineDrawer_1 = require("./LineDrawer");
5
- function loadLineShape(tsParticles) {
6
- tsParticles.addShape("line", new LineDrawer_1.LineDrawer());
5
+ async function loadLineShape(tsParticles) {
6
+ await tsParticles.addShape("line", new LineDrawer_1.LineDrawer());
7
7
  }
8
8
  exports.loadLineShape = loadLineShape;
@@ -1,4 +1,4 @@
1
1
  import type { Main } from "../../main";
2
- export declare function loadGenericPolygonShape(tsParticles: Main): void;
3
- export declare function loadTriangleShape(tsParticles: Main): void;
4
- export declare function loadPolygonShape(tsParticles: Main): void;
2
+ export declare function loadGenericPolygonShape(tsParticles: Main): Promise<void>;
3
+ export declare function loadTriangleShape(tsParticles: Main): Promise<void>;
4
+ export declare function loadPolygonShape(tsParticles: Main): Promise<void>;
@@ -3,16 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.loadPolygonShape = exports.loadTriangleShape = exports.loadGenericPolygonShape = void 0;
4
4
  const PolygonDrawer_1 = require("./PolygonDrawer");
5
5
  const TriangleDrawer_1 = require("./TriangleDrawer");
6
- function loadGenericPolygonShape(tsParticles) {
7
- tsParticles.addShape("polygon", new PolygonDrawer_1.PolygonDrawer());
6
+ async function loadGenericPolygonShape(tsParticles) {
7
+ await tsParticles.addShape("polygon", new PolygonDrawer_1.PolygonDrawer());
8
8
  }
9
9
  exports.loadGenericPolygonShape = loadGenericPolygonShape;
10
- function loadTriangleShape(tsParticles) {
11
- tsParticles.addShape("triangle", new TriangleDrawer_1.TriangleDrawer());
10
+ async function loadTriangleShape(tsParticles) {
11
+ await tsParticles.addShape("triangle", new TriangleDrawer_1.TriangleDrawer());
12
12
  }
13
13
  exports.loadTriangleShape = loadTriangleShape;
14
- function loadPolygonShape(tsParticles) {
15
- loadGenericPolygonShape(tsParticles);
16
- loadTriangleShape(tsParticles);
14
+ async function loadPolygonShape(tsParticles) {
15
+ await loadGenericPolygonShape(tsParticles);
16
+ await loadTriangleShape(tsParticles);
17
17
  }
18
18
  exports.loadPolygonShape = loadPolygonShape;
@@ -1,2 +1,2 @@
1
1
  import type { Main } from "../../main";
2
- export declare function loadSquareShape(tsParticles: Main): void;
2
+ export declare function loadSquareShape(tsParticles: Main): Promise<void>;
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.loadSquareShape = void 0;
4
4
  const SquareDrawer_1 = require("./SquareDrawer");
5
- function loadSquareShape(tsParticles) {
5
+ async function loadSquareShape(tsParticles) {
6
6
  const drawer = new SquareDrawer_1.SquareDrawer();
7
- tsParticles.addShape("edge", drawer);
8
- tsParticles.addShape("square", drawer);
7
+ await tsParticles.addShape("edge", drawer);
8
+ await tsParticles.addShape("square", drawer);
9
9
  }
10
10
  exports.loadSquareShape = loadSquareShape;
@@ -1,2 +1,2 @@
1
1
  import type { Main } from "../../main";
2
- export declare function loadStarShape(tsParticles: Main): void;
2
+ export declare function loadStarShape(tsParticles: Main): Promise<void>;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.loadStarShape = void 0;
4
4
  const StarDrawer_1 = require("./StarDrawer");
5
- function loadStarShape(tsParticles) {
6
- tsParticles.addShape("star", new StarDrawer_1.StarDrawer());
5
+ async function loadStarShape(tsParticles) {
6
+ await tsParticles.addShape("star", new StarDrawer_1.StarDrawer());
7
7
  }
8
8
  exports.loadStarShape = loadStarShape;
@@ -1,2 +1,2 @@
1
1
  import type { Main } from "../../main";
2
- export declare function loadTextShape(tsParticles: Main): void;
2
+ export declare function loadTextShape(tsParticles: Main): Promise<void>;
@@ -2,10 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.loadTextShape = void 0;
4
4
  const TextDrawer_1 = require("./TextDrawer");
5
- function loadTextShape(tsParticles) {
5
+ async function loadTextShape(tsParticles) {
6
6
  const drawer = new TextDrawer_1.TextDrawer();
7
7
  for (const type of TextDrawer_1.validTypes) {
8
- tsParticles.addShape(type, drawer);
8
+ await tsParticles.addShape(type, drawer);
9
9
  }
10
10
  }
11
11
  exports.loadTextShape = loadTextShape;
@@ -1,2 +1,2 @@
1
1
  import type { Main } from "../../main";
2
- export declare function loadAngleUpdater(tsParticles: Main): void;
2
+ export declare function loadAngleUpdater(tsParticles: Main): Promise<void>;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.loadAngleUpdater = void 0;
4
4
  const AngleUpdater_1 = require("./AngleUpdater");
5
- function loadAngleUpdater(tsParticles) {
6
- tsParticles.addParticleUpdater("angle", (container) => new AngleUpdater_1.AngleUpdater(container));
5
+ async function loadAngleUpdater(tsParticles) {
6
+ await tsParticles.addParticleUpdater("angle", (container) => new AngleUpdater_1.AngleUpdater(container));
7
7
  }
8
8
  exports.loadAngleUpdater = loadAngleUpdater;
@@ -1,2 +1,2 @@
1
1
  import type { Main } from "../../main";
2
- export declare function loadColorUpdater(tsParticles: Main): void;
2
+ export declare function loadColorUpdater(tsParticles: Main): Promise<void>;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.loadColorUpdater = void 0;
4
4
  const ColorUpdater_1 = require("./ColorUpdater");
5
- function loadColorUpdater(tsParticles) {
6
- tsParticles.addParticleUpdater("color", (container) => new ColorUpdater_1.ColorUpdater(container));
5
+ async function loadColorUpdater(tsParticles) {
6
+ await tsParticles.addParticleUpdater("color", (container) => new ColorUpdater_1.ColorUpdater(container));
7
7
  }
8
8
  exports.loadColorUpdater = loadColorUpdater;
@@ -1,2 +1,2 @@
1
1
  import type { Main } from "../../main";
2
- export declare function loadLifeUpdater(tsParticles: Main): void;
2
+ export declare function loadLifeUpdater(tsParticles: Main): Promise<void>;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.loadLifeUpdater = void 0;
4
4
  const LifeUpdater_1 = require("./LifeUpdater");
5
- function loadLifeUpdater(tsParticles) {
6
- tsParticles.addParticleUpdater("life", (container) => new LifeUpdater_1.LifeUpdater(container));
5
+ async function loadLifeUpdater(tsParticles) {
6
+ await tsParticles.addParticleUpdater("life", (container) => new LifeUpdater_1.LifeUpdater(container));
7
7
  }
8
8
  exports.loadLifeUpdater = loadLifeUpdater;
@@ -1,2 +1,2 @@
1
1
  import type { Main } from "../../main";
2
- export declare function loadOpacityUpdater(tsParticles: Main): void;
2
+ export declare function loadOpacityUpdater(tsParticles: Main): Promise<void>;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.loadOpacityUpdater = void 0;
4
4
  const OpacityUpdater_1 = require("./OpacityUpdater");
5
- function loadOpacityUpdater(tsParticles) {
6
- tsParticles.addParticleUpdater("opacity", (container) => new OpacityUpdater_1.OpacityUpdater(container));
5
+ async function loadOpacityUpdater(tsParticles) {
6
+ await tsParticles.addParticleUpdater("opacity", (container) => new OpacityUpdater_1.OpacityUpdater(container));
7
7
  }
8
8
  exports.loadOpacityUpdater = loadOpacityUpdater;
@@ -1,2 +1,2 @@
1
1
  import type { Main } from "../../main";
2
- export declare function loadOutModesUpdater(tsParticles: Main): void;
2
+ export declare function loadOutModesUpdater(tsParticles: Main): Promise<void>;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.loadOutModesUpdater = void 0;
4
4
  const OutOfCanvasUpdater_1 = require("./OutOfCanvasUpdater");
5
- function loadOutModesUpdater(tsParticles) {
6
- tsParticles.addParticleUpdater("outModes", (container) => new OutOfCanvasUpdater_1.OutOfCanvasUpdater(container));
5
+ async function loadOutModesUpdater(tsParticles) {
6
+ await tsParticles.addParticleUpdater("outModes", (container) => new OutOfCanvasUpdater_1.OutOfCanvasUpdater(container));
7
7
  }
8
8
  exports.loadOutModesUpdater = loadOutModesUpdater;
@@ -1,2 +1,2 @@
1
1
  import type { Main } from "../../main";
2
- export declare function loadRollUpdater(tsParticles: Main): void;
2
+ export declare function loadRollUpdater(tsParticles: Main): Promise<void>;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.loadRollUpdater = void 0;
4
4
  const RollUpdater_1 = require("./RollUpdater");
5
- function loadRollUpdater(tsParticles) {
6
- tsParticles.addParticleUpdater("roll", () => new RollUpdater_1.RollUpdater());
5
+ async function loadRollUpdater(tsParticles) {
6
+ await tsParticles.addParticleUpdater("roll", () => new RollUpdater_1.RollUpdater());
7
7
  }
8
8
  exports.loadRollUpdater = loadRollUpdater;
@@ -1,2 +1,2 @@
1
1
  import type { Main } from "../../main";
2
- export declare function loadSizeUpdater(tsParticles: Main): void;
2
+ export declare function loadSizeUpdater(tsParticles: Main): Promise<void>;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.loadSizeUpdater = void 0;
4
4
  const SizeUpdater_1 = require("./SizeUpdater");
5
- function loadSizeUpdater(tsParticles) {
6
- tsParticles.addParticleUpdater("size", () => new SizeUpdater_1.SizeUpdater());
5
+ async function loadSizeUpdater(tsParticles) {
6
+ await tsParticles.addParticleUpdater("size", () => new SizeUpdater_1.SizeUpdater());
7
7
  }
8
8
  exports.loadSizeUpdater = loadSizeUpdater;
@@ -1,2 +1,2 @@
1
1
  import type { Main } from "../../main";
2
- export declare function loadStrokeColorUpdater(tsParticles: Main): void;
2
+ export declare function loadStrokeColorUpdater(tsParticles: Main): Promise<void>;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.loadStrokeColorUpdater = void 0;
4
4
  const StrokeColorUpdater_1 = require("./StrokeColorUpdater");
5
- function loadStrokeColorUpdater(tsParticles) {
6
- tsParticles.addParticleUpdater("strokeColor", (container) => new StrokeColorUpdater_1.StrokeColorUpdater(container));
5
+ async function loadStrokeColorUpdater(tsParticles) {
6
+ await tsParticles.addParticleUpdater("strokeColor", (container) => new StrokeColorUpdater_1.StrokeColorUpdater(container));
7
7
  }
8
8
  exports.loadStrokeColorUpdater = loadStrokeColorUpdater;
@@ -1,2 +1,2 @@
1
1
  import type { Main } from "../../main";
2
- export declare function loadTiltUpdater(tsParticles: Main): void;
2
+ export declare function loadTiltUpdater(tsParticles: Main): Promise<void>;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.loadTiltUpdater = void 0;
4
4
  const TiltUpdater_1 = require("./TiltUpdater");
5
- function loadTiltUpdater(tsParticles) {
6
- tsParticles.addParticleUpdater("tilt", (container) => new TiltUpdater_1.TiltUpdater(container));
5
+ async function loadTiltUpdater(tsParticles) {
6
+ await tsParticles.addParticleUpdater("tilt", (container) => new TiltUpdater_1.TiltUpdater(container));
7
7
  }
8
8
  exports.loadTiltUpdater = loadTiltUpdater;
@@ -1,2 +1,2 @@
1
1
  import type { Main } from "../../main";
2
- export declare function loadWobbleUpdater(tsParticles: Main): void;
2
+ export declare function loadWobbleUpdater(tsParticles: Main): Promise<void>;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.loadWobbleUpdater = void 0;
4
4
  const WobbleUpdater_1 = require("./WobbleUpdater");
5
- function loadWobbleUpdater(tsParticles) {
6
- tsParticles.addParticleUpdater("wobble", (container) => new WobbleUpdater_1.WobbleUpdater(container));
5
+ async function loadWobbleUpdater(tsParticles) {
6
+ await tsParticles.addParticleUpdater("wobble", (container) => new WobbleUpdater_1.WobbleUpdater(container));
7
7
  }
8
8
  exports.loadWobbleUpdater = loadWobbleUpdater;
@@ -15,8 +15,8 @@ export declare class Plugins {
15
15
  static getSupportedShapes(): IterableIterator<string>;
16
16
  static getPathGenerator(type: string): IMovePathGenerator | undefined;
17
17
  static addPathGenerator(type: string, pathGenerator: IMovePathGenerator): void;
18
- static getInteractors(container: Container): IInteractor[];
18
+ static getInteractors(container: Container, force?: boolean): IInteractor[];
19
19
  static addInteractor(name: string, initInteractor: (container: Container) => IInteractor): void;
20
- static getUpdaters(container: Container): IParticleUpdater[];
20
+ static getUpdaters(container: Container, force?: boolean): IParticleUpdater[];
21
21
  static addParticleUpdater(name: string, initUpdater: (container: Container) => IParticleUpdater): void;
22
22
  }
package/Utils/Plugins.js CHANGED
@@ -60,9 +60,9 @@ class Plugins {
60
60
  pathGenerators.set(type, pathGenerator);
61
61
  }
62
62
  }
63
- static getInteractors(container) {
63
+ static getInteractors(container, force = false) {
64
64
  let res = interactors.get(container);
65
- if (!res) {
65
+ if (!res || force) {
66
66
  res = [...interactorsInitializers.values()].map((t) => t(container));
67
67
  interactors.set(container, res);
68
68
  }
@@ -71,9 +71,9 @@ class Plugins {
71
71
  static addInteractor(name, initInteractor) {
72
72
  interactorsInitializers.set(name, initInteractor);
73
73
  }
74
- static getUpdaters(container) {
74
+ static getUpdaters(container, force = false) {
75
75
  let res = updaters.get(container);
76
- if (!res) {
76
+ if (!res || force) {
77
77
  res = [...updatersInitializers.values()].map((t) => t(container));
78
78
  updaters.set(container, res);
79
79
  }
package/Utils/Utils.d.ts CHANGED
@@ -1,10 +1,9 @@
1
1
  import type { IBounds, ICircleBouncer, ICoordinates, IDimension, IParticle } from "../Core/Interfaces";
2
- import { DivMode } from "../Enums";
2
+ import { DivMode, OutModeDirection } from "../Enums";
3
3
  import type { ICharacterShape } from "../Options/Interfaces/Particles/Shape/ICharacterShape";
4
4
  import type { SingleOrMultiple } from "../Types";
5
5
  import { DivEvent } from "../Options/Classes/Interactivity/Events/DivEvent";
6
6
  import type { IModeDiv } from "../Options/Interfaces/Interactivity/Modes/IModeDiv";
7
- import { OutModeDirection } from "../Enums";
8
7
  declare global {
9
8
  interface Window {
10
9
  customRequestAnimationFrame: (callback: FrameRequestCallback) => number;
@@ -66,10 +66,12 @@ export declare class Container {
66
66
  readonly pathGenerator: IMovePathGenerator;
67
67
  private _options;
68
68
  private _sourceOptions;
69
+ private readonly _initialSourceOptions;
69
70
  private paused;
70
71
  private firstStart;
71
72
  private currentTheme?;
72
73
  private drawAnimationFrame?;
74
+ private readonly presets;
73
75
  private readonly eventListeners;
74
76
  private readonly intersectionObserver?;
75
77
  /**
@@ -154,6 +156,6 @@ export declare class Container {
154
156
  start(): Promise<void>;
155
157
  addClickHandler(callback: (evt: Event, particles?: Particle[]) => void): void;
156
158
  updateActualOptions(): boolean;
157
- private init;
159
+ init(): Promise<void>;
158
160
  private intersectionManager;
159
161
  }
@@ -35,10 +35,12 @@ export class Container {
35
35
  this.zLayers = 100;
36
36
  this.pageHidden = false;
37
37
  this._sourceOptions = sourceOptions;
38
+ this._initialSourceOptions = sourceOptions;
38
39
  this.retina = new Retina(this);
39
40
  this.canvas = new Canvas(this);
40
41
  this.particles = new Particles(this);
41
42
  this.drawer = new FrameManager(this);
43
+ this.presets = presets;
42
44
  this.pathGenerator = {
43
45
  generate: () => {
44
46
  const v = Vector.create(0, 0);
@@ -68,18 +70,6 @@ export class Container {
68
70
  /* tsParticles variables with default values */
69
71
  this._options = new Options();
70
72
  this.actualOptions = new Options();
71
- for (const preset of presets) {
72
- this._options.load(Plugins.getPreset(preset));
73
- }
74
- const shapes = Plugins.getSupportedShapes();
75
- for (const type of shapes) {
76
- const drawer = Plugins.getShapeDrawer(type);
77
- if (drawer) {
78
- this.drawers.set(type, drawer);
79
- }
80
- }
81
- /* options settings */
82
- this._options.load(this._sourceOptions);
83
73
  /* ---------- tsParticles - start ------------ */
84
74
  this.eventListeners = new EventListeners(this);
85
75
  if (typeof IntersectionObserver !== "undefined" && IntersectionObserver) {
@@ -277,6 +267,7 @@ export class Container {
277
267
  this.particles.linksColors = new Map();
278
268
  delete this.particles.grabLineColor;
279
269
  delete this.particles.linksColor;
270
+ this._sourceOptions = this._options;
280
271
  }
281
272
  /**
282
273
  * Loads the given theme, overriding the options
@@ -398,6 +389,20 @@ export class Container {
398
389
  return false;
399
390
  }
400
391
  async init() {
392
+ this._options = new Options();
393
+ for (const preset of this.presets) {
394
+ this._options.load(Plugins.getPreset(preset));
395
+ }
396
+ const shapes = Plugins.getSupportedShapes();
397
+ for (const type of shapes) {
398
+ const drawer = Plugins.getShapeDrawer(type);
399
+ if (drawer) {
400
+ this.drawers.set(type, drawer);
401
+ }
402
+ }
403
+ /* options settings */
404
+ this._options.load(this._initialSourceOptions);
405
+ this._options.load(this._sourceOptions);
401
406
  this.actualOptions = new Options();
402
407
  this.actualOptions.load(this._options);
403
408
  /* init canvas + particles */
@@ -9,6 +9,7 @@ export declare class InteractionManager {
9
9
  private readonly externalInteractors;
10
10
  private readonly particleInteractors;
11
11
  constructor(container: Container);
12
+ init(): void;
12
13
  externalInteract(delta: IDelta): void;
13
14
  particlesInteract(particle: Particle, delta: IDelta): void;
14
15
  }
@@ -6,9 +6,12 @@ import { InteractorType } from "../Enums";
6
6
  export class InteractionManager {
7
7
  constructor(container) {
8
8
  this.container = container;
9
- const interactors = Plugins.getInteractors(container);
10
9
  this.externalInteractors = [];
11
10
  this.particleInteractors = [];
11
+ this.init();
12
+ }
13
+ init() {
14
+ const interactors = Plugins.getInteractors(this.container, true);
12
15
  for (const interactor of interactors) {
13
16
  switch (interactor.type) {
14
17
  case InteractorType.External:
@@ -27,7 +27,7 @@ export declare class Particles {
27
27
  pushing?: boolean;
28
28
  linksColor?: IRgb | string;
29
29
  grabLineColor?: IRgb | string;
30
- readonly updaters: import("./Interfaces").IParticleUpdater[];
30
+ updaters: import("./Interfaces").IParticleUpdater[];
31
31
  private interactionManager;
32
32
  private nextId;
33
33
  private readonly freqs;
@@ -25,7 +25,7 @@ export class Particles {
25
25
  const canvasSize = this.container.canvas.size;
26
26
  this.linksColors = new Map();
27
27
  this.quadTree = new QuadTree(new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, (canvasSize.width * 3) / 2, (canvasSize.height * 3) / 2), 4);
28
- this.updaters = Plugins.getUpdaters(container);
28
+ this.updaters = Plugins.getUpdaters(container, true);
29
29
  }
30
30
  get count() {
31
31
  return this.array.length;
@@ -40,6 +40,8 @@ export class Particles {
40
40
  this.freqs.links = new Map();
41
41
  this.freqs.triangles = new Map();
42
42
  let handled = false;
43
+ this.updaters = Plugins.getUpdaters(container, true);
44
+ this.interactionManager.init();
43
45
  for (const [, plugin] of container.plugins) {
44
46
  if (plugin.particlesInitialization !== undefined) {
45
47
  handled = plugin.particlesInitialization();
@@ -0,0 +1,4 @@
1
+ export declare enum ResponsiveMode {
2
+ screen = "screen",
3
+ canvas = "canvas"
4
+ }
@@ -0,0 +1,5 @@
1
+ export var ResponsiveMode;
2
+ (function (ResponsiveMode) {
3
+ ResponsiveMode["screen"] = "screen";
4
+ ResponsiveMode["canvas"] = "canvas";
5
+ })(ResponsiveMode || (ResponsiveMode = {}));
@@ -7,3 +7,4 @@ export * from "./OutMode";
7
7
  export * from "./RollMode";
8
8
  export * from "./SizeMode";
9
9
  export * from "./ThemeMode";
10
+ export * from "./ResponsiveMode";
@@ -7,3 +7,4 @@ export * from "./OutMode";
7
7
  export * from "./RollMode";
8
8
  export * from "./SizeMode";
9
9
  export * from "./ThemeMode";
10
+ export * from "./ResponsiveMode";
@@ -1,2 +1,2 @@
1
1
  import type { Main } from "../../../main";
2
- export declare function loadExternalAttractInteraction(tsParticles: Main): void;
2
+ export declare function loadExternalAttractInteraction(tsParticles: Main): Promise<void>;
@@ -1,4 +1,4 @@
1
1
  import { Attractor } from "./Attractor";
2
- export function loadExternalAttractInteraction(tsParticles) {
3
- tsParticles.addInteractor("externalAttract", (container) => new Attractor(container));
2
+ export async function loadExternalAttractInteraction(tsParticles) {
3
+ await tsParticles.addInteractor("externalAttract", (container) => new Attractor(container));
4
4
  }
@@ -1,2 +1,2 @@
1
1
  import type { Main } from "../../../main";
2
- export declare function loadExternalBounceInteraction(tsParticles: Main): void;
2
+ export declare function loadExternalBounceInteraction(tsParticles: Main): Promise<void>;
@@ -1,4 +1,4 @@
1
1
  import { Bouncer } from "./Bouncer";
2
- export function loadExternalBounceInteraction(tsParticles) {
3
- tsParticles.addInteractor("externalBounce", (container) => new Bouncer(container));
2
+ export async function loadExternalBounceInteraction(tsParticles) {
3
+ await tsParticles.addInteractor("externalBounce", (container) => new Bouncer(container));
4
4
  }
@@ -1,2 +1,2 @@
1
1
  import type { Main } from "../../../main";
2
- export declare function loadExternalBubbleInteraction(tsParticles: Main): void;
2
+ export declare function loadExternalBubbleInteraction(tsParticles: Main): Promise<void>;
@@ -1,4 +1,4 @@
1
1
  import { Bubbler } from "./Bubbler";
2
- export function loadExternalBubbleInteraction(tsParticles) {
3
- tsParticles.addInteractor("externalBubble", (container) => new Bubbler(container));
2
+ export async function loadExternalBubbleInteraction(tsParticles) {
3
+ await tsParticles.addInteractor("externalBubble", (container) => new Bubbler(container));
4
4
  }
@@ -1,2 +1,2 @@
1
1
  import type { Main } from "../../../main";
2
- export declare function loadExternalConnectInteraction(tsParticles: Main): void;
2
+ export declare function loadExternalConnectInteraction(tsParticles: Main): Promise<void>;
@@ -1,4 +1,4 @@
1
1
  import { Connector } from "./Connector";
2
- export function loadExternalConnectInteraction(tsParticles) {
3
- tsParticles.addInteractor("externalConnect", (container) => new Connector(container));
2
+ export async function loadExternalConnectInteraction(tsParticles) {
3
+ await tsParticles.addInteractor("externalConnect", (container) => new Connector(container));
4
4
  }
@@ -1,2 +1,2 @@
1
1
  import type { Main } from "../../../main";
2
- export declare function loadExternalGrabInteraction(tsParticles: Main): void;
2
+ export declare function loadExternalGrabInteraction(tsParticles: Main): Promise<void>;