@tsparticles/preset-confetti 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 +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 +4 -4
- package/tsparticles.preset.confetti.bundle.js +3012 -3351
- 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 +306 -277
- 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,18 +4,18 @@
|
|
|
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.1
|
|
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/move-base"), require("@tsparticles/shape-circle"), require("@tsparticles/updater-color"), require("@tsparticles/updater-opacity"), require("@tsparticles/updater-out-modes"), require("@tsparticles/updater-size"), require("@tsparticles/plugin-emitters"), require("@tsparticles/updater-life"), require("@tsparticles/plugin-motion"), require("@tsparticles/updater-roll"), require("@tsparticles/engine"), 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/move-base", "@tsparticles/shape-circle", "@tsparticles/updater-color", "@tsparticles/updater-opacity", "@tsparticles/updater-out-modes", "@tsparticles/updater-size", "@tsparticles/plugin-emitters", "@tsparticles/updater-life", "@tsparticles/plugin-motion", "@tsparticles/updater-roll", "@tsparticles/engine", "@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/move-base"), require("@tsparticles/shape-circle"), require("@tsparticles/updater-color"), require("@tsparticles/updater-opacity"), require("@tsparticles/updater-out-modes"), require("@tsparticles/updater-size"), require("@tsparticles/plugin-emitters"), require("@tsparticles/updater-life"), require("@tsparticles/plugin-motion"), require("@tsparticles/updater-roll"), require("@tsparticles/engine"), 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"], 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__619__, __WEBPACK_EXTERNAL_MODULE__163__, __WEBPACK_EXTERNAL_MODULE__501__, __WEBPACK_EXTERNAL_MODULE__686__, __WEBPACK_EXTERNAL_MODULE__290__, __WEBPACK_EXTERNAL_MODULE__2__, __WEBPACK_EXTERNAL_MODULE__68__, __WEBPACK_EXTERNAL_MODULE__84__, __WEBPACK_EXTERNAL_MODULE__82__, __WEBPACK_EXTERNAL_MODULE__734__, __WEBPACK_EXTERNAL_MODULE__533__, __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__ = ({
|
|
@@ -62,13 +62,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__652__;
|
|
|
62
62
|
|
|
63
63
|
/***/ }),
|
|
64
64
|
|
|
65
|
-
/***/ 71:
|
|
66
|
-
/***/ ((module) => {
|
|
67
|
-
|
|
68
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__71__;
|
|
69
|
-
|
|
70
|
-
/***/ }),
|
|
71
|
-
|
|
72
65
|
/***/ 501:
|
|
73
66
|
/***/ ((module) => {
|
|
74
67
|
|
|
@@ -189,274 +182,339 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
189
182
|
|
|
190
183
|
// EXPORTS
|
|
191
184
|
__webpack_require__.d(__webpack_exports__, {
|
|
192
|
-
|
|
193
|
-
"loadConfettiPreset": () => (/* binding */ loadConfettiPreset)
|
|
185
|
+
loadConfettiPreset: () => (/* binding */ loadConfettiPreset)
|
|
194
186
|
});
|
|
195
187
|
|
|
196
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"}
|
|
197
|
-
var engine_root_window_ = __webpack_require__(533);
|
|
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
188
|
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/move-base","commonjs2":"@tsparticles/move-base","amd":"@tsparticles/move-base","root":"window"}
|
|
201
189
|
var move_base_root_window_ = __webpack_require__(619);
|
|
202
190
|
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-circle","commonjs2":"@tsparticles/shape-circle","amd":"@tsparticles/shape-circle","root":"window"}
|
|
203
191
|
var shape_circle_root_window_ = __webpack_require__(163);
|
|
204
192
|
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-color","commonjs2":"@tsparticles/updater-color","amd":"@tsparticles/updater-color","root":"window"}
|
|
205
193
|
var updater_color_root_window_ = __webpack_require__(501);
|
|
194
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-opacity","commonjs2":"@tsparticles/updater-opacity","amd":"@tsparticles/updater-opacity","root":"window"}
|
|
195
|
+
var updater_opacity_root_window_ = __webpack_require__(686);
|
|
196
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-out-modes","commonjs2":"@tsparticles/updater-out-modes","amd":"@tsparticles/updater-out-modes","root":"window"}
|
|
197
|
+
var updater_out_modes_root_window_ = __webpack_require__(290);
|
|
198
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-size","commonjs2":"@tsparticles/updater-size","amd":"@tsparticles/updater-size","root":"window"}
|
|
199
|
+
var updater_size_root_window_ = __webpack_require__(2);
|
|
200
|
+
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+basic@3.0.0-beta.1/node_modules/@tsparticles/basic/browser/index.js
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
async function loadBasic(engine, refresh = true) {
|
|
208
|
+
await (0,move_base_root_window_.loadBaseMover)(engine, false);
|
|
209
|
+
await (0,shape_circle_root_window_.loadCircleShape)(engine, false);
|
|
210
|
+
await (0,updater_color_root_window_.loadColorUpdater)(engine, false);
|
|
211
|
+
await (0,updater_opacity_root_window_.loadOpacityUpdater)(engine, false);
|
|
212
|
+
await (0,updater_out_modes_root_window_.loadOutModesUpdater)(engine, false);
|
|
213
|
+
await (0,updater_size_root_window_.loadSizeUpdater)(engine, false);
|
|
214
|
+
await engine.refresh(refresh);
|
|
215
|
+
}
|
|
216
|
+
|
|
206
217
|
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-emitters","commonjs2":"@tsparticles/plugin-emitters","amd":"@tsparticles/plugin-emitters","root":"window"}
|
|
207
218
|
var plugin_emitters_root_window_ = __webpack_require__(68);
|
|
208
219
|
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-life","commonjs2":"@tsparticles/updater-life","amd":"@tsparticles/updater-life","root":"window"}
|
|
209
220
|
var updater_life_root_window_ = __webpack_require__(84);
|
|
210
221
|
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-motion","commonjs2":"@tsparticles/plugin-motion","amd":"@tsparticles/plugin-motion","root":"window"}
|
|
211
222
|
var plugin_motion_root_window_ = __webpack_require__(82);
|
|
212
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-
|
|
213
|
-
var
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
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;
|
|
223
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-roll","commonjs2":"@tsparticles/updater-roll","amd":"@tsparticles/updater-roll","root":"window"}
|
|
224
|
+
var updater_roll_root_window_ = __webpack_require__(734);
|
|
225
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"}
|
|
226
|
+
var engine_root_window_ = __webpack_require__(533);
|
|
227
|
+
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-rotate@3.0.0-beta.1/node_modules/@tsparticles/updater-rotate/browser/Options/Classes/RotateAnimation.js
|
|
228
|
+
|
|
229
|
+
class RotateAnimation {
|
|
230
|
+
constructor() {
|
|
231
|
+
this.enable = false;
|
|
232
|
+
this.speed = 0;
|
|
233
|
+
this.decay = 0;
|
|
234
|
+
this.sync = false;
|
|
265
235
|
}
|
|
266
|
-
|
|
267
|
-
|
|
236
|
+
load(data) {
|
|
237
|
+
if (!data) {
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
if (data.enable !== undefined) {
|
|
241
|
+
this.enable = data.enable;
|
|
242
|
+
}
|
|
243
|
+
if (data.speed !== undefined) {
|
|
244
|
+
this.speed = (0,engine_root_window_.setRangeValue)(data.speed);
|
|
245
|
+
}
|
|
246
|
+
if (data.decay !== undefined) {
|
|
247
|
+
this.decay = (0,engine_root_window_.setRangeValue)(data.decay);
|
|
248
|
+
}
|
|
249
|
+
if (data.sync !== undefined) {
|
|
250
|
+
this.sync = data.sync;
|
|
251
|
+
}
|
|
268
252
|
}
|
|
269
|
-
|
|
270
|
-
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-rotate@3.0.0-beta.1/node_modules/@tsparticles/updater-rotate/browser/Options/Classes/Rotate.js
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
class Rotate extends engine_root_window_.ValueWithRandom {
|
|
259
|
+
constructor() {
|
|
260
|
+
super();
|
|
261
|
+
this.animation = new RotateAnimation();
|
|
262
|
+
this.direction = "clockwise";
|
|
263
|
+
this.path = false;
|
|
264
|
+
this.value = 0;
|
|
271
265
|
}
|
|
272
|
-
|
|
273
|
-
|
|
266
|
+
load(data) {
|
|
267
|
+
if (!data) {
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
super.load(data);
|
|
271
|
+
if (data.direction !== undefined) {
|
|
272
|
+
this.direction = data.direction;
|
|
273
|
+
}
|
|
274
|
+
this.animation.load(data.animation);
|
|
275
|
+
if (data.path !== undefined) {
|
|
276
|
+
this.path = data.path;
|
|
277
|
+
}
|
|
274
278
|
}
|
|
275
|
-
|
|
276
|
-
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-rotate@3.0.0-beta.1/node_modules/@tsparticles/updater-rotate/browser/RotateUpdater.js
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
function updateRotate(particle, delta) {
|
|
285
|
+
const rotate = particle.rotate, rotateOptions = particle.options.rotate;
|
|
286
|
+
if (!rotate || !rotateOptions) {
|
|
287
|
+
return;
|
|
277
288
|
}
|
|
278
|
-
|
|
279
|
-
|
|
289
|
+
const rotateAnimation = rotateOptions.animation, speed = (rotate.velocity ?? 0) * delta.factor, max = 2 * Math.PI, decay = rotate.decay ?? 1;
|
|
290
|
+
if (!rotateAnimation.enable) {
|
|
291
|
+
return;
|
|
280
292
|
}
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
293
|
+
switch (rotate.status) {
|
|
294
|
+
case "increasing":
|
|
295
|
+
rotate.value += speed;
|
|
296
|
+
if (rotate.value > max) {
|
|
297
|
+
rotate.value -= max;
|
|
298
|
+
}
|
|
299
|
+
break;
|
|
300
|
+
case "decreasing":
|
|
301
|
+
default:
|
|
302
|
+
rotate.value -= speed;
|
|
303
|
+
if (rotate.value < 0) {
|
|
304
|
+
rotate.value += max;
|
|
305
|
+
}
|
|
306
|
+
break;
|
|
284
307
|
}
|
|
285
|
-
if (
|
|
286
|
-
|
|
308
|
+
if (rotate.velocity && decay !== 1) {
|
|
309
|
+
rotate.velocity *= decay;
|
|
287
310
|
}
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
this.colors = data.colors;
|
|
293
|
-
}
|
|
311
|
+
}
|
|
312
|
+
class RotateUpdater {
|
|
313
|
+
constructor(container) {
|
|
314
|
+
this.container = container;
|
|
294
315
|
}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
316
|
+
init(particle) {
|
|
317
|
+
const rotateOptions = particle.options.rotate;
|
|
318
|
+
if (!rotateOptions) {
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
particle.rotate = {
|
|
322
|
+
enable: rotateOptions.animation.enable,
|
|
323
|
+
value: ((0,engine_root_window_.getRangeValue)(rotateOptions.value) * Math.PI) / 180,
|
|
324
|
+
};
|
|
325
|
+
particle.pathRotation = rotateOptions.path;
|
|
326
|
+
let rotateDirection = rotateOptions.direction;
|
|
327
|
+
if (rotateDirection === "random") {
|
|
328
|
+
const index = Math.floor((0,engine_root_window_.getRandom)() * 2);
|
|
329
|
+
rotateDirection = index > 0 ? "counter-clockwise" : "clockwise";
|
|
330
|
+
}
|
|
331
|
+
switch (rotateDirection) {
|
|
332
|
+
case "counter-clockwise":
|
|
333
|
+
case "counterClockwise":
|
|
334
|
+
particle.rotate.status = "decreasing";
|
|
335
|
+
break;
|
|
336
|
+
case "clockwise":
|
|
337
|
+
particle.rotate.status = "increasing";
|
|
338
|
+
break;
|
|
339
|
+
}
|
|
340
|
+
const rotateAnimation = rotateOptions.animation;
|
|
341
|
+
if (rotateAnimation.enable) {
|
|
342
|
+
particle.rotate.decay = 1 - (0,engine_root_window_.getRangeValue)(rotateAnimation.decay);
|
|
343
|
+
particle.rotate.velocity =
|
|
344
|
+
((0,engine_root_window_.getRangeValue)(rotateAnimation.speed) / 360) * this.container.retina.reduceFactor;
|
|
345
|
+
if (!rotateAnimation.sync) {
|
|
346
|
+
particle.rotate.velocity *= (0,engine_root_window_.getRandom)();
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
particle.rotation = particle.rotate.value;
|
|
301
350
|
}
|
|
302
|
-
|
|
303
|
-
|
|
351
|
+
isEnabled(particle) {
|
|
352
|
+
const rotate = particle.options.rotate;
|
|
353
|
+
if (!rotate) {
|
|
354
|
+
return false;
|
|
355
|
+
}
|
|
356
|
+
return !particle.destroyed && !particle.spawning && rotate.animation.enable && !rotate.path;
|
|
304
357
|
}
|
|
305
|
-
|
|
306
|
-
|
|
358
|
+
loadOptions(options, ...sources) {
|
|
359
|
+
if (!options.rotate) {
|
|
360
|
+
options.rotate = new Rotate();
|
|
361
|
+
}
|
|
362
|
+
for (const source of sources) {
|
|
363
|
+
options.rotate.load(source?.rotate);
|
|
364
|
+
}
|
|
307
365
|
}
|
|
308
|
-
|
|
309
|
-
|
|
366
|
+
update(particle, delta) {
|
|
367
|
+
if (!this.isEnabled(particle)) {
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
updateRotate(particle, delta);
|
|
371
|
+
particle.rotation = particle.rotate?.value ?? 0;
|
|
310
372
|
}
|
|
311
|
-
}
|
|
312
373
|
}
|
|
313
|
-
;// CONCATENATED MODULE: ./dist/browser/options.js
|
|
314
374
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
375
|
+
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tsparticles+updater-rotate@3.0.0-beta.1/node_modules/@tsparticles/updater-rotate/browser/index.js
|
|
376
|
+
|
|
377
|
+
async function loadRotateUpdater(engine, refresh = true) {
|
|
378
|
+
await engine.addParticleUpdater("rotate", (container) => new RotateUpdater(container), refresh);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-square","commonjs2":"@tsparticles/shape-square","amd":"@tsparticles/shape-square","root":"window"}
|
|
382
|
+
var shape_square_root_window_ = __webpack_require__(652);
|
|
383
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-tilt","commonjs2":"@tsparticles/updater-tilt","amd":"@tsparticles/updater-tilt","root":"window"}
|
|
384
|
+
var updater_tilt_root_window_ = __webpack_require__(448);
|
|
385
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-wobble","commonjs2":"@tsparticles/updater-wobble","amd":"@tsparticles/updater-wobble","root":"window"}
|
|
386
|
+
var updater_wobble_root_window_ = __webpack_require__(83);
|
|
387
|
+
;// CONCATENATED MODULE: ./dist/browser/options.js
|
|
388
|
+
const options = {
|
|
389
|
+
fullScreen: {
|
|
390
|
+
enable: true,
|
|
391
|
+
zIndex: 100
|
|
392
|
+
},
|
|
393
|
+
fpsLimit: 120,
|
|
394
|
+
particles: {
|
|
395
|
+
number: {
|
|
396
|
+
value: 0
|
|
322
397
|
},
|
|
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
|
|
398
|
+
color: {
|
|
399
|
+
value: ["#26ccff", "#a25afd", "#ff5e7e", "#88ff5a", "#fcff42", "#ffa62d", "#ff36ff"]
|
|
400
|
+
},
|
|
401
|
+
shape: {
|
|
402
|
+
type: ["square", "circle"]
|
|
403
|
+
},
|
|
404
|
+
opacity: {
|
|
405
|
+
value: {
|
|
406
|
+
min: 0,
|
|
407
|
+
max: 1
|
|
358
408
|
},
|
|
359
|
-
|
|
360
|
-
angle: {
|
|
361
|
-
value: actualOptions.spread,
|
|
362
|
-
offset: 0
|
|
363
|
-
},
|
|
364
|
-
drift: {
|
|
365
|
-
min: -actualOptions.drift,
|
|
366
|
-
max: actualOptions.drift
|
|
367
|
-
},
|
|
409
|
+
animation: {
|
|
368
410
|
enable: true,
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
411
|
+
speed: 0.5,
|
|
412
|
+
startValue: "max",
|
|
413
|
+
destroy: "min"
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
size: {
|
|
417
|
+
value: 5
|
|
418
|
+
},
|
|
419
|
+
links: {
|
|
420
|
+
enable: false
|
|
421
|
+
},
|
|
422
|
+
life: {
|
|
423
|
+
duration: {
|
|
424
|
+
sync: true,
|
|
425
|
+
value: 20 / 6
|
|
382
426
|
},
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
animation: {
|
|
390
|
-
enable: true,
|
|
391
|
-
speed: 60
|
|
392
|
-
}
|
|
427
|
+
count: 1
|
|
428
|
+
},
|
|
429
|
+
move: {
|
|
430
|
+
angle: {
|
|
431
|
+
value: 45,
|
|
432
|
+
offset: 0
|
|
393
433
|
},
|
|
394
|
-
|
|
395
|
-
|
|
434
|
+
drift: 0,
|
|
435
|
+
enable: true,
|
|
436
|
+
gravity: {
|
|
396
437
|
enable: true,
|
|
397
|
-
|
|
398
|
-
min: 0,
|
|
399
|
-
max: 360
|
|
400
|
-
},
|
|
401
|
-
animation: {
|
|
402
|
-
enable: true,
|
|
403
|
-
speed: 60
|
|
404
|
-
}
|
|
438
|
+
acceleration: 9.81
|
|
405
439
|
},
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
440
|
+
speed: 45,
|
|
441
|
+
decay: 0.1,
|
|
442
|
+
direction: -90,
|
|
443
|
+
random: true,
|
|
444
|
+
straight: false,
|
|
445
|
+
outModes: {
|
|
446
|
+
default: "none",
|
|
447
|
+
bottom: "destroy"
|
|
448
|
+
}
|
|
449
|
+
},
|
|
450
|
+
rotate: {
|
|
451
|
+
value: {
|
|
452
|
+
min: 0,
|
|
453
|
+
max: 360
|
|
416
454
|
},
|
|
417
|
-
|
|
418
|
-
|
|
455
|
+
direction: "random",
|
|
456
|
+
animation: {
|
|
419
457
|
enable: true,
|
|
420
|
-
speed:
|
|
421
|
-
min: -15,
|
|
422
|
-
max: 15
|
|
423
|
-
}
|
|
458
|
+
speed: 60
|
|
424
459
|
}
|
|
425
460
|
},
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
position: actualOptions.position,
|
|
433
|
-
size: {
|
|
434
|
-
width: 0,
|
|
435
|
-
height: 0
|
|
461
|
+
tilt: {
|
|
462
|
+
direction: "random",
|
|
463
|
+
enable: true,
|
|
464
|
+
value: {
|
|
465
|
+
min: 0,
|
|
466
|
+
max: 360
|
|
436
467
|
},
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
468
|
+
animation: {
|
|
469
|
+
enable: true,
|
|
470
|
+
speed: 60
|
|
471
|
+
}
|
|
472
|
+
},
|
|
473
|
+
roll: {
|
|
474
|
+
darken: {
|
|
475
|
+
enable: true,
|
|
476
|
+
value: 25
|
|
440
477
|
},
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
478
|
+
enable: true,
|
|
479
|
+
speed: {
|
|
480
|
+
min: 15,
|
|
481
|
+
max: 25
|
|
482
|
+
}
|
|
483
|
+
},
|
|
484
|
+
wobble: {
|
|
485
|
+
distance: 30,
|
|
486
|
+
enable: true,
|
|
487
|
+
speed: {
|
|
488
|
+
min: -15,
|
|
489
|
+
max: 15
|
|
444
490
|
}
|
|
445
491
|
}
|
|
446
|
-
}
|
|
492
|
+
},
|
|
493
|
+
detectRetina: true,
|
|
494
|
+
motion: {
|
|
495
|
+
disable: true
|
|
496
|
+
},
|
|
497
|
+
emitters: {
|
|
498
|
+
name: "confetti",
|
|
499
|
+
startCount: 50,
|
|
500
|
+
position: {
|
|
501
|
+
x: 50,
|
|
502
|
+
y: 50
|
|
503
|
+
},
|
|
504
|
+
size: {
|
|
505
|
+
width: 0,
|
|
506
|
+
height: 0
|
|
507
|
+
},
|
|
508
|
+
rate: {
|
|
509
|
+
delay: 0,
|
|
510
|
+
quantity: 0
|
|
511
|
+
},
|
|
512
|
+
life: {
|
|
513
|
+
duration: 0.1,
|
|
514
|
+
count: 1
|
|
515
|
+
}
|
|
516
|
+
}
|
|
447
517
|
};
|
|
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
518
|
;// CONCATENATED MODULE: ./dist/browser/index.js
|
|
461
519
|
|
|
462
520
|
|
|
@@ -468,49 +526,20 @@ var updater_wobble_root_window_ = __webpack_require__(83);
|
|
|
468
526
|
|
|
469
527
|
|
|
470
528
|
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
await (
|
|
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);
|
|
493
|
-
}
|
|
494
|
-
async function loadConfettiPreset(main) {
|
|
495
|
-
await loadPreset(main, {}, true);
|
|
529
|
+
async function loadPreset(engine, refresh = true) {
|
|
530
|
+
await loadBasic(engine, false);
|
|
531
|
+
await (0,shape_square_root_window_.loadSquareShape)(engine, false);
|
|
532
|
+
await (0,plugin_emitters_root_window_.loadEmittersPlugin)(engine, false);
|
|
533
|
+
await (0,plugin_motion_root_window_.loadMotionPlugin)(engine, false);
|
|
534
|
+
await (0,updater_wobble_root_window_.loadWobbleUpdater)(engine, false);
|
|
535
|
+
await (0,updater_roll_root_window_.loadRollUpdater)(engine, false);
|
|
536
|
+
await loadRotateUpdater(engine, false);
|
|
537
|
+
await (0,updater_tilt_root_window_.loadTiltUpdater)(engine, false);
|
|
538
|
+
await (0,updater_life_root_window_.loadLifeUpdater)(engine, false);
|
|
539
|
+
await engine.addPreset("confetti", options, refresh);
|
|
496
540
|
}
|
|
497
|
-
async function
|
|
498
|
-
|
|
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
|
-
});
|
|
541
|
+
async function loadConfettiPreset(engine) {
|
|
542
|
+
await loadPreset(engine);
|
|
514
543
|
}
|
|
515
544
|
})();
|
|
516
545
|
|