@tsparticles/preset-confetti 3.0.0-alpha.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 +25 -113
- package/browser/bundle.js +2 -2
- package/browser/index.js +16 -46
- package/browser/options.js +108 -112
- package/browser/package.json +1 -0
- package/cjs/bundle.js +4 -14
- package/cjs/index.js +17 -63
- package/cjs/options.js +109 -114
- package/cjs/package.json +1 -0
- package/esm/bundle.js +2 -2
- package/esm/index.js +16 -46
- package/esm/options.js +108 -112
- package/esm/package.json +1 -0
- package/package.json +19 -23
- package/report.html +5 -5
- package/tsparticles.preset.confetti.bundle.js +3453 -3727
- package/tsparticles.preset.confetti.bundle.min.js +1 -1
- package/tsparticles.preset.confetti.bundle.min.js.LICENSE.txt +1 -8
- package/tsparticles.preset.confetti.js +152 -339
- package/tsparticles.preset.confetti.min.js +1 -1
- package/tsparticles.preset.confetti.min.js.LICENSE.txt +1 -8
- package/types/bundle.d.ts +2 -4
- package/types/index.d.ts +2 -6
- package/types/options.d.ts +2 -3
- package/umd/bundle.js +1 -2
- package/umd/index.js +18 -49
- package/umd/options.js +110 -115
- package/browser/ConfettiOptions.js +0 -100
- package/browser/IConfettiOptions.js +0 -1
- package/cjs/ConfettiOptions.js +0 -104
- package/cjs/IConfettiOptions.js +0 -2
- package/esm/ConfettiOptions.js +0 -100
- package/esm/IConfettiOptions.js +0 -1
- package/types/ConfettiOptions.d.ts +0 -24
- package/types/IConfettiOptions.d.ts +0 -19
- package/umd/ConfettiOptions.js +0 -114
- package/umd/IConfettiOptions.js +0 -12
|
@@ -4,33 +4,26 @@
|
|
|
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
|
-
* v3.0.0-
|
|
7
|
+
* v3.0.0-beta.2
|
|
8
8
|
*/
|
|
9
9
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
10
10
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
11
|
-
module.exports = factory(require("@tsparticles/
|
|
11
|
+
module.exports = factory(require("@tsparticles/basic"), require("@tsparticles/plugin-emitters"), require("@tsparticles/updater-life"), require("@tsparticles/plugin-motion"), require("@tsparticles/updater-roll"), require("@tsparticles/updater-rotate"), require("@tsparticles/shape-square"), require("@tsparticles/updater-tilt"), require("@tsparticles/updater-wobble"));
|
|
12
12
|
else if(typeof define === 'function' && define.amd)
|
|
13
|
-
define(["@tsparticles/
|
|
13
|
+
define(["@tsparticles/basic", "@tsparticles/plugin-emitters", "@tsparticles/updater-life", "@tsparticles/plugin-motion", "@tsparticles/updater-roll", "@tsparticles/updater-rotate", "@tsparticles/shape-square", "@tsparticles/updater-tilt", "@tsparticles/updater-wobble"], factory);
|
|
14
14
|
else {
|
|
15
|
-
var a = typeof exports === 'object' ? factory(require("@tsparticles/
|
|
15
|
+
var a = typeof exports === 'object' ? factory(require("@tsparticles/basic"), require("@tsparticles/plugin-emitters"), require("@tsparticles/updater-life"), require("@tsparticles/plugin-motion"), require("@tsparticles/updater-roll"), require("@tsparticles/updater-rotate"), require("@tsparticles/shape-square"), require("@tsparticles/updater-tilt"), require("@tsparticles/updater-wobble")) : factory(root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"]);
|
|
16
16
|
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
|
17
17
|
}
|
|
18
|
-
})(this, (
|
|
18
|
+
})(this, (__WEBPACK_EXTERNAL_MODULE__574__, __WEBPACK_EXTERNAL_MODULE__68__, __WEBPACK_EXTERNAL_MODULE__84__, __WEBPACK_EXTERNAL_MODULE__433__, __WEBPACK_EXTERNAL_MODULE__734__, __WEBPACK_EXTERNAL_MODULE__59__, __WEBPACK_EXTERNAL_MODULE__652__, __WEBPACK_EXTERNAL_MODULE__448__, __WEBPACK_EXTERNAL_MODULE__83__) => {
|
|
19
19
|
return /******/ (() => { // webpackBootstrap
|
|
20
20
|
/******/ "use strict";
|
|
21
21
|
/******/ var __webpack_modules__ = ({
|
|
22
22
|
|
|
23
|
-
/***/
|
|
23
|
+
/***/ 574:
|
|
24
24
|
/***/ ((module) => {
|
|
25
25
|
|
|
26
|
-
module.exports =
|
|
27
|
-
|
|
28
|
-
/***/ }),
|
|
29
|
-
|
|
30
|
-
/***/ 619:
|
|
31
|
-
/***/ ((module) => {
|
|
32
|
-
|
|
33
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__619__;
|
|
26
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__574__;
|
|
34
27
|
|
|
35
28
|
/***/ }),
|
|
36
29
|
|
|
@@ -41,17 +34,10 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__68__;
|
|
|
41
34
|
|
|
42
35
|
/***/ }),
|
|
43
36
|
|
|
44
|
-
/***/
|
|
37
|
+
/***/ 433:
|
|
45
38
|
/***/ ((module) => {
|
|
46
39
|
|
|
47
|
-
module.exports =
|
|
48
|
-
|
|
49
|
-
/***/ }),
|
|
50
|
-
|
|
51
|
-
/***/ 163:
|
|
52
|
-
/***/ ((module) => {
|
|
53
|
-
|
|
54
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__163__;
|
|
40
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__433__;
|
|
55
41
|
|
|
56
42
|
/***/ }),
|
|
57
43
|
|
|
@@ -62,20 +48,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__652__;
|
|
|
62
48
|
|
|
63
49
|
/***/ }),
|
|
64
50
|
|
|
65
|
-
/***/ 71:
|
|
66
|
-
/***/ ((module) => {
|
|
67
|
-
|
|
68
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__71__;
|
|
69
|
-
|
|
70
|
-
/***/ }),
|
|
71
|
-
|
|
72
|
-
/***/ 501:
|
|
73
|
-
/***/ ((module) => {
|
|
74
|
-
|
|
75
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__501__;
|
|
76
|
-
|
|
77
|
-
/***/ }),
|
|
78
|
-
|
|
79
51
|
/***/ 84:
|
|
80
52
|
/***/ ((module) => {
|
|
81
53
|
|
|
@@ -83,20 +55,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__84__;
|
|
|
83
55
|
|
|
84
56
|
/***/ }),
|
|
85
57
|
|
|
86
|
-
/***/ 686:
|
|
87
|
-
/***/ ((module) => {
|
|
88
|
-
|
|
89
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__686__;
|
|
90
|
-
|
|
91
|
-
/***/ }),
|
|
92
|
-
|
|
93
|
-
/***/ 290:
|
|
94
|
-
/***/ ((module) => {
|
|
95
|
-
|
|
96
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__290__;
|
|
97
|
-
|
|
98
|
-
/***/ }),
|
|
99
|
-
|
|
100
58
|
/***/ 734:
|
|
101
59
|
/***/ ((module) => {
|
|
102
60
|
|
|
@@ -104,10 +62,10 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__734__;
|
|
|
104
62
|
|
|
105
63
|
/***/ }),
|
|
106
64
|
|
|
107
|
-
/***/
|
|
65
|
+
/***/ 59:
|
|
108
66
|
/***/ ((module) => {
|
|
109
67
|
|
|
110
|
-
module.exports =
|
|
68
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__59__;
|
|
111
69
|
|
|
112
70
|
/***/ }),
|
|
113
71
|
|
|
@@ -189,274 +147,158 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
189
147
|
|
|
190
148
|
// EXPORTS
|
|
191
149
|
__webpack_require__.d(__webpack_exports__, {
|
|
192
|
-
|
|
193
|
-
"loadConfettiPreset": () => (/* binding */ loadConfettiPreset)
|
|
150
|
+
loadConfettiPreset: () => (/* binding */ loadConfettiPreset)
|
|
194
151
|
});
|
|
195
152
|
|
|
196
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/
|
|
197
|
-
var
|
|
198
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-angle","commonjs2":"@tsparticles/updater-angle","amd":"@tsparticles/updater-angle","root":"window"}
|
|
199
|
-
var updater_angle_root_window_ = __webpack_require__(71);
|
|
200
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/move-base","commonjs2":"@tsparticles/move-base","amd":"@tsparticles/move-base","root":"window"}
|
|
201
|
-
var move_base_root_window_ = __webpack_require__(619);
|
|
202
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-circle","commonjs2":"@tsparticles/shape-circle","amd":"@tsparticles/shape-circle","root":"window"}
|
|
203
|
-
var shape_circle_root_window_ = __webpack_require__(163);
|
|
204
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-color","commonjs2":"@tsparticles/updater-color","amd":"@tsparticles/updater-color","root":"window"}
|
|
205
|
-
var updater_color_root_window_ = __webpack_require__(501);
|
|
153
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/basic","commonjs2":"@tsparticles/basic","amd":"@tsparticles/basic","root":"window"}
|
|
154
|
+
var basic_root_window_ = __webpack_require__(574);
|
|
206
155
|
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-emitters","commonjs2":"@tsparticles/plugin-emitters","amd":"@tsparticles/plugin-emitters","root":"window"}
|
|
207
156
|
var plugin_emitters_root_window_ = __webpack_require__(68);
|
|
208
157
|
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-life","commonjs2":"@tsparticles/updater-life","amd":"@tsparticles/updater-life","root":"window"}
|
|
209
158
|
var updater_life_root_window_ = __webpack_require__(84);
|
|
210
159
|
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-motion","commonjs2":"@tsparticles/plugin-motion","amd":"@tsparticles/plugin-motion","root":"window"}
|
|
211
|
-
var plugin_motion_root_window_ = __webpack_require__(
|
|
212
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-
|
|
213
|
-
var
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
this.gravity = 1;
|
|
223
|
-
this.drift = 0;
|
|
224
|
-
this.ticks = 200;
|
|
225
|
-
this.position = {
|
|
226
|
-
x: 50,
|
|
227
|
-
y: 50
|
|
228
|
-
};
|
|
229
|
-
this.colors = ["#ffffff", "#ff0000"];
|
|
230
|
-
this.shapes = ["square", "circle"];
|
|
231
|
-
this.scalar = 1;
|
|
232
|
-
this.zIndex = 100;
|
|
233
|
-
this.disableForReducedMotion = true;
|
|
234
|
-
}
|
|
235
|
-
get origin() {
|
|
236
|
-
return {
|
|
237
|
-
x: this.position.x / 100,
|
|
238
|
-
y: this.position.y / 100
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
set origin(value) {
|
|
242
|
-
this.position.x = value.x * 100;
|
|
243
|
-
this.position.y = value.y * 100;
|
|
244
|
-
}
|
|
245
|
-
get particleCount() {
|
|
246
|
-
return this.count;
|
|
247
|
-
}
|
|
248
|
-
set particleCount(value) {
|
|
249
|
-
this.count = value;
|
|
250
|
-
}
|
|
251
|
-
load(data) {
|
|
252
|
-
var _a, _b;
|
|
253
|
-
if (!data) {
|
|
254
|
-
return;
|
|
255
|
-
}
|
|
256
|
-
if (data.angle !== undefined) {
|
|
257
|
-
this.angle = data.angle;
|
|
258
|
-
}
|
|
259
|
-
const count = (_a = data.count) !== null && _a !== void 0 ? _a : data.particleCount;
|
|
260
|
-
if (count !== undefined) {
|
|
261
|
-
this.count = count;
|
|
262
|
-
}
|
|
263
|
-
if (data.spread !== undefined) {
|
|
264
|
-
this.spread = data.spread;
|
|
265
|
-
}
|
|
266
|
-
if (data.startVelocity !== undefined) {
|
|
267
|
-
this.startVelocity = data.startVelocity;
|
|
268
|
-
}
|
|
269
|
-
if (data.decay !== undefined) {
|
|
270
|
-
this.decay = data.decay;
|
|
271
|
-
}
|
|
272
|
-
if (data.gravity !== undefined) {
|
|
273
|
-
this.gravity = data.gravity;
|
|
274
|
-
}
|
|
275
|
-
if (data.drift !== undefined) {
|
|
276
|
-
this.drift = data.drift;
|
|
277
|
-
}
|
|
278
|
-
if (data.ticks !== undefined) {
|
|
279
|
-
this.ticks = data.ticks;
|
|
280
|
-
}
|
|
281
|
-
const position = (_b = data.position) !== null && _b !== void 0 ? _b : this.position;
|
|
282
|
-
if ((position === null || position === void 0 ? void 0 : position.x) !== undefined) {
|
|
283
|
-
this.position.x = position.x;
|
|
284
|
-
}
|
|
285
|
-
if ((position === null || position === void 0 ? void 0 : position.y) !== undefined) {
|
|
286
|
-
this.position.y = position.y;
|
|
287
|
-
}
|
|
288
|
-
if (data.colors !== undefined) {
|
|
289
|
-
if (data.colors instanceof Array) {
|
|
290
|
-
this.colors = [...data.colors];
|
|
291
|
-
} else {
|
|
292
|
-
this.colors = data.colors;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
if (data.shapes !== undefined) {
|
|
296
|
-
if (data.shapes instanceof Array) {
|
|
297
|
-
this.shapes = [...data.shapes];
|
|
298
|
-
} else {
|
|
299
|
-
this.shapes = data.shapes;
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
if (data.scalar !== undefined) {
|
|
303
|
-
this.scalar = data.scalar;
|
|
304
|
-
}
|
|
305
|
-
if (data.zIndex !== undefined) {
|
|
306
|
-
this.zIndex = data.zIndex;
|
|
307
|
-
}
|
|
308
|
-
if (data.disableForReducedMotion !== undefined) {
|
|
309
|
-
this.disableForReducedMotion = data.disableForReducedMotion;
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
}
|
|
160
|
+
var plugin_motion_root_window_ = __webpack_require__(433);
|
|
161
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-roll","commonjs2":"@tsparticles/updater-roll","amd":"@tsparticles/updater-roll","root":"window"}
|
|
162
|
+
var updater_roll_root_window_ = __webpack_require__(734);
|
|
163
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-rotate","commonjs2":"@tsparticles/updater-rotate","amd":"@tsparticles/updater-rotate","root":"window"}
|
|
164
|
+
var updater_rotate_root_window_ = __webpack_require__(59);
|
|
165
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-square","commonjs2":"@tsparticles/shape-square","amd":"@tsparticles/shape-square","root":"window"}
|
|
166
|
+
var shape_square_root_window_ = __webpack_require__(652);
|
|
167
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-tilt","commonjs2":"@tsparticles/updater-tilt","amd":"@tsparticles/updater-tilt","root":"window"}
|
|
168
|
+
var updater_tilt_root_window_ = __webpack_require__(448);
|
|
169
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-wobble","commonjs2":"@tsparticles/updater-wobble","amd":"@tsparticles/updater-wobble","root":"window"}
|
|
170
|
+
var updater_wobble_root_window_ = __webpack_require__(83);
|
|
313
171
|
;// CONCATENATED MODULE: ./dist/browser/options.js
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
172
|
+
const options = {
|
|
173
|
+
fullScreen: {
|
|
174
|
+
enable: true,
|
|
175
|
+
zIndex: 100
|
|
176
|
+
},
|
|
177
|
+
fpsLimit: 120,
|
|
178
|
+
particles: {
|
|
179
|
+
number: {
|
|
180
|
+
value: 0
|
|
322
181
|
},
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
},
|
|
334
|
-
opacity: {
|
|
335
|
-
value: {
|
|
336
|
-
min: 0,
|
|
337
|
-
max: 1
|
|
338
|
-
},
|
|
339
|
-
animation: {
|
|
340
|
-
enable: true,
|
|
341
|
-
speed: 0.5,
|
|
342
|
-
startValue: "max",
|
|
343
|
-
destroy: "min"
|
|
344
|
-
}
|
|
345
|
-
},
|
|
346
|
-
size: {
|
|
347
|
-
value: 5 * actualOptions.scalar
|
|
348
|
-
},
|
|
349
|
-
links: {
|
|
350
|
-
enable: false
|
|
351
|
-
},
|
|
352
|
-
life: {
|
|
353
|
-
duration: {
|
|
354
|
-
sync: true,
|
|
355
|
-
value: actualOptions.ticks / 60
|
|
356
|
-
},
|
|
357
|
-
count: 1
|
|
182
|
+
color: {
|
|
183
|
+
value: ["#26ccff", "#a25afd", "#ff5e7e", "#88ff5a", "#fcff42", "#ffa62d", "#ff36ff"]
|
|
184
|
+
},
|
|
185
|
+
shape: {
|
|
186
|
+
type: ["square", "circle"]
|
|
187
|
+
},
|
|
188
|
+
opacity: {
|
|
189
|
+
value: {
|
|
190
|
+
min: 0,
|
|
191
|
+
max: 1
|
|
358
192
|
},
|
|
359
|
-
|
|
360
|
-
angle: {
|
|
361
|
-
value: actualOptions.spread,
|
|
362
|
-
offset: 0
|
|
363
|
-
},
|
|
364
|
-
drift: {
|
|
365
|
-
min: -actualOptions.drift,
|
|
366
|
-
max: actualOptions.drift
|
|
367
|
-
},
|
|
193
|
+
animation: {
|
|
368
194
|
enable: true,
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
195
|
+
speed: 0.5,
|
|
196
|
+
startValue: "max",
|
|
197
|
+
destroy: "min"
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
size: {
|
|
201
|
+
value: 5
|
|
202
|
+
},
|
|
203
|
+
links: {
|
|
204
|
+
enable: false
|
|
205
|
+
},
|
|
206
|
+
life: {
|
|
207
|
+
duration: {
|
|
208
|
+
sync: true,
|
|
209
|
+
value: 20 / 6
|
|
382
210
|
},
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
animation: {
|
|
390
|
-
enable: true,
|
|
391
|
-
speed: 60
|
|
392
|
-
}
|
|
211
|
+
count: 1
|
|
212
|
+
},
|
|
213
|
+
move: {
|
|
214
|
+
angle: {
|
|
215
|
+
value: 45,
|
|
216
|
+
offset: 0
|
|
393
217
|
},
|
|
394
|
-
|
|
395
|
-
|
|
218
|
+
drift: 0,
|
|
219
|
+
enable: true,
|
|
220
|
+
gravity: {
|
|
396
221
|
enable: true,
|
|
397
|
-
|
|
398
|
-
min: 0,
|
|
399
|
-
max: 360
|
|
400
|
-
},
|
|
401
|
-
animation: {
|
|
402
|
-
enable: true,
|
|
403
|
-
speed: 60
|
|
404
|
-
}
|
|
222
|
+
acceleration: 9.81
|
|
405
223
|
},
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
224
|
+
speed: 45,
|
|
225
|
+
decay: 0.1,
|
|
226
|
+
direction: -90,
|
|
227
|
+
random: true,
|
|
228
|
+
straight: false,
|
|
229
|
+
outModes: {
|
|
230
|
+
default: "none",
|
|
231
|
+
bottom: "destroy"
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
rotate: {
|
|
235
|
+
value: {
|
|
236
|
+
min: 0,
|
|
237
|
+
max: 360
|
|
416
238
|
},
|
|
417
|
-
|
|
418
|
-
|
|
239
|
+
direction: "random",
|
|
240
|
+
animation: {
|
|
419
241
|
enable: true,
|
|
420
|
-
speed:
|
|
421
|
-
min: -15,
|
|
422
|
-
max: 15
|
|
423
|
-
}
|
|
242
|
+
speed: 60
|
|
424
243
|
}
|
|
425
244
|
},
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
position: actualOptions.position,
|
|
433
|
-
size: {
|
|
434
|
-
width: 0,
|
|
435
|
-
height: 0
|
|
245
|
+
tilt: {
|
|
246
|
+
direction: "random",
|
|
247
|
+
enable: true,
|
|
248
|
+
value: {
|
|
249
|
+
min: 0,
|
|
250
|
+
max: 360
|
|
436
251
|
},
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
252
|
+
animation: {
|
|
253
|
+
enable: true,
|
|
254
|
+
speed: 60
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
roll: {
|
|
258
|
+
darken: {
|
|
259
|
+
enable: true,
|
|
260
|
+
value: 25
|
|
440
261
|
},
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
262
|
+
enable: true,
|
|
263
|
+
speed: {
|
|
264
|
+
min: 15,
|
|
265
|
+
max: 25
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
wobble: {
|
|
269
|
+
distance: 30,
|
|
270
|
+
enable: true,
|
|
271
|
+
speed: {
|
|
272
|
+
min: -15,
|
|
273
|
+
max: 15
|
|
444
274
|
}
|
|
445
275
|
}
|
|
446
|
-
}
|
|
276
|
+
},
|
|
277
|
+
detectRetina: true,
|
|
278
|
+
motion: {
|
|
279
|
+
disable: true
|
|
280
|
+
},
|
|
281
|
+
emitters: {
|
|
282
|
+
name: "confetti",
|
|
283
|
+
startCount: 50,
|
|
284
|
+
position: {
|
|
285
|
+
x: 50,
|
|
286
|
+
y: 50
|
|
287
|
+
},
|
|
288
|
+
size: {
|
|
289
|
+
width: 0,
|
|
290
|
+
height: 0
|
|
291
|
+
},
|
|
292
|
+
rate: {
|
|
293
|
+
delay: 0,
|
|
294
|
+
quantity: 0
|
|
295
|
+
},
|
|
296
|
+
life: {
|
|
297
|
+
duration: 0.1,
|
|
298
|
+
count: 1
|
|
299
|
+
}
|
|
300
|
+
}
|
|
447
301
|
};
|
|
448
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-out-modes","commonjs2":"@tsparticles/updater-out-modes","amd":"@tsparticles/updater-out-modes","root":"window"}
|
|
449
|
-
var updater_out_modes_root_window_ = __webpack_require__(290);
|
|
450
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-roll","commonjs2":"@tsparticles/updater-roll","amd":"@tsparticles/updater-roll","root":"window"}
|
|
451
|
-
var updater_roll_root_window_ = __webpack_require__(734);
|
|
452
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-size","commonjs2":"@tsparticles/updater-size","amd":"@tsparticles/updater-size","root":"window"}
|
|
453
|
-
var updater_size_root_window_ = __webpack_require__(2);
|
|
454
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-square","commonjs2":"@tsparticles/shape-square","amd":"@tsparticles/shape-square","root":"window"}
|
|
455
|
-
var shape_square_root_window_ = __webpack_require__(652);
|
|
456
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-tilt","commonjs2":"@tsparticles/updater-tilt","amd":"@tsparticles/updater-tilt","root":"window"}
|
|
457
|
-
var updater_tilt_root_window_ = __webpack_require__(448);
|
|
458
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-wobble","commonjs2":"@tsparticles/updater-wobble","amd":"@tsparticles/updater-wobble","root":"window"}
|
|
459
|
-
var updater_wobble_root_window_ = __webpack_require__(83);
|
|
460
302
|
;// CONCATENATED MODULE: ./dist/browser/index.js
|
|
461
303
|
|
|
462
304
|
|
|
@@ -468,49 +310,20 @@ var updater_wobble_root_window_ = __webpack_require__(83);
|
|
|
468
310
|
|
|
469
311
|
|
|
470
312
|
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
await (0,
|
|
479
|
-
await (0,
|
|
480
|
-
await (0,
|
|
481
|
-
await (
|
|
482
|
-
await (0,updater_size_root_window_.loadSizeUpdater)(engine);
|
|
483
|
-
await (0,updater_opacity_root_window_.loadOpacityUpdater)(engine);
|
|
484
|
-
await (0,updater_out_modes_root_window_.loadOutModesUpdater)(engine);
|
|
485
|
-
await (0,plugin_emitters_root_window_.loadEmittersPlugin)(engine);
|
|
486
|
-
await (0,plugin_motion_root_window_.loadMotionPlugin)(engine);
|
|
487
|
-
await (0,updater_wobble_root_window_.loadWobbleUpdater)(engine);
|
|
488
|
-
await (0,updater_roll_root_window_.loadRollUpdater)(engine);
|
|
489
|
-
await (0,updater_angle_root_window_.loadAngleUpdater)(engine);
|
|
490
|
-
await (0,updater_tilt_root_window_.loadTiltUpdater)(engine);
|
|
491
|
-
await (0,updater_life_root_window_.loadLifeUpdater)(engine);
|
|
492
|
-
await engine.addPreset("confetti", loadOptions(confettiOptions), override);
|
|
313
|
+
async function loadPreset(engine, refresh = true) {
|
|
314
|
+
await (0,basic_root_window_.loadBasic)(engine, false);
|
|
315
|
+
await (0,shape_square_root_window_.loadSquareShape)(engine, false);
|
|
316
|
+
await (0,plugin_emitters_root_window_.loadEmittersPlugin)(engine, false);
|
|
317
|
+
await (0,plugin_motion_root_window_.loadMotionPlugin)(engine, false);
|
|
318
|
+
await (0,updater_wobble_root_window_.loadWobbleUpdater)(engine, false);
|
|
319
|
+
await (0,updater_roll_root_window_.loadRollUpdater)(engine, false);
|
|
320
|
+
await (0,updater_rotate_root_window_.loadRotateUpdater)(engine, false);
|
|
321
|
+
await (0,updater_tilt_root_window_.loadTiltUpdater)(engine, false);
|
|
322
|
+
await (0,updater_life_root_window_.loadLifeUpdater)(engine, false);
|
|
323
|
+
await engine.addPreset("confetti", options, refresh);
|
|
493
324
|
}
|
|
494
|
-
async function loadConfettiPreset(
|
|
495
|
-
await loadPreset(
|
|
496
|
-
}
|
|
497
|
-
async function confetti(idOrOptions, confettiOptions) {
|
|
498
|
-
let options;
|
|
499
|
-
let id;
|
|
500
|
-
if (typeof idOrOptions === "string") {
|
|
501
|
-
id = idOrOptions;
|
|
502
|
-
options = confettiOptions !== null && confettiOptions !== void 0 ? confettiOptions : {};
|
|
503
|
-
} else {
|
|
504
|
-
id = `tsparticles_${Math.floor((0,engine_root_window_.getRandom)() * 1000)}`;
|
|
505
|
-
options = idOrOptions;
|
|
506
|
-
}
|
|
507
|
-
await loadPreset(engine_root_window_.tsParticles, options, true);
|
|
508
|
-
await engine_root_window_.tsParticles.load({
|
|
509
|
-
id,
|
|
510
|
-
options: {
|
|
511
|
-
preset: "confetti"
|
|
512
|
-
}
|
|
513
|
-
});
|
|
325
|
+
async function loadConfettiPreset(engine) {
|
|
326
|
+
await loadPreset(engine);
|
|
514
327
|
}
|
|
515
328
|
})();
|
|
516
329
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see tsparticles.preset.confetti.min.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/
|
|
2
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/basic"),require("@tsparticles/plugin-emitters"),require("@tsparticles/updater-life"),require("@tsparticles/plugin-motion"),require("@tsparticles/updater-roll"),require("@tsparticles/updater-rotate"),require("@tsparticles/shape-square"),require("@tsparticles/updater-tilt"),require("@tsparticles/updater-wobble"));else if("function"==typeof define&&define.amd)define(["@tsparticles/basic","@tsparticles/plugin-emitters","@tsparticles/updater-life","@tsparticles/plugin-motion","@tsparticles/updater-roll","@tsparticles/updater-rotate","@tsparticles/shape-square","@tsparticles/updater-tilt","@tsparticles/updater-wobble"],t);else{var a="object"==typeof exports?t(require("@tsparticles/basic"),require("@tsparticles/plugin-emitters"),require("@tsparticles/updater-life"),require("@tsparticles/plugin-motion"),require("@tsparticles/updater-roll"),require("@tsparticles/updater-rotate"),require("@tsparticles/shape-square"),require("@tsparticles/updater-tilt"),require("@tsparticles/updater-wobble")):t(e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window);for(var r in a)("object"==typeof exports?exports:e)[r]=a[r]}}(this,((e,t,a,r,i,o,s,l,n)=>(()=>{"use strict";var p={574:t=>{t.exports=e},68:e=>{e.exports=t},433:e=>{e.exports=r},652:e=>{e.exports=s},84:e=>{e.exports=a},734:e=>{e.exports=i},59:e=>{e.exports=o},448:e=>{e.exports=l},83:e=>{e.exports=n}},d={};function u(e){var t=d[e];if(void 0!==t)return t.exports;var a=d[e]={exports:{}};return p[e](a,a.exports,u),a.exports}u.d=(e,t)=>{for(var a in t)u.o(t,a)&&!u.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{u.r(c),u.d(c,{loadConfettiPreset:()=>d});var e=u(574),t=u(68),a=u(84),r=u(433),i=u(734),o=u(59),s=u(652),l=u(448),n=u(83);const p={fullScreen:{enable:!0,zIndex:100},fpsLimit:120,particles:{number:{value:0},color:{value:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"]},shape:{type:["square","circle"]},opacity:{value:{min:0,max:1},animation:{enable:!0,speed:.5,startValue:"max",destroy:"min"}},size:{value:5},links:{enable:!1},life:{duration:{sync:!0,value:20/6},count:1},move:{angle:{value:45,offset:0},drift:0,enable:!0,gravity:{enable:!0,acceleration:9.81},speed:45,decay:.1,direction:-90,random:!0,straight:!1,outModes:{default:"none",bottom:"destroy"}},rotate:{value:{min:0,max:360},direction:"random",animation:{enable:!0,speed:60}},tilt:{direction:"random",enable:!0,value:{min:0,max:360},animation:{enable:!0,speed:60}},roll:{darken:{enable:!0,value:25},enable:!0,speed:{min:15,max:25}},wobble:{distance:30,enable:!0,speed:{min:-15,max:15}}},detectRetina:!0,motion:{disable:!0},emitters:{name:"confetti",startCount:50,position:{x:50,y:50},size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1}}};async function d(d){await async function(d,u=!0){await(0,e.loadBasic)(d,!1),await(0,s.loadSquareShape)(d,!1),await(0,t.loadEmittersPlugin)(d,!1),await(0,r.loadMotionPlugin)(d,!1),await(0,n.loadWobbleUpdater)(d,!1),await(0,i.loadRollUpdater)(d,!1),await(0,o.loadRotateUpdater)(d,!1),await(0,l.loadTiltUpdater)(d,!1),await(0,a.loadLifeUpdater)(d,!1),await d.addPreset("confetti",p,u)}(d)}})(),c})()));
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Author : Matteo Bruni
|
|
3
|
-
* MIT license: https://opensource.org/licenses/MIT
|
|
4
|
-
* Demo / Generator : https://particles.js.org/
|
|
5
|
-
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
|
-
* How to use? : Check the GitHub README
|
|
7
|
-
* v3.0.0-alpha.1
|
|
8
|
-
*/
|
|
1
|
+
/*! tsParticles Confetti Preset v3.0.0-beta.2 by Matteo Bruni */
|
package/types/bundle.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { ConfettiOptions } from "./index";
|
|
1
|
+
import { loadConfettiPreset } from "./index";
|
|
3
2
|
import { tsParticles } from "@tsparticles/engine";
|
|
4
|
-
export
|
|
5
|
-
export { confetti, loadConfettiPreset, tsParticles };
|
|
3
|
+
export { loadConfettiPreset, tsParticles };
|
package/types/index.d.ts
CHANGED
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
import type { Engine
|
|
2
|
-
|
|
3
|
-
export declare function loadConfettiPreset(main: Engine): Promise<void>;
|
|
4
|
-
export type ConfettiOptions = RecursivePartial<IConfettiOptions>;
|
|
5
|
-
export type ConfettiFirstParam = string | ConfettiOptions;
|
|
6
|
-
export declare function confetti(idOrOptions: ConfettiFirstParam, confettiOptions?: RecursivePartial<IConfettiOptions>): Promise<void>;
|
|
1
|
+
import type { Engine } from "@tsparticles/engine";
|
|
2
|
+
export declare function loadConfettiPreset(engine: Engine): Promise<void>;
|
package/types/options.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import type { ISourceOptions
|
|
2
|
-
|
|
3
|
-
export declare const loadOptions: (confettiOptions: RecursivePartial<IConfettiOptions>) => ISourceOptions;
|
|
1
|
+
import type { ISourceOptions } from "@tsparticles/engine";
|
|
2
|
+
export declare const options: ISourceOptions;
|