@tsparticles/shape-cards 3.9.0 → 4.0.0-alpha.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 (71) hide show
  1. package/30.min.js +2 -0
  2. package/30.min.js.LICENSE.txt +1 -0
  3. package/50.min.js +2 -0
  4. package/50.min.js.LICENSE.txt +1 -0
  5. package/568.min.js +2 -0
  6. package/568.min.js.LICENSE.txt +1 -0
  7. package/810.min.js +2 -0
  8. package/810.min.js.LICENSE.txt +1 -0
  9. package/browser/Utils.js +1 -1
  10. package/browser/{ClubDrawer.js → clubs/ClubDrawer.js} +1 -1
  11. package/browser/clubs/index.js +7 -0
  12. package/browser/{DiamondDrawer.js → diamonds/DiamondDrawer.js} +1 -1
  13. package/browser/diamonds/index.js +7 -0
  14. package/{esm → browser/hearts}/HeartDrawer.js +1 -1
  15. package/browser/hearts/index.js +7 -0
  16. package/browser/index.js +13 -10
  17. package/{esm → browser/spades}/SpadeDrawer.js +1 -1
  18. package/browser/spades/index.js +7 -0
  19. package/cjs/ICardsPath.js +1 -2
  20. package/cjs/Utils.js +3 -7
  21. package/{esm → cjs/clubs}/ClubDrawer.js +1 -1
  22. package/cjs/clubs/index.js +7 -0
  23. package/{esm → cjs/diamonds}/DiamondDrawer.js +1 -1
  24. package/cjs/diamonds/index.js +7 -0
  25. package/{browser → cjs/hearts}/HeartDrawer.js +1 -1
  26. package/cjs/hearts/index.js +7 -0
  27. package/cjs/index.js +13 -13
  28. package/{browser → cjs/spades}/SpadeDrawer.js +1 -1
  29. package/cjs/spades/index.js +7 -0
  30. package/dist_browser_clubs_ClubDrawer_js.js +40 -0
  31. package/dist_browser_diamonds_DiamondDrawer_js.js +40 -0
  32. package/dist_browser_hearts_HeartDrawer_js.js +40 -0
  33. package/dist_browser_spades_SpadeDrawer_js.js +40 -0
  34. package/esm/Utils.js +1 -1
  35. package/esm/clubs/ClubDrawer.js +9 -0
  36. package/esm/clubs/index.js +7 -0
  37. package/esm/diamonds/DiamondDrawer.js +9 -0
  38. package/esm/diamonds/index.js +7 -0
  39. package/esm/hearts/HeartDrawer.js +9 -0
  40. package/esm/hearts/index.js +7 -0
  41. package/esm/index.js +13 -10
  42. package/esm/spades/SpadeDrawer.js +9 -0
  43. package/esm/spades/index.js +7 -0
  44. package/package.json +4 -3
  45. package/report.html +5 -4
  46. package/tsparticles.shape.cards.js +235 -44
  47. package/tsparticles.shape.cards.min.js +1 -1
  48. package/tsparticles.shape.cards.min.js.LICENSE.txt +1 -1
  49. package/types/clubs/index.d.ts +2 -0
  50. package/types/diamonds/index.d.ts +2 -0
  51. package/types/hearts/index.d.ts +2 -0
  52. package/types/index.d.ts +5 -1
  53. package/types/spades/index.d.ts +2 -0
  54. package/umd/Utils.js +1 -1
  55. package/umd/{ClubDrawer.js → clubs/ClubDrawer.js} +2 -2
  56. package/umd/clubs/index.js +54 -0
  57. package/umd/{DiamondDrawer.js → diamonds/DiamondDrawer.js} +2 -2
  58. package/umd/diamonds/index.js +54 -0
  59. package/umd/{HeartDrawer.js → hearts/HeartDrawer.js} +2 -2
  60. package/umd/hearts/index.js +54 -0
  61. package/umd/index.js +51 -11
  62. package/umd/{SpadeDrawer.js → spades/SpadeDrawer.js} +2 -2
  63. package/umd/spades/index.js +54 -0
  64. package/cjs/ClubDrawer.js +0 -13
  65. package/cjs/DiamondDrawer.js +0 -13
  66. package/cjs/HeartDrawer.js +0 -13
  67. package/cjs/SpadeDrawer.js +0 -13
  68. /package/types/{ClubDrawer.d.ts → clubs/ClubDrawer.d.ts} +0 -0
  69. /package/types/{DiamondDrawer.d.ts → diamonds/DiamondDrawer.d.ts} +0 -0
  70. /package/types/{HeartDrawer.d.ts → hearts/HeartDrawer.d.ts} +0 -0
  71. /package/types/{SpadeDrawer.d.ts → spades/SpadeDrawer.d.ts} +0 -0
@@ -4,7 +4,7 @@
4
4
  * Demo / Generator : https://particles.js.org/
5
5
  * GitHub : https://www.github.com/matteobruni/tsparticles
6
6
  * How to use? : Check the GitHub README
7
- * v3.9.0
7
+ * v4.0.0-alpha.0
8
8
  */
9
9
  /*
10
10
  * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
@@ -28,65 +28,55 @@ return /******/ (() => { // webpackBootstrap
28
28
  /******/ "use strict";
29
29
  /******/ var __webpack_modules__ = ({
30
30
 
31
- /***/ "./dist/browser/ClubDrawer.js":
32
- /*!************************************!*\
33
- !*** ./dist/browser/ClubDrawer.js ***!
34
- \************************************/
35
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
36
-
37
- eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ClubDrawer: () => (/* binding */ ClubDrawer)\n/* harmony export */ });\n/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Utils.js */ \"./dist/browser/Utils.js\");\n\nclass ClubDrawer {\n constructor() {\n this.validTypes = [\"club\", \"clubs\"];\n }\n draw(data) {\n (0,_Utils_js__WEBPACK_IMPORTED_MODULE_0__.drawPath)(data, _Utils_js__WEBPACK_IMPORTED_MODULE_0__.paths.club);\n }\n}\n\n//# sourceURL=webpack://@tsparticles/shape-cards/./dist/browser/ClubDrawer.js?\n}");
38
-
39
- /***/ }),
40
-
41
- /***/ "./dist/browser/DiamondDrawer.js":
42
- /*!***************************************!*\
43
- !*** ./dist/browser/DiamondDrawer.js ***!
44
- \***************************************/
45
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
46
-
47
- eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DiamondDrawer: () => (/* binding */ DiamondDrawer)\n/* harmony export */ });\n/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Utils.js */ \"./dist/browser/Utils.js\");\n\nclass DiamondDrawer {\n constructor() {\n this.validTypes = [\"diamond\", \"diamonds\"];\n }\n draw(data) {\n (0,_Utils_js__WEBPACK_IMPORTED_MODULE_0__.drawPath)(data, _Utils_js__WEBPACK_IMPORTED_MODULE_0__.paths.diamond);\n }\n}\n\n//# sourceURL=webpack://@tsparticles/shape-cards/./dist/browser/DiamondDrawer.js?\n}");
48
-
49
- /***/ }),
50
-
51
- /***/ "./dist/browser/HeartDrawer.js":
31
+ /***/ "./dist/browser/clubs/index.js"
52
32
  /*!*************************************!*\
53
- !*** ./dist/browser/HeartDrawer.js ***!
33
+ !*** ./dist/browser/clubs/index.js ***!
54
34
  \*************************************/
55
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
35
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
56
36
 
57
- eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ HeartDrawer: () => (/* binding */ HeartDrawer)\n/* harmony export */ });\n/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Utils.js */ \"./dist/browser/Utils.js\");\n\nclass HeartDrawer {\n constructor() {\n this.validTypes = [\"heart\", \"hearts\"];\n }\n draw(data) {\n (0,_Utils_js__WEBPACK_IMPORTED_MODULE_0__.drawPath)(data, _Utils_js__WEBPACK_IMPORTED_MODULE_0__.paths.heart);\n }\n}\n\n//# sourceURL=webpack://@tsparticles/shape-cards/./dist/browser/HeartDrawer.js?\n}");
37
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadClubsCardsShape: () => (/* binding */ loadClubsCardsShape)\n/* harmony export */ });\nfunction loadClubsCardsShape(engine) {\n engine.checkVersion(\"4.0.0-alpha.0\");\n engine.register(async e => {\n const {\n ClubDrawer\n } = await __webpack_require__.e(/*! import() */ \"dist_browser_clubs_ClubDrawer_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./ClubDrawer.js */ \"./dist/browser/clubs/ClubDrawer.js\"));\n e.addShape(new ClubDrawer());\n });\n}\n\n//# sourceURL=webpack://@tsparticles/shape-cards/./dist/browser/clubs/index.js?\n}");
58
38
 
59
- /***/ }),
39
+ /***/ },
60
40
 
61
- /***/ "./dist/browser/SpadeDrawer.js":
62
- /*!*************************************!*\
63
- !*** ./dist/browser/SpadeDrawer.js ***!
64
- \*************************************/
65
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
41
+ /***/ "./dist/browser/diamonds/index.js"
42
+ /*!****************************************!*\
43
+ !*** ./dist/browser/diamonds/index.js ***!
44
+ \****************************************/
45
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
66
46
 
67
- eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SpadeDrawer: () => (/* binding */ SpadeDrawer)\n/* harmony export */ });\n/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Utils.js */ \"./dist/browser/Utils.js\");\n\nclass SpadeDrawer {\n constructor() {\n this.validTypes = [\"spade\", \"spades\"];\n }\n draw(data) {\n (0,_Utils_js__WEBPACK_IMPORTED_MODULE_0__.drawPath)(data, _Utils_js__WEBPACK_IMPORTED_MODULE_0__.paths.spade);\n }\n}\n\n//# sourceURL=webpack://@tsparticles/shape-cards/./dist/browser/SpadeDrawer.js?\n}");
47
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadDiamondsCardsShape: () => (/* binding */ loadDiamondsCardsShape)\n/* harmony export */ });\nfunction loadDiamondsCardsShape(engine) {\n engine.checkVersion(\"4.0.0-alpha.0\");\n engine.register(async e => {\n const {\n DiamondDrawer\n } = await __webpack_require__.e(/*! import() */ \"dist_browser_diamonds_DiamondDrawer_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./DiamondDrawer.js */ \"./dist/browser/diamonds/DiamondDrawer.js\"));\n e.addShape(new DiamondDrawer());\n });\n}\n\n//# sourceURL=webpack://@tsparticles/shape-cards/./dist/browser/diamonds/index.js?\n}");
68
48
 
69
- /***/ }),
49
+ /***/ },
70
50
 
71
- /***/ "./dist/browser/Utils.js":
72
- /*!*******************************!*\
73
- !*** ./dist/browser/Utils.js ***!
74
- \*******************************/
75
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
51
+ /***/ "./dist/browser/hearts/index.js"
52
+ /*!**************************************!*\
53
+ !*** ./dist/browser/hearts/index.js ***!
54
+ \**************************************/
55
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
76
56
 
77
- eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ drawPath: () => (/* binding */ drawPath),\n/* harmony export */ paths: () => (/* binding */ paths)\n/* harmony export */ });\nfunction drawPath(data, path) {\n if (!path.segments.length || !path.segments[0].values.length) {\n return;\n }\n const {\n context,\n radius\n } = data;\n context.moveTo(path.segments[0].values[0].x * radius, path.segments[0].values[0].y * radius);\n for (const segment of path.segments) {\n context.bezierCurveTo(segment.values[1].x * radius, segment.values[1].y * radius, segment.values[2].x * radius, segment.values[2].y * radius, segment.values[3].x * radius, segment.values[3].y * radius);\n }\n for (let i = path.segments.length - 1; i >= 0; i--) {\n const segment = path.segments[i];\n context.bezierCurveTo(-segment.values[2].x * radius, segment.values[2].y * radius, -segment.values[1].x * radius, segment.values[1].y * radius, -segment.values[0].x * radius, segment.values[0].y * radius);\n }\n}\nconst n = 1.0 / 2;\nconst paths = {\n heart: {\n segments: [{\n values: [{\n x: 0,\n y: n\n }, {\n x: 0,\n y: n\n }, {\n x: n,\n y: 0\n }, {\n x: n,\n y: -n / 2\n }]\n }, {\n values: [{\n x: n,\n y: -n / 2\n }, {\n x: n,\n y: -n / 2\n }, {\n x: n,\n y: -n\n }, {\n x: n / 2,\n y: -n\n }]\n }, {\n values: [{\n x: n / 2,\n y: -n\n }, {\n x: n / 2,\n y: -n\n }, {\n x: 0,\n y: -n\n }, {\n x: 0,\n y: -n / 2\n }]\n }]\n },\n diamond: {\n segments: [{\n values: [{\n x: 0,\n y: n\n }, {\n x: 0,\n y: n\n }, {\n x: 3 * n / 4,\n y: 0\n }, {\n x: 3 * n / 4,\n y: 0\n }]\n }, {\n values: [{\n x: 3 * n / 4,\n y: 0\n }, {\n x: 3 * n / 4,\n y: 0\n }, {\n x: 0,\n y: -n\n }, {\n x: 0,\n y: -n\n }]\n }]\n },\n club: {\n segments: [{\n values: [{\n x: 0,\n y: -n\n }, {\n x: 0,\n y: -n\n }, {\n x: n / 2,\n y: -n\n }, {\n x: n / 2,\n y: -n / 2\n }]\n }, {\n values: [{\n x: n / 2,\n y: -n / 2\n }, {\n x: n / 2,\n y: -n / 2\n }, {\n x: n,\n y: -n / 2\n }, {\n x: n,\n y: 0\n }]\n }, {\n values: [{\n x: n,\n y: 0\n }, {\n x: n,\n y: 0\n }, {\n x: n,\n y: n / 2\n }, {\n x: n / 2,\n y: n / 2\n }]\n }, {\n values: [{\n x: n / 2,\n y: n / 2\n }, {\n x: n / 2,\n y: n / 2\n }, {\n x: n / 8,\n y: n / 2\n }, {\n x: n / 8,\n y: n / 8\n }]\n }, {\n values: [{\n x: n / 8,\n y: n / 8\n }, {\n x: n / 8,\n y: n / 2\n }, {\n x: n / 2,\n y: n\n }, {\n x: n / 2,\n y: n\n }]\n }, {\n values: [{\n x: n / 2,\n y: n\n }, {\n x: n / 2,\n y: n\n }, {\n x: 0,\n y: n\n }, {\n x: 0,\n y: n\n }]\n }]\n },\n spade: {\n segments: [{\n values: [{\n x: 0,\n y: -n\n }, {\n x: 0,\n y: -n\n }, {\n x: n,\n y: -n / 2\n }, {\n x: n,\n y: 0\n }]\n }, {\n values: [{\n x: n,\n y: 0\n }, {\n x: n,\n y: 0\n }, {\n x: n,\n y: n / 2\n }, {\n x: n / 2,\n y: n / 2\n }]\n }, {\n values: [{\n x: n / 2,\n y: n / 2\n }, {\n x: n / 2,\n y: n / 2\n }, {\n x: n / 8,\n y: n / 2\n }, {\n x: n / 8,\n y: n / 8\n }]\n }, {\n values: [{\n x: n / 8,\n y: n / 8\n }, {\n x: n / 8,\n y: n / 2\n }, {\n x: n / 2,\n y: n\n }, {\n x: n / 2,\n y: n\n }]\n }, {\n values: [{\n x: n / 2,\n y: n\n }, {\n x: n / 2,\n y: n\n }, {\n x: 0,\n y: n\n }, {\n x: 0,\n y: n\n }]\n }]\n }\n};\n\n//# sourceURL=webpack://@tsparticles/shape-cards/./dist/browser/Utils.js?\n}");
57
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadHeartsCardsShape: () => (/* binding */ loadHeartsCardsShape)\n/* harmony export */ });\nfunction loadHeartsCardsShape(engine) {\n engine.checkVersion(\"4.0.0-alpha.0\");\n engine.register(async e => {\n const {\n HeartDrawer\n } = await __webpack_require__.e(/*! import() */ \"dist_browser_hearts_HeartDrawer_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./HeartDrawer.js */ \"./dist/browser/hearts/HeartDrawer.js\"));\n e.addShape(new HeartDrawer());\n });\n}\n\n//# sourceURL=webpack://@tsparticles/shape-cards/./dist/browser/hearts/index.js?\n}");
78
58
 
79
- /***/ }),
59
+ /***/ },
80
60
 
81
- /***/ "./dist/browser/index.js":
61
+ /***/ "./dist/browser/index.js"
82
62
  /*!*******************************!*\
83
63
  !*** ./dist/browser/index.js ***!
84
64
  \*******************************/
85
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
65
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
66
+
67
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadCardsShape: () => (/* binding */ loadCardsShape),\n/* harmony export */ loadClubsCardsShape: () => (/* reexport safe */ _clubs_index_js__WEBPACK_IMPORTED_MODULE_0__.loadClubsCardsShape),\n/* harmony export */ loadDiamondsCardsShape: () => (/* reexport safe */ _diamonds_index_js__WEBPACK_IMPORTED_MODULE_1__.loadDiamondsCardsShape),\n/* harmony export */ loadHeartsCardsShape: () => (/* reexport safe */ _hearts_index_js__WEBPACK_IMPORTED_MODULE_2__.loadHeartsCardsShape),\n/* harmony export */ loadSpadesCardsShape: () => (/* reexport safe */ _spades_index_js__WEBPACK_IMPORTED_MODULE_3__.loadSpadesCardsShape)\n/* harmony export */ });\n/* harmony import */ var _clubs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./clubs/index.js */ \"./dist/browser/clubs/index.js\");\n/* harmony import */ var _diamonds_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./diamonds/index.js */ \"./dist/browser/diamonds/index.js\");\n/* harmony import */ var _hearts_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./hearts/index.js */ \"./dist/browser/hearts/index.js\");\n/* harmony import */ var _spades_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./spades/index.js */ \"./dist/browser/spades/index.js\");\nfunction loadCardsShape(engine) {\n engine.checkVersion(\"4.0.0-alpha.0\");\n engine.register(async e => {\n const {\n loadClubsCardsShape\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.bind(__webpack_require__, /*! ./clubs/index.js */ \"./dist/browser/clubs/index.js\")),\n {\n loadDiamondsCardsShape\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.bind(__webpack_require__, /*! ./diamonds/index.js */ \"./dist/browser/diamonds/index.js\")),\n {\n loadHeartsCardsShape\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.bind(__webpack_require__, /*! ./hearts/index.js */ \"./dist/browser/hearts/index.js\")),\n {\n loadSpadesCardsShape\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.bind(__webpack_require__, /*! ./spades/index.js */ \"./dist/browser/spades/index.js\"));\n loadClubsCardsShape(e);\n loadDiamondsCardsShape(e);\n loadHeartsCardsShape(e);\n loadSpadesCardsShape(e);\n });\n}\n\n\n\n\n\n//# sourceURL=webpack://@tsparticles/shape-cards/./dist/browser/index.js?\n}");
86
68
 
87
- eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadCardsShape: () => (/* binding */ loadCardsShape)\n/* harmony export */ });\n/* harmony import */ var _ClubDrawer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ClubDrawer.js */ \"./dist/browser/ClubDrawer.js\");\n/* harmony import */ var _DiamondDrawer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./DiamondDrawer.js */ \"./dist/browser/DiamondDrawer.js\");\n/* harmony import */ var _HeartDrawer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./HeartDrawer.js */ \"./dist/browser/HeartDrawer.js\");\n/* harmony import */ var _SpadeDrawer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./SpadeDrawer.js */ \"./dist/browser/SpadeDrawer.js\");\n\n\n\n\nasync function loadCardsShape(engine, refresh = true) {\n engine.checkVersion(\"3.9.0\");\n await engine.addShape(new _SpadeDrawer_js__WEBPACK_IMPORTED_MODULE_3__.SpadeDrawer(), refresh);\n await engine.addShape(new _HeartDrawer_js__WEBPACK_IMPORTED_MODULE_2__.HeartDrawer(), refresh);\n await engine.addShape(new _DiamondDrawer_js__WEBPACK_IMPORTED_MODULE_1__.DiamondDrawer(), refresh);\n await engine.addShape(new _ClubDrawer_js__WEBPACK_IMPORTED_MODULE_0__.ClubDrawer(), refresh);\n}\n\n//# sourceURL=webpack://@tsparticles/shape-cards/./dist/browser/index.js?\n}");
69
+ /***/ },
88
70
 
89
- /***/ })
71
+ /***/ "./dist/browser/spades/index.js"
72
+ /*!**************************************!*\
73
+ !*** ./dist/browser/spades/index.js ***!
74
+ \**************************************/
75
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
76
+
77
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadSpadesCardsShape: () => (/* binding */ loadSpadesCardsShape)\n/* harmony export */ });\nfunction loadSpadesCardsShape(engine) {\n engine.checkVersion(\"4.0.0-alpha.0\");\n engine.register(async e => {\n const {\n SpadeDrawer\n } = await __webpack_require__.e(/*! import() */ \"dist_browser_spades_SpadeDrawer_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./SpadeDrawer.js */ \"./dist/browser/spades/SpadeDrawer.js\"));\n e.addShape(new SpadeDrawer());\n });\n}\n\n//# sourceURL=webpack://@tsparticles/shape-cards/./dist/browser/spades/index.js?\n}");
78
+
79
+ /***/ }
90
80
 
91
81
  /******/ });
92
82
  /************************************************************************/
@@ -100,6 +90,12 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
100
90
  /******/ if (cachedModule !== undefined) {
101
91
  /******/ return cachedModule.exports;
102
92
  /******/ }
93
+ /******/ // Check if module exists (development only)
94
+ /******/ if (__webpack_modules__[moduleId] === undefined) {
95
+ /******/ var e = new Error("Cannot find module '" + moduleId + "'");
96
+ /******/ e.code = 'MODULE_NOT_FOUND';
97
+ /******/ throw e;
98
+ /******/ }
103
99
  /******/ // Create a new module (and put it into the cache)
104
100
  /******/ var module = __webpack_module_cache__[moduleId] = {
105
101
  /******/ // no module.id needed
@@ -114,6 +110,9 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
114
110
  /******/ return module.exports;
115
111
  /******/ }
116
112
  /******/
113
+ /******/ // expose the modules object (__webpack_modules__)
114
+ /******/ __webpack_require__.m = __webpack_modules__;
115
+ /******/
117
116
  /************************************************************************/
118
117
  /******/ /* webpack/runtime/define property getters */
119
118
  /******/ (() => {
@@ -127,11 +126,90 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
127
126
  /******/ };
128
127
  /******/ })();
129
128
  /******/
129
+ /******/ /* webpack/runtime/ensure chunk */
130
+ /******/ (() => {
131
+ /******/ __webpack_require__.f = {};
132
+ /******/ // This file contains only the entry chunk.
133
+ /******/ // The chunk loading function for additional chunks
134
+ /******/ __webpack_require__.e = (chunkId) => {
135
+ /******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {
136
+ /******/ __webpack_require__.f[key](chunkId, promises);
137
+ /******/ return promises;
138
+ /******/ }, []));
139
+ /******/ };
140
+ /******/ })();
141
+ /******/
142
+ /******/ /* webpack/runtime/get javascript chunk filename */
143
+ /******/ (() => {
144
+ /******/ // This function allow to reference async chunks
145
+ /******/ __webpack_require__.u = (chunkId) => {
146
+ /******/ // return url for filenames based on template
147
+ /******/ return "" + chunkId + ".js";
148
+ /******/ };
149
+ /******/ })();
150
+ /******/
151
+ /******/ /* webpack/runtime/global */
152
+ /******/ (() => {
153
+ /******/ __webpack_require__.g = (function() {
154
+ /******/ if (typeof globalThis === 'object') return globalThis;
155
+ /******/ try {
156
+ /******/ return this || new Function('return this')();
157
+ /******/ } catch (e) {
158
+ /******/ if (typeof window === 'object') return window;
159
+ /******/ }
160
+ /******/ })();
161
+ /******/ })();
162
+ /******/
130
163
  /******/ /* webpack/runtime/hasOwnProperty shorthand */
131
164
  /******/ (() => {
132
165
  /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
133
166
  /******/ })();
134
167
  /******/
168
+ /******/ /* webpack/runtime/load script */
169
+ /******/ (() => {
170
+ /******/ var inProgress = {};
171
+ /******/ var dataWebpackPrefix = "@tsparticles/shape-cards:";
172
+ /******/ // loadScript function to load a script via script tag
173
+ /******/ __webpack_require__.l = (url, done, key, chunkId) => {
174
+ /******/ if(inProgress[url]) { inProgress[url].push(done); return; }
175
+ /******/ var script, needAttach;
176
+ /******/ if(key !== undefined) {
177
+ /******/ var scripts = document.getElementsByTagName("script");
178
+ /******/ for(var i = 0; i < scripts.length; i++) {
179
+ /******/ var s = scripts[i];
180
+ /******/ if(s.getAttribute("src") == url || s.getAttribute("data-webpack") == dataWebpackPrefix + key) { script = s; break; }
181
+ /******/ }
182
+ /******/ }
183
+ /******/ if(!script) {
184
+ /******/ needAttach = true;
185
+ /******/ script = document.createElement('script');
186
+ /******/
187
+ /******/ script.charset = 'utf-8';
188
+ /******/ if (__webpack_require__.nc) {
189
+ /******/ script.setAttribute("nonce", __webpack_require__.nc);
190
+ /******/ }
191
+ /******/ script.setAttribute("data-webpack", dataWebpackPrefix + key);
192
+ /******/
193
+ /******/ script.src = url;
194
+ /******/ }
195
+ /******/ inProgress[url] = [done];
196
+ /******/ var onScriptComplete = (prev, event) => {
197
+ /******/ // avoid mem leaks in IE.
198
+ /******/ script.onerror = script.onload = null;
199
+ /******/ clearTimeout(timeout);
200
+ /******/ var doneFns = inProgress[url];
201
+ /******/ delete inProgress[url];
202
+ /******/ script.parentNode && script.parentNode.removeChild(script);
203
+ /******/ doneFns && doneFns.forEach((fn) => (fn(event)));
204
+ /******/ if(prev) return prev(event);
205
+ /******/ }
206
+ /******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);
207
+ /******/ script.onerror = onScriptComplete.bind(null, script.onerror);
208
+ /******/ script.onload = onScriptComplete.bind(null, script.onload);
209
+ /******/ needAttach && document.head.appendChild(script);
210
+ /******/ };
211
+ /******/ })();
212
+ /******/
135
213
  /******/ /* webpack/runtime/make namespace object */
136
214
  /******/ (() => {
137
215
  /******/ // define __esModule on exports
@@ -143,6 +221,119 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
143
221
  /******/ };
144
222
  /******/ })();
145
223
  /******/
224
+ /******/ /* webpack/runtime/publicPath */
225
+ /******/ (() => {
226
+ /******/ var scriptUrl;
227
+ /******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + "";
228
+ /******/ var document = __webpack_require__.g.document;
229
+ /******/ if (!scriptUrl && document) {
230
+ /******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')
231
+ /******/ scriptUrl = document.currentScript.src;
232
+ /******/ if (!scriptUrl) {
233
+ /******/ var scripts = document.getElementsByTagName("script");
234
+ /******/ if(scripts.length) {
235
+ /******/ var i = scripts.length - 1;
236
+ /******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;
237
+ /******/ }
238
+ /******/ }
239
+ /******/ }
240
+ /******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration
241
+ /******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.
242
+ /******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser");
243
+ /******/ scriptUrl = scriptUrl.replace(/^blob:/, "").replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/");
244
+ /******/ __webpack_require__.p = scriptUrl;
245
+ /******/ })();
246
+ /******/
247
+ /******/ /* webpack/runtime/jsonp chunk loading */
248
+ /******/ (() => {
249
+ /******/ // no baseURI
250
+ /******/
251
+ /******/ // object to store loaded and loading chunks
252
+ /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
253
+ /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
254
+ /******/ var installedChunks = {
255
+ /******/ "tsparticles.shape.cards": 0
256
+ /******/ };
257
+ /******/
258
+ /******/ __webpack_require__.f.j = (chunkId, promises) => {
259
+ /******/ // JSONP chunk loading for javascript
260
+ /******/ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;
261
+ /******/ if(installedChunkData !== 0) { // 0 means "already installed".
262
+ /******/
263
+ /******/ // a Promise means "currently loading".
264
+ /******/ if(installedChunkData) {
265
+ /******/ promises.push(installedChunkData[2]);
266
+ /******/ } else {
267
+ /******/ if(true) { // all chunks have JS
268
+ /******/ // setup Promise in chunk cache
269
+ /******/ var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));
270
+ /******/ promises.push(installedChunkData[2] = promise);
271
+ /******/
272
+ /******/ // start chunk loading
273
+ /******/ var url = __webpack_require__.p + __webpack_require__.u(chunkId);
274
+ /******/ // create error before stack unwound to get useful stacktrace later
275
+ /******/ var error = new Error();
276
+ /******/ var loadingEnded = (event) => {
277
+ /******/ if(__webpack_require__.o(installedChunks, chunkId)) {
278
+ /******/ installedChunkData = installedChunks[chunkId];
279
+ /******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined;
280
+ /******/ if(installedChunkData) {
281
+ /******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type);
282
+ /******/ var realSrc = event && event.target && event.target.src;
283
+ /******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
284
+ /******/ error.name = 'ChunkLoadError';
285
+ /******/ error.type = errorType;
286
+ /******/ error.request = realSrc;
287
+ /******/ installedChunkData[1](error);
288
+ /******/ }
289
+ /******/ }
290
+ /******/ };
291
+ /******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId);
292
+ /******/ }
293
+ /******/ }
294
+ /******/ }
295
+ /******/ };
296
+ /******/
297
+ /******/ // no prefetching
298
+ /******/
299
+ /******/ // no preloaded
300
+ /******/
301
+ /******/ // no HMR
302
+ /******/
303
+ /******/ // no HMR manifest
304
+ /******/
305
+ /******/ // no on chunks loaded
306
+ /******/
307
+ /******/ // install a JSONP callback for chunk loading
308
+ /******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
309
+ /******/ var [chunkIds, moreModules, runtime] = data;
310
+ /******/ // add "moreModules" to the modules object,
311
+ /******/ // then flag all "chunkIds" as loaded and fire callback
312
+ /******/ var moduleId, chunkId, i = 0;
313
+ /******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
314
+ /******/ for(moduleId in moreModules) {
315
+ /******/ if(__webpack_require__.o(moreModules, moduleId)) {
316
+ /******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
317
+ /******/ }
318
+ /******/ }
319
+ /******/ if(runtime) var result = runtime(__webpack_require__);
320
+ /******/ }
321
+ /******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
322
+ /******/ for(;i < chunkIds.length; i++) {
323
+ /******/ chunkId = chunkIds[i];
324
+ /******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
325
+ /******/ installedChunks[chunkId][0]();
326
+ /******/ }
327
+ /******/ installedChunks[chunkId] = 0;
328
+ /******/ }
329
+ /******/
330
+ /******/ }
331
+ /******/
332
+ /******/ var chunkLoadingGlobal = this["webpackChunk_tsparticles_shape_cards"] = this["webpackChunk_tsparticles_shape_cards"] || [];
333
+ /******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
334
+ /******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
335
+ /******/ })();
336
+ /******/
146
337
  /************************************************************************/
147
338
  /******/
148
339
  /******/ // startup
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see tsparticles.shape.cards.min.js.LICENSE.txt */
2
- !function(e,s){if("object"==typeof exports&&"object"==typeof module)module.exports=s();else if("function"==typeof define&&define.amd)define([],s);else{var y=s();for(var a in y)("object"==typeof exports?exports:e)[a]=y[a]}}(this,(()=>(()=>{var e={d:(s,y)=>{for(var a in y)e.o(y,a)&&!e.o(s,a)&&Object.defineProperty(s,a,{enumerable:!0,get:y[a]})},o:(e,s)=>Object.prototype.hasOwnProperty.call(e,s),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},s={};function y(e,s){if(!s.segments.length||!s.segments[0].values.length)return;const{context:y,radius:a}=e;y.moveTo(s.segments[0].values[0].x*a,s.segments[0].values[0].y*a);for(const e of s.segments)y.bezierCurveTo(e.values[1].x*a,e.values[1].y*a,e.values[2].x*a,e.values[2].y*a,e.values[3].x*a,e.values[3].y*a);for(let e=s.segments.length-1;e>=0;e--){const x=s.segments[e];y.bezierCurveTo(-x.values[2].x*a,x.values[2].y*a,-x.values[1].x*a,x.values[1].y*a,-x.values[0].x*a,x.values[0].y*a)}}e.r(s),e.d(s,{loadCardsShape:()=>u});const a=.5,x={heart:{segments:[{values:[{x:0,y:a},{x:0,y:a},{x:a,y:0},{x:a,y:-a/2}]},{values:[{x:a,y:-a/2},{x:a,y:-a/2},{x:a,y:-a},{x:a/2,y:-a}]},{values:[{x:a/2,y:-a},{x:a/2,y:-a},{x:0,y:-a},{x:0,y:-a/2}]}]},diamond:{segments:[{values:[{x:0,y:a},{x:0,y:a},{x:.375,y:0},{x:.375,y:0}]},{values:[{x:.375,y:0},{x:.375,y:0},{x:0,y:-a},{x:0,y:-a}]}]},club:{segments:[{values:[{x:0,y:-a},{x:0,y:-a},{x:a/2,y:-a},{x:a/2,y:-a/2}]},{values:[{x:a/2,y:-a/2},{x:a/2,y:-a/2},{x:a,y:-a/2},{x:a,y:0}]},{values:[{x:a,y:0},{x:a,y:0},{x:a,y:a/2},{x:a/2,y:a/2}]},{values:[{x:a/2,y:a/2},{x:a/2,y:a/2},{x:a/8,y:a/2},{x:a/8,y:a/8}]},{values:[{x:a/8,y:a/8},{x:a/8,y:a/2},{x:a/2,y:a},{x:a/2,y:a}]},{values:[{x:a/2,y:a},{x:a/2,y:a},{x:0,y:a},{x:0,y:a}]}]},spade:{segments:[{values:[{x:0,y:-a},{x:0,y:-a},{x:a,y:-a/2},{x:a,y:0}]},{values:[{x:a,y:0},{x:a,y:0},{x:a,y:a/2},{x:a/2,y:a/2}]},{values:[{x:a/2,y:a/2},{x:a/2,y:a/2},{x:a/8,y:a/2},{x:a/8,y:a/8}]},{values:[{x:a/8,y:a/8},{x:a/8,y:a/2},{x:a/2,y:a},{x:a/2,y:a}]},{values:[{x:a/2,y:a},{x:a/2,y:a},{x:0,y:a},{x:0,y:a}]}]}};class t{constructor(){this.validTypes=["club","clubs"]}draw(e){y(e,x.club)}}class l{constructor(){this.validTypes=["diamond","diamonds"]}draw(e){y(e,x.diamond)}}class o{constructor(){this.validTypes=["heart","hearts"]}draw(e){y(e,x.heart)}}class n{constructor(){this.validTypes=["spade","spades"]}draw(e){y(e,x.spade)}}async function u(e,s=!0){e.checkVersion("3.9.0"),await e.addShape(new n,s),await e.addShape(new o,s),await e.addShape(new l,s),await e.addShape(new t,s)}return s})()));
2
+ !function(e,a){if("object"==typeof exports&&"object"==typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var r=a();for(var t in r)("object"==typeof exports?exports:e)[t]=r[t]}}(this,(()=>(()=>{var e,a,r={128(e,a,r){function t(e){e.checkVersion("4.0.0-alpha.0"),e.register((async e=>{const{SpadeDrawer:a}=await r.e(568).then(r.bind(r,568));e.addShape(new a)}))}r.d(a,{loadSpadesCardsShape:()=>t})},575(e,a,r){function t(e){e.checkVersion("4.0.0-alpha.0"),e.register((async e=>{const{DiamondDrawer:a}=await r.e(30).then(r.bind(r,30));e.addShape(new a)}))}r.d(a,{loadDiamondsCardsShape:()=>t})},675(e,a,r){function t(e){e.checkVersion("4.0.0-alpha.0"),e.register((async e=>{const{HeartDrawer:a}=await r.e(50).then(r.bind(r,50));e.addShape(new a)}))}r.d(a,{loadHeartsCardsShape:()=>t})},923(e,a,r){function t(e){e.checkVersion("4.0.0-alpha.0"),e.register((async e=>{const{ClubDrawer:a}=await r.e(810).then(r.bind(r,810));e.addShape(new a)}))}r.d(a,{loadClubsCardsShape:()=>t})}},t={};function o(e){var a=t[e];if(void 0!==a)return a.exports;var n=t[e]={exports:{}};return r[e](n,n.exports,o),n.exports}o.m=r,o.d=(e,a)=>{for(var r in a)o.o(a,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:a[r]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((a,r)=>(o.f[r](e,a),a)),[])),o.u=e=>e+".min.js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),e={},a="@tsparticles/shape-cards:",o.l=(r,t,n,s)=>{if(e[r])e[r].push(t);else{var i,d;if(void 0!==n)for(var p=document.getElementsByTagName("script"),l=0;l<p.length;l++){var c=p[l];if(c.getAttribute("src")==r||c.getAttribute("data-webpack")==a+n){i=c;break}}i||(d=!0,(i=document.createElement("script")).charset="utf-8",o.nc&&i.setAttribute("nonce",o.nc),i.setAttribute("data-webpack",a+n),i.src=r),e[r]=[t];var h=(a,t)=>{i.onerror=i.onload=null,clearTimeout(u);var o=e[r];if(delete e[r],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((e=>e(t))),a)return a(t)},u=setTimeout(h.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=h.bind(null,i.onerror),i.onload=h.bind(null,i.onload),d&&document.head.appendChild(i)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var a=o.g.document;if(!e&&a&&(a.currentScript&&"SCRIPT"===a.currentScript.tagName.toUpperCase()&&(e=a.currentScript.src),!e)){var r=a.getElementsByTagName("script");if(r.length)for(var t=r.length-1;t>-1&&(!e||!/^http(s?):/.test(e));)e=r[t--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{var e={461:0};o.f.j=(a,r)=>{var t=o.o(e,a)?e[a]:void 0;if(0!==t)if(t)r.push(t[2]);else{var n=new Promise(((r,o)=>t=e[a]=[r,o]));r.push(t[2]=n);var s=o.p+o.u(a),i=new Error;o.l(s,(r=>{if(o.o(e,a)&&(0!==(t=e[a])&&(e[a]=void 0),t)){var n=r&&("load"===r.type?"missing":r.type),s=r&&r.target&&r.target.src;i.message="Loading chunk "+a+" failed.\n("+n+": "+s+")",i.name="ChunkLoadError",i.type=n,i.request=s,t[1](i)}}),"chunk-"+a,a)}};var a=(a,r)=>{var t,n,[s,i,d]=r,p=0;if(s.some((a=>0!==e[a]))){for(t in i)o.o(i,t)&&(o.m[t]=i[t]);if(d)d(o)}for(a&&a(r);p<s.length;p++)n=s[p],o.o(e,n)&&e[n]&&e[n][0](),e[n]=0},r=this.webpackChunk_tsparticles_shape_cards=this.webpackChunk_tsparticles_shape_cards||[];r.forEach(a.bind(null,0)),r.push=a.bind(null,r.push.bind(r))})();var n={};o.r(n),o.d(n,{loadCardsShape:()=>l,loadClubsCardsShape:()=>s.loadClubsCardsShape,loadDiamondsCardsShape:()=>i.loadDiamondsCardsShape,loadHeartsCardsShape:()=>d.loadHeartsCardsShape,loadSpadesCardsShape:()=>p.loadSpadesCardsShape});var s=o(923),i=o(575),d=o(675),p=o(128);function l(e){e.checkVersion("4.0.0-alpha.0"),e.register((async e=>{const{loadClubsCardsShape:a}=await Promise.resolve().then(o.bind(o,923)),{loadDiamondsCardsShape:r}=await Promise.resolve().then(o.bind(o,575)),{loadHeartsCardsShape:t}=await Promise.resolve().then(o.bind(o,675)),{loadSpadesCardsShape:n}=await Promise.resolve().then(o.bind(o,128));a(e),r(e),t(e),n(e)}))}return n})()));
@@ -1 +1 @@
1
- /*! tsParticles Cards Shape v3.9.0 by Matteo Bruni */
1
+ /*! tsParticles Cards Shape v4.0.0-alpha.0 by Matteo Bruni */
@@ -0,0 +1,2 @@
1
+ import { type Engine } from "@tsparticles/engine";
2
+ export declare function loadClubsCardsShape(engine: Engine): void;
@@ -0,0 +1,2 @@
1
+ import { type Engine } from "@tsparticles/engine";
2
+ export declare function loadDiamondsCardsShape(engine: Engine): void;
@@ -0,0 +1,2 @@
1
+ import { type Engine } from "@tsparticles/engine";
2
+ export declare function loadHeartsCardsShape(engine: Engine): void;
package/types/index.d.ts CHANGED
@@ -1,2 +1,6 @@
1
1
  import { type Engine } from "@tsparticles/engine";
2
- export declare function loadCardsShape(engine: Engine, refresh?: boolean): Promise<void>;
2
+ export declare function loadCardsShape(engine: Engine): void;
3
+ export * from "./clubs/index.js";
4
+ export * from "./diamonds/index.js";
5
+ export * from "./hearts/index.js";
6
+ export * from "./spades/index.js";
@@ -0,0 +1,2 @@
1
+ import { type Engine } from "@tsparticles/engine";
2
+ export declare function loadSpadesCardsShape(engine: Engine): void;
package/umd/Utils.js CHANGED
@@ -25,7 +25,7 @@
25
25
  context.bezierCurveTo(-segment.values[2].x * radius, segment.values[2].y * radius, -segment.values[1].x * radius, segment.values[1].y * radius, -segment.values[0].x * radius, segment.values[0].y * radius);
26
26
  }
27
27
  }
28
- const n = 1.0 / 2;
28
+ const n = 0.5;
29
29
  exports.paths = {
30
30
  heart: {
31
31
  segments: [
@@ -4,13 +4,13 @@
4
4
  if (v !== undefined) module.exports = v;
5
5
  }
6
6
  else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports", "./Utils.js"], factory);
7
+ define(["require", "exports", "../Utils.js"], factory);
8
8
  }
9
9
  })(function (require, exports) {
10
10
  "use strict";
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.ClubDrawer = void 0;
13
- const Utils_js_1 = require("./Utils.js");
13
+ const Utils_js_1 = require("../Utils.js");
14
14
  class ClubDrawer {
15
15
  constructor() {
16
16
  this.validTypes = ["club", "clubs"];
@@ -0,0 +1,54 @@
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 () {
18
+ var ownKeys = function(o) {
19
+ ownKeys = Object.getOwnPropertyNames || function (o) {
20
+ var ar = [];
21
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
22
+ return ar;
23
+ };
24
+ return ownKeys(o);
25
+ };
26
+ return function (mod) {
27
+ if (mod && mod.__esModule) return mod;
28
+ var result = {};
29
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
30
+ __setModuleDefault(result, mod);
31
+ return result;
32
+ };
33
+ })();
34
+ (function (factory) {
35
+ if (typeof module === "object" && typeof module.exports === "object") {
36
+ var v = factory(require, exports);
37
+ if (v !== undefined) module.exports = v;
38
+ }
39
+ else if (typeof define === "function" && define.amd) {
40
+ define(["require", "exports"], factory);
41
+ }
42
+ })(function (require, exports) {
43
+ "use strict";
44
+ var __syncRequire = typeof module === "object" && typeof module.exports === "object";
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.loadClubsCardsShape = loadClubsCardsShape;
47
+ function loadClubsCardsShape(engine) {
48
+ engine.checkVersion("4.0.0-alpha.0");
49
+ engine.register(async (e) => {
50
+ const { ClubDrawer } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./ClubDrawer.js"))) : new Promise((resolve_1, reject_1) => { require(["./ClubDrawer.js"], resolve_1, reject_1); }).then(__importStar));
51
+ e.addShape(new ClubDrawer());
52
+ });
53
+ }
54
+ });
@@ -4,13 +4,13 @@
4
4
  if (v !== undefined) module.exports = v;
5
5
  }
6
6
  else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports", "./Utils.js"], factory);
7
+ define(["require", "exports", "../Utils.js"], factory);
8
8
  }
9
9
  })(function (require, exports) {
10
10
  "use strict";
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.DiamondDrawer = void 0;
13
- const Utils_js_1 = require("./Utils.js");
13
+ const Utils_js_1 = require("../Utils.js");
14
14
  class DiamondDrawer {
15
15
  constructor() {
16
16
  this.validTypes = ["diamond", "diamonds"];
@@ -0,0 +1,54 @@
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 () {
18
+ var ownKeys = function(o) {
19
+ ownKeys = Object.getOwnPropertyNames || function (o) {
20
+ var ar = [];
21
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
22
+ return ar;
23
+ };
24
+ return ownKeys(o);
25
+ };
26
+ return function (mod) {
27
+ if (mod && mod.__esModule) return mod;
28
+ var result = {};
29
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
30
+ __setModuleDefault(result, mod);
31
+ return result;
32
+ };
33
+ })();
34
+ (function (factory) {
35
+ if (typeof module === "object" && typeof module.exports === "object") {
36
+ var v = factory(require, exports);
37
+ if (v !== undefined) module.exports = v;
38
+ }
39
+ else if (typeof define === "function" && define.amd) {
40
+ define(["require", "exports"], factory);
41
+ }
42
+ })(function (require, exports) {
43
+ "use strict";
44
+ var __syncRequire = typeof module === "object" && typeof module.exports === "object";
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.loadDiamondsCardsShape = loadDiamondsCardsShape;
47
+ function loadDiamondsCardsShape(engine) {
48
+ engine.checkVersion("4.0.0-alpha.0");
49
+ engine.register(async (e) => {
50
+ const { DiamondDrawer } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./DiamondDrawer.js"))) : new Promise((resolve_1, reject_1) => { require(["./DiamondDrawer.js"], resolve_1, reject_1); }).then(__importStar));
51
+ e.addShape(new DiamondDrawer());
52
+ });
53
+ }
54
+ });
@@ -4,13 +4,13 @@
4
4
  if (v !== undefined) module.exports = v;
5
5
  }
6
6
  else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports", "./Utils.js"], factory);
7
+ define(["require", "exports", "../Utils.js"], factory);
8
8
  }
9
9
  })(function (require, exports) {
10
10
  "use strict";
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.HeartDrawer = void 0;
13
- const Utils_js_1 = require("./Utils.js");
13
+ const Utils_js_1 = require("../Utils.js");
14
14
  class HeartDrawer {
15
15
  constructor() {
16
16
  this.validTypes = ["heart", "hearts"];