@tsparticles/preset-confetti 3.0.0-alpha.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/LICENSE +21 -0
- package/README.md +453 -0
- package/browser/ConfettiOptions.js +100 -0
- package/browser/IConfettiOptions.js +1 -0
- package/browser/bundle.js +6 -0
- package/browser/index.js +55 -0
- package/browser/options.js +131 -0
- package/cjs/ConfettiOptions.js +104 -0
- package/cjs/IConfettiOptions.js +2 -0
- package/cjs/bundle.js +20 -0
- package/cjs/index.js +75 -0
- package/cjs/options.js +135 -0
- package/esm/ConfettiOptions.js +100 -0
- package/esm/IConfettiOptions.js +1 -0
- package/esm/bundle.js +6 -0
- package/esm/index.js +55 -0
- package/esm/options.js +131 -0
- package/package.json +105 -0
- package/report.html +39 -0
- package/tsparticles.preset.confetti.bundle.js +8088 -0
- package/tsparticles.preset.confetti.bundle.min.js +2 -0
- package/tsparticles.preset.confetti.bundle.min.js.LICENSE.txt +8 -0
- package/tsparticles.preset.confetti.js +520 -0
- package/tsparticles.preset.confetti.min.js +2 -0
- package/tsparticles.preset.confetti.min.js.LICENSE.txt +8 -0
- package/types/ConfettiOptions.d.ts +24 -0
- package/types/IConfettiOptions.d.ts +19 -0
- package/types/bundle.d.ts +5 -0
- package/types/index.d.ts +6 -0
- package/types/options.d.ts +3 -0
- package/umd/ConfettiOptions.js +114 -0
- package/umd/IConfettiOptions.js +12 -0
- package/umd/bundle.js +21 -0
- package/umd/index.js +70 -0
- package/umd/options.js +145 -0
package/esm/options.js
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { ConfettiOptions } from "./ConfettiOptions";
|
|
2
|
+
export const loadOptions = (confettiOptions) => {
|
|
3
|
+
const actualOptions = new ConfettiOptions();
|
|
4
|
+
actualOptions.load(confettiOptions);
|
|
5
|
+
return {
|
|
6
|
+
fullScreen: {
|
|
7
|
+
enable: true,
|
|
8
|
+
zIndex: actualOptions.zIndex,
|
|
9
|
+
},
|
|
10
|
+
fpsLimit: 120,
|
|
11
|
+
particles: {
|
|
12
|
+
number: {
|
|
13
|
+
value: 0,
|
|
14
|
+
},
|
|
15
|
+
color: {
|
|
16
|
+
value: actualOptions.colors,
|
|
17
|
+
},
|
|
18
|
+
shape: {
|
|
19
|
+
type: actualOptions.shapes,
|
|
20
|
+
},
|
|
21
|
+
opacity: {
|
|
22
|
+
value: { min: 0, max: 1 },
|
|
23
|
+
animation: {
|
|
24
|
+
enable: true,
|
|
25
|
+
speed: 0.5,
|
|
26
|
+
startValue: "max",
|
|
27
|
+
destroy: "min",
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
size: {
|
|
31
|
+
value: 5 * actualOptions.scalar,
|
|
32
|
+
},
|
|
33
|
+
links: {
|
|
34
|
+
enable: false,
|
|
35
|
+
},
|
|
36
|
+
life: {
|
|
37
|
+
duration: {
|
|
38
|
+
sync: true,
|
|
39
|
+
value: actualOptions.ticks / 60,
|
|
40
|
+
},
|
|
41
|
+
count: 1,
|
|
42
|
+
},
|
|
43
|
+
move: {
|
|
44
|
+
angle: {
|
|
45
|
+
value: actualOptions.spread,
|
|
46
|
+
offset: 0,
|
|
47
|
+
},
|
|
48
|
+
drift: {
|
|
49
|
+
min: -actualOptions.drift,
|
|
50
|
+
max: actualOptions.drift,
|
|
51
|
+
},
|
|
52
|
+
enable: true,
|
|
53
|
+
gravity: {
|
|
54
|
+
enable: true,
|
|
55
|
+
acceleration: actualOptions.gravity * 9.81,
|
|
56
|
+
},
|
|
57
|
+
speed: actualOptions.startVelocity,
|
|
58
|
+
decay: 1 - actualOptions.decay,
|
|
59
|
+
direction: -actualOptions.angle,
|
|
60
|
+
random: true,
|
|
61
|
+
straight: false,
|
|
62
|
+
outModes: {
|
|
63
|
+
default: "none",
|
|
64
|
+
bottom: "destroy",
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
rotate: {
|
|
68
|
+
value: {
|
|
69
|
+
min: 0,
|
|
70
|
+
max: 360,
|
|
71
|
+
},
|
|
72
|
+
direction: "random",
|
|
73
|
+
animation: {
|
|
74
|
+
enable: true,
|
|
75
|
+
speed: 60,
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
tilt: {
|
|
79
|
+
direction: "random",
|
|
80
|
+
enable: true,
|
|
81
|
+
value: {
|
|
82
|
+
min: 0,
|
|
83
|
+
max: 360,
|
|
84
|
+
},
|
|
85
|
+
animation: {
|
|
86
|
+
enable: true,
|
|
87
|
+
speed: 60,
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
roll: {
|
|
91
|
+
darken: {
|
|
92
|
+
enable: true,
|
|
93
|
+
value: 25,
|
|
94
|
+
},
|
|
95
|
+
enable: true,
|
|
96
|
+
speed: {
|
|
97
|
+
min: 15,
|
|
98
|
+
max: 25,
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
wobble: {
|
|
102
|
+
distance: 30,
|
|
103
|
+
enable: true,
|
|
104
|
+
speed: {
|
|
105
|
+
min: -15,
|
|
106
|
+
max: 15,
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
detectRetina: true,
|
|
111
|
+
motion: {
|
|
112
|
+
disable: actualOptions.disableForReducedMotion,
|
|
113
|
+
},
|
|
114
|
+
emitters: {
|
|
115
|
+
startCount: actualOptions.count,
|
|
116
|
+
position: actualOptions.position,
|
|
117
|
+
size: {
|
|
118
|
+
width: 0,
|
|
119
|
+
height: 0,
|
|
120
|
+
},
|
|
121
|
+
rate: {
|
|
122
|
+
delay: 0,
|
|
123
|
+
quantity: 0,
|
|
124
|
+
},
|
|
125
|
+
life: {
|
|
126
|
+
duration: 0.1,
|
|
127
|
+
count: 1,
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
};
|
|
131
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tsparticles/preset-confetti",
|
|
3
|
+
"version": "3.0.0-alpha.1",
|
|
4
|
+
"description": "tsParticles confetti preset",
|
|
5
|
+
"homepage": "https://particles.js.org",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/matteobruni/tsparticles.git",
|
|
9
|
+
"directory": "presets/confetti"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"front-end",
|
|
13
|
+
"frontend",
|
|
14
|
+
"tsparticles",
|
|
15
|
+
"particles.js",
|
|
16
|
+
"particlesjs",
|
|
17
|
+
"particles",
|
|
18
|
+
"particle",
|
|
19
|
+
"canvas",
|
|
20
|
+
"jsparticles",
|
|
21
|
+
"xparticles",
|
|
22
|
+
"particles-js",
|
|
23
|
+
"particles-bg",
|
|
24
|
+
"particles-bg-vue",
|
|
25
|
+
"particles-ts",
|
|
26
|
+
"particles.ts",
|
|
27
|
+
"react-particles-js",
|
|
28
|
+
"react-particles.js",
|
|
29
|
+
"react-particles",
|
|
30
|
+
"react",
|
|
31
|
+
"reactjs",
|
|
32
|
+
"vue-particles",
|
|
33
|
+
"ngx-particles",
|
|
34
|
+
"angular-particles",
|
|
35
|
+
"particleground",
|
|
36
|
+
"vue",
|
|
37
|
+
"vuejs",
|
|
38
|
+
"preact",
|
|
39
|
+
"preactjs",
|
|
40
|
+
"jquery",
|
|
41
|
+
"angularjs",
|
|
42
|
+
"angular",
|
|
43
|
+
"typescript",
|
|
44
|
+
"javascript",
|
|
45
|
+
"animation",
|
|
46
|
+
"web",
|
|
47
|
+
"html5",
|
|
48
|
+
"web-design",
|
|
49
|
+
"webdesign",
|
|
50
|
+
"css",
|
|
51
|
+
"html",
|
|
52
|
+
"css3",
|
|
53
|
+
"animated",
|
|
54
|
+
"background",
|
|
55
|
+
"confetti",
|
|
56
|
+
"canvas",
|
|
57
|
+
"fireworks",
|
|
58
|
+
"fireworks-js",
|
|
59
|
+
"confetti-js",
|
|
60
|
+
"confettijs",
|
|
61
|
+
"fireworksjs",
|
|
62
|
+
"canvas-confetti",
|
|
63
|
+
"tsparticles-preset"
|
|
64
|
+
],
|
|
65
|
+
"author": "Matteo Bruni <matteo.bruni@me.com>",
|
|
66
|
+
"license": "MIT",
|
|
67
|
+
"bugs": {
|
|
68
|
+
"url": "https://github.com/matteobruni/tsparticles/issues"
|
|
69
|
+
},
|
|
70
|
+
"funding": [
|
|
71
|
+
{
|
|
72
|
+
"type": "github",
|
|
73
|
+
"url": "https://github.com/sponsors/matteobruni"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"type": "buymeacoffee",
|
|
77
|
+
"url": "https://www.buymeacoffee.com/matteobruni"
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"main": "cjs/index.js",
|
|
81
|
+
"jsdelivr": "tsparticles.preset.confetti.min.js",
|
|
82
|
+
"unpkg": "tsparticles.preset.confetti.min.js",
|
|
83
|
+
"module": "esm/index.js",
|
|
84
|
+
"types": "types/index.d.ts",
|
|
85
|
+
"publishConfig": {
|
|
86
|
+
"access": "public"
|
|
87
|
+
},
|
|
88
|
+
"dependencies": {
|
|
89
|
+
"@tsparticles/engine": "^3.0.0-alpha.1",
|
|
90
|
+
"@tsparticles/move-base": "^3.0.0-alpha.1",
|
|
91
|
+
"@tsparticles/plugin-emitters": "^3.0.0-alpha.1",
|
|
92
|
+
"@tsparticles/plugin-motion": "^3.0.0-alpha.1",
|
|
93
|
+
"@tsparticles/shape-circle": "^3.0.0-alpha.1",
|
|
94
|
+
"@tsparticles/shape-square": "^3.0.0-alpha.1",
|
|
95
|
+
"@tsparticles/updater-angle": "^3.0.0-alpha.1",
|
|
96
|
+
"@tsparticles/updater-color": "^3.0.0-alpha.1",
|
|
97
|
+
"@tsparticles/updater-life": "^3.0.0-alpha.1",
|
|
98
|
+
"@tsparticles/updater-opacity": "^3.0.0-alpha.1",
|
|
99
|
+
"@tsparticles/updater-out-modes": "^3.0.0-alpha.1",
|
|
100
|
+
"@tsparticles/updater-roll": "^3.0.0-alpha.1",
|
|
101
|
+
"@tsparticles/updater-size": "^3.0.0-alpha.1",
|
|
102
|
+
"@tsparticles/updater-tilt": "^3.0.0-alpha.1",
|
|
103
|
+
"@tsparticles/updater-wobble": "^3.0.0-alpha.1"
|
|
104
|
+
}
|
|
105
|
+
}
|