tsparticles 2.0.3 → 2.0.6

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.
@@ -4,12 +4,12 @@
4
4
  * Demo / Generator : https://particles.js.org/
5
5
  * GitHub : https://www.github.com/matteobruni/tsparticles
6
6
  * How to use? : Check the GitHub README
7
- * v2.0.3
7
+ * v2.0.6
8
8
  */
9
9
  "use strict";
10
- (this["webpackChunktsparticles"] = this["webpackChunktsparticles"] || []).push([[107],{
10
+ (this["webpackChunktsparticles"] = this["webpackChunktsparticles"] || []).push([[939],{
11
11
 
12
- /***/ 107:
12
+ /***/ 939:
13
13
  /***/ (() => {
14
14
 
15
15
 
package/README.md CHANGED
@@ -9,15 +9,15 @@ a `tsparticles-engine` instance.
9
9
 
10
10
  **Included Packages**
11
11
 
12
- - tsparticles-engine
13
- - tsparticles-slim (and all its dependencies)
14
- - tsparticles-interaction-external-trail
15
- - tsparticles-plugin-absorbers
16
- - tsparticles-plugin-emitters
17
- - tsparticles-plugin-polygon-mask
18
- - tsparticles-updater-roll
19
- - tsparticles-updater-tilt
20
- - tsparticles-updater-wobble
12
+ - [tsparticles-engine](https://github.com/matteobruni/tsparticles/tree/main/engine)
13
+ - [tsparticles-slim (and all its dependencies)](https://github.com/matteobruni/tsparticles/tree/main/bundles/slim)
14
+ - [tsparticles-interaction-external-trail](https://github.com/matteobruni/tsparticles/tree/main/interactions/external/trail)
15
+ - [tsparticles-plugin-absorbers](https://github.com/matteobruni/tsparticles/tree/main/plugins/absorbers)
16
+ - [tsparticles-plugin-emitters](https://github.com/matteobruni/tsparticles/tree/main/plugins/emitters)
17
+ - [tsparticles-plugin-polygon-mask](https://github.com/matteobruni/tsparticles/tree/main/plugins/polygonMask)
18
+ - [tsparticles-updater-roll](https://github.com/matteobruni/tsparticles/tree/main/updaters/roll)
19
+ - [tsparticles-updater-tilt](https://github.com/matteobruni/tsparticles/tree/main/updaters/tilt)
20
+ - [tsparticles-updater-wobble](https://github.com/matteobruni/tsparticles/tree/main/updaters/wobble)
21
21
 
22
22
  ## How to use it
23
23
 
@@ -74,9 +74,9 @@ import { loadFull } from "tsparticles";
74
74
 
75
75
  export class ParticlesContainer extends PureComponent<unknown> {
76
76
  // this customizes the component tsParticles installation
77
- customInit(engine: Engine) {
77
+ async customInit(engine: Engine): Promise<void> {
78
78
  // this adds the bundle to tsParticles
79
- loadFull(engine);
79
+ await loadFull(engine);
80
80
  }
81
81
 
82
82
  render() {
@@ -99,9 +99,9 @@ import { loadFull } from "tsparticles";
99
99
 
100
100
  export function ParticlesContainer(props: unknown) {
101
101
  // this customizes the component tsParticles installation
102
- const customInit = useCallback((engine: Engine) => {
102
+ const customInit = useCallback(async (engine: Engine) => {
103
103
  // this adds the bundle to tsParticles
104
- loadFull(engine);
104
+ await loadFull(engine);
105
105
  });
106
106
 
107
107
  const options = {
@@ -121,8 +121,8 @@ _The syntax for `Vue.js 2.x` and `3.x` is the same_
121
121
  ```
122
122
 
123
123
  ```js
124
- function particlesInit(engine: Engine) {
125
- loadFull(engine);
124
+ async function particlesInit(engine: Engine): Promise<void> {
125
+ await loadFull(engine);
126
126
  }
127
127
  ```
128
128
 
@@ -133,13 +133,13 @@ function particlesInit(engine: Engine) {
133
133
  [id]="id"
134
134
  [options]="particlesOptions"
135
135
  (particlesLoaded)="particlesLoaded($event)"
136
- (particlesInit)="particlesInit($event)"
136
+ [particlesInit]="particlesInit"
137
137
  ></ng-particles>
138
138
  ```
139
139
 
140
140
  ```ts
141
- function particlesInit(engine: Engine): void {
142
- loadFull(engine);
141
+ async function particlesInit(engine: Engine): Promise<void> {
142
+ await loadFull(engine);
143
143
  }
144
144
  ```
145
145
 
File without changes
@@ -0,0 +1,20 @@
1
+ import { loadAbsorbersPlugin } from "tsparticles-plugin-absorbers";
2
+ import { loadEmittersPlugin } from "tsparticles-plugin-emitters";
3
+ import { loadExternalTrailInteraction } from "tsparticles-interaction-external-trail";
4
+ import { loadPolygonMaskPlugin } from "tsparticles-plugin-polygon-mask";
5
+ import { loadRollUpdater } from "tsparticles-updater-roll";
6
+ import { loadSlim } from "tsparticles-slim";
7
+ import { loadTiltUpdater } from "tsparticles-updater-tilt";
8
+ import { loadTwinkleUpdater } from "tsparticles-updater-twinkle";
9
+ import { loadWobbleUpdater } from "tsparticles-updater-wobble";
10
+ export async function loadFull(engine) {
11
+ await loadSlim(engine);
12
+ await loadRollUpdater(engine);
13
+ await loadTiltUpdater(engine);
14
+ await loadTwinkleUpdater(engine);
15
+ await loadWobbleUpdater(engine);
16
+ await loadExternalTrailInteraction(engine);
17
+ await loadAbsorbersPlugin(engine);
18
+ await loadEmittersPlugin(engine);
19
+ await loadPolygonMaskPlugin(engine);
20
+ }
package/cjs/bundle.js ADDED
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.loadFull = void 0;
18
+ const _1 = require(".");
19
+ Object.defineProperty(exports, "loadFull", { enumerable: true, get: function () { return _1.loadFull; } });
20
+ const tsparticles_engine_1 = require("tsparticles-engine");
21
+ (0, _1.loadFull)(tsparticles_engine_1.tsParticles);
22
+ __exportStar(require("tsparticles-slim"), exports);
23
+ __exportStar(require("tsparticles-engine"), exports);
package/cjs/index.js ADDED
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.loadFull = void 0;
4
+ const tsparticles_plugin_absorbers_1 = require("tsparticles-plugin-absorbers");
5
+ const tsparticles_plugin_emitters_1 = require("tsparticles-plugin-emitters");
6
+ const tsparticles_interaction_external_trail_1 = require("tsparticles-interaction-external-trail");
7
+ const tsparticles_plugin_polygon_mask_1 = require("tsparticles-plugin-polygon-mask");
8
+ const tsparticles_updater_roll_1 = require("tsparticles-updater-roll");
9
+ const tsparticles_slim_1 = require("tsparticles-slim");
10
+ const tsparticles_updater_tilt_1 = require("tsparticles-updater-tilt");
11
+ const tsparticles_updater_twinkle_1 = require("tsparticles-updater-twinkle");
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_roll_1.loadRollUpdater)(engine);
16
+ await (0, tsparticles_updater_tilt_1.loadTiltUpdater)(engine);
17
+ await (0, tsparticles_updater_twinkle_1.loadTwinkleUpdater)(engine);
18
+ await (0, tsparticles_updater_wobble_1.loadWobbleUpdater)(engine);
19
+ await (0, tsparticles_interaction_external_trail_1.loadExternalTrailInteraction)(engine);
20
+ await (0, tsparticles_plugin_absorbers_1.loadAbsorbersPlugin)(engine);
21
+ await (0, tsparticles_plugin_emitters_1.loadEmittersPlugin)(engine);
22
+ await (0, tsparticles_plugin_polygon_mask_1.loadPolygonMaskPlugin)(engine);
23
+ }
24
+ exports.loadFull = loadFull;
package/esm/bundle.js ADDED
@@ -0,0 +1,6 @@
1
+ import { loadFull } from ".";
2
+ import { tsParticles } from "tsparticles-engine";
3
+ loadFull(tsParticles);
4
+ export { loadFull };
5
+ export * from "tsparticles-slim";
6
+ export * from "tsparticles-engine";
package/esm/index.js ADDED
@@ -0,0 +1,20 @@
1
+ import { loadAbsorbersPlugin } from "tsparticles-plugin-absorbers";
2
+ import { loadEmittersPlugin } from "tsparticles-plugin-emitters";
3
+ import { loadExternalTrailInteraction } from "tsparticles-interaction-external-trail";
4
+ import { loadPolygonMaskPlugin } from "tsparticles-plugin-polygon-mask";
5
+ import { loadRollUpdater } from "tsparticles-updater-roll";
6
+ import { loadSlim } from "tsparticles-slim";
7
+ import { loadTiltUpdater } from "tsparticles-updater-tilt";
8
+ import { loadTwinkleUpdater } from "tsparticles-updater-twinkle";
9
+ import { loadWobbleUpdater } from "tsparticles-updater-wobble";
10
+ export async function loadFull(engine) {
11
+ await loadSlim(engine);
12
+ await loadRollUpdater(engine);
13
+ await loadTiltUpdater(engine);
14
+ await loadTwinkleUpdater(engine);
15
+ await loadWobbleUpdater(engine);
16
+ await loadExternalTrailInteraction(engine);
17
+ await loadAbsorbersPlugin(engine);
18
+ await loadEmittersPlugin(engine);
19
+ await loadPolygonMaskPlugin(engine);
20
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tsparticles",
3
- "version": "2.0.3",
3
+ "version": "2.0.6",
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": {
@@ -27,6 +27,10 @@
27
27
  "react-particles",
28
28
  "react",
29
29
  "reactjs",
30
+ "vue-particles",
31
+ "ngx-particles",
32
+ "angular-particles",
33
+ "particleground",
30
34
  "vue",
31
35
  "vuejs",
32
36
  "preact",
@@ -45,7 +49,15 @@
45
49
  "html",
46
50
  "css3",
47
51
  "animated",
48
- "background"
52
+ "background",
53
+ "confetti",
54
+ "canvas",
55
+ "fireworks",
56
+ "fireworks-js",
57
+ "confetti-js",
58
+ "confettijs",
59
+ "fireworksjs",
60
+ "canvas-confetti"
49
61
  ],
50
62
  "author": "Matteo Bruni <matteo.bruni@me.com>",
51
63
  "license": "MIT",
@@ -56,21 +68,21 @@
56
68
  "type": "github",
57
69
  "url": "https://github.com/sponsors/matteobruni"
58
70
  },
59
- "main": "index.js",
71
+ "main": "cjs/index.js",
60
72
  "module": "esm/index.js",
61
73
  "jsdelivr": "tsparticles.min.js",
62
74
  "unpkg": "tsparticles.min.js",
63
- "browser": "index.js",
64
- "types": "index.d.ts",
75
+ "types": "types/index.d.ts",
65
76
  "dependencies": {
66
- "tsparticles-engine": "^2.0.3",
67
- "tsparticles-interaction-external-trail": "^2.0.3",
68
- "tsparticles-plugin-absorbers": "^2.0.3",
69
- "tsparticles-plugin-emitters": "^2.0.3",
70
- "tsparticles-plugin-polygon-mask": "^2.0.3",
71
- "tsparticles-slim": "^2.0.3",
72
- "tsparticles-updater-roll": "^2.0.3",
73
- "tsparticles-updater-tilt": "^2.0.3",
74
- "tsparticles-updater-wobble": "^2.0.3"
77
+ "tsparticles-engine": "^2.0.6",
78
+ "tsparticles-interaction-external-trail": "^2.0.6",
79
+ "tsparticles-plugin-absorbers": "^2.0.6",
80
+ "tsparticles-plugin-emitters": "^2.0.6",
81
+ "tsparticles-plugin-polygon-mask": "^2.0.6",
82
+ "tsparticles-slim": "^2.0.6",
83
+ "tsparticles-updater-roll": "^2.0.6",
84
+ "tsparticles-updater-tilt": "^2.0.6",
85
+ "tsparticles-updater-twinkle": "^2.0.6",
86
+ "tsparticles-updater-wobble": "^2.0.6"
75
87
  }
76
88
  }