@tsparticles/preset-confetti 3.0.0 → 3.0.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 +83 -175
- package/browser/bundle.js +2 -4
- package/browser/index.js +1 -1
- package/browser/options.js +2 -1
- package/cjs/bundle.js +3 -5
- package/cjs/index.js +2 -2
- package/cjs/options.js +2 -1
- package/esm/bundle.js +2 -4
- package/esm/index.js +1 -1
- package/esm/options.js +2 -1
- package/package.json +11 -11
- package/report.html +2 -2
- package/tsparticles.preset.confetti.bundle.js +172 -151
- package/tsparticles.preset.confetti.bundle.min.js +1 -1
- package/tsparticles.preset.confetti.bundle.min.js.LICENSE.txt +1 -1
- package/tsparticles.preset.confetti.js +5 -2
- package/tsparticles.preset.confetti.min.js +1 -1
- package/tsparticles.preset.confetti.min.js.LICENSE.txt +1 -1
- package/types/bundle.d.ts +1 -1
- package/umd/bundle.js +4 -6
- package/umd/index.js +3 -3
- package/umd/options.js +2 -1
package/umd/bundle.js
CHANGED
|
@@ -4,17 +4,15 @@
|
|
|
4
4
|
if (v !== undefined) module.exports = v;
|
|
5
5
|
}
|
|
6
6
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "./index", "@tsparticles/engine"], factory);
|
|
7
|
+
define(["require", "exports", "./index.js", "@tsparticles/engine"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.tsParticles = exports.loadConfettiPreset = void 0;
|
|
13
|
-
const
|
|
14
|
-
Object.defineProperty(exports, "loadConfettiPreset", { enumerable: true, get: function () { return
|
|
13
|
+
const index_js_1 = require("./index.js");
|
|
14
|
+
Object.defineProperty(exports, "loadConfettiPreset", { enumerable: true, get: function () { return index_js_1.loadConfettiPreset; } });
|
|
15
15
|
const engine_1 = require("@tsparticles/engine");
|
|
16
16
|
Object.defineProperty(exports, "tsParticles", { enumerable: true, get: function () { return engine_1.tsParticles; } });
|
|
17
|
-
(
|
|
18
|
-
await (0, index_1.loadConfettiPreset)(engine_1.tsParticles);
|
|
19
|
-
})();
|
|
17
|
+
void (0, index_js_1.loadConfettiPreset)(engine_1.tsParticles);
|
|
20
18
|
});
|
package/umd/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
if (v !== undefined) module.exports = v;
|
|
5
5
|
}
|
|
6
6
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "@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", "./options"], factory);
|
|
7
|
+
define(["require", "exports", "@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", "./options.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
const shape_square_1 = require("@tsparticles/shape-square");
|
|
20
20
|
const updater_tilt_1 = require("@tsparticles/updater-tilt");
|
|
21
21
|
const updater_wobble_1 = require("@tsparticles/updater-wobble");
|
|
22
|
-
const
|
|
22
|
+
const options_js_1 = require("./options.js");
|
|
23
23
|
async function loadPreset(engine, refresh = true) {
|
|
24
24
|
await (0, basic_1.loadBasic)(engine, false);
|
|
25
25
|
await (0, shape_square_1.loadSquareShape)(engine, false);
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
await (0, updater_rotate_1.loadRotateUpdater)(engine, false);
|
|
31
31
|
await (0, updater_tilt_1.loadTiltUpdater)(engine, false);
|
|
32
32
|
await (0, updater_life_1.loadLifeUpdater)(engine, false);
|
|
33
|
-
await engine.addPreset("confetti",
|
|
33
|
+
await engine.addPreset("confetti", options_js_1.options, refresh);
|
|
34
34
|
}
|
|
35
35
|
async function loadConfettiPreset(engine) {
|
|
36
36
|
await loadPreset(engine);
|
package/umd/options.js
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.options = void 0;
|
|
13
|
+
const lifeDurationNum = 20, lifeDurationFactor = 6, lifeDuration = lifeDurationNum / lifeDurationFactor;
|
|
13
14
|
exports.options = {
|
|
14
15
|
fullScreen: {
|
|
15
16
|
enable: true,
|
|
@@ -44,7 +45,7 @@
|
|
|
44
45
|
life: {
|
|
45
46
|
duration: {
|
|
46
47
|
sync: true,
|
|
47
|
-
value:
|
|
48
|
+
value: lifeDuration,
|
|
48
49
|
},
|
|
49
50
|
count: 1,
|
|
50
51
|
},
|