tsparticles 2.0.5 → 2.1.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 +26 -15
- package/{bundle.js → browser/bundle.js} +0 -0
- package/browser/index.js +20 -0
- package/cjs/bundle.js +23 -0
- package/cjs/index.js +24 -0
- package/esm/bundle.js +6 -0
- package/esm/index.js +20 -0
- package/package.json +26 -15
- package/report.html +2 -2
- package/tsparticles.bundle.js +8857 -8693
- package/tsparticles.bundle.min.js +2 -2
- package/tsparticles.js +64 -158
- package/tsparticles.min.js +2 -2
- package/{bundle.d.ts → types/bundle.d.ts} +0 -0
- package/{index.d.ts → types/index.d.ts} +0 -0
- package/umd/bundle.js +33 -0
- package/umd/index.js +34 -0
- package/107.js +0 -1780
- package/index.js +0 -31
package/README.md
CHANGED
|
@@ -51,11 +51,13 @@ is enough, and if this is done the `tsparticles-engine` is not needed, since it'
|
|
|
51
51
|
Once the scripts are loaded you can set up `tsParticles` like this:
|
|
52
52
|
|
|
53
53
|
```javascript
|
|
54
|
-
|
|
54
|
+
(async () => {
|
|
55
|
+
await loadFull(tsParticles); // not needed if using the bundle script, required for any other installation
|
|
55
56
|
|
|
56
|
-
tsParticles.load("tsparticles", {
|
|
57
|
-
|
|
58
|
-
});
|
|
57
|
+
await tsParticles.load("tsparticles", {
|
|
58
|
+
/* options */
|
|
59
|
+
});
|
|
60
|
+
})();
|
|
59
61
|
```
|
|
60
62
|
|
|
61
63
|
### React.js / Preact / Inferno
|
|
@@ -117,10 +119,14 @@ export function ParticlesContainer(props: unknown) {
|
|
|
117
119
|
_The syntax for `Vue.js 2.x` and `3.x` is the same_
|
|
118
120
|
|
|
119
121
|
```vue
|
|
120
|
-
<Particles id="tsparticles" :particlesInit="particlesInit"
|
|
122
|
+
<Particles id="tsparticles" :particlesInit="particlesInit" :options="options" />
|
|
121
123
|
```
|
|
122
124
|
|
|
123
125
|
```js
|
|
126
|
+
const options = {
|
|
127
|
+
/* custom options */
|
|
128
|
+
};
|
|
129
|
+
|
|
124
130
|
async function particlesInit(engine: Engine): Promise<void> {
|
|
125
131
|
await loadFull(engine);
|
|
126
132
|
}
|
|
@@ -129,15 +135,14 @@ async function particlesInit(engine: Engine): Promise<void> {
|
|
|
129
135
|
### Angular
|
|
130
136
|
|
|
131
137
|
```html
|
|
132
|
-
<ng-particles
|
|
133
|
-
[id]="id"
|
|
134
|
-
[options]="particlesOptions"
|
|
135
|
-
(particlesLoaded)="particlesLoaded($event)"
|
|
136
|
-
[particlesInit]="particlesInit"
|
|
137
|
-
></ng-particles>
|
|
138
|
+
<ng-particles [id]="id" [options]="options" [particlesInit]="particlesInit"></ng-particles>
|
|
138
139
|
```
|
|
139
140
|
|
|
140
141
|
```ts
|
|
142
|
+
const options = {
|
|
143
|
+
/* custom options */
|
|
144
|
+
};
|
|
145
|
+
|
|
141
146
|
async function particlesInit(engine: Engine): Promise<void> {
|
|
142
147
|
await loadFull(engine);
|
|
143
148
|
}
|
|
@@ -147,15 +152,21 @@ async function particlesInit(engine: Engine): Promise<void> {
|
|
|
147
152
|
|
|
148
153
|
```sveltehtml
|
|
149
154
|
|
|
155
|
+
<script>
|
|
156
|
+
</script>
|
|
150
157
|
<Particles
|
|
151
158
|
id="tsparticles"
|
|
152
|
-
|
|
153
|
-
|
|
159
|
+
options={options}
|
|
160
|
+
particlesInit={particlesInit}
|
|
154
161
|
/>
|
|
155
162
|
```
|
|
156
163
|
|
|
157
164
|
```js
|
|
158
|
-
let
|
|
159
|
-
|
|
165
|
+
let options = {
|
|
166
|
+
/* custom options */
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
let particlesInit = async (engine) => {
|
|
170
|
+
await loadFull(engine);
|
|
160
171
|
};
|
|
161
172
|
```
|
|
File without changes
|
package/browser/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/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
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.
|
|
3
|
+
"version": "2.1.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": {
|
|
@@ -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,22 +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
|
-
"
|
|
64
|
-
"types": "index.d.ts",
|
|
75
|
+
"types": "types/index.d.ts",
|
|
65
76
|
"dependencies": {
|
|
66
|
-
"tsparticles-engine": "^2.
|
|
67
|
-
"tsparticles-interaction-external-trail": "^2.
|
|
68
|
-
"tsparticles-plugin-absorbers": "^2.
|
|
69
|
-
"tsparticles-plugin-emitters": "^2.
|
|
70
|
-
"tsparticles-plugin-polygon-mask": "^2.
|
|
71
|
-
"tsparticles-slim": "^2.
|
|
72
|
-
"tsparticles-updater-roll": "^2.
|
|
73
|
-
"tsparticles-updater-tilt": "^2.
|
|
74
|
-
"tsparticles-updater-twinkle": "^2.
|
|
75
|
-
"tsparticles-updater-wobble": "^2.
|
|
77
|
+
"tsparticles-engine": "^2.1.1",
|
|
78
|
+
"tsparticles-interaction-external-trail": "^2.1.1",
|
|
79
|
+
"tsparticles-plugin-absorbers": "^2.1.1",
|
|
80
|
+
"tsparticles-plugin-emitters": "^2.1.1",
|
|
81
|
+
"tsparticles-plugin-polygon-mask": "^2.1.1",
|
|
82
|
+
"tsparticles-slim": "^2.1.1",
|
|
83
|
+
"tsparticles-updater-roll": "^2.1.1",
|
|
84
|
+
"tsparticles-updater-tilt": "^2.1.1",
|
|
85
|
+
"tsparticles-updater-twinkle": "^2.1.1",
|
|
86
|
+
"tsparticles-updater-wobble": "^2.1.1"
|
|
76
87
|
}
|
|
77
88
|
}
|