@tsparticles/confetti 3.1.0 → 3.2.0

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.
Files changed (220) hide show
  1. package/1308.min.js +2 -0
  2. package/1308.min.js.LICENSE.txt +1 -0
  3. package/1472.min.js +2 -0
  4. package/1472.min.js.LICENSE.txt +1 -0
  5. package/1513.min.js +2 -0
  6. package/1513.min.js.LICENSE.txt +1 -0
  7. package/1705.min.js +2 -0
  8. package/1705.min.js.LICENSE.txt +1 -0
  9. package/1810.min.js +2 -0
  10. package/1810.min.js.LICENSE.txt +1 -0
  11. package/196.min.js +2 -0
  12. package/196.min.js.LICENSE.txt +1 -0
  13. package/2124.min.js +2 -0
  14. package/2124.min.js.LICENSE.txt +1 -0
  15. package/2173.min.js +2 -0
  16. package/2173.min.js.LICENSE.txt +1 -0
  17. package/2580.min.js +2 -0
  18. package/2580.min.js.LICENSE.txt +1 -0
  19. package/2720.min.js +2 -0
  20. package/2720.min.js.LICENSE.txt +1 -0
  21. package/2765.min.js +2 -0
  22. package/2765.min.js.LICENSE.txt +1 -0
  23. package/3141.min.js +2 -0
  24. package/3141.min.js.LICENSE.txt +1 -0
  25. package/3261.min.js +2 -0
  26. package/3261.min.js.LICENSE.txt +1 -0
  27. package/3473.min.js +2 -0
  28. package/3473.min.js.LICENSE.txt +1 -0
  29. package/3610.min.js +2 -0
  30. package/3610.min.js.LICENSE.txt +1 -0
  31. package/3629.min.js +2 -0
  32. package/3629.min.js.LICENSE.txt +1 -0
  33. package/3648.min.js +2 -0
  34. package/3648.min.js.LICENSE.txt +1 -0
  35. package/3733.min.js +2 -0
  36. package/3733.min.js.LICENSE.txt +1 -0
  37. package/3862.min.js +2 -0
  38. package/3862.min.js.LICENSE.txt +1 -0
  39. package/3869.min.js +2 -0
  40. package/3869.min.js.LICENSE.txt +1 -0
  41. package/409.min.js +2 -0
  42. package/409.min.js.LICENSE.txt +1 -0
  43. package/4245.min.js +2 -0
  44. package/4245.min.js.LICENSE.txt +1 -0
  45. package/4328.min.js +2 -0
  46. package/4328.min.js.LICENSE.txt +1 -0
  47. package/4396.min.js +2 -0
  48. package/4396.min.js.LICENSE.txt +1 -0
  49. package/4547.min.js +2 -0
  50. package/4547.min.js.LICENSE.txt +1 -0
  51. package/4595.min.js +2 -0
  52. package/4595.min.js.LICENSE.txt +1 -0
  53. package/4794.min.js +2 -0
  54. package/4794.min.js.LICENSE.txt +1 -0
  55. package/482.min.js +2 -0
  56. package/482.min.js.LICENSE.txt +1 -0
  57. package/4866.min.js +2 -0
  58. package/4866.min.js.LICENSE.txt +1 -0
  59. package/4973.min.js +2 -0
  60. package/4973.min.js.LICENSE.txt +1 -0
  61. package/4994.min.js +2 -0
  62. package/4994.min.js.LICENSE.txt +1 -0
  63. package/5092.min.js +2 -0
  64. package/5092.min.js.LICENSE.txt +1 -0
  65. package/5120.min.js +2 -0
  66. package/5120.min.js.LICENSE.txt +1 -0
  67. package/5245.min.js +2 -0
  68. package/5245.min.js.LICENSE.txt +1 -0
  69. package/5308.min.js +2 -0
  70. package/5308.min.js.LICENSE.txt +1 -0
  71. package/5329.min.js +2 -0
  72. package/5329.min.js.LICENSE.txt +1 -0
  73. package/5437.min.js +2 -0
  74. package/5437.min.js.LICENSE.txt +1 -0
  75. package/5444.min.js +2 -0
  76. package/5444.min.js.LICENSE.txt +1 -0
  77. package/5534.min.js +2 -0
  78. package/5534.min.js.LICENSE.txt +1 -0
  79. package/560.min.js +2 -0
  80. package/560.min.js.LICENSE.txt +1 -0
  81. package/5647.min.js +2 -0
  82. package/5647.min.js.LICENSE.txt +1 -0
  83. package/571.min.js +2 -0
  84. package/571.min.js.LICENSE.txt +1 -0
  85. package/5742.min.js +2 -0
  86. package/5742.min.js.LICENSE.txt +1 -0
  87. package/6004.min.js +2 -0
  88. package/6004.min.js.LICENSE.txt +1 -0
  89. package/6132.min.js +2 -0
  90. package/6132.min.js.LICENSE.txt +1 -0
  91. package/6551.min.js +2 -0
  92. package/6551.min.js.LICENSE.txt +1 -0
  93. package/6772.min.js +2 -0
  94. package/6772.min.js.LICENSE.txt +1 -0
  95. package/7031.min.js +2 -0
  96. package/7031.min.js.LICENSE.txt +1 -0
  97. package/7049.min.js +2 -0
  98. package/7049.min.js.LICENSE.txt +1 -0
  99. package/7108.min.js +2 -0
  100. package/7108.min.js.LICENSE.txt +1 -0
  101. package/7331.min.js +2 -0
  102. package/7331.min.js.LICENSE.txt +1 -0
  103. package/7517.min.js +2 -0
  104. package/7517.min.js.LICENSE.txt +1 -0
  105. package/7687.min.js +2 -0
  106. package/7687.min.js.LICENSE.txt +1 -0
  107. package/7725.min.js +2 -0
  108. package/7725.min.js.LICENSE.txt +1 -0
  109. package/7757.min.js +2 -0
  110. package/7757.min.js.LICENSE.txt +1 -0
  111. package/7835.min.js +2 -0
  112. package/7835.min.js.LICENSE.txt +1 -0
  113. package/7859.min.js +2 -0
  114. package/7859.min.js.LICENSE.txt +1 -0
  115. package/7886.min.js +2 -0
  116. package/7886.min.js.LICENSE.txt +1 -0
  117. package/7890.min.js +2 -0
  118. package/7890.min.js.LICENSE.txt +1 -0
  119. package/8060.min.js +2 -0
  120. package/8060.min.js.LICENSE.txt +1 -0
  121. package/9062.min.js +2 -0
  122. package/9062.min.js.LICENSE.txt +1 -0
  123. package/9126.min.js +2 -0
  124. package/9126.min.js.LICENSE.txt +1 -0
  125. package/9331.min.js +2 -0
  126. package/9331.min.js.LICENSE.txt +1 -0
  127. package/9376.min.js +2 -0
  128. package/9376.min.js.LICENSE.txt +1 -0
  129. package/95.min.js +2 -0
  130. package/95.min.js.LICENSE.txt +1 -0
  131. package/9530.min.js +2 -0
  132. package/9530.min.js.LICENSE.txt +1 -0
  133. package/9532.min.js +2 -0
  134. package/9532.min.js.LICENSE.txt +1 -0
  135. package/9836.min.js +2 -0
  136. package/9836.min.js.LICENSE.txt +1 -0
  137. package/9921.min.js +2 -0
  138. package/9921.min.js.LICENSE.txt +1 -0
  139. package/basic_dist_browser_index_js.js +30 -0
  140. package/browser/confetti.js +1 -15
  141. package/cjs/confetti.js +39 -30
  142. package/engine_dist_browser_Core_Container_js.js +90 -0
  143. package/engine_dist_browser_Core_Particle_js.js +30 -0
  144. package/esm/confetti.js +1 -15
  145. package/move_base_dist_browser_BaseMover_js.js +30 -0
  146. package/move_base_dist_browser_Utils_js.js +30 -0
  147. package/move_base_dist_browser_index_js.js +30 -0
  148. package/package.json +17 -17
  149. package/plugins_emitters_dist_browser_EmitterInstance_js.js +30 -0
  150. package/plugins_emitters_dist_browser_EmittersPlugin_js.js +90 -0
  151. package/plugins_emitters_dist_browser_Emitters_js.js +30 -0
  152. package/plugins_emitters_dist_browser_ShapeManager_js.js +30 -0
  153. package/plugins_emitters_dist_browser_index_js.js +100 -0
  154. package/plugins_motion_dist_browser_MotionInstance_js.js +30 -0
  155. package/plugins_motion_dist_browser_MotionPlugin_js.js +50 -0
  156. package/plugins_motion_dist_browser_index_js.js +30 -0
  157. package/report.html +3 -3
  158. package/shapes_cards_dist_browser_ClubDrawer_js.js +30 -0
  159. package/shapes_cards_dist_browser_DiamondDrawer_js.js +30 -0
  160. package/shapes_cards_dist_browser_HeartDrawer_js.js +30 -0
  161. package/shapes_cards_dist_browser_SpadeDrawer_js.js +30 -0
  162. package/shapes_cards_dist_browser_Utils_js.js +30 -0
  163. package/shapes_cards_dist_browser_index_js.js +30 -0
  164. package/shapes_circle_dist_browser_CircleDrawer_js.js +30 -0
  165. package/shapes_circle_dist_browser_Utils_js.js +30 -0
  166. package/shapes_circle_dist_browser_index_js.js +30 -0
  167. package/shapes_emoji_dist_browser_EmojiDrawer_js.js +30 -0
  168. package/shapes_emoji_dist_browser_Utils_js.js +30 -0
  169. package/shapes_emoji_dist_browser_index_js.js +40 -0
  170. package/shapes_heart_dist_browser_HeartDrawer_js.js +30 -0
  171. package/shapes_heart_dist_browser_Utils_js.js +30 -0
  172. package/shapes_heart_dist_browser_index_js.js +30 -0
  173. package/shapes_image_dist_browser_GifUtils_Utils_js.js +50 -0
  174. package/shapes_image_dist_browser_ImageDrawer_js.js +30 -0
  175. package/shapes_image_dist_browser_ImagePreloader_js.js +40 -0
  176. package/shapes_image_dist_browser_index_js.js +40 -0
  177. package/shapes_polygon_dist_browser_PolygonDrawer_js.js +40 -0
  178. package/shapes_polygon_dist_browser_TriangleDrawer_js.js +40 -0
  179. package/shapes_polygon_dist_browser_Utils_js.js +30 -0
  180. package/shapes_polygon_dist_browser_index_js.js +30 -0
  181. package/shapes_square_dist_browser_SquareDrawer_js.js +30 -0
  182. package/shapes_square_dist_browser_Utils_js.js +30 -0
  183. package/shapes_square_dist_browser_index_js.js +30 -0
  184. package/shapes_star_dist_browser_StarDrawer_js.js +30 -0
  185. package/shapes_star_dist_browser_Utils_js.js +30 -0
  186. package/shapes_star_dist_browser_index_js.js +30 -0
  187. package/tsparticles.confetti.bundle.js +2140 -10008
  188. package/tsparticles.confetti.bundle.min.js +1 -1
  189. package/tsparticles.confetti.bundle.min.js.LICENSE.txt +1 -1
  190. package/tsparticles.confetti.js +171 -524
  191. package/tsparticles.confetti.min.js +1 -1
  192. package/tsparticles.confetti.min.js.LICENSE.txt +1 -1
  193. package/types/confetti.d.ts +5 -0
  194. package/umd/confetti.js +41 -31
  195. package/updaters_color_dist_browser_ColorUpdater_js.js +30 -0
  196. package/updaters_color_dist_browser_index_js.js +30 -0
  197. package/updaters_life_dist_browser_LifeUpdater_js.js +60 -0
  198. package/updaters_life_dist_browser_Utils_js.js +30 -0
  199. package/updaters_life_dist_browser_index_js.js +30 -0
  200. package/updaters_opacity_dist_browser_OpacityUpdater_js.js +30 -0
  201. package/updaters_opacity_dist_browser_index_js.js +30 -0
  202. package/updaters_outModes_dist_browser_BounceOutMode_js.js +30 -0
  203. package/updaters_outModes_dist_browser_DestroyOutMode_js.js +30 -0
  204. package/updaters_outModes_dist_browser_NoneOutMode_js.js +30 -0
  205. package/updaters_outModes_dist_browser_OutOfCanvasUpdater_js.js +30 -0
  206. package/updaters_outModes_dist_browser_OutOutMode_js.js +30 -0
  207. package/updaters_outModes_dist_browser_Utils_js.js +30 -0
  208. package/updaters_outModes_dist_browser_index_js.js +30 -0
  209. package/updaters_roll_dist_browser_RollUpdater_js.js +50 -0
  210. package/updaters_roll_dist_browser_Utils_js.js +30 -0
  211. package/updaters_roll_dist_browser_index_js.js +30 -0
  212. package/updaters_rotate_dist_browser_RotateUpdater_js.js +50 -0
  213. package/updaters_rotate_dist_browser_index_js.js +30 -0
  214. package/updaters_size_dist_browser_SizeUpdater_js.js +30 -0
  215. package/updaters_size_dist_browser_index_js.js +30 -0
  216. package/updaters_tilt_dist_browser_TiltUpdater_js.js +50 -0
  217. package/updaters_tilt_dist_browser_index_js.js +30 -0
  218. package/updaters_wobble_dist_browser_Utils_js.js +30 -0
  219. package/updaters_wobble_dist_browser_WobbleUpdater_js.js +50 -0
  220. package/updaters_wobble_dist_browser_index_js.js +30 -0
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see tsparticles.confetti.min.js.LICENSE.txt */
2
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"),require("@tsparticles/plugin-emitters"),require("@tsparticles/basic"),require("@tsparticles/shape-cards"),require("@tsparticles/shape-emoji"),require("@tsparticles/shape-heart"),require("@tsparticles/shape-image"),require("@tsparticles/updater-life"),require("@tsparticles/plugin-motion"),require("@tsparticles/shape-polygon"),require("@tsparticles/updater-roll"),require("@tsparticles/updater-rotate"),require("@tsparticles/shape-square"),require("@tsparticles/shape-star"),require("@tsparticles/updater-tilt"),require("@tsparticles/updater-wobble"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine","@tsparticles/plugin-emitters","@tsparticles/basic","@tsparticles/shape-cards","@tsparticles/shape-emoji","@tsparticles/shape-heart","@tsparticles/shape-image","@tsparticles/updater-life","@tsparticles/plugin-motion","@tsparticles/shape-polygon","@tsparticles/updater-roll","@tsparticles/updater-rotate","@tsparticles/shape-square","@tsparticles/shape-star","@tsparticles/updater-tilt","@tsparticles/updater-wobble"],t);else{var i="object"==typeof exports?t(require("@tsparticles/engine"),require("@tsparticles/plugin-emitters"),require("@tsparticles/basic"),require("@tsparticles/shape-cards"),require("@tsparticles/shape-emoji"),require("@tsparticles/shape-heart"),require("@tsparticles/shape-image"),require("@tsparticles/updater-life"),require("@tsparticles/plugin-motion"),require("@tsparticles/shape-polygon"),require("@tsparticles/updater-roll"),require("@tsparticles/updater-rotate"),require("@tsparticles/shape-square"),require("@tsparticles/shape-star"),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,e.window,e.window,e.window,e.window,e.window,e.window,e.window);for(var a in i)("object"==typeof exports?exports:e)[a]=i[a]}}(this,((e,t,i,a,s,r,o,n,l,p,d,c,u,h,f,y)=>(()=>{"use strict";var m={574:e=>{e.exports=i},533:t=>{t.exports=e},68:e=>{e.exports=t},82:e=>{e.exports=l},686:e=>{e.exports=a},151:e=>{e.exports=s},12:e=>{e.exports=r},885:e=>{e.exports=o},907:e=>{e.exports=p},652:e=>{e.exports=u},960:e=>{e.exports=h},84:e=>{e.exports=n},734:e=>{e.exports=d},59:e=>{e.exports=c},448:e=>{e.exports=f},83:e=>{e.exports=y}},v={};function w(e){var t=v[e];if(void 0!==t)return t.exports;var i=v[e]={exports:{}};return m[e](i,i.exports,w),i.exports}w.d=(e,t)=>{for(var i in t)w.o(t,i)&&!w.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},w.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),w.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var x={};return(()=>{w.r(x),w.d(x,{confetti:()=>R});var e=w(533),t=w(68);class i{constructor(){this.angle=90,this.count=50,this.spread=45,this.startVelocity=45,this.decay=.9,this.gravity=1,this.drift=0,this.ticks=200,this.position={x:50,y:50},this.colors=["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],this.shapes=["square","circle"],this.scalar=1,this.zIndex=100,this.disableForReducedMotion=!0,this.flat=!1,this.shapeOptions={}}get origin(){return{x:this.position.x/e.percentDenominator,y:this.position.y/e.percentDenominator}}set origin(t){this.position.x=t.x*e.percentDenominator,this.position.y=t.y*e.percentDenominator}get particleCount(){return this.count}set particleCount(e){this.count=e}load(t){if(!t)return;void 0!==t.angle&&(this.angle=t.angle);const i=t.count??t.particleCount;void 0!==i&&(this.count=i),void 0!==t.spread&&(this.spread=t.spread),void 0!==t.startVelocity&&(this.startVelocity=t.startVelocity),void 0!==t.decay&&(this.decay=t.decay),void 0!==t.flat&&(this.flat=t.flat),void 0!==t.gravity&&(this.gravity=t.gravity),void 0!==t.drift&&(this.drift=t.drift),void 0!==t.ticks&&(this.ticks=t.ticks);const a=t.origin;a&&!t.position&&(t.position={x:void 0!==a.x?a.x*e.percentDenominator:void 0,y:void 0!==a.y?a.y*e.percentDenominator:void 0});const s=t.position;s&&(void 0!==s.x&&(this.position.x=s.x),void 0!==s.y&&(this.position.y=s.y)),void 0!==t.colors&&((0,e.isArray)(t.colors)?this.colors=[...t.colors]:this.colors=t.colors);const r=t.shapeOptions;if(void 0!==r)for(const t in r){const i=r[t];i&&(this.shapeOptions[t]=(0,e.deepExtend)(this.shapeOptions[t]??{},i))}void 0!==t.shapes&&((0,e.isArray)(t.shapes)?this.shapes=[...t.shapes]:this.shapes=t.shapes),void 0!==t.scalar&&(this.scalar=t.scalar),void 0!==t.zIndex&&(this.zIndex=t.zIndex),void 0!==t.disableForReducedMotion&&(this.disableForReducedMotion=t.disableForReducedMotion)}}var a=w(574),s=w(686),r=w(151),o=w(12),n=w(885),l=w(84),p=w(82),d=w(907),c=w(734),u=w(59),h=w(652),f=w(960),y=w(448),m=w(83);const v=9.81,g=5,b=3,q=1,S=0,j=0;let P=!1,O=!1;const z=new Map;async function M(e){if(!P){if(O)return new Promise((e=>{const t=setInterval((()=>{P&&(clearInterval(t),e())}),100)}));O=!0,await(0,t.loadEmittersPlugin)(e,!1),await(0,p.loadMotionPlugin)(e,!1),await(0,s.loadCardsShape)(e,!1),await(0,o.loadHeartShape)(e,!1),await(0,n.loadImageShape)(e,!1),await(0,d.loadPolygonShape)(e,!1),await(0,h.loadSquareShape)(e,!1),await(0,f.loadStarShape)(e,!1),await(0,r.loadEmojiShape)(e,!1),await(0,u.loadRotateUpdater)(e,!1),await(0,l.loadLifeUpdater)(e,!1),await(0,c.loadRollUpdater)(e,!1),await(0,y.loadTiltUpdater)(e,!1),await(0,m.loadWobbleUpdater)(e,!1),await(0,a.loadBasic)(e),O=!1,P=!0}}async function I(t){const a=new i;let s;a.load(t.options);const r=a.ticks*e.millisecondsToSeconds/(3.6*e.millisecondsToSeconds*120);if(z.has(t.id)&&(s=z.get(t.id),s&&!s.destroyed)){const e=s;if(e.addEmitter)return void await e.addEmitter({startCount:a.count,position:a.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1},particles:{color:{value:a.colors},shape:{type:a.shapes,options:a.shapeOptions},life:{count:1},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:r,startValue:"max",destroy:"min"}},size:{value:g*a.scalar},move:{angle:{value:a.spread,offset:0},drift:{min:-a.drift,max:a.drift},gravity:{acceleration:a.gravity*v},speed:a.startVelocity*b,decay:q-a.decay,direction:-a.angle}}})}const o={fullScreen:{enable:!t.canvas,zIndex:a.zIndex},fpsLimit:120,particles:{number:{value:0},color:{value:a.colors},shape:{type:a.shapes,options:a.shapeOptions},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:r,startValue:"max",destroy:"min"}},size:{value:g*a.scalar},links:{enable:!1},life:{count:1},move:{angle:{value:a.spread,offset:0},drift:{min:-a.drift,max:a.drift},enable:!0,gravity:{enable:!0,acceleration:a.gravity*v},speed:a.startVelocity*b,decay:q-a.decay,direction:-a.angle,random:!0,straight:!1,outModes:{default:"none",bottom:"destroy"}},rotate:{value:a.flat?S:{min:0,max:360},direction:"random",animation:{enable:!a.flat,speed:60}},tilt:{direction:"random",enable:!a.flat,value:a.flat?j:{min:0,max:360},animation:{enable:!0,speed:60}},roll:{darken:{enable:!0,value:25},enable:!a.flat,speed:{min:15,max:25}},wobble:{distance:30,enable:!a.flat,speed:{min:-15,max:15}}},detectRetina:!0,motion:{disable:a.disableForReducedMotion},emitters:{name:"confetti",startCount:a.count,position:a.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1}}};return s=await e.tsParticles.load({id:t.id,element:t.canvas,options:o}),z.set(t.id,s),s}async function R(t,i){let a,s;return await M(e.tsParticles),(0,e.isString)(t)?(s=t,a=i??{}):(s="confetti",a=t),I({id:s,options:a})}R.create=async(t,i)=>{if(!t)return R;await M(e.tsParticles);const a=t.getAttribute("id")??"confetti";return t.setAttribute("id",a),async(s,r)=>{let o,n;return(0,e.isString)(s)?(n=s,o=r??i):(n=a,o=s),I({id:n,canvas:t,options:o})}},R.version=e.tsParticles.version,(0,e.isSsr)()||(window.confetti=R)})(),x})()));
2
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"),require("@tsparticles/basic"),require("@tsparticles/updater-wobble"),require("@tsparticles/updater-tilt"),require("@tsparticles/updater-roll"),require("@tsparticles/updater-life"),require("@tsparticles/updater-rotate"),require("@tsparticles/shape-emoji"),require("@tsparticles/shape-star"),require("@tsparticles/shape-square"),require("@tsparticles/shape-polygon"),require("@tsparticles/shape-image"),require("@tsparticles/shape-heart"),require("@tsparticles/shape-cards"),require("@tsparticles/plugin-motion"),require("@tsparticles/plugin-emitters"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine","@tsparticles/basic","@tsparticles/updater-wobble","@tsparticles/updater-tilt","@tsparticles/updater-roll","@tsparticles/updater-life","@tsparticles/updater-rotate","@tsparticles/shape-emoji","@tsparticles/shape-star","@tsparticles/shape-square","@tsparticles/shape-polygon","@tsparticles/shape-image","@tsparticles/shape-heart","@tsparticles/shape-cards","@tsparticles/plugin-motion","@tsparticles/plugin-emitters"],t);else{var i="object"==typeof exports?t(require("@tsparticles/engine"),require("@tsparticles/basic"),require("@tsparticles/updater-wobble"),require("@tsparticles/updater-tilt"),require("@tsparticles/updater-roll"),require("@tsparticles/updater-life"),require("@tsparticles/updater-rotate"),require("@tsparticles/shape-emoji"),require("@tsparticles/shape-star"),require("@tsparticles/shape-square"),require("@tsparticles/shape-polygon"),require("@tsparticles/shape-image"),require("@tsparticles/shape-heart"),require("@tsparticles/shape-cards"),require("@tsparticles/plugin-motion"),require("@tsparticles/plugin-emitters")):t(e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window);for(var a in i)("object"==typeof exports?exports:e)[a]=i[a]}}(this,((e,t,i,a,s,r,o,n,l,p,d,c,u,h,f,m)=>(()=>{var v,w,y={574:e=>{e.exports=t},533:t=>{t.exports=e},68:e=>{e.exports=m},82:e=>{e.exports=f},686:e=>{e.exports=h},151:e=>{e.exports=n},12:e=>{e.exports=u},885:e=>{e.exports=c},907:e=>{e.exports=d},652:e=>{e.exports=p},960:e=>{e.exports=l},84:e=>{e.exports=r},734:e=>{e.exports=s},59:e=>{e.exports=o},448:e=>{e.exports=a},83:e=>{e.exports=i}},b={};function g(e){var t=b[e];if(void 0!==t)return t.exports;var i=b[e]={exports:{}};return y[e](i,i.exports,g),i.exports}w=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,g.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var i=Object.create(null);g.r(i);var a={};v=v||[null,w({}),w([]),w(w)];for(var s=2&t&&e;"object"==typeof s&&!~v.indexOf(s);s=w(s))Object.getOwnPropertyNames(s).forEach((t=>a[t]=()=>e[t]));return a.default=()=>e,g.d(i,a),i},g.d=(e,t)=>{for(var i in t)g.o(t,i)&&!g.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},g.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),g.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var x={};return(()=>{g.r(x),g.d(x,{confetti:()=>h});var e=g(533);class t{constructor(){this.angle=90,this.count=50,this.spread=45,this.startVelocity=45,this.decay=.9,this.gravity=1,this.drift=0,this.ticks=200,this.position={x:50,y:50},this.colors=["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],this.shapes=["square","circle"],this.scalar=1,this.zIndex=100,this.disableForReducedMotion=!0,this.flat=!1,this.shapeOptions={}}get origin(){return{x:this.position.x/e.percentDenominator,y:this.position.y/e.percentDenominator}}set origin(t){this.position.x=t.x*e.percentDenominator,this.position.y=t.y*e.percentDenominator}get particleCount(){return this.count}set particleCount(e){this.count=e}load(t){if(!t)return;void 0!==t.angle&&(this.angle=t.angle);const i=t.count??t.particleCount;void 0!==i&&(this.count=i),void 0!==t.spread&&(this.spread=t.spread),void 0!==t.startVelocity&&(this.startVelocity=t.startVelocity),void 0!==t.decay&&(this.decay=t.decay),void 0!==t.flat&&(this.flat=t.flat),void 0!==t.gravity&&(this.gravity=t.gravity),void 0!==t.drift&&(this.drift=t.drift),void 0!==t.ticks&&(this.ticks=t.ticks);const a=t.origin;a&&!t.position&&(t.position={x:void 0!==a.x?a.x*e.percentDenominator:void 0,y:void 0!==a.y?a.y*e.percentDenominator:void 0});const s=t.position;s&&(void 0!==s.x&&(this.position.x=s.x),void 0!==s.y&&(this.position.y=s.y)),void 0!==t.colors&&((0,e.isArray)(t.colors)?this.colors=[...t.colors]:this.colors=t.colors);const r=t.shapeOptions;if(void 0!==r)for(const t in r){const i=r[t];i&&(this.shapeOptions[t]=(0,e.deepExtend)(this.shapeOptions[t]??{},i))}void 0!==t.shapes&&((0,e.isArray)(t.shapes)?this.shapes=[...t.shapes]:this.shapes=t.shapes),void 0!==t.scalar&&(this.scalar=t.scalar),void 0!==t.zIndex&&(this.zIndex=t.zIndex),void 0!==t.disableForReducedMotion&&(this.disableForReducedMotion=t.disableForReducedMotion)}}const i=9.81,a=5,s=3,r=1,o=0,n=0;let l=!1,p=!1;const d=new Map;async function c(e){if(l)return;if(p)return new Promise((e=>{const t=setInterval((()=>{l&&(clearInterval(t),e())}),100)}));p=!0;const{loadEmittersPlugin:t}=await Promise.resolve().then(g.t.bind(g,68,23)),{loadMotionPlugin:i}=await Promise.resolve().then(g.t.bind(g,82,23)),{loadCardsShape:a}=await Promise.resolve().then(g.t.bind(g,686,23)),{loadHeartShape:s}=await Promise.resolve().then(g.t.bind(g,12,23)),{loadImageShape:r}=await Promise.resolve().then(g.t.bind(g,885,23)),{loadPolygonShape:o}=await Promise.resolve().then(g.t.bind(g,907,23)),{loadSquareShape:n}=await Promise.resolve().then(g.t.bind(g,652,23)),{loadStarShape:d}=await Promise.resolve().then(g.t.bind(g,960,23)),{loadEmojiShape:c}=await Promise.resolve().then(g.t.bind(g,151,23)),{loadRotateUpdater:u}=await Promise.resolve().then(g.t.bind(g,59,23)),{loadLifeUpdater:h}=await Promise.resolve().then(g.t.bind(g,84,23)),{loadRollUpdater:f}=await Promise.resolve().then(g.t.bind(g,734,23)),{loadTiltUpdater:m}=await Promise.resolve().then(g.t.bind(g,448,23)),{loadWobbleUpdater:v}=await Promise.resolve().then(g.t.bind(g,83,23)),{loadBasic:w}=await Promise.resolve().then(g.t.bind(g,574,23));await t(e,!1),await i(e,!1),await a(e,!1),await s(e,!1),await r(e,!1),await o(e,!1),await n(e,!1),await d(e,!1),await c(e,!1),await u(e,!1),await h(e,!1),await f(e,!1),await m(e,!1),await v(e,!1),await w(e),p=!1,l=!0}async function u(l){const p=new t;let c;p.load(l.options);const u=p.ticks*e.millisecondsToSeconds/(3.6*e.millisecondsToSeconds*120);if(d.has(l.id)&&(c=d.get(l.id),c&&!c.destroyed)){const e=c;if(e.addEmitter)return void await e.addEmitter({startCount:p.count,position:p.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1},particles:{color:{value:p.colors},shape:{type:p.shapes,options:p.shapeOptions},life:{count:1},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:u,startValue:"max",destroy:"min"}},size:{value:a*p.scalar},move:{angle:{value:p.spread,offset:0},drift:{min:-p.drift,max:p.drift},gravity:{acceleration:p.gravity*i},speed:p.startVelocity*s,decay:r-p.decay,direction:-p.angle}}})}const h={fullScreen:{enable:!l.canvas,zIndex:p.zIndex},fpsLimit:120,particles:{number:{value:0},color:{value:p.colors},shape:{type:p.shapes,options:p.shapeOptions},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:u,startValue:"max",destroy:"min"}},size:{value:a*p.scalar},links:{enable:!1},life:{count:1},move:{angle:{value:p.spread,offset:0},drift:{min:-p.drift,max:p.drift},enable:!0,gravity:{enable:!0,acceleration:p.gravity*i},speed:p.startVelocity*s,decay:r-p.decay,direction:-p.angle,random:!0,straight:!1,outModes:{default:"none",bottom:"destroy"}},rotate:{value:p.flat?o:{min:0,max:360},direction:"random",animation:{enable:!p.flat,speed:60}},tilt:{direction:"random",enable:!p.flat,value:p.flat?n:{min:0,max:360},animation:{enable:!0,speed:60}},roll:{darken:{enable:!0,value:25},enable:!p.flat,speed:{min:15,max:25}},wobble:{distance:30,enable:!p.flat,speed:{min:-15,max:15}}},detectRetina:!0,motion:{disable:p.disableForReducedMotion},emitters:{name:"confetti",startCount:p.count,position:p.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1}}};return c=await e.tsParticles.load({id:l.id,element:l.canvas,options:h}),d.set(l.id,c),c}async function h(t,i){let a,s;return await c(e.tsParticles),(0,e.isString)(t)?(s=t,a=i??{}):(s="confetti",a=t),u({id:s,options:a})}h.create=async(t,i)=>{if(!t)return h;await c(e.tsParticles);const a=t.getAttribute("id")??"confetti";return t.setAttribute("id",a),async(s,r)=>{let o,n;return(0,e.isString)(s)?(n=s,o=r??i):(n=a,o=s),u({id:n,canvas:t,options:o})}},h.version=e.tsParticles.version,(0,e.isSsr)()||(window.confetti=h)})(),x})()));
@@ -1 +1 @@
1
- /*! tsParticles Confetti v3.1.0 by Matteo Bruni */
1
+ /*! tsParticles Confetti v3.2.0 by Matteo Bruni */
@@ -9,6 +9,11 @@ declare global {
9
9
  };
10
10
  }
11
11
  }
12
+ export interface ConfettiParams {
13
+ canvas?: HTMLCanvasElement;
14
+ id: string;
15
+ options: RecursivePartial<IConfettiOptions>;
16
+ }
12
17
  type ConfettiFunc = (idOrOptions: ConfettiFirstParam, confettiOptions?: RecursivePartial<IConfettiOptions>) => Promise<Container | undefined>;
13
18
  export declare function confetti(idOrOptions: ConfettiFirstParam, confettiOptions?: RecursivePartial<IConfettiOptions>): Promise<Container | undefined>;
14
19
  export declare namespace confetti {
package/umd/confetti.js CHANGED
@@ -1,32 +1,41 @@
1
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2
+ if (k2 === undefined) k2 = k;
3
+ var desc = Object.getOwnPropertyDescriptor(m, k);
4
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
5
+ desc = { enumerable: true, get: function() { return m[k]; } };
6
+ }
7
+ Object.defineProperty(o, k2, desc);
8
+ }) : (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ o[k2] = m[k];
11
+ }));
12
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
13
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
14
+ }) : function(o, v) {
15
+ o["default"] = v;
16
+ });
17
+ var __importStar = (this && this.__importStar) || function (mod) {
18
+ if (mod && mod.__esModule) return mod;
19
+ var result = {};
20
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
21
+ __setModuleDefault(result, mod);
22
+ return result;
23
+ };
1
24
  (function (factory) {
2
25
  if (typeof module === "object" && typeof module.exports === "object") {
3
26
  var v = factory(require, exports);
4
27
  if (v !== undefined) module.exports = v;
5
28
  }
6
29
  else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports", "@tsparticles/engine", "@tsparticles/plugin-emitters", "./ConfettiOptions.js", "@tsparticles/basic", "@tsparticles/shape-cards", "@tsparticles/shape-emoji", "@tsparticles/shape-heart", "@tsparticles/shape-image", "@tsparticles/updater-life", "@tsparticles/plugin-motion", "@tsparticles/shape-polygon", "@tsparticles/updater-roll", "@tsparticles/updater-rotate", "@tsparticles/shape-square", "@tsparticles/shape-star", "@tsparticles/updater-tilt", "@tsparticles/updater-wobble"], factory);
30
+ define(["require", "exports", "@tsparticles/engine", "./ConfettiOptions.js"], factory);
8
31
  }
9
32
  })(function (require, exports) {
10
33
  "use strict";
34
+ var __syncRequire = typeof module === "object" && typeof module.exports === "object";
11
35
  Object.defineProperty(exports, "__esModule", { value: true });
12
36
  exports.confetti = void 0;
13
37
  const engine_1 = require("@tsparticles/engine");
14
- const plugin_emitters_1 = require("@tsparticles/plugin-emitters");
15
38
  const ConfettiOptions_js_1 = require("./ConfettiOptions.js");
16
- const basic_1 = require("@tsparticles/basic");
17
- const shape_cards_1 = require("@tsparticles/shape-cards");
18
- const shape_emoji_1 = require("@tsparticles/shape-emoji");
19
- const shape_heart_1 = require("@tsparticles/shape-heart");
20
- const shape_image_1 = require("@tsparticles/shape-image");
21
- const updater_life_1 = require("@tsparticles/updater-life");
22
- const plugin_motion_1 = require("@tsparticles/plugin-motion");
23
- const shape_polygon_1 = require("@tsparticles/shape-polygon");
24
- const updater_roll_1 = require("@tsparticles/updater-roll");
25
- const updater_rotate_1 = require("@tsparticles/updater-rotate");
26
- const shape_square_1 = require("@tsparticles/shape-square");
27
- const shape_star_1 = require("@tsparticles/shape-star");
28
- const updater_tilt_1 = require("@tsparticles/updater-tilt");
29
- const updater_wobble_1 = require("@tsparticles/updater-wobble");
30
39
  const defaultGravity = 9.81, sizeFactor = 5, speedFactor = 3, decayOffset = 1, disableRotate = 0, disableTilt = 0;
31
40
  let initialized = false;
32
41
  let initializing = false;
@@ -47,21 +56,22 @@
47
56
  });
48
57
  }
49
58
  initializing = true;
50
- await (0, plugin_emitters_1.loadEmittersPlugin)(engine, false);
51
- await (0, plugin_motion_1.loadMotionPlugin)(engine, false);
52
- await (0, shape_cards_1.loadCardsShape)(engine, false);
53
- await (0, shape_heart_1.loadHeartShape)(engine, false);
54
- await (0, shape_image_1.loadImageShape)(engine, false);
55
- await (0, shape_polygon_1.loadPolygonShape)(engine, false);
56
- await (0, shape_square_1.loadSquareShape)(engine, false);
57
- await (0, shape_star_1.loadStarShape)(engine, false);
58
- await (0, shape_emoji_1.loadEmojiShape)(engine, false);
59
- await (0, updater_rotate_1.loadRotateUpdater)(engine, false);
60
- await (0, updater_life_1.loadLifeUpdater)(engine, false);
61
- await (0, updater_roll_1.loadRollUpdater)(engine, false);
62
- await (0, updater_tilt_1.loadTiltUpdater)(engine, false);
63
- await (0, updater_wobble_1.loadWobbleUpdater)(engine, false);
64
- await (0, basic_1.loadBasic)(engine);
59
+ const { loadEmittersPlugin } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/plugin-emitters"))) : new Promise((resolve_1, reject_1) => { require(["@tsparticles/plugin-emitters"], resolve_1, reject_1); }).then(__importStar)), { loadMotionPlugin } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/plugin-motion"))) : new Promise((resolve_2, reject_2) => { require(["@tsparticles/plugin-motion"], resolve_2, reject_2); }).then(__importStar)), { loadCardsShape } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/shape-cards"))) : new Promise((resolve_3, reject_3) => { require(["@tsparticles/shape-cards"], resolve_3, reject_3); }).then(__importStar)), { loadHeartShape } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/shape-heart"))) : new Promise((resolve_4, reject_4) => { require(["@tsparticles/shape-heart"], resolve_4, reject_4); }).then(__importStar)), { loadImageShape } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/shape-image"))) : new Promise((resolve_5, reject_5) => { require(["@tsparticles/shape-image"], resolve_5, reject_5); }).then(__importStar)), { loadPolygonShape } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/shape-polygon"))) : new Promise((resolve_6, reject_6) => { require(["@tsparticles/shape-polygon"], resolve_6, reject_6); }).then(__importStar)), { loadSquareShape } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/shape-square"))) : new Promise((resolve_7, reject_7) => { require(["@tsparticles/shape-square"], resolve_7, reject_7); }).then(__importStar)), { loadStarShape } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/shape-star"))) : new Promise((resolve_8, reject_8) => { require(["@tsparticles/shape-star"], resolve_8, reject_8); }).then(__importStar)), { loadEmojiShape } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/shape-emoji"))) : new Promise((resolve_9, reject_9) => { require(["@tsparticles/shape-emoji"], resolve_9, reject_9); }).then(__importStar)), { loadRotateUpdater } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/updater-rotate"))) : new Promise((resolve_10, reject_10) => { require(["@tsparticles/updater-rotate"], resolve_10, reject_10); }).then(__importStar)), { loadLifeUpdater } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/updater-life"))) : new Promise((resolve_11, reject_11) => { require(["@tsparticles/updater-life"], resolve_11, reject_11); }).then(__importStar)), { loadRollUpdater } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/updater-roll"))) : new Promise((resolve_12, reject_12) => { require(["@tsparticles/updater-roll"], resolve_12, reject_12); }).then(__importStar)), { loadTiltUpdater } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/updater-tilt"))) : new Promise((resolve_13, reject_13) => { require(["@tsparticles/updater-tilt"], resolve_13, reject_13); }).then(__importStar)), { loadWobbleUpdater } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/updater-wobble"))) : new Promise((resolve_14, reject_14) => { require(["@tsparticles/updater-wobble"], resolve_14, reject_14); }).then(__importStar)), { loadBasic } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/basic"))) : new Promise((resolve_15, reject_15) => { require(["@tsparticles/basic"], resolve_15, reject_15); }).then(__importStar));
60
+ await loadEmittersPlugin(engine, false);
61
+ await loadMotionPlugin(engine, false);
62
+ await loadCardsShape(engine, false);
63
+ await loadHeartShape(engine, false);
64
+ await loadImageShape(engine, false);
65
+ await loadPolygonShape(engine, false);
66
+ await loadSquareShape(engine, false);
67
+ await loadStarShape(engine, false);
68
+ await loadEmojiShape(engine, false);
69
+ await loadRotateUpdater(engine, false);
70
+ await loadLifeUpdater(engine, false);
71
+ await loadRollUpdater(engine, false);
72
+ await loadTiltUpdater(engine, false);
73
+ await loadWobbleUpdater(engine, false);
74
+ await loadBasic(engine);
65
75
  initializing = false;
66
76
  initialized = true;
67
77
  }
@@ -0,0 +1,30 @@
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.2.0
8
+ */
9
+ "use strict";
10
+ /*
11
+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
12
+ * This devtool is neither made for production nor for readable output files.
13
+ * It uses "eval()" calls to create a separate source file in the browser devtools.
14
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
15
+ * or disable the default devtool with "devtool: false".
16
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
17
+ */
18
+ (this["webpackChunk_tsparticles_confetti"] = this["webpackChunk_tsparticles_confetti"] || []).push([["updaters_color_dist_browser_ColorUpdater_js"],{
19
+
20
+ /***/ "../../updaters/color/dist/browser/ColorUpdater.js":
21
+ /*!*********************************************************!*\
22
+ !*** ../../updaters/color/dist/browser/ColorUpdater.js ***!
23
+ \*********************************************************/
24
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
25
+
26
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ColorUpdater: () => (/* binding */ ColorUpdater)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nclass ColorUpdater {\n constructor(container) {\n this.container = container;\n }\n async init(particle) {\n const hslColor = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.rangeColorToHsl)(particle.options.color, particle.id, particle.options.reduceDuplicates);\n if (hslColor) {\n particle.color = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getHslAnimationFromHsl)(hslColor, particle.options.color.animation, this.container.retina.reduceFactor);\n }\n await Promise.resolve();\n }\n isEnabled(particle) {\n const {\n h: hAnimation,\n s: sAnimation,\n l: lAnimation\n } = particle.options.color.animation,\n {\n color\n } = particle;\n return !particle.destroyed && !particle.spawning && (color?.h.value !== undefined && hAnimation.enable || color?.s.value !== undefined && sAnimation.enable || color?.l.value !== undefined && lAnimation.enable);\n }\n async update(particle, delta) {\n (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.updateColor)(particle.color, delta);\n await Promise.resolve();\n }\n}\n\n//# sourceURL=webpack://@tsparticles/confetti/../../updaters/color/dist/browser/ColorUpdater.js?");
27
+
28
+ /***/ })
29
+
30
+ }]);
@@ -0,0 +1,30 @@
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.2.0
8
+ */
9
+ "use strict";
10
+ /*
11
+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
12
+ * This devtool is neither made for production nor for readable output files.
13
+ * It uses "eval()" calls to create a separate source file in the browser devtools.
14
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
15
+ * or disable the default devtool with "devtool: false".
16
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
17
+ */
18
+ (this["webpackChunk_tsparticles_confetti"] = this["webpackChunk_tsparticles_confetti"] || []).push([["updaters_color_dist_browser_index_js"],{
19
+
20
+ /***/ "../../updaters/color/dist/browser/index.js":
21
+ /*!**************************************************!*\
22
+ !*** ../../updaters/color/dist/browser/index.js ***!
23
+ \**************************************************/
24
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
25
+
26
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadColorUpdater: () => (/* binding */ loadColorUpdater)\n/* harmony export */ });\nasync function loadColorUpdater(engine, refresh = true) {\n await engine.addParticleUpdater(\"color\", async container => {\n const {\n ColorUpdater\n } = await __webpack_require__.e(/*! import() */ \"updaters_color_dist_browser_ColorUpdater_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./ColorUpdater.js */ \"../../updaters/color/dist/browser/ColorUpdater.js\"));\n return new ColorUpdater(container);\n }, refresh);\n}\n\n//# sourceURL=webpack://@tsparticles/confetti/../../updaters/color/dist/browser/index.js?");
27
+
28
+ /***/ })
29
+
30
+ }]);
@@ -0,0 +1,60 @@
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.2.0
8
+ */
9
+ "use strict";
10
+ /*
11
+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
12
+ * This devtool is neither made for production nor for readable output files.
13
+ * It uses "eval()" calls to create a separate source file in the browser devtools.
14
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
15
+ * or disable the default devtool with "devtool: false".
16
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
17
+ */
18
+ (this["webpackChunk_tsparticles_confetti"] = this["webpackChunk_tsparticles_confetti"] || []).push([["updaters_life_dist_browser_LifeUpdater_js"],{
19
+
20
+ /***/ "../../updaters/life/dist/browser/LifeUpdater.js":
21
+ /*!*******************************************************!*\
22
+ !*** ../../updaters/life/dist/browser/LifeUpdater.js ***!
23
+ \*******************************************************/
24
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
25
+
26
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ LifeUpdater: () => (/* binding */ LifeUpdater)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n/* harmony import */ var _Options_Classes_Life_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Options/Classes/Life.js */ \"../../updaters/life/dist/browser/Options/Classes/Life.js\");\n\n\nconst noTime = 0,\n identity = 1,\n infiniteValue = -1;\nclass LifeUpdater {\n constructor(container) {\n this.container = container;\n }\n async init(particle) {\n const container = this.container,\n particlesOptions = particle.options,\n lifeOptions = particlesOptions.life;\n if (!lifeOptions) {\n return;\n }\n particle.life = {\n delay: container.retina.reduceFactor ? (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(lifeOptions.delay.value) * (lifeOptions.delay.sync ? identity : (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)()) / container.retina.reduceFactor * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.millisecondsToSeconds : noTime,\n delayTime: noTime,\n duration: container.retina.reduceFactor ? (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(lifeOptions.duration.value) * (lifeOptions.duration.sync ? identity : (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)()) / container.retina.reduceFactor * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.millisecondsToSeconds : noTime,\n time: noTime,\n count: lifeOptions.count\n };\n if (particle.life.duration <= noTime) {\n particle.life.duration = infiniteValue;\n }\n if (particle.life.count <= noTime) {\n particle.life.count = infiniteValue;\n }\n if (particle.life) {\n particle.spawning = particle.life.delay > noTime;\n }\n await Promise.resolve();\n }\n isEnabled(particle) {\n return !particle.destroyed;\n }\n loadOptions(options, ...sources) {\n if (!options.life) {\n options.life = new _Options_Classes_Life_js__WEBPACK_IMPORTED_MODULE_1__.Life();\n }\n for (const source of sources) {\n options.life.load(source?.life);\n }\n }\n async update(particle, delta) {\n if (!this.isEnabled(particle) || !particle.life) {\n return;\n }\n const {\n updateLife\n } = await __webpack_require__.e(/*! import() */ \"updaters_life_dist_browser_Utils_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./Utils.js */ \"../../updaters/life/dist/browser/Utils.js\"));\n updateLife(particle, delta, this.container.canvas.size);\n }\n}\n\n//# sourceURL=webpack://@tsparticles/confetti/../../updaters/life/dist/browser/LifeUpdater.js?");
27
+
28
+ /***/ }),
29
+
30
+ /***/ "../../updaters/life/dist/browser/Options/Classes/Life.js":
31
+ /*!****************************************************************!*\
32
+ !*** ../../updaters/life/dist/browser/Options/Classes/Life.js ***!
33
+ \****************************************************************/
34
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
35
+
36
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Life: () => (/* binding */ Life)\n/* harmony export */ });\n/* harmony import */ var _LifeDelay_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./LifeDelay.js */ \"../../updaters/life/dist/browser/Options/Classes/LifeDelay.js\");\n/* harmony import */ var _LifeDuration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./LifeDuration.js */ \"../../updaters/life/dist/browser/Options/Classes/LifeDuration.js\");\n\n\nclass Life {\n constructor() {\n this.count = 0;\n this.delay = new _LifeDelay_js__WEBPACK_IMPORTED_MODULE_0__.LifeDelay();\n this.duration = new _LifeDuration_js__WEBPACK_IMPORTED_MODULE_1__.LifeDuration();\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.count !== undefined) {\n this.count = data.count;\n }\n this.delay.load(data.delay);\n this.duration.load(data.duration);\n }\n}\n\n//# sourceURL=webpack://@tsparticles/confetti/../../updaters/life/dist/browser/Options/Classes/Life.js?");
37
+
38
+ /***/ }),
39
+
40
+ /***/ "../../updaters/life/dist/browser/Options/Classes/LifeDelay.js":
41
+ /*!*********************************************************************!*\
42
+ !*** ../../updaters/life/dist/browser/Options/Classes/LifeDelay.js ***!
43
+ \*********************************************************************/
44
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
45
+
46
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ LifeDelay: () => (/* binding */ LifeDelay)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nclass LifeDelay extends _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ValueWithRandom {\n constructor() {\n super();\n this.sync = false;\n }\n load(data) {\n if (!data) {\n return;\n }\n super.load(data);\n if (data.sync !== undefined) {\n this.sync = data.sync;\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/confetti/../../updaters/life/dist/browser/Options/Classes/LifeDelay.js?");
47
+
48
+ /***/ }),
49
+
50
+ /***/ "../../updaters/life/dist/browser/Options/Classes/LifeDuration.js":
51
+ /*!************************************************************************!*\
52
+ !*** ../../updaters/life/dist/browser/Options/Classes/LifeDuration.js ***!
53
+ \************************************************************************/
54
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
55
+
56
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ LifeDuration: () => (/* binding */ LifeDuration)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nclass LifeDuration extends _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ValueWithRandom {\n constructor() {\n super();\n this.sync = false;\n }\n load(data) {\n if (!data) {\n return;\n }\n super.load(data);\n if (data.sync !== undefined) {\n this.sync = data.sync;\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/confetti/../../updaters/life/dist/browser/Options/Classes/LifeDuration.js?");
57
+
58
+ /***/ })
59
+
60
+ }]);
@@ -0,0 +1,30 @@
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.2.0
8
+ */
9
+ "use strict";
10
+ /*
11
+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
12
+ * This devtool is neither made for production nor for readable output files.
13
+ * It uses "eval()" calls to create a separate source file in the browser devtools.
14
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
15
+ * or disable the default devtool with "devtool: false".
16
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
17
+ */
18
+ (this["webpackChunk_tsparticles_confetti"] = this["webpackChunk_tsparticles_confetti"] || []).push([["updaters_life_dist_browser_Utils_js"],{
19
+
20
+ /***/ "../../updaters/life/dist/browser/Utils.js":
21
+ /*!*************************************************!*\
22
+ !*** ../../updaters/life/dist/browser/Utils.js ***!
23
+ \*************************************************/
24
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
25
+
26
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ updateLife: () => (/* binding */ updateLife)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nconst noTime = 0,\n infiniteValue = -1,\n noLife = 0,\n minCanvasSize = 0;\nfunction updateLife(particle, delta, canvasSize) {\n if (!particle.life) {\n return;\n }\n const life = particle.life;\n let justSpawned = false;\n if (particle.spawning) {\n life.delayTime += delta.value;\n if (life.delayTime >= particle.life.delay) {\n justSpawned = true;\n particle.spawning = false;\n life.delayTime = noTime;\n life.time = noTime;\n } else {\n return;\n }\n }\n if (life.duration === infiniteValue) {\n return;\n }\n if (particle.spawning) {\n return;\n }\n if (justSpawned) {\n life.time = noTime;\n } else {\n life.time += delta.value;\n }\n if (life.time < life.duration) {\n return;\n }\n life.time = noTime;\n if (particle.life.count > noLife) {\n particle.life.count--;\n }\n if (particle.life.count === noLife) {\n particle.destroy();\n return;\n }\n const widthRange = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(minCanvasSize, canvasSize.width),\n heightRange = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(minCanvasSize, canvasSize.width);\n particle.position.x = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.randomInRange)(widthRange);\n particle.position.y = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.randomInRange)(heightRange);\n particle.spawning = true;\n life.delayTime = noTime;\n life.time = noTime;\n particle.reset();\n const lifeOptions = particle.options.life;\n if (lifeOptions) {\n life.delay = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(lifeOptions.delay.value) * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.millisecondsToSeconds;\n life.duration = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(lifeOptions.duration.value) * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.millisecondsToSeconds;\n }\n}\n\n//# sourceURL=webpack://@tsparticles/confetti/../../updaters/life/dist/browser/Utils.js?");
27
+
28
+ /***/ })
29
+
30
+ }]);
@@ -0,0 +1,30 @@
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.2.0
8
+ */
9
+ "use strict";
10
+ /*
11
+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
12
+ * This devtool is neither made for production nor for readable output files.
13
+ * It uses "eval()" calls to create a separate source file in the browser devtools.
14
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
15
+ * or disable the default devtool with "devtool: false".
16
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
17
+ */
18
+ (this["webpackChunk_tsparticles_confetti"] = this["webpackChunk_tsparticles_confetti"] || []).push([["updaters_life_dist_browser_index_js"],{
19
+
20
+ /***/ "../../updaters/life/dist/browser/index.js":
21
+ /*!*************************************************!*\
22
+ !*** ../../updaters/life/dist/browser/index.js ***!
23
+ \*************************************************/
24
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
25
+
26
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadLifeUpdater: () => (/* binding */ loadLifeUpdater)\n/* harmony export */ });\nasync function loadLifeUpdater(engine, refresh = true) {\n await engine.addParticleUpdater(\"life\", async container => {\n const {\n LifeUpdater\n } = await __webpack_require__.e(/*! import() */ \"updaters_life_dist_browser_LifeUpdater_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./LifeUpdater.js */ \"../../updaters/life/dist/browser/LifeUpdater.js\"));\n return new LifeUpdater(container);\n }, refresh);\n}\n\n//# sourceURL=webpack://@tsparticles/confetti/../../updaters/life/dist/browser/index.js?");
27
+
28
+ /***/ })
29
+
30
+ }]);
@@ -0,0 +1,30 @@
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.2.0
8
+ */
9
+ "use strict";
10
+ /*
11
+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
12
+ * This devtool is neither made for production nor for readable output files.
13
+ * It uses "eval()" calls to create a separate source file in the browser devtools.
14
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
15
+ * or disable the default devtool with "devtool: false".
16
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
17
+ */
18
+ (this["webpackChunk_tsparticles_confetti"] = this["webpackChunk_tsparticles_confetti"] || []).push([["updaters_opacity_dist_browser_OpacityUpdater_js"],{
19
+
20
+ /***/ "../../updaters/opacity/dist/browser/OpacityUpdater.js":
21
+ /*!*************************************************************!*\
22
+ !*** ../../updaters/opacity/dist/browser/OpacityUpdater.js ***!
23
+ \*************************************************************/
24
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
25
+
26
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ OpacityUpdater: () => (/* binding */ OpacityUpdater)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nclass OpacityUpdater {\n constructor(container) {\n this.container = container;\n }\n async init(particle) {\n const opacityOptions = particle.options.opacity,\n pxRatio = 1;\n particle.opacity = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.initParticleNumericAnimationValue)(opacityOptions, pxRatio);\n const opacityAnimation = opacityOptions.animation;\n if (opacityAnimation.enable) {\n particle.opacity.velocity = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(opacityAnimation.speed) / _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.percentDenominator * this.container.retina.reduceFactor;\n if (!opacityAnimation.sync) {\n particle.opacity.velocity *= (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)();\n }\n }\n await Promise.resolve();\n }\n isEnabled(particle) {\n const none = 0;\n return !particle.destroyed && !particle.spawning && !!particle.opacity && particle.opacity.enable && ((particle.opacity.maxLoops ?? none) <= none || (particle.opacity.maxLoops ?? none) > none && (particle.opacity.loops ?? none) < (particle.opacity.maxLoops ?? none));\n }\n reset(particle) {\n if (particle.opacity) {\n particle.opacity.time = 0;\n particle.opacity.loops = 0;\n }\n }\n async update(particle, delta) {\n if (!this.isEnabled(particle) || !particle.opacity) {\n return;\n }\n (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.updateAnimation)(particle, particle.opacity, true, particle.options.opacity.animation.destroy, delta);\n await Promise.resolve();\n }\n}\n\n//# sourceURL=webpack://@tsparticles/confetti/../../updaters/opacity/dist/browser/OpacityUpdater.js?");
27
+
28
+ /***/ })
29
+
30
+ }]);
@@ -0,0 +1,30 @@
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.2.0
8
+ */
9
+ "use strict";
10
+ /*
11
+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
12
+ * This devtool is neither made for production nor for readable output files.
13
+ * It uses "eval()" calls to create a separate source file in the browser devtools.
14
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
15
+ * or disable the default devtool with "devtool: false".
16
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
17
+ */
18
+ (this["webpackChunk_tsparticles_confetti"] = this["webpackChunk_tsparticles_confetti"] || []).push([["updaters_opacity_dist_browser_index_js"],{
19
+
20
+ /***/ "../../updaters/opacity/dist/browser/index.js":
21
+ /*!****************************************************!*\
22
+ !*** ../../updaters/opacity/dist/browser/index.js ***!
23
+ \****************************************************/
24
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
25
+
26
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadOpacityUpdater: () => (/* binding */ loadOpacityUpdater)\n/* harmony export */ });\nasync function loadOpacityUpdater(engine, refresh = true) {\n await engine.addParticleUpdater(\"opacity\", async container => {\n const {\n OpacityUpdater\n } = await __webpack_require__.e(/*! import() */ \"updaters_opacity_dist_browser_OpacityUpdater_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./OpacityUpdater.js */ \"../../updaters/opacity/dist/browser/OpacityUpdater.js\"));\n return new OpacityUpdater(container);\n }, refresh);\n}\n\n//# sourceURL=webpack://@tsparticles/confetti/../../updaters/opacity/dist/browser/index.js?");
27
+
28
+ /***/ })
29
+
30
+ }]);
@@ -0,0 +1,30 @@
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.2.0
8
+ */
9
+ "use strict";
10
+ /*
11
+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
12
+ * This devtool is neither made for production nor for readable output files.
13
+ * It uses "eval()" calls to create a separate source file in the browser devtools.
14
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
15
+ * or disable the default devtool with "devtool: false".
16
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
17
+ */
18
+ (this["webpackChunk_tsparticles_confetti"] = this["webpackChunk_tsparticles_confetti"] || []).push([["updaters_outModes_dist_browser_BounceOutMode_js"],{
19
+
20
+ /***/ "../../updaters/outModes/dist/browser/BounceOutMode.js":
21
+ /*!*************************************************************!*\
22
+ !*** ../../updaters/outModes/dist/browser/BounceOutMode.js ***!
23
+ \*************************************************************/
24
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
25
+
26
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BounceOutMode: () => (/* binding */ BounceOutMode)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nclass BounceOutMode {\n constructor(container) {\n this.container = container;\n this.modes = [\"bounce\", \"split\"];\n }\n async update(particle, direction, delta, outMode) {\n if (!this.modes.includes(outMode)) {\n return;\n }\n const container = this.container;\n let handled = false;\n for (const [, plugin] of container.plugins) {\n if (plugin.particleBounce !== undefined) {\n handled = await plugin.particleBounce(particle, delta, direction);\n }\n if (handled) {\n break;\n }\n }\n if (handled) {\n return;\n }\n const pos = particle.getPosition(),\n offset = particle.offset,\n size = particle.getRadius(),\n bounds = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.calculateBounds)(pos, size),\n canvasSize = container.canvas.size,\n {\n bounceHorizontal,\n bounceVertical\n } = await __webpack_require__.e(/*! import() */ \"updaters_outModes_dist_browser_Utils_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./Utils.js */ \"../../updaters/outModes/dist/browser/Utils.js\"));\n bounceHorizontal({\n particle,\n outMode,\n direction,\n bounds,\n canvasSize,\n offset,\n size\n });\n bounceVertical({\n particle,\n outMode,\n direction,\n bounds,\n canvasSize,\n offset,\n size\n });\n }\n}\n\n//# sourceURL=webpack://@tsparticles/confetti/../../updaters/outModes/dist/browser/BounceOutMode.js?");
27
+
28
+ /***/ })
29
+
30
+ }]);
@@ -0,0 +1,30 @@
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.2.0
8
+ */
9
+ "use strict";
10
+ /*
11
+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
12
+ * This devtool is neither made for production nor for readable output files.
13
+ * It uses "eval()" calls to create a separate source file in the browser devtools.
14
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
15
+ * or disable the default devtool with "devtool: false".
16
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
17
+ */
18
+ (this["webpackChunk_tsparticles_confetti"] = this["webpackChunk_tsparticles_confetti"] || []).push([["updaters_outModes_dist_browser_DestroyOutMode_js"],{
19
+
20
+ /***/ "../../updaters/outModes/dist/browser/DestroyOutMode.js":
21
+ /*!**************************************************************!*\
22
+ !*** ../../updaters/outModes/dist/browser/DestroyOutMode.js ***!
23
+ \**************************************************************/
24
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
25
+
26
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DestroyOutMode: () => (/* binding */ DestroyOutMode)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nconst minVelocity = 0;\nclass DestroyOutMode {\n constructor(container) {\n this.container = container;\n this.modes = [\"destroy\"];\n }\n async update(particle, direction, _delta, outMode) {\n if (!this.modes.includes(outMode)) {\n return;\n }\n const container = this.container;\n switch (particle.outType) {\n case \"normal\":\n case \"outside\":\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isPointInside)(particle.position, container.canvas.size, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.Vector.origin, particle.getRadius(), direction)) {\n return;\n }\n break;\n case \"inside\":\n {\n const {\n dx,\n dy\n } = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getDistances)(particle.position, particle.moveCenter),\n {\n x: vx,\n y: vy\n } = particle.velocity;\n if (vx < minVelocity && dx > particle.moveCenter.radius || vy < minVelocity && dy > particle.moveCenter.radius || vx >= minVelocity && dx < -particle.moveCenter.radius || vy >= minVelocity && dy < -particle.moveCenter.radius) {\n return;\n }\n break;\n }\n }\n container.particles.remove(particle, undefined, true);\n await Promise.resolve();\n }\n}\n\n//# sourceURL=webpack://@tsparticles/confetti/../../updaters/outModes/dist/browser/DestroyOutMode.js?");
27
+
28
+ /***/ })
29
+
30
+ }]);
@@ -0,0 +1,30 @@
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.2.0
8
+ */
9
+ "use strict";
10
+ /*
11
+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
12
+ * This devtool is neither made for production nor for readable output files.
13
+ * It uses "eval()" calls to create a separate source file in the browser devtools.
14
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
15
+ * or disable the default devtool with "devtool: false".
16
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
17
+ */
18
+ (this["webpackChunk_tsparticles_confetti"] = this["webpackChunk_tsparticles_confetti"] || []).push([["updaters_outModes_dist_browser_NoneOutMode_js"],{
19
+
20
+ /***/ "../../updaters/outModes/dist/browser/NoneOutMode.js":
21
+ /*!***********************************************************!*\
22
+ !*** ../../updaters/outModes/dist/browser/NoneOutMode.js ***!
23
+ \***********************************************************/
24
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
25
+
26
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ NoneOutMode: () => (/* binding */ NoneOutMode)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"../../engine/dist/browser/index.js\");\n\nconst minVelocity = 0;\nclass NoneOutMode {\n constructor(container) {\n this.container = container;\n this.modes = [\"none\"];\n }\n async update(particle, direction, delta, outMode) {\n if (!this.modes.includes(outMode)) {\n return;\n }\n if ((particle.options.move.distance.horizontal && (direction === \"left\" || direction === \"right\")) ?? (particle.options.move.distance.vertical && (direction === \"top\" || direction === \"bottom\"))) {\n return;\n }\n const gravityOptions = particle.options.move.gravity,\n container = this.container,\n canvasSize = container.canvas.size,\n pRadius = particle.getRadius();\n if (!gravityOptions.enable) {\n if (particle.velocity.y > minVelocity && particle.position.y <= canvasSize.height + pRadius || particle.velocity.y < minVelocity && particle.position.y >= -pRadius || particle.velocity.x > minVelocity && particle.position.x <= canvasSize.width + pRadius || particle.velocity.x < minVelocity && particle.position.x >= -pRadius) {\n return;\n }\n if (!(0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isPointInside)(particle.position, container.canvas.size, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.Vector.origin, pRadius, direction)) {\n container.particles.remove(particle);\n }\n } else {\n const position = particle.position;\n if (!gravityOptions.inverse && position.y > canvasSize.height + pRadius && direction === \"bottom\" || gravityOptions.inverse && position.y < -pRadius && direction === \"top\") {\n container.particles.remove(particle);\n }\n }\n await Promise.resolve();\n }\n}\n\n//# sourceURL=webpack://@tsparticles/confetti/../../updaters/outModes/dist/browser/NoneOutMode.js?");
27
+
28
+ /***/ })
29
+
30
+ }]);
@@ -0,0 +1,30 @@
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.2.0
8
+ */
9
+ "use strict";
10
+ /*
11
+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
12
+ * This devtool is neither made for production nor for readable output files.
13
+ * It uses "eval()" calls to create a separate source file in the browser devtools.
14
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
15
+ * or disable the default devtool with "devtool: false".
16
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
17
+ */
18
+ (this["webpackChunk_tsparticles_confetti"] = this["webpackChunk_tsparticles_confetti"] || []).push([["updaters_outModes_dist_browser_OutOfCanvasUpdater_js"],{
19
+
20
+ /***/ "../../updaters/outModes/dist/browser/OutOfCanvasUpdater.js":
21
+ /*!******************************************************************!*\
22
+ !*** ../../updaters/outModes/dist/browser/OutOfCanvasUpdater.js ***!
23
+ \******************************************************************/
24
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
25
+
26
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ OutOfCanvasUpdater: () => (/* binding */ OutOfCanvasUpdater)\n/* harmony export */ });\nconst checkOutMode = (outModes, outMode) => {\n return outModes.default === outMode || outModes.bottom === outMode || outModes.left === outMode || outModes.right === outMode || outModes.top === outMode;\n};\nclass OutOfCanvasUpdater {\n constructor(container) {\n this._updateOutMode = async (particle, delta, outMode, direction) => {\n for (const updater of this.updaters) {\n await updater.update(particle, direction, delta, outMode);\n }\n };\n this.container = container;\n this.updaters = [];\n }\n async init(particle) {\n this.updaters = [];\n const outModes = particle.options.move.outModes;\n if (checkOutMode(outModes, \"bounce\")) {\n const {\n BounceOutMode\n } = await __webpack_require__.e(/*! import() */ \"updaters_outModes_dist_browser_BounceOutMode_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./BounceOutMode.js */ \"../../updaters/outModes/dist/browser/BounceOutMode.js\"));\n this.updaters.push(new BounceOutMode(this.container));\n } else if (checkOutMode(outModes, \"out\")) {\n const {\n OutOutMode\n } = await __webpack_require__.e(/*! import() */ \"updaters_outModes_dist_browser_OutOutMode_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./OutOutMode.js */ \"../../updaters/outModes/dist/browser/OutOutMode.js\"));\n this.updaters.push(new OutOutMode(this.container));\n } else if (checkOutMode(outModes, \"destroy\")) {\n const {\n DestroyOutMode\n } = await __webpack_require__.e(/*! import() */ \"updaters_outModes_dist_browser_DestroyOutMode_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./DestroyOutMode.js */ \"../../updaters/outModes/dist/browser/DestroyOutMode.js\"));\n this.updaters.push(new DestroyOutMode(this.container));\n } else if (checkOutMode(outModes, \"none\")) {\n const {\n NoneOutMode\n } = await __webpack_require__.e(/*! import() */ \"updaters_outModes_dist_browser_NoneOutMode_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./NoneOutMode.js */ \"../../updaters/outModes/dist/browser/NoneOutMode.js\"));\n this.updaters.push(new NoneOutMode(this.container));\n }\n }\n isEnabled(particle) {\n return !particle.destroyed && !particle.spawning;\n }\n async update(particle, delta) {\n const outModes = particle.options.move.outModes;\n await this._updateOutMode(particle, delta, outModes.bottom ?? outModes.default, \"bottom\");\n await this._updateOutMode(particle, delta, outModes.left ?? outModes.default, \"left\");\n await this._updateOutMode(particle, delta, outModes.right ?? outModes.default, \"right\");\n await this._updateOutMode(particle, delta, outModes.top ?? outModes.default, \"top\");\n }\n}\n\n//# sourceURL=webpack://@tsparticles/confetti/../../updaters/outModes/dist/browser/OutOfCanvasUpdater.js?");
27
+
28
+ /***/ })
29
+
30
+ }]);