tsparticles 2.10.1 → 2.11.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.
package/README.md CHANGED
@@ -55,8 +55,11 @@ Once the scripts are loaded you can set up `tsParticles` like this:
55
55
  (async () => {
56
56
  await loadFull(tsParticles); // not needed if using the bundle script, required for any other installation
57
57
 
58
- await tsParticles.load("tsparticles", {
59
- /* options */
58
+ await tsParticles.load({
59
+ id: "tsparticles",
60
+ options: {
61
+ /* options */
62
+ },
60
63
  });
61
64
  })();
62
65
  ```
@@ -154,9 +157,9 @@ async function particlesInit(engine: Engine): Promise<void> {
154
157
  ```sveltehtml
155
158
 
156
159
  <Particles
157
- id="tsparticles"
158
- options={options}
159
- particlesInit={particlesInit}
160
+ id="tsparticles"
161
+ options={options}
162
+ particlesInit={particlesInit}
160
163
  />
161
164
  ```
162
165
 
package/browser/index.js CHANGED
@@ -7,14 +7,14 @@ import { loadSlim } from "tsparticles-slim";
7
7
  import { loadTiltUpdater } from "tsparticles-updater-tilt";
8
8
  import { loadTwinkleUpdater } from "tsparticles-updater-twinkle";
9
9
  import { loadWobbleUpdater } from "tsparticles-updater-wobble";
10
- export async function loadFull(engine) {
11
- await loadSlim(engine);
12
- await loadDestroyUpdater(engine);
13
- await loadRollUpdater(engine);
14
- await loadTiltUpdater(engine);
15
- await loadTwinkleUpdater(engine);
16
- await loadWobbleUpdater(engine);
17
- await loadExternalTrailInteraction(engine);
18
- await loadAbsorbersPlugin(engine);
19
- await loadEmittersPlugin(engine);
10
+ export async function loadFull(engine, refresh = true) {
11
+ await loadDestroyUpdater(engine, false);
12
+ await loadRollUpdater(engine, false);
13
+ await loadTiltUpdater(engine, false);
14
+ await loadTwinkleUpdater(engine, false);
15
+ await loadWobbleUpdater(engine, false);
16
+ await loadExternalTrailInteraction(engine, false);
17
+ await loadAbsorbersPlugin(engine, false);
18
+ await loadEmittersPlugin(engine, false);
19
+ await loadSlim(engine, refresh);
20
20
  }
package/cjs/index.js CHANGED
@@ -10,15 +10,15 @@ const tsparticles_slim_1 = require("tsparticles-slim");
10
10
  const tsparticles_updater_tilt_1 = require("tsparticles-updater-tilt");
11
11
  const tsparticles_updater_twinkle_1 = require("tsparticles-updater-twinkle");
12
12
  const tsparticles_updater_wobble_1 = require("tsparticles-updater-wobble");
13
- async function loadFull(engine) {
14
- await (0, tsparticles_slim_1.loadSlim)(engine);
15
- await (0, tsparticles_updater_destroy_1.loadDestroyUpdater)(engine);
16
- await (0, tsparticles_updater_roll_1.loadRollUpdater)(engine);
17
- await (0, tsparticles_updater_tilt_1.loadTiltUpdater)(engine);
18
- await (0, tsparticles_updater_twinkle_1.loadTwinkleUpdater)(engine);
19
- await (0, tsparticles_updater_wobble_1.loadWobbleUpdater)(engine);
20
- await (0, tsparticles_interaction_external_trail_1.loadExternalTrailInteraction)(engine);
21
- await (0, tsparticles_plugin_absorbers_1.loadAbsorbersPlugin)(engine);
22
- await (0, tsparticles_plugin_emitters_1.loadEmittersPlugin)(engine);
13
+ async function loadFull(engine, refresh = true) {
14
+ await (0, tsparticles_updater_destroy_1.loadDestroyUpdater)(engine, false);
15
+ await (0, tsparticles_updater_roll_1.loadRollUpdater)(engine, false);
16
+ await (0, tsparticles_updater_tilt_1.loadTiltUpdater)(engine, false);
17
+ await (0, tsparticles_updater_twinkle_1.loadTwinkleUpdater)(engine, false);
18
+ await (0, tsparticles_updater_wobble_1.loadWobbleUpdater)(engine, false);
19
+ await (0, tsparticles_interaction_external_trail_1.loadExternalTrailInteraction)(engine, false);
20
+ await (0, tsparticles_plugin_absorbers_1.loadAbsorbersPlugin)(engine, false);
21
+ await (0, tsparticles_plugin_emitters_1.loadEmittersPlugin)(engine, false);
22
+ await (0, tsparticles_slim_1.loadSlim)(engine, refresh);
23
23
  }
24
24
  exports.loadFull = loadFull;
package/esm/index.js CHANGED
@@ -7,14 +7,14 @@ import { loadSlim } from "tsparticles-slim";
7
7
  import { loadTiltUpdater } from "tsparticles-updater-tilt";
8
8
  import { loadTwinkleUpdater } from "tsparticles-updater-twinkle";
9
9
  import { loadWobbleUpdater } from "tsparticles-updater-wobble";
10
- export async function loadFull(engine) {
11
- await loadSlim(engine);
12
- await loadDestroyUpdater(engine);
13
- await loadRollUpdater(engine);
14
- await loadTiltUpdater(engine);
15
- await loadTwinkleUpdater(engine);
16
- await loadWobbleUpdater(engine);
17
- await loadExternalTrailInteraction(engine);
18
- await loadAbsorbersPlugin(engine);
19
- await loadEmittersPlugin(engine);
10
+ export async function loadFull(engine, refresh = true) {
11
+ await loadDestroyUpdater(engine, false);
12
+ await loadRollUpdater(engine, false);
13
+ await loadTiltUpdater(engine, false);
14
+ await loadTwinkleUpdater(engine, false);
15
+ await loadWobbleUpdater(engine, false);
16
+ await loadExternalTrailInteraction(engine, false);
17
+ await loadAbsorbersPlugin(engine, false);
18
+ await loadEmittersPlugin(engine, false);
19
+ await loadSlim(engine, refresh);
20
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tsparticles",
3
- "version": "2.10.1",
3
+ "version": "2.11.1",
4
4
  "description": "Easily create highly customizable particle animations and use them as animated backgrounds for your website. Ready to use components available also for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, Inferno.",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -85,16 +85,17 @@
85
85
  "jsdelivr": "tsparticles.bundle.min.js",
86
86
  "unpkg": "tsparticles.bundle.min.js",
87
87
  "types": "types/index.d.ts",
88
+ "sideEffects": false,
88
89
  "dependencies": {
89
- "tsparticles-engine": "^2.10.1",
90
- "tsparticles-interaction-external-trail": "^2.10.1",
91
- "tsparticles-plugin-absorbers": "^2.10.1",
92
- "tsparticles-plugin-emitters": "^2.10.1",
93
- "tsparticles-slim": "^2.10.1",
94
- "tsparticles-updater-destroy": "^2.10.1",
95
- "tsparticles-updater-roll": "^2.10.1",
96
- "tsparticles-updater-tilt": "^2.10.1",
97
- "tsparticles-updater-twinkle": "^2.10.1",
98
- "tsparticles-updater-wobble": "^2.10.1"
90
+ "tsparticles-engine": "^2.11.1",
91
+ "tsparticles-interaction-external-trail": "^2.11.1",
92
+ "tsparticles-plugin-absorbers": "^2.11.1",
93
+ "tsparticles-plugin-emitters": "^2.11.1",
94
+ "tsparticles-slim": "^2.11.1",
95
+ "tsparticles-updater-destroy": "^2.11.1",
96
+ "tsparticles-updater-roll": "^2.11.1",
97
+ "tsparticles-updater-tilt": "^2.11.1",
98
+ "tsparticles-updater-twinkle": "^2.11.1",
99
+ "tsparticles-updater-wobble": "^2.11.1"
99
100
  }
100
101
  }