@tsparticles/engine 3.0.0-beta.1 → 3.0.0-beta.2
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 +8 -8
- package/browser/Core/Engine.js +1 -1
- package/browser/Core/Particles.js +3 -2
- package/cjs/Core/Engine.js +1 -1
- package/cjs/Core/Particles.js +3 -2
- package/esm/Core/Engine.js +1 -1
- package/esm/Core/Particles.js +3 -2
- package/package.json +3 -3
- package/report.html +23 -5
- package/scripts/install.js +8 -8
- package/tsparticles.engine.js +5 -4
- package/tsparticles.engine.min.js +1 -1
- package/tsparticles.engine.min.js.LICENSE.txt +1 -1
- package/umd/Core/Engine.js +1 -1
- package/umd/Core/Particles.js +3 -2
package/README.md
CHANGED
|
@@ -11,11 +11,11 @@ React.js, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Inferno, Riot.j
|
|
|
11
11
|
[](https://www.npmjs.com/package/tsparticles)
|
|
12
12
|
[](https://www.npmjs.com/package/tsparticles)
|
|
13
13
|
[](https://lerna.js.org/)
|
|
14
|
-
[](https://www.codacy.com/manual/ar3s/tsparticles?utm_source=github.com&utm_medium=referral&utm_content=
|
|
14
|
+
[](https://www.codefactor.io/repository/github/tsparticles/tsparticles)
|
|
15
|
+
[](https://www.codacy.com/manual/ar3s/tsparticles?utm_source=github.com&utm_medium=referral&utm_content=tsparticles/tsparticles&utm_campaign=Badge_Grade)
|
|
16
16
|
[](https://openbase.com/js/tsparticles?utm_source=embedded&utm_medium=badge&utm_campaign=rating-badge&utm_term=js/tsparticles)
|
|
17
|
-
[](https://gitpod.io/#https://github.com/
|
|
18
|
-
[](https://gitpod.io/#https://github.com/tsparticles/tsparticles)
|
|
18
|
+
[](https://repl.it/github/tsparticles/tsparticles)
|
|
19
19
|
|
|
20
20
|
[](https://discord.gg/hACwv45Hme)
|
|
21
21
|
[](https://join.slack.com/t/tsparticles/shared_invite/enQtOTcxNTQxNjQ4NzkxLWE2MTZhZWExMWRmOWI5MTMxNjczOGE1Yjk0MjViYjdkYTUzODM3OTc5MGQ5MjFlODc4MzE0N2Q1OWQxZDc1YzI)
|
|
@@ -114,7 +114,7 @@ particles.js
|
|
|
114
114
|
it's even easier**.
|
|
115
115
|
|
|
116
116
|
You'll find the
|
|
117
|
-
instructions [below](https://github.com/
|
|
117
|
+
instructions [below](https://github.com/tsparticles/tsparticles/blob/main/README.md#library-installation), with all the
|
|
118
118
|
links you need, and _don't be scared by **TypeScript**, it's just the source language_.
|
|
119
119
|
|
|
120
120
|
**The output files are just JavaScript**. 🤩
|
|
@@ -124,7 +124,7 @@ all
|
|
|
124
124
|
files splitted for `import` syntax.
|
|
125
125
|
|
|
126
126
|
**If you are interested** there are some _simple instructions_
|
|
127
|
-
just [below](https://github.com/
|
|
127
|
+
just [below](https://github.com/tsparticles/tsparticles/blob/main/README.md#library-installation) to guide you to
|
|
128
128
|
migrate from the old particles.js library.
|
|
129
129
|
|
|
130
130
|
## **_Library installation_**
|
|
@@ -839,10 +839,10 @@ e --> u
|
|
|
839
839
|
|
|
840
840
|
<p>
|
|
841
841
|
<a href="https://www.jetbrains.com/?from=tsParticles">
|
|
842
|
-
<img src="https://raw.githubusercontent.com/
|
|
842
|
+
<img src="https://raw.githubusercontent.com/tsparticles/tsparticles/gh-pages/images/jetbrains-logos/jetbrains-variant-4.png" height="150" alt="JetBrains" />
|
|
843
843
|
</a>
|
|
844
844
|
<a href="https://www.jetbrains.com/webstorm/?from=tsParticles">
|
|
845
|
-
<img src="https://raw.githubusercontent.com/
|
|
845
|
+
<img src="https://raw.githubusercontent.com/tsparticles/tsparticles/gh-pages/images/jetbrains-logos/logo.png" height="150" alt="JetBrains" />
|
|
846
846
|
</a>
|
|
847
847
|
</p>
|
|
848
848
|
|
package/browser/Core/Engine.js
CHANGED
|
@@ -70,8 +70,9 @@ export class Particles {
|
|
|
70
70
|
return false;
|
|
71
71
|
}
|
|
72
72
|
particle.destroy(override);
|
|
73
|
+
const zIdx = this._zArray.indexOf(particle);
|
|
73
74
|
this._array.splice(index, 1);
|
|
74
|
-
this._zArray
|
|
75
|
+
this._zArray.splice(zIdx, 1);
|
|
75
76
|
this.pool.push(particle);
|
|
76
77
|
this._engine.dispatchEvent("particleRemoved", {
|
|
77
78
|
container: this._container,
|
|
@@ -172,7 +173,7 @@ export class Particles {
|
|
|
172
173
|
}
|
|
173
174
|
this.addManualParticles();
|
|
174
175
|
if (!handled) {
|
|
175
|
-
const particlesOptions = options.particles, groups =
|
|
176
|
+
const particlesOptions = options.particles, groups = particlesOptions.groups;
|
|
176
177
|
for (const group in groups) {
|
|
177
178
|
const groupOptions = groups[group];
|
|
178
179
|
for (let i = this.count, j = 0; j < groupOptions.number?.value && i < particlesOptions.number.value; i++, j++) {
|
package/cjs/Core/Engine.js
CHANGED
package/cjs/Core/Particles.js
CHANGED
|
@@ -73,8 +73,9 @@ class Particles {
|
|
|
73
73
|
return false;
|
|
74
74
|
}
|
|
75
75
|
particle.destroy(override);
|
|
76
|
+
const zIdx = this._zArray.indexOf(particle);
|
|
76
77
|
this._array.splice(index, 1);
|
|
77
|
-
this._zArray
|
|
78
|
+
this._zArray.splice(zIdx, 1);
|
|
78
79
|
this.pool.push(particle);
|
|
79
80
|
this._engine.dispatchEvent("particleRemoved", {
|
|
80
81
|
container: this._container,
|
|
@@ -175,7 +176,7 @@ class Particles {
|
|
|
175
176
|
}
|
|
176
177
|
this.addManualParticles();
|
|
177
178
|
if (!handled) {
|
|
178
|
-
const particlesOptions = options.particles, groups =
|
|
179
|
+
const particlesOptions = options.particles, groups = particlesOptions.groups;
|
|
179
180
|
for (const group in groups) {
|
|
180
181
|
const groupOptions = groups[group];
|
|
181
182
|
for (let i = this.count, j = 0; j < groupOptions.number?.value && i < particlesOptions.number.value; i++, j++) {
|
package/esm/Core/Engine.js
CHANGED
package/esm/Core/Particles.js
CHANGED
|
@@ -70,8 +70,9 @@ export class Particles {
|
|
|
70
70
|
return false;
|
|
71
71
|
}
|
|
72
72
|
particle.destroy(override);
|
|
73
|
+
const zIdx = this._zArray.indexOf(particle);
|
|
73
74
|
this._array.splice(index, 1);
|
|
74
|
-
this._zArray
|
|
75
|
+
this._zArray.splice(zIdx, 1);
|
|
75
76
|
this.pool.push(particle);
|
|
76
77
|
this._engine.dispatchEvent("particleRemoved", {
|
|
77
78
|
container: this._container,
|
|
@@ -172,7 +173,7 @@ export class Particles {
|
|
|
172
173
|
}
|
|
173
174
|
this.addManualParticles();
|
|
174
175
|
if (!handled) {
|
|
175
|
-
const particlesOptions = options.particles, groups =
|
|
176
|
+
const particlesOptions = options.particles, groups = particlesOptions.groups;
|
|
176
177
|
for (const group in groups) {
|
|
177
178
|
const groupOptions = groups[group];
|
|
178
179
|
for (let i = this.count, j = 0; j < groupOptions.number?.value && i < particlesOptions.number.value; i++, j++) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/engine",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.2",
|
|
4
4
|
"description": "Easily create highly customizable particle, confetti and fireworks 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
|
"scripts": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/
|
|
11
|
+
"url": "git+https://github.com/tsparticles/tsparticles.git",
|
|
12
12
|
"directory": "engine"
|
|
13
13
|
},
|
|
14
14
|
"keywords": [
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"author": "Matteo Bruni <matteo.bruni@me.com>",
|
|
68
68
|
"license": "MIT",
|
|
69
69
|
"bugs": {
|
|
70
|
-
"url": "https://github.com/
|
|
70
|
+
"url": "https://github.com/tsparticles/tsparticles/issues"
|
|
71
71
|
},
|
|
72
72
|
"funding": [
|
|
73
73
|
{
|