tsparticles 3.0.0-alpha.1 → 3.0.0-beta.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 +18 -17
- package/browser/index.js +10 -10
- package/browser/package.json +1 -0
- package/cjs/index.js +10 -21
- package/cjs/package.json +1 -0
- package/esm/index.js +10 -10
- package/esm/package.json +1 -0
- package/package.json +43 -20
- package/report.html +4 -4
- package/tsparticles.bundle.js +5931 -5242
- package/tsparticles.bundle.min.js +1 -1
- package/tsparticles.bundle.min.js.LICENSE.txt +1 -8
- package/tsparticles.js +12 -12
- package/tsparticles.min.js +1 -1
- package/tsparticles.min.js.LICENSE.txt +1 -8
- package/types/index.d.ts +1 -1
- package/umd/index.js +10 -10
package/README.md
CHANGED
|
@@ -5,18 +5,19 @@
|
|
|
5
5
|
[](https://www.jsdelivr.com/package/npm/tsparticles) [](https://www.npmjs.com/package/tsparticles) [](https://www.npmjs.com/package/tsparticles) [](https://github.com/sponsors/matteobruni)
|
|
6
6
|
|
|
7
7
|
[tsParticles](https://github.com/matteobruni/tsparticles) full bundle loads all the v1 features to
|
|
8
|
-
a
|
|
8
|
+
a `@tsparticles/engine` instance.
|
|
9
9
|
|
|
10
10
|
**Included Packages**
|
|
11
11
|
|
|
12
|
-
- [tsparticles
|
|
13
|
-
- [tsparticles-
|
|
14
|
-
- [tsparticles-
|
|
15
|
-
- [tsparticles
|
|
16
|
-
- [tsparticles-
|
|
17
|
-
- [tsparticles
|
|
18
|
-
- [tsparticles
|
|
19
|
-
- [tsparticles
|
|
12
|
+
- [@tsparticles/slim (and all its dependencies)](https://github.com/matteobruni/tsparticles/tree/main/bundles/slim)
|
|
13
|
+
- [@tsparticles/interaction-external-trail](https://github.com/matteobruni/tsparticles/tree/main/interactions/external/trail)
|
|
14
|
+
- [@tsparticles/plugin-absorbers](https://github.com/matteobruni/tsparticles/tree/main/plugins/absorbers)
|
|
15
|
+
- [@tsparticles/plugin-emitters](https://github.com/matteobruni/tsparticles/tree/main/plugins/emitters)
|
|
16
|
+
- [@tsparticles/updater-destroy](https://github.com/matteobruni/tsparticles/tree/main/updaters/destroy)
|
|
17
|
+
- [@tsparticles/updater-roll](https://github.com/matteobruni/tsparticles/tree/main/updaters/roll)
|
|
18
|
+
- [@tsparticles/updater-tilt](https://github.com/matteobruni/tsparticles/tree/main/updaters/tilt)
|
|
19
|
+
- [@tsparticles/updater-twinkle](https://github.com/matteobruni/tsparticles/tree/main/updaters/twinkle)
|
|
20
|
+
- [@tsparticles/updater-wobble](https://github.com/matteobruni/tsparticles/tree/main/updaters/wobble)
|
|
20
21
|
|
|
21
22
|
## How to use it
|
|
22
23
|
|
|
@@ -42,8 +43,8 @@ All new features will be added as external packages, this bundle is recommended
|
|
|
42
43
|
This installation requires more work since all dependencies must be included in the page. Some lines above are all
|
|
43
44
|
specified in the **Included Packages** section.
|
|
44
45
|
|
|
45
|
-
A note about
|
|
46
|
-
is enough, and if this is done the
|
|
46
|
+
A note about `@tsparticles/slim` can be made: it's not mandatory to include all of its dependencies, the slim bundle file
|
|
47
|
+
is enough, and if this is done the `@tsparticles/engine` is not needed, since it's already bundled in the slim bundle.
|
|
47
48
|
|
|
48
49
|
### Usage
|
|
49
50
|
|
|
@@ -73,7 +74,7 @@ _Class Components_
|
|
|
73
74
|
```typescript jsx
|
|
74
75
|
import React from "react";
|
|
75
76
|
import Particles from "react-particles";
|
|
76
|
-
import type { Engine } from "tsparticles
|
|
77
|
+
import type { Engine } from "@tsparticles/engine";
|
|
77
78
|
import { loadFull } from "tsparticles";
|
|
78
79
|
|
|
79
80
|
export class ParticlesContainer extends PureComponent<unknown> {
|
|
@@ -98,7 +99,7 @@ _Hooks / Functional Components_
|
|
|
98
99
|
```typescript jsx
|
|
99
100
|
import React, { useCallback } from "react";
|
|
100
101
|
import Particles from "react-particles";
|
|
101
|
-
import type { Engine } from "tsparticles
|
|
102
|
+
import type { Engine } from "@tsparticles/engine";
|
|
102
103
|
import { loadFull } from "tsparticles";
|
|
103
104
|
|
|
104
105
|
export function ParticlesContainer(props: unknown) {
|
|
@@ -137,7 +138,7 @@ async function particlesInit(engine: Engine): Promise<void> {
|
|
|
137
138
|
### Angular
|
|
138
139
|
|
|
139
140
|
```html
|
|
140
|
-
<
|
|
141
|
+
<ng-particles [id]="id" [options]="options" [particlesInit]="particlesInit"></ng-particles>
|
|
141
142
|
```
|
|
142
143
|
|
|
143
144
|
```ts
|
|
@@ -155,9 +156,9 @@ async function particlesInit(engine: Engine): Promise<void> {
|
|
|
155
156
|
```sveltehtml
|
|
156
157
|
|
|
157
158
|
<Particles
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
id="tsparticles"
|
|
160
|
+
options={options}
|
|
161
|
+
particlesInit={particlesInit}
|
|
161
162
|
/>
|
|
162
163
|
```
|
|
163
164
|
|
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
|
|
12
|
-
await
|
|
13
|
-
await
|
|
14
|
-
await
|
|
15
|
-
await
|
|
16
|
-
await
|
|
17
|
-
await
|
|
18
|
-
await
|
|
19
|
-
await
|
|
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
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "type": "module" }
|
package/cjs/index.js
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.loadFull = void 0;
|
|
13
4
|
const plugin_absorbers_1 = require("@tsparticles/plugin-absorbers");
|
|
@@ -19,17 +10,15 @@ const slim_1 = require("@tsparticles/slim");
|
|
|
19
10
|
const updater_tilt_1 = require("@tsparticles/updater-tilt");
|
|
20
11
|
const updater_twinkle_1 = require("@tsparticles/updater-twinkle");
|
|
21
12
|
const updater_wobble_1 = require("@tsparticles/updater-wobble");
|
|
22
|
-
function loadFull(engine) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
yield (0, plugin_emitters_1.loadEmittersPlugin)(engine);
|
|
33
|
-
});
|
|
13
|
+
async function loadFull(engine, refresh = true) {
|
|
14
|
+
await (0, updater_destroy_1.loadDestroyUpdater)(engine, false);
|
|
15
|
+
await (0, updater_roll_1.loadRollUpdater)(engine, false);
|
|
16
|
+
await (0, updater_tilt_1.loadTiltUpdater)(engine, false);
|
|
17
|
+
await (0, updater_twinkle_1.loadTwinkleUpdater)(engine, false);
|
|
18
|
+
await (0, updater_wobble_1.loadWobbleUpdater)(engine, false);
|
|
19
|
+
await (0, interaction_external_trail_1.loadExternalTrailInteraction)(engine, false);
|
|
20
|
+
await (0, plugin_absorbers_1.loadAbsorbersPlugin)(engine, false);
|
|
21
|
+
await (0, plugin_emitters_1.loadEmittersPlugin)(engine, false);
|
|
22
|
+
await (0, slim_1.loadSlim)(engine, refresh);
|
|
34
23
|
}
|
|
35
24
|
exports.loadFull = loadFull;
|
package/cjs/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "type": "commonjs" }
|
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
|
|
12
|
-
await
|
|
13
|
-
await
|
|
14
|
-
await
|
|
15
|
-
await
|
|
16
|
-
await
|
|
17
|
-
await
|
|
18
|
-
await
|
|
19
|
-
await
|
|
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/esm/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "type": "module" }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tsparticles",
|
|
3
|
-
"version": "3.0.0-
|
|
3
|
+
"version": "3.0.0-beta.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": {
|
|
@@ -66,28 +66,51 @@
|
|
|
66
66
|
"bugs": {
|
|
67
67
|
"url": "https://github.com/matteobruni/tsparticles/issues"
|
|
68
68
|
},
|
|
69
|
-
"funding":
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
"funding": [
|
|
70
|
+
{
|
|
71
|
+
"type": "github",
|
|
72
|
+
"url": "https://github.com/sponsors/matteobruni"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"type": "github",
|
|
76
|
+
"url": "https://github.com/sponsors/tsparticles"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"type": "buymeacoffee",
|
|
80
|
+
"url": "https://www.buymeacoffee.com/matteobruni"
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"sideEffects": false,
|
|
75
84
|
"jsdelivr": "tsparticles.bundle.min.js",
|
|
76
85
|
"unpkg": "tsparticles.bundle.min.js",
|
|
86
|
+
"browser": "browser/index.js",
|
|
87
|
+
"main": "cjs/index.js",
|
|
88
|
+
"module": "esm/index.js",
|
|
77
89
|
"types": "types/index.d.ts",
|
|
78
|
-
"
|
|
79
|
-
"
|
|
90
|
+
"exports": {
|
|
91
|
+
".": {
|
|
92
|
+
"types": "./types/index.d.ts",
|
|
93
|
+
"browser": "./browser/index.js",
|
|
94
|
+
"import": "./esm/index.js",
|
|
95
|
+
"require": "./cjs/index.js",
|
|
96
|
+
"umd": "./umd/index.js",
|
|
97
|
+
"default": "./cjs/index.js"
|
|
98
|
+
},
|
|
99
|
+
"./package.json": "./package.json"
|
|
80
100
|
},
|
|
81
101
|
"dependencies": {
|
|
82
|
-
"@tsparticles/engine": "^3.0.0-
|
|
83
|
-
"@tsparticles/interaction-external-trail": "^3.0.0-
|
|
84
|
-
"@tsparticles/plugin-absorbers": "^3.0.0-
|
|
85
|
-
"@tsparticles/plugin-emitters": "^3.0.0-
|
|
86
|
-
"@tsparticles/slim": "^3.0.0-
|
|
87
|
-
"@tsparticles/updater-destroy": "^3.0.0-
|
|
88
|
-
"@tsparticles/updater-roll": "^3.0.0-
|
|
89
|
-
"@tsparticles/updater-tilt": "^3.0.0-
|
|
90
|
-
"@tsparticles/updater-twinkle": "^3.0.0-
|
|
91
|
-
"@tsparticles/updater-wobble": "^3.0.0-
|
|
102
|
+
"@tsparticles/engine": "^3.0.0-beta.1",
|
|
103
|
+
"@tsparticles/interaction-external-trail": "^3.0.0-beta.1",
|
|
104
|
+
"@tsparticles/plugin-absorbers": "^3.0.0-beta.1",
|
|
105
|
+
"@tsparticles/plugin-emitters": "^3.0.0-beta.1",
|
|
106
|
+
"@tsparticles/slim": "^3.0.0-beta.1",
|
|
107
|
+
"@tsparticles/updater-destroy": "^3.0.0-beta.1",
|
|
108
|
+
"@tsparticles/updater-roll": "^3.0.0-beta.1",
|
|
109
|
+
"@tsparticles/updater-tilt": "^3.0.0-beta.1",
|
|
110
|
+
"@tsparticles/updater-twinkle": "^3.0.0-beta.1",
|
|
111
|
+
"@tsparticles/updater-wobble": "^3.0.0-beta.1"
|
|
112
|
+
},
|
|
113
|
+
"publishConfig": {
|
|
114
|
+
"access": "public"
|
|
92
115
|
}
|
|
93
|
-
}
|
|
116
|
+
}
|