You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`width`|`Number`|`window.innerWidth \|\| 300`| Width of the `<canvas>` element. |
49
-
|`height`|`Number`|`window.innerHeight \|\| 200`| Height of the `<canvas>` element. |
50
-
|`numberOfPieces`|`Number`| 200 | Number of confetti pieces at one time. |
51
-
|`confettiSource`|`{ x: Number, y: Number, w: Number, h: Number }`|`{x: 0, y: 0, w: canvas.width, h:0}`| Rectangle where the confetti should spawn. Default is across the top. |
52
-
|`friction`|`Number`| 0.99 ||
53
-
|`wind`|`Number`| 0 ||
54
-
|`gravity`|`Number`| 0.1 ||
55
-
|`colors`|`Array` of `String`|`['#f44336'`</br>`'#e91e63'`</br>`'#9c27b0'`</br>`'#673ab7'`</br>`'#3f51b5'`</br>`'#2196f3'`</br>`'#03a9f4'`</br>`'#00bcd4'`</br>`'#009688'`</br>`'#4CAF50'`</br>`'#8BC34A'`</br>`'#CDDC39'`</br>`'#FFEB3B'`</br>`'#FFC107'`</br>`'#FF9800'`</br>`'#FF5722'`</br>`'#795548']`</br> | All available Colors for the confetti pieces. |
56
-
|`opacity`|`Number`| 1.0 ||
57
-
|`recycle`|`Bool`| true | Keep spawning confetti after `numberOfPieces` pieces have been shown. |
|`width`|`Number`|`window.innerWidth \|\| 300`| Width of the `<canvas>` element. |
49
+
|`height`|`Number`|`window.innerHeight \|\| 200`| Height of the `<canvas>` element. |
50
+
|`numberOfPieces`|`Number`| 200 | Number of confetti pieces at one time. |
51
+
|`confettiSource`|`{ x: Number, y: Number, w: Number, h: Number }`|`{x: 0, y: 0, w: canvas.width, h:0}`| Rectangle where the confetti should spawn. Default is across the top. |
52
+
|`friction`|`Number`| 0.99 ||
53
+
|`wind`|`Number`| 0 ||
54
+
|`gravity`|`Number`| 0.1 ||
55
+
|`colors`|`String[]`|`['#f44336'`</br>`'#e91e63'`</br>`'#9c27b0'`</br>`'#673ab7'`</br>`'#3f51b5'`</br>`'#2196f3'`</br>`'#03a9f4'`</br>`'#00bcd4'`</br>`'#009688'`</br>`'#4CAF50'`</br>`'#8BC34A'`</br>`'#CDDC39'`</br>`'#FFEB3B'`</br>`'#FFC107'`</br>`'#FF9800'`</br>`'#FF5722'`</br>`'#795548']`</br> | All available Colors for the confetti pieces. |
56
+
|`opacity`|`Number`| 1.0 ||
57
+
|`recycle`|`Bool`| true | Keep spawning confetti after `numberOfPieces` pieces have been shown. |
58
+
|`run`|`Bool`| true | Run the animation loop |
59
+
|`tweenDuration`|`Number`| 5000 | How fast the confetti is added |
0 commit comments