Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tsparticles/shape-cards

Package Overview
Dependencies
Maintainers
2
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tsparticles/shape-cards - npm Package Compare versions

Comparing version 3.3.0 to 3.4.0

3

browser/ClubDrawer.js
import { drawPath, paths } from "./Utils.js";
export class ClubDrawer {
constructor() {
this.validTypes = ["club", "clubs"];
}
draw(data) {

@@ -4,0 +7,0 @@ drawPath(data, paths.club);

import { drawPath, paths } from "./Utils.js";
export class DiamondDrawer {
constructor() {
this.validTypes = ["diamond", "diamonds"];
}
draw(data) {

@@ -4,0 +7,0 @@ drawPath(data, paths.diamond);

import { drawPath, paths } from "./Utils.js";
export class HeartDrawer {
constructor() {
this.validTypes = ["heart", "hearts"];
}
draw(data) {

@@ -4,0 +7,0 @@ drawPath(data, paths.heart);

13

browser/index.js

@@ -0,7 +1,10 @@

import { ClubDrawer } from "./ClubDrawer.js";
import { DiamondDrawer } from "./DiamondDrawer.js";
import { HeartDrawer } from "./HeartDrawer.js";
import { SpadeDrawer } from "./SpadeDrawer.js";
export async function loadCardsShape(engine, refresh = true) {
const { SpadeDrawer } = await import("./SpadeDrawer.js"), { HeartDrawer } = await import("./HeartDrawer.js"), { DiamondDrawer } = await import("./DiamondDrawer.js"), { ClubDrawer } = await import("./ClubDrawer.js");
await engine.addShape(["spade", "spades"], new SpadeDrawer(), refresh);
await engine.addShape(["heart", "hearts"], new HeartDrawer(), refresh);
await engine.addShape(["diamond", "diamonds"], new DiamondDrawer(), refresh);
await engine.addShape(["club", "clubs"], new ClubDrawer(), refresh);
await engine.addShape(new SpadeDrawer(), refresh);
await engine.addShape(new HeartDrawer(), refresh);
await engine.addShape(new DiamondDrawer(), refresh);
await engine.addShape(new ClubDrawer(), refresh);
}
import { drawPath, paths } from "./Utils.js";
export class SpadeDrawer {
constructor() {
this.validTypes = ["spade", "spades"];
}
draw(data) {

@@ -4,0 +7,0 @@ drawPath(data, paths.spade);

@@ -6,2 +6,5 @@ "use strict";

class ClubDrawer {
constructor() {
this.validTypes = ["club", "clubs"];
}
draw(data) {

@@ -8,0 +11,0 @@ (0, Utils_js_1.drawPath)(data, Utils_js_1.paths.club);

@@ -6,2 +6,5 @@ "use strict";

class DiamondDrawer {
constructor() {
this.validTypes = ["diamond", "diamonds"];
}
draw(data) {

@@ -8,0 +11,0 @@ (0, Utils_js_1.drawPath)(data, Utils_js_1.paths.diamond);

@@ -6,2 +6,5 @@ "use strict";

class HeartDrawer {
constructor() {
this.validTypes = ["heart", "hearts"];
}
draw(data) {

@@ -8,0 +11,0 @@ (0, Utils_js_1.drawPath)(data, Utils_js_1.paths.heart);

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.loadCardsShape = void 0;
const ClubDrawer_js_1 = require("./ClubDrawer.js");
const DiamondDrawer_js_1 = require("./DiamondDrawer.js");
const HeartDrawer_js_1 = require("./HeartDrawer.js");
const SpadeDrawer_js_1 = require("./SpadeDrawer.js");
async function loadCardsShape(engine, refresh = true) {
const { SpadeDrawer } = await import("./SpadeDrawer.js"), { HeartDrawer } = await import("./HeartDrawer.js"), { DiamondDrawer } = await import("./DiamondDrawer.js"), { ClubDrawer } = await import("./ClubDrawer.js");
await engine.addShape(["spade", "spades"], new SpadeDrawer(), refresh);
await engine.addShape(["heart", "hearts"], new HeartDrawer(), refresh);
await engine.addShape(["diamond", "diamonds"], new DiamondDrawer(), refresh);
await engine.addShape(["club", "clubs"], new ClubDrawer(), refresh);
await engine.addShape(new SpadeDrawer_js_1.SpadeDrawer(), refresh);
await engine.addShape(new HeartDrawer_js_1.HeartDrawer(), refresh);
await engine.addShape(new DiamondDrawer_js_1.DiamondDrawer(), refresh);
await engine.addShape(new ClubDrawer_js_1.ClubDrawer(), refresh);
}
exports.loadCardsShape = loadCardsShape;

@@ -6,2 +6,5 @@ "use strict";

class SpadeDrawer {
constructor() {
this.validTypes = ["spade", "spades"];
}
draw(data) {

@@ -8,0 +11,0 @@ (0, Utils_js_1.drawPath)(data, Utils_js_1.paths.spade);

import { drawPath, paths } from "./Utils.js";
export class ClubDrawer {
constructor() {
this.validTypes = ["club", "clubs"];
}
draw(data) {

@@ -4,0 +7,0 @@ drawPath(data, paths.club);

import { drawPath, paths } from "./Utils.js";
export class DiamondDrawer {
constructor() {
this.validTypes = ["diamond", "diamonds"];
}
draw(data) {

@@ -4,0 +7,0 @@ drawPath(data, paths.diamond);

import { drawPath, paths } from "./Utils.js";
export class HeartDrawer {
constructor() {
this.validTypes = ["heart", "hearts"];
}
draw(data) {

@@ -4,0 +7,0 @@ drawPath(data, paths.heart);

@@ -0,7 +1,10 @@

import { ClubDrawer } from "./ClubDrawer.js";
import { DiamondDrawer } from "./DiamondDrawer.js";
import { HeartDrawer } from "./HeartDrawer.js";
import { SpadeDrawer } from "./SpadeDrawer.js";
export async function loadCardsShape(engine, refresh = true) {
const { SpadeDrawer } = await import("./SpadeDrawer.js"), { HeartDrawer } = await import("./HeartDrawer.js"), { DiamondDrawer } = await import("./DiamondDrawer.js"), { ClubDrawer } = await import("./ClubDrawer.js");
await engine.addShape(["spade", "spades"], new SpadeDrawer(), refresh);
await engine.addShape(["heart", "hearts"], new HeartDrawer(), refresh);
await engine.addShape(["diamond", "diamonds"], new DiamondDrawer(), refresh);
await engine.addShape(["club", "clubs"], new ClubDrawer(), refresh);
await engine.addShape(new SpadeDrawer(), refresh);
await engine.addShape(new HeartDrawer(), refresh);
await engine.addShape(new DiamondDrawer(), refresh);
await engine.addShape(new ClubDrawer(), refresh);
}
import { drawPath, paths } from "./Utils.js";
export class SpadeDrawer {
constructor() {
this.validTypes = ["spade", "spades"];
}
draw(data) {

@@ -4,0 +7,0 @@ drawPath(data, paths.spade);

{
"name": "@tsparticles/shape-cards",
"version": "3.3.0",
"version": "3.4.0",
"description": "tsParticles cards shape",

@@ -103,3 +103,3 @@ "homepage": "https://particles.js.org",

"dependencies": {
"@tsparticles/engine": "^3.3.0"
"@tsparticles/engine": "^3.4.0"
},

@@ -106,0 +106,0 @@ "publishConfig": {

@@ -7,3 +7,3 @@ /*!

* How to use? : Check the GitHub README
* v3.3.0
* v3.4.0
*/

@@ -32,2 +32,52 @@ /*

/***/ "./dist/browser/ClubDrawer.js":
/*!************************************!*\
!*** ./dist/browser/ClubDrawer.js ***!
\************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
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?");
/***/ }),
/***/ "./dist/browser/DiamondDrawer.js":
/*!***************************************!*\
!*** ./dist/browser/DiamondDrawer.js ***!
\***************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
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?");
/***/ }),
/***/ "./dist/browser/HeartDrawer.js":
/*!*************************************!*\
!*** ./dist/browser/HeartDrawer.js ***!
\*************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
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?");
/***/ }),
/***/ "./dist/browser/SpadeDrawer.js":
/*!*************************************!*\
!*** ./dist/browser/SpadeDrawer.js ***!
\*************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
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?");
/***/ }),
/***/ "./dist/browser/Utils.js":
/*!*******************************!*\
!*** ./dist/browser/Utils.js ***!
\*******************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
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?");
/***/ }),
/***/ "./dist/browser/index.js":

@@ -39,3 +89,3 @@ /*!*******************************!*\

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadCardsShape: () => (/* binding */ loadCardsShape)\n/* harmony export */ });\nasync function loadCardsShape(engine, refresh = true) {\n const {\n SpadeDrawer\n } = await __webpack_require__.e(/*! import() */ \"dist_browser_SpadeDrawer_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./SpadeDrawer.js */ \"./dist/browser/SpadeDrawer.js\")),\n {\n HeartDrawer\n } = await __webpack_require__.e(/*! import() */ \"dist_browser_HeartDrawer_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./HeartDrawer.js */ \"./dist/browser/HeartDrawer.js\")),\n {\n DiamondDrawer\n } = await __webpack_require__.e(/*! import() */ \"dist_browser_DiamondDrawer_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./DiamondDrawer.js */ \"./dist/browser/DiamondDrawer.js\")),\n {\n ClubDrawer\n } = await __webpack_require__.e(/*! import() */ \"dist_browser_ClubDrawer_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./ClubDrawer.js */ \"./dist/browser/ClubDrawer.js\"));\n await engine.addShape([\"spade\", \"spades\"], new SpadeDrawer(), refresh);\n await engine.addShape([\"heart\", \"hearts\"], new HeartDrawer(), refresh);\n await engine.addShape([\"diamond\", \"diamonds\"], new DiamondDrawer(), refresh);\n await engine.addShape([\"club\", \"clubs\"], new ClubDrawer(), refresh);\n}\n\n//# sourceURL=webpack://@tsparticles/shape-cards/./dist/browser/index.js?");
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_3__ = __webpack_require__(/*! ./ClubDrawer.js */ \"./dist/browser/ClubDrawer.js\");\n/* harmony import */ var _DiamondDrawer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./DiamondDrawer.js */ \"./dist/browser/DiamondDrawer.js\");\n/* harmony import */ var _HeartDrawer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./HeartDrawer.js */ \"./dist/browser/HeartDrawer.js\");\n/* harmony import */ var _SpadeDrawer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SpadeDrawer.js */ \"./dist/browser/SpadeDrawer.js\");\n\n\n\n\nasync function loadCardsShape(engine, refresh = true) {\n await engine.addShape(new _SpadeDrawer_js__WEBPACK_IMPORTED_MODULE_0__.SpadeDrawer(), refresh);\n await engine.addShape(new _HeartDrawer_js__WEBPACK_IMPORTED_MODULE_1__.HeartDrawer(), refresh);\n await engine.addShape(new _DiamondDrawer_js__WEBPACK_IMPORTED_MODULE_2__.DiamondDrawer(), refresh);\n await engine.addShape(new _ClubDrawer_js__WEBPACK_IMPORTED_MODULE_3__.ClubDrawer(), refresh);\n}\n\n//# sourceURL=webpack://@tsparticles/shape-cards/./dist/browser/index.js?");

@@ -70,5 +120,2 @@ /***/ })

/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = __webpack_modules__;
/******/
/************************************************************************/

@@ -87,36 +134,2 @@ /******/ /* webpack/runtime/define property getters */

/******/
/******/ /* webpack/runtime/ensure chunk */
/******/ (() => {
/******/ __webpack_require__.f = {};
/******/ // This file contains only the entry chunk.
/******/ // The chunk loading function for additional chunks
/******/ __webpack_require__.e = (chunkId) => {
/******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {
/******/ __webpack_require__.f[key](chunkId, promises);
/******/ return promises;
/******/ }, []));
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/get javascript chunk filename */
/******/ (() => {
/******/ // This function allow to reference async chunks
/******/ __webpack_require__.u = (chunkId) => {
/******/ // return url for filenames based on template
/******/ return "" + chunkId + ".js";
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/global */
/******/ (() => {
/******/ __webpack_require__.g = (function() {
/******/ if (typeof globalThis === 'object') return globalThis;
/******/ try {
/******/ return this || new Function('return this')();
/******/ } catch (e) {
/******/ if (typeof window === 'object') return window;
/******/ }
/******/ })();
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */

@@ -127,48 +140,2 @@ /******/ (() => {

/******/
/******/ /* webpack/runtime/load script */
/******/ (() => {
/******/ var inProgress = {};
/******/ var dataWebpackPrefix = "@tsparticles/shape-cards:";
/******/ // loadScript function to load a script via script tag
/******/ __webpack_require__.l = (url, done, key, chunkId) => {
/******/ if(inProgress[url]) { inProgress[url].push(done); return; }
/******/ var script, needAttach;
/******/ if(key !== undefined) {
/******/ var scripts = document.getElementsByTagName("script");
/******/ for(var i = 0; i < scripts.length; i++) {
/******/ var s = scripts[i];
/******/ if(s.getAttribute("src") == url || s.getAttribute("data-webpack") == dataWebpackPrefix + key) { script = s; break; }
/******/ }
/******/ }
/******/ if(!script) {
/******/ needAttach = true;
/******/ script = document.createElement('script');
/******/
/******/ script.charset = 'utf-8';
/******/ script.timeout = 120;
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
/******/ }
/******/ script.setAttribute("data-webpack", dataWebpackPrefix + key);
/******/
/******/ script.src = url;
/******/ }
/******/ inProgress[url] = [done];
/******/ var onScriptComplete = (prev, event) => {
/******/ // avoid mem leaks in IE.
/******/ script.onerror = script.onload = null;
/******/ clearTimeout(timeout);
/******/ var doneFns = inProgress[url];
/******/ delete inProgress[url];
/******/ script.parentNode && script.parentNode.removeChild(script);
/******/ doneFns && doneFns.forEach((fn) => (fn(event)));
/******/ if(prev) return prev(event);
/******/ }
/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);
/******/ script.onerror = onScriptComplete.bind(null, script.onerror);
/******/ script.onload = onScriptComplete.bind(null, script.onload);
/******/ needAttach && document.head.appendChild(script);
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */

@@ -185,117 +152,2 @@ /******/ (() => {

/******/
/******/ /* webpack/runtime/publicPath */
/******/ (() => {
/******/ var scriptUrl;
/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + "";
/******/ var document = __webpack_require__.g.document;
/******/ if (!scriptUrl && document) {
/******/ if (document.currentScript)
/******/ scriptUrl = document.currentScript.src;
/******/ if (!scriptUrl) {
/******/ var scripts = document.getElementsByTagName("script");
/******/ if(scripts.length) {
/******/ var i = scripts.length - 1;
/******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;
/******/ }
/******/ }
/******/ }
/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration
/******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.
/******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser");
/******/ scriptUrl = scriptUrl.replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/");
/******/ __webpack_require__.p = scriptUrl;
/******/ })();
/******/
/******/ /* webpack/runtime/jsonp chunk loading */
/******/ (() => {
/******/ // no baseURI
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ "tsparticles.shape.cards": 0
/******/ };
/******/
/******/ __webpack_require__.f.j = (chunkId, promises) => {
/******/ // JSONP chunk loading for javascript
/******/ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;
/******/ if(installedChunkData !== 0) { // 0 means "already installed".
/******/
/******/ // a Promise means "currently loading".
/******/ if(installedChunkData) {
/******/ promises.push(installedChunkData[2]);
/******/ } else {
/******/ if(true) { // all chunks have JS
/******/ // setup Promise in chunk cache
/******/ var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));
/******/ promises.push(installedChunkData[2] = promise);
/******/
/******/ // start chunk loading
/******/ var url = __webpack_require__.p + __webpack_require__.u(chunkId);
/******/ // create error before stack unwound to get useful stacktrace later
/******/ var error = new Error();
/******/ var loadingEnded = (event) => {
/******/ if(__webpack_require__.o(installedChunks, chunkId)) {
/******/ installedChunkData = installedChunks[chunkId];
/******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined;
/******/ if(installedChunkData) {
/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type);
/******/ var realSrc = event && event.target && event.target.src;
/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
/******/ error.name = 'ChunkLoadError';
/******/ error.type = errorType;
/******/ error.request = realSrc;
/******/ installedChunkData[1](error);
/******/ }
/******/ }
/******/ };
/******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId);
/******/ }
/******/ }
/******/ }
/******/ };
/******/
/******/ // no prefetching
/******/
/******/ // no preloaded
/******/
/******/ // no HMR
/******/
/******/ // no HMR manifest
/******/
/******/ // no on chunks loaded
/******/
/******/ // install a JSONP callback for chunk loading
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1];
/******/ var runtime = data[2];
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0;
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
/******/ for(moduleId in moreModules) {
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(runtime) var result = runtime(__webpack_require__);
/******/ }
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ installedChunks[chunkId][0]();
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/
/******/ }
/******/
/******/ var chunkLoadingGlobal = this["webpackChunk_tsparticles_shape_cards"] = this["webpackChunk_tsparticles_shape_cards"] || [];
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
/******/ })();
/******/
/************************************************************************/

@@ -302,0 +154,0 @@ /******/

/*! For license information please see tsparticles.shape.cards.min.js.LICENSE.txt */
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var a in r)("object"==typeof exports?exports:e)[a]=r[a]}}(this,(()=>(()=>{var e,t,r={},a={};function o(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return r[e](n,n.exports,o),n.exports}o.m=r,o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((t,r)=>(o.f[r](e,t),t)),[])),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,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="@tsparticles/shape-cards:",o.l=(r,a,n,i)=>{if(e[r])e[r].push(a);else{var s,d;if(void 0!==n)for(var p=document.getElementsByTagName("script"),c=0;c<p.length;c++){var l=p[c];if(l.getAttribute("src")==r||l.getAttribute("data-webpack")==t+n){s=l;break}}s||(d=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,o.nc&&s.setAttribute("nonce",o.nc),s.setAttribute("data-webpack",t+n),s.src=r),e[r]=[a];var u=(t,a)=>{s.onerror=s.onload=null,clearTimeout(f);var o=e[r];if(delete e[r],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((e=>e(a))),t)return t(a)},f=setTimeout(u.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=u.bind(null,s.onerror),s.onload=u.bind(null,s.onload),d&&document.head.appendChild(s)}},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 t=o.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var a=r.length-1;a>-1&&(!e||!/^http(s?):/.test(e));)e=r[a--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{var e={461:0};o.f.j=(t,r)=>{var a=o.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else{var n=new Promise(((r,o)=>a=e[t]=[r,o]));r.push(a[2]=n);var i=o.p+o.u(t),s=new Error;o.l(i,(r=>{if(o.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var n=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+n+": "+i+")",s.name="ChunkLoadError",s.type=n,s.request=i,a[1](s)}}),"chunk-"+t,t)}};var t=(t,r)=>{var a,n,i=r[0],s=r[1],d=r[2],p=0;if(i.some((t=>0!==e[t]))){for(a in s)o.o(s,a)&&(o.m[a]=s[a]);if(d)d(o)}for(t&&t(r);p<i.length;p++)n=i[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(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var n={};async function i(e,t=!0){const{SpadeDrawer:r}=await o.e(765).then(o.bind(o,765)),{HeartDrawer:a}=await o.e(348).then(o.bind(o,348)),{DiamondDrawer:n}=await o.e(576).then(o.bind(o,576)),{ClubDrawer:i}=await o.e(668).then(o.bind(o,668));await e.addShape(["spade","spades"],new r,t),await e.addShape(["heart","hearts"],new a,t),await e.addShape(["diamond","diamonds"],new n,t),await e.addShape(["club","clubs"],new i,t)}return o.r(n),o.d(n,{loadCardsShape:()=>i}),n})()));
!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){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})()));

@@ -1,1 +0,1 @@

/*! tsParticles Cards Shape v3.3.0 by Matteo Bruni */
/*! tsParticles Cards Shape v3.4.0 by Matteo Bruni */
import type { IShapeDrawData, IShapeDrawer } from "@tsparticles/engine";
export declare class ClubDrawer implements IShapeDrawer {
readonly validTypes: readonly ["club", "clubs"];
draw(data: IShapeDrawData): void;
}
import type { IShapeDrawData, IShapeDrawer } from "@tsparticles/engine";
export declare class DiamondDrawer implements IShapeDrawer {
readonly validTypes: readonly ["diamond", "diamonds"];
draw(data: IShapeDrawData): void;
}
import type { IShapeDrawData, IShapeDrawer } from "@tsparticles/engine";
export declare class HeartDrawer implements IShapeDrawer {
readonly validTypes: readonly ["heart", "hearts"];
draw(data: IShapeDrawData): void;
}
import type { IShapeDrawData, IShapeDrawer } from "@tsparticles/engine";
export declare class SpadeDrawer implements IShapeDrawer {
readonly validTypes: readonly ["spade", "spades"];
draw(data: IShapeDrawData): void;
}

@@ -15,2 +15,5 @@ (function (factory) {

class ClubDrawer {
constructor() {
this.validTypes = ["club", "clubs"];
}
draw(data) {

@@ -17,0 +20,0 @@ (0, Utils_js_1.drawPath)(data, Utils_js_1.paths.club);

@@ -15,2 +15,5 @@ (function (factory) {

class DiamondDrawer {
constructor() {
this.validTypes = ["diamond", "diamonds"];
}
draw(data) {

@@ -17,0 +20,0 @@ (0, Utils_js_1.drawPath)(data, Utils_js_1.paths.diamond);

@@ -15,2 +15,5 @@ (function (factory) {

class HeartDrawer {
constructor() {
this.validTypes = ["heart", "hearts"];
}
draw(data) {

@@ -17,0 +20,0 @@ (0, Utils_js_1.drawPath)(data, Utils_js_1.paths.heart);

@@ -1,24 +0,1 @@

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
(function (factory) {

@@ -30,17 +7,19 @@ if (typeof module === "object" && typeof module.exports === "object") {

else if (typeof define === "function" && define.amd) {
define(["require", "exports"], factory);
define(["require", "exports", "./ClubDrawer.js", "./DiamondDrawer.js", "./HeartDrawer.js", "./SpadeDrawer.js"], factory);
}
})(function (require, exports) {
"use strict";
var __syncRequire = typeof module === "object" && typeof module.exports === "object";
Object.defineProperty(exports, "__esModule", { value: true });
exports.loadCardsShape = void 0;
const ClubDrawer_js_1 = require("./ClubDrawer.js");
const DiamondDrawer_js_1 = require("./DiamondDrawer.js");
const HeartDrawer_js_1 = require("./HeartDrawer.js");
const SpadeDrawer_js_1 = require("./SpadeDrawer.js");
async function loadCardsShape(engine, refresh = true) {
const { SpadeDrawer } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./SpadeDrawer.js"))) : new Promise((resolve_1, reject_1) => { require(["./SpadeDrawer.js"], resolve_1, reject_1); }).then(__importStar)), { HeartDrawer } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./HeartDrawer.js"))) : new Promise((resolve_2, reject_2) => { require(["./HeartDrawer.js"], resolve_2, reject_2); }).then(__importStar)), { DiamondDrawer } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./DiamondDrawer.js"))) : new Promise((resolve_3, reject_3) => { require(["./DiamondDrawer.js"], resolve_3, reject_3); }).then(__importStar)), { ClubDrawer } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./ClubDrawer.js"))) : new Promise((resolve_4, reject_4) => { require(["./ClubDrawer.js"], resolve_4, reject_4); }).then(__importStar));
await engine.addShape(["spade", "spades"], new SpadeDrawer(), refresh);
await engine.addShape(["heart", "hearts"], new HeartDrawer(), refresh);
await engine.addShape(["diamond", "diamonds"], new DiamondDrawer(), refresh);
await engine.addShape(["club", "clubs"], new ClubDrawer(), refresh);
await engine.addShape(new SpadeDrawer_js_1.SpadeDrawer(), refresh);
await engine.addShape(new HeartDrawer_js_1.HeartDrawer(), refresh);
await engine.addShape(new DiamondDrawer_js_1.DiamondDrawer(), refresh);
await engine.addShape(new ClubDrawer_js_1.ClubDrawer(), refresh);
}
exports.loadCardsShape = loadCardsShape;
});

@@ -15,2 +15,5 @@ (function (factory) {

class SpadeDrawer {
constructor() {
this.validTypes = ["spade", "spades"];
}
draw(data) {

@@ -17,0 +20,0 @@ (0, Utils_js_1.drawPath)(data, Utils_js_1.paths.spade);

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc