@tsparticles/confetti 4.1.3 → 4.2.0
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/browser/ConfettiOptions.js +12 -34
- package/browser/confetti.js +2 -2
- package/browser/confetti.lazy.js +2 -2
- package/cjs/ConfettiOptions.js +12 -34
- package/cjs/confetti.js +2 -2
- package/cjs/confetti.lazy.js +2 -2
- package/esm/ConfettiOptions.js +12 -34
- package/esm/confetti.js +2 -2
- package/esm/confetti.lazy.js +2 -2
- package/package.json +18 -18
- package/report.html +1 -1
- package/tsparticles.confetti.bundle.js +1127 -1894
- package/tsparticles.confetti.bundle.min.js +1 -1
- package/tsparticles.confetti.js +14 -36
- package/tsparticles.confetti.min.js +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { deepExtend, isArray, isNull, percentDenominator, } from "@tsparticles/engine";
|
|
1
|
+
import { deepExtend, isArray, isNull, loadProperty, percentDenominator, } from "@tsparticles/engine";
|
|
2
2
|
export class ConfettiOptions {
|
|
3
3
|
angle;
|
|
4
4
|
colors;
|
|
@@ -57,34 +57,18 @@ export class ConfettiOptions {
|
|
|
57
57
|
if (isNull(data)) {
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
|
-
|
|
61
|
-
this.angle = data.angle;
|
|
62
|
-
}
|
|
60
|
+
loadProperty(this, "angle", data.angle);
|
|
63
61
|
const count = data.count ?? data.particleCount;
|
|
64
62
|
if (count !== undefined) {
|
|
65
63
|
this.count = count;
|
|
66
64
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
this.decay = data.decay;
|
|
75
|
-
}
|
|
76
|
-
if (data.flat !== undefined) {
|
|
77
|
-
this.flat = data.flat;
|
|
78
|
-
}
|
|
79
|
-
if (data.gravity !== undefined) {
|
|
80
|
-
this.gravity = data.gravity;
|
|
81
|
-
}
|
|
82
|
-
if (data.drift !== undefined) {
|
|
83
|
-
this.drift = data.drift;
|
|
84
|
-
}
|
|
85
|
-
if (data.ticks !== undefined) {
|
|
86
|
-
this.ticks = data.ticks;
|
|
87
|
-
}
|
|
65
|
+
loadProperty(this, "spread", data.spread);
|
|
66
|
+
loadProperty(this, "startVelocity", data.startVelocity);
|
|
67
|
+
loadProperty(this, "decay", data.decay);
|
|
68
|
+
loadProperty(this, "flat", data.flat);
|
|
69
|
+
loadProperty(this, "gravity", data.gravity);
|
|
70
|
+
loadProperty(this, "drift", data.drift);
|
|
71
|
+
loadProperty(this, "ticks", data.ticks);
|
|
88
72
|
const origin = data.origin;
|
|
89
73
|
if (origin && !data.position) {
|
|
90
74
|
data.position = {
|
|
@@ -126,14 +110,8 @@ export class ConfettiOptions {
|
|
|
126
110
|
this.shapes = data.shapes;
|
|
127
111
|
}
|
|
128
112
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
if (data.zIndex !== undefined) {
|
|
133
|
-
this.zIndex = data.zIndex;
|
|
134
|
-
}
|
|
135
|
-
if (data.disableForReducedMotion !== undefined) {
|
|
136
|
-
this.disableForReducedMotion = data.disableForReducedMotion;
|
|
137
|
-
}
|
|
113
|
+
loadProperty(this, "scalar", data.scalar);
|
|
114
|
+
loadProperty(this, "zIndex", data.zIndex);
|
|
115
|
+
loadProperty(this, "disableForReducedMotion", data.disableForReducedMotion);
|
|
138
116
|
}
|
|
139
117
|
}
|
package/browser/confetti.js
CHANGED
|
@@ -17,7 +17,7 @@ import { loadWobbleUpdater } from "@tsparticles/updater-wobble";
|
|
|
17
17
|
import { setConfetti } from "./utils.js";
|
|
18
18
|
let initPromise = null;
|
|
19
19
|
async function doInitPlugins(engine) {
|
|
20
|
-
engine.checkVersion("4.
|
|
20
|
+
engine.checkVersion("4.2.0");
|
|
21
21
|
await engine.pluginManager.register(async (e) => {
|
|
22
22
|
await Promise.all([
|
|
23
23
|
loadBasic(e),
|
|
@@ -90,5 +90,5 @@ confetti.create = async (canvas, options = {}) => {
|
|
|
90
90
|
confetti.init = async () => {
|
|
91
91
|
await initPlugins(tsParticles);
|
|
92
92
|
};
|
|
93
|
-
confetti.version = "4.
|
|
93
|
+
confetti.version = "4.2.0";
|
|
94
94
|
globalThis.confetti = confetti;
|
package/browser/confetti.lazy.js
CHANGED
|
@@ -2,7 +2,7 @@ import { isString, tsParticles } from "@tsparticles/engine/lazy";
|
|
|
2
2
|
import { setConfetti } from "./utils.js";
|
|
3
3
|
let initPromise = null;
|
|
4
4
|
async function doInitPlugins(engine) {
|
|
5
|
-
engine.checkVersion("4.
|
|
5
|
+
engine.checkVersion("4.2.0");
|
|
6
6
|
await engine.pluginManager.register(async (e) => {
|
|
7
7
|
const [{ loadBasic }, { loadEmittersPluginSimple }, { loadMotionPlugin }, { loadCardSuitsShape }, { loadEmojiShape }, { loadHeartShape }, { loadImageShape }, { loadPolygonShape }, { loadSquareShape }, { loadStarShape }, { loadRotateUpdater }, { loadLifeUpdater }, { loadRollUpdater }, { loadTiltUpdater }, { loadWobbleUpdater },] = await Promise.all([
|
|
8
8
|
import("@tsparticles/basic/lazy"),
|
|
@@ -92,5 +92,5 @@ confetti.create = async (canvas, options = {}) => {
|
|
|
92
92
|
confetti.init = async () => {
|
|
93
93
|
await initPlugins(tsParticles);
|
|
94
94
|
};
|
|
95
|
-
confetti.version = "4.
|
|
95
|
+
confetti.version = "4.2.0";
|
|
96
96
|
globalThis.confetti = confetti;
|
package/cjs/ConfettiOptions.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { deepExtend, isArray, isNull, percentDenominator, } from "@tsparticles/engine";
|
|
1
|
+
import { deepExtend, isArray, isNull, loadProperty, percentDenominator, } from "@tsparticles/engine";
|
|
2
2
|
export class ConfettiOptions {
|
|
3
3
|
angle;
|
|
4
4
|
colors;
|
|
@@ -57,34 +57,18 @@ export class ConfettiOptions {
|
|
|
57
57
|
if (isNull(data)) {
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
|
-
|
|
61
|
-
this.angle = data.angle;
|
|
62
|
-
}
|
|
60
|
+
loadProperty(this, "angle", data.angle);
|
|
63
61
|
const count = data.count ?? data.particleCount;
|
|
64
62
|
if (count !== undefined) {
|
|
65
63
|
this.count = count;
|
|
66
64
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
this.decay = data.decay;
|
|
75
|
-
}
|
|
76
|
-
if (data.flat !== undefined) {
|
|
77
|
-
this.flat = data.flat;
|
|
78
|
-
}
|
|
79
|
-
if (data.gravity !== undefined) {
|
|
80
|
-
this.gravity = data.gravity;
|
|
81
|
-
}
|
|
82
|
-
if (data.drift !== undefined) {
|
|
83
|
-
this.drift = data.drift;
|
|
84
|
-
}
|
|
85
|
-
if (data.ticks !== undefined) {
|
|
86
|
-
this.ticks = data.ticks;
|
|
87
|
-
}
|
|
65
|
+
loadProperty(this, "spread", data.spread);
|
|
66
|
+
loadProperty(this, "startVelocity", data.startVelocity);
|
|
67
|
+
loadProperty(this, "decay", data.decay);
|
|
68
|
+
loadProperty(this, "flat", data.flat);
|
|
69
|
+
loadProperty(this, "gravity", data.gravity);
|
|
70
|
+
loadProperty(this, "drift", data.drift);
|
|
71
|
+
loadProperty(this, "ticks", data.ticks);
|
|
88
72
|
const origin = data.origin;
|
|
89
73
|
if (origin && !data.position) {
|
|
90
74
|
data.position = {
|
|
@@ -126,14 +110,8 @@ export class ConfettiOptions {
|
|
|
126
110
|
this.shapes = data.shapes;
|
|
127
111
|
}
|
|
128
112
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
if (data.zIndex !== undefined) {
|
|
133
|
-
this.zIndex = data.zIndex;
|
|
134
|
-
}
|
|
135
|
-
if (data.disableForReducedMotion !== undefined) {
|
|
136
|
-
this.disableForReducedMotion = data.disableForReducedMotion;
|
|
137
|
-
}
|
|
113
|
+
loadProperty(this, "scalar", data.scalar);
|
|
114
|
+
loadProperty(this, "zIndex", data.zIndex);
|
|
115
|
+
loadProperty(this, "disableForReducedMotion", data.disableForReducedMotion);
|
|
138
116
|
}
|
|
139
117
|
}
|
package/cjs/confetti.js
CHANGED
|
@@ -17,7 +17,7 @@ import { loadWobbleUpdater } from "@tsparticles/updater-wobble";
|
|
|
17
17
|
import { setConfetti } from "./utils.js";
|
|
18
18
|
let initPromise = null;
|
|
19
19
|
async function doInitPlugins(engine) {
|
|
20
|
-
engine.checkVersion("4.
|
|
20
|
+
engine.checkVersion("4.2.0");
|
|
21
21
|
await engine.pluginManager.register(async (e) => {
|
|
22
22
|
await Promise.all([
|
|
23
23
|
loadBasic(e),
|
|
@@ -90,5 +90,5 @@ confetti.create = async (canvas, options = {}) => {
|
|
|
90
90
|
confetti.init = async () => {
|
|
91
91
|
await initPlugins(tsParticles);
|
|
92
92
|
};
|
|
93
|
-
confetti.version = "4.
|
|
93
|
+
confetti.version = "4.2.0";
|
|
94
94
|
globalThis.confetti = confetti;
|
package/cjs/confetti.lazy.js
CHANGED
|
@@ -2,7 +2,7 @@ import { isString, tsParticles } from "@tsparticles/engine/lazy";
|
|
|
2
2
|
import { setConfetti } from "./utils.js";
|
|
3
3
|
let initPromise = null;
|
|
4
4
|
async function doInitPlugins(engine) {
|
|
5
|
-
engine.checkVersion("4.
|
|
5
|
+
engine.checkVersion("4.2.0");
|
|
6
6
|
await engine.pluginManager.register(async (e) => {
|
|
7
7
|
const [{ loadBasic }, { loadEmittersPluginSimple }, { loadMotionPlugin }, { loadCardSuitsShape }, { loadEmojiShape }, { loadHeartShape }, { loadImageShape }, { loadPolygonShape }, { loadSquareShape }, { loadStarShape }, { loadRotateUpdater }, { loadLifeUpdater }, { loadRollUpdater }, { loadTiltUpdater }, { loadWobbleUpdater },] = await Promise.all([
|
|
8
8
|
import("@tsparticles/basic/lazy"),
|
|
@@ -92,5 +92,5 @@ confetti.create = async (canvas, options = {}) => {
|
|
|
92
92
|
confetti.init = async () => {
|
|
93
93
|
await initPlugins(tsParticles);
|
|
94
94
|
};
|
|
95
|
-
confetti.version = "4.
|
|
95
|
+
confetti.version = "4.2.0";
|
|
96
96
|
globalThis.confetti = confetti;
|
package/esm/ConfettiOptions.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { deepExtend, isArray, isNull, percentDenominator, } from "@tsparticles/engine";
|
|
1
|
+
import { deepExtend, isArray, isNull, loadProperty, percentDenominator, } from "@tsparticles/engine";
|
|
2
2
|
export class ConfettiOptions {
|
|
3
3
|
angle;
|
|
4
4
|
colors;
|
|
@@ -57,34 +57,18 @@ export class ConfettiOptions {
|
|
|
57
57
|
if (isNull(data)) {
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
|
-
|
|
61
|
-
this.angle = data.angle;
|
|
62
|
-
}
|
|
60
|
+
loadProperty(this, "angle", data.angle);
|
|
63
61
|
const count = data.count ?? data.particleCount;
|
|
64
62
|
if (count !== undefined) {
|
|
65
63
|
this.count = count;
|
|
66
64
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
this.decay = data.decay;
|
|
75
|
-
}
|
|
76
|
-
if (data.flat !== undefined) {
|
|
77
|
-
this.flat = data.flat;
|
|
78
|
-
}
|
|
79
|
-
if (data.gravity !== undefined) {
|
|
80
|
-
this.gravity = data.gravity;
|
|
81
|
-
}
|
|
82
|
-
if (data.drift !== undefined) {
|
|
83
|
-
this.drift = data.drift;
|
|
84
|
-
}
|
|
85
|
-
if (data.ticks !== undefined) {
|
|
86
|
-
this.ticks = data.ticks;
|
|
87
|
-
}
|
|
65
|
+
loadProperty(this, "spread", data.spread);
|
|
66
|
+
loadProperty(this, "startVelocity", data.startVelocity);
|
|
67
|
+
loadProperty(this, "decay", data.decay);
|
|
68
|
+
loadProperty(this, "flat", data.flat);
|
|
69
|
+
loadProperty(this, "gravity", data.gravity);
|
|
70
|
+
loadProperty(this, "drift", data.drift);
|
|
71
|
+
loadProperty(this, "ticks", data.ticks);
|
|
88
72
|
const origin = data.origin;
|
|
89
73
|
if (origin && !data.position) {
|
|
90
74
|
data.position = {
|
|
@@ -126,14 +110,8 @@ export class ConfettiOptions {
|
|
|
126
110
|
this.shapes = data.shapes;
|
|
127
111
|
}
|
|
128
112
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
if (data.zIndex !== undefined) {
|
|
133
|
-
this.zIndex = data.zIndex;
|
|
134
|
-
}
|
|
135
|
-
if (data.disableForReducedMotion !== undefined) {
|
|
136
|
-
this.disableForReducedMotion = data.disableForReducedMotion;
|
|
137
|
-
}
|
|
113
|
+
loadProperty(this, "scalar", data.scalar);
|
|
114
|
+
loadProperty(this, "zIndex", data.zIndex);
|
|
115
|
+
loadProperty(this, "disableForReducedMotion", data.disableForReducedMotion);
|
|
138
116
|
}
|
|
139
117
|
}
|
package/esm/confetti.js
CHANGED
|
@@ -17,7 +17,7 @@ import { loadWobbleUpdater } from "@tsparticles/updater-wobble";
|
|
|
17
17
|
import { setConfetti } from "./utils.js";
|
|
18
18
|
let initPromise = null;
|
|
19
19
|
async function doInitPlugins(engine) {
|
|
20
|
-
engine.checkVersion("4.
|
|
20
|
+
engine.checkVersion("4.2.0");
|
|
21
21
|
await engine.pluginManager.register(async (e) => {
|
|
22
22
|
await Promise.all([
|
|
23
23
|
loadBasic(e),
|
|
@@ -90,5 +90,5 @@ confetti.create = async (canvas, options = {}) => {
|
|
|
90
90
|
confetti.init = async () => {
|
|
91
91
|
await initPlugins(tsParticles);
|
|
92
92
|
};
|
|
93
|
-
confetti.version = "4.
|
|
93
|
+
confetti.version = "4.2.0";
|
|
94
94
|
globalThis.confetti = confetti;
|
package/esm/confetti.lazy.js
CHANGED
|
@@ -2,7 +2,7 @@ import { isString, tsParticles } from "@tsparticles/engine/lazy";
|
|
|
2
2
|
import { setConfetti } from "./utils.js";
|
|
3
3
|
let initPromise = null;
|
|
4
4
|
async function doInitPlugins(engine) {
|
|
5
|
-
engine.checkVersion("4.
|
|
5
|
+
engine.checkVersion("4.2.0");
|
|
6
6
|
await engine.pluginManager.register(async (e) => {
|
|
7
7
|
const [{ loadBasic }, { loadEmittersPluginSimple }, { loadMotionPlugin }, { loadCardSuitsShape }, { loadEmojiShape }, { loadHeartShape }, { loadImageShape }, { loadPolygonShape }, { loadSquareShape }, { loadStarShape }, { loadRotateUpdater }, { loadLifeUpdater }, { loadRollUpdater }, { loadTiltUpdater }, { loadWobbleUpdater },] = await Promise.all([
|
|
8
8
|
import("@tsparticles/basic/lazy"),
|
|
@@ -92,5 +92,5 @@ confetti.create = async (canvas, options = {}) => {
|
|
|
92
92
|
confetti.init = async () => {
|
|
93
93
|
await initPlugins(tsParticles);
|
|
94
94
|
};
|
|
95
|
-
confetti.version = "4.
|
|
95
|
+
confetti.version = "4.2.0";
|
|
96
96
|
globalThis.confetti = confetti;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/confetti",
|
|
3
|
-
"version": "4.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "4.2.0",
|
|
4
|
+
"description": "tsParticles confetti bundle — easily create confetti, confetti cannon, confetti explosions, confetti falling, and confetti parade animations with presets. Ready to use components available 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": {
|
|
7
7
|
"type": "git",
|
|
@@ -105,22 +105,22 @@
|
|
|
105
105
|
"./package.json": "./package.json"
|
|
106
106
|
},
|
|
107
107
|
"dependencies": {
|
|
108
|
-
"@tsparticles/basic": "4.
|
|
109
|
-
"@tsparticles/engine": "4.
|
|
110
|
-
"@tsparticles/plugin-emitters": "4.
|
|
111
|
-
"@tsparticles/plugin-motion": "4.
|
|
112
|
-
"@tsparticles/shape-cards": "4.
|
|
113
|
-
"@tsparticles/shape-emoji": "4.
|
|
114
|
-
"@tsparticles/shape-heart": "4.
|
|
115
|
-
"@tsparticles/shape-image": "4.
|
|
116
|
-
"@tsparticles/shape-polygon": "4.
|
|
117
|
-
"@tsparticles/shape-square": "4.
|
|
118
|
-
"@tsparticles/shape-star": "4.
|
|
119
|
-
"@tsparticles/updater-life": "4.
|
|
120
|
-
"@tsparticles/updater-roll": "4.
|
|
121
|
-
"@tsparticles/updater-rotate": "4.
|
|
122
|
-
"@tsparticles/updater-tilt": "4.
|
|
123
|
-
"@tsparticles/updater-wobble": "4.
|
|
108
|
+
"@tsparticles/basic": "4.2.0",
|
|
109
|
+
"@tsparticles/engine": "4.2.0",
|
|
110
|
+
"@tsparticles/plugin-emitters": "4.2.0",
|
|
111
|
+
"@tsparticles/plugin-motion": "4.2.0",
|
|
112
|
+
"@tsparticles/shape-cards": "4.2.0",
|
|
113
|
+
"@tsparticles/shape-emoji": "4.2.0",
|
|
114
|
+
"@tsparticles/shape-heart": "4.2.0",
|
|
115
|
+
"@tsparticles/shape-image": "4.2.0",
|
|
116
|
+
"@tsparticles/shape-polygon": "4.2.0",
|
|
117
|
+
"@tsparticles/shape-square": "4.2.0",
|
|
118
|
+
"@tsparticles/shape-star": "4.2.0",
|
|
119
|
+
"@tsparticles/updater-life": "4.2.0",
|
|
120
|
+
"@tsparticles/updater-roll": "4.2.0",
|
|
121
|
+
"@tsparticles/updater-rotate": "4.2.0",
|
|
122
|
+
"@tsparticles/updater-tilt": "4.2.0",
|
|
123
|
+
"@tsparticles/updater-wobble": "4.2.0"
|
|
124
124
|
},
|
|
125
125
|
"publishConfig": {
|
|
126
126
|
"access": "public"
|