Socket
Socket
Sign inDemoInstall

@tsparticles/shape-heart

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tsparticles/shape-heart - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

103.min.js

15

browser/HeartDrawer.js

@@ -1,15 +0,6 @@

const half = 0.5, double = 2;
export class HeartDrawer {
draw(data) {
const { context, radius } = data, diameter = radius * double, halfRadius = radius * half, radiusAndHalf = radius + halfRadius, x = -radius, y = -radius;
context.moveTo(x, y + halfRadius);
context.quadraticCurveTo(x, y, x + halfRadius, y);
context.quadraticCurveTo(x + radius, y, x + radius, y + halfRadius);
context.quadraticCurveTo(x + radius, y, x + radiusAndHalf, y);
context.quadraticCurveTo(x + diameter, y, x + diameter, y + halfRadius);
context.quadraticCurveTo(x + diameter, y + radius, x + radiusAndHalf, y + radiusAndHalf);
context.lineTo(x + radius, y + diameter);
context.lineTo(x + halfRadius, y + radiusAndHalf);
context.quadraticCurveTo(x, y + radius, x, y + halfRadius);
async draw(data) {
const { drawHeart } = await import("./Utils.js");
drawHeart(data);
}
}

2

browser/index.js

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

import { HeartDrawer } from "./HeartDrawer.js";
export async function loadHeartShape(engine, refresh = true) {
const { HeartDrawer } = await import("./HeartDrawer.js");
await engine.addShape("heart", new HeartDrawer(), refresh);
}
"use strict";
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;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.HeartDrawer = void 0;
const half = 0.5, double = 2;
class HeartDrawer {
draw(data) {
const { context, radius } = data, diameter = radius * double, halfRadius = radius * half, radiusAndHalf = radius + halfRadius, x = -radius, y = -radius;
context.moveTo(x, y + halfRadius);
context.quadraticCurveTo(x, y, x + halfRadius, y);
context.quadraticCurveTo(x + radius, y, x + radius, y + halfRadius);
context.quadraticCurveTo(x + radius, y, x + radiusAndHalf, y);
context.quadraticCurveTo(x + diameter, y, x + diameter, y + halfRadius);
context.quadraticCurveTo(x + diameter, y + radius, x + radiusAndHalf, y + radiusAndHalf);
context.lineTo(x + radius, y + diameter);
context.lineTo(x + halfRadius, y + radiusAndHalf);
context.quadraticCurveTo(x, y + radius, x, y + halfRadius);
async draw(data) {
const { drawHeart } = await Promise.resolve().then(() => __importStar(require("./Utils.js")));
drawHeart(data);
}
}
exports.HeartDrawer = HeartDrawer;
"use strict";
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;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.loadHeartShape = void 0;
const HeartDrawer_js_1 = require("./HeartDrawer.js");
async function loadHeartShape(engine, refresh = true) {
await engine.addShape("heart", new HeartDrawer_js_1.HeartDrawer(), refresh);
const { HeartDrawer } = await Promise.resolve().then(() => __importStar(require("./HeartDrawer.js")));
await engine.addShape("heart", new HeartDrawer(), refresh);
}
exports.loadHeartShape = loadHeartShape;

@@ -1,15 +0,6 @@

const half = 0.5, double = 2;
export class HeartDrawer {
draw(data) {
const { context, radius } = data, diameter = radius * double, halfRadius = radius * half, radiusAndHalf = radius + halfRadius, x = -radius, y = -radius;
context.moveTo(x, y + halfRadius);
context.quadraticCurveTo(x, y, x + halfRadius, y);
context.quadraticCurveTo(x + radius, y, x + radius, y + halfRadius);
context.quadraticCurveTo(x + radius, y, x + radiusAndHalf, y);
context.quadraticCurveTo(x + diameter, y, x + diameter, y + halfRadius);
context.quadraticCurveTo(x + diameter, y + radius, x + radiusAndHalf, y + radiusAndHalf);
context.lineTo(x + radius, y + diameter);
context.lineTo(x + halfRadius, y + radiusAndHalf);
context.quadraticCurveTo(x, y + radius, x, y + halfRadius);
async draw(data) {
const { drawHeart } = await import("./Utils.js");
drawHeart(data);
}
}

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

import { HeartDrawer } from "./HeartDrawer.js";
export async function loadHeartShape(engine, refresh = true) {
const { HeartDrawer } = await import("./HeartDrawer.js");
await engine.addShape("heart", new HeartDrawer(), refresh);
}
{
"name": "@tsparticles/shape-heart",
"version": "3.1.0",
"version": "3.2.0",
"description": "tsParticles heart shape",

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

"dependencies": {
"@tsparticles/engine": "^3.1.0"
"@tsparticles/engine": "^3.2.0"
},

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

@@ -7,4 +7,12 @@ /*!

* How to use? : Check the GitHub README
* v3.1.0
* v3.2.0
*/
/*
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
(function webpackUniversalModuleDefinition(root, factory) {

@@ -22,5 +30,43 @@ if(typeof exports === 'object' && typeof module === 'object')

/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/ var __webpack_modules__ = ({
/***/ "./dist/browser/index.js":
/*!*******************************!*\
!*** ./dist/browser/index.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 */ loadHeartShape: () => (/* binding */ loadHeartShape)\n/* harmony export */ });\nasync function loadHeartShape(engine, refresh = true) {\n const {\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 await engine.addShape(\"heart\", new HeartDrawer(), refresh);\n}\n\n//# sourceURL=webpack://@tsparticles/shape-heart/./dist/browser/index.js?");
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = __webpack_modules__;
/******/
/************************************************************************/

@@ -39,2 +85,36 @@ /******/ /* 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 */

@@ -45,2 +125,48 @@ /******/ (() => {

/******/
/******/ /* webpack/runtime/load script */
/******/ (() => {
/******/ var inProgress = {};
/******/ var dataWebpackPrefix = "@tsparticles/shape-heart:";
/******/ // 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 */

@@ -57,42 +183,124 @@ /******/ (() => {

/******/
/******/ /* 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) 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.heart": 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_heart"] = this["webpackChunk_tsparticles_shape_heart"] || [];
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
/******/ })();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
loadHeartShape: () => (/* binding */ loadHeartShape)
});
;// CONCATENATED MODULE: ./dist/browser/HeartDrawer.js
const half = 0.5,
HeartDrawer_double = 2;
class HeartDrawer {
draw(data) {
const {
context,
radius
} = data,
diameter = radius * HeartDrawer_double,
halfRadius = radius * half,
radiusAndHalf = radius + halfRadius,
x = -radius,
y = -radius;
context.moveTo(x, y + halfRadius);
context.quadraticCurveTo(x, y, x + halfRadius, y);
context.quadraticCurveTo(x + radius, y, x + radius, y + halfRadius);
context.quadraticCurveTo(x + radius, y, x + radiusAndHalf, y);
context.quadraticCurveTo(x + diameter, y, x + diameter, y + halfRadius);
context.quadraticCurveTo(x + diameter, y + radius, x + radiusAndHalf, y + radiusAndHalf);
context.lineTo(x + radius, y + diameter);
context.lineTo(x + halfRadius, y + radiusAndHalf);
context.quadraticCurveTo(x, y + radius, x, y + halfRadius);
}
}
;// CONCATENATED MODULE: ./dist/browser/index.js
async function loadHeartShape(engine, refresh = true) {
await engine.addShape("heart", new HeartDrawer(), refresh);
}
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module can't be inlined because the eval devtool is used.
/******/ var __webpack_exports__ = __webpack_require__("./dist/browser/index.js");
/******/
/******/ return __webpack_exports__;

@@ -99,0 +307,0 @@ /******/ })()

/*! For license information please see tsparticles.shape.heart.min.js.LICENSE.txt */
!function(e,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o();else if("function"==typeof define&&define.amd)define([],o);else{var t=o();for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}}(this,(()=>(()=>{"use strict";var e={d:(o,t)=>{for(var r in t)e.o(t,r)&&!e.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:t[r]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};e.r(o),e.d(o,{loadHeartShape:()=>r});class t{draw(e){const{context:o,radius:t}=e,r=2*t,a=.5*t,i=t+a,n=-t,d=-t;o.moveTo(n,d+a),o.quadraticCurveTo(n,d,n+a,d),o.quadraticCurveTo(n+t,d,n+t,d+a),o.quadraticCurveTo(n+t,d,n+i,d),o.quadraticCurveTo(n+r,d,n+r,d+a),o.quadraticCurveTo(n+r,d+t,n+i,d+i),o.lineTo(n+t,d+r),o.lineTo(n+a,d+i),o.quadraticCurveTo(n,d+t,n,d+a)}}async function r(e,o=!0){await e.addShape("heart",new t,o)}return o})()));
!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 o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(this,(()=>(()=>{var e,t,r={},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e](n,n.exports,a),n.exports}a.m=r,a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((t,r)=>(a.f[r](e,t),t)),[])),a.u=e=>e+".min.js",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="@tsparticles/shape-heart:",a.l=(r,o,n,i)=>{if(e[r])e[r].push(o);else{var s,c;if(void 0!==n)for(var l=document.getElementsByTagName("script"),p=0;p<l.length;p++){var u=l[p];if(u.getAttribute("src")==r||u.getAttribute("data-webpack")==t+n){s=u;break}}s||(c=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,a.nc&&s.setAttribute("nonce",a.nc),s.setAttribute("data-webpack",t+n),s.src=r),e[r]=[o];var d=(t,o)=>{s.onerror=s.onload=null,clearTimeout(f);var a=e[r];if(delete e[r],s.parentNode&&s.parentNode.removeChild(s),a&&a.forEach((e=>e(o))),t)return t(o)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=d.bind(null,s.onerror),s.onload=d.bind(null,s.onload),c&&document.head.appendChild(s)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var o=r.length-1;o>-1&&!e;)e=r[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{var e={922:0};a.f.j=(t,r)=>{var o=a.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var n=new Promise(((r,a)=>o=e[t]=[r,a]));r.push(o[2]=n);var i=a.p+a.u(t),s=new Error;a.l(i,(r=>{if(a.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){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,o[1](s)}}),"chunk-"+t,t)}};var t=(t,r)=>{var o,n,i=r[0],s=r[1],c=r[2],l=0;if(i.some((t=>0!==e[t]))){for(o in s)a.o(s,o)&&(a.m[o]=s[o]);if(c)c(a)}for(t&&t(r);l<i.length;l++)n=i[l],a.o(e,n)&&e[n]&&e[n][0](),e[n]=0},r=this.webpackChunk_tsparticles_shape_heart=this.webpackChunk_tsparticles_shape_heart||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var n={};async function i(e,t=!0){const{HeartDrawer:r}=await a.e(895).then(a.bind(a,895));await e.addShape("heart",new r,t)}return a.r(n),a.d(n,{loadHeartShape:()=>i}),n})()));

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

/*! tsParticles Heart Shape v3.1.0 by Matteo Bruni */
/*! tsParticles Heart Shape v3.2.0 by Matteo Bruni */
import type { IShapeDrawData, IShapeDrawer } from "@tsparticles/engine";
export declare class HeartDrawer implements IShapeDrawer {
draw(data: IShapeDrawData): void;
draw(data: IShapeDrawData): Promise<void>;
}

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

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) {

@@ -11,17 +34,9 @@ if (typeof module === "object" && typeof module.exports === "object") {

"use strict";
var __syncRequire = typeof module === "object" && typeof module.exports === "object";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HeartDrawer = void 0;
const half = 0.5, double = 2;
class HeartDrawer {
draw(data) {
const { context, radius } = data, diameter = radius * double, halfRadius = radius * half, radiusAndHalf = radius + halfRadius, x = -radius, y = -radius;
context.moveTo(x, y + halfRadius);
context.quadraticCurveTo(x, y, x + halfRadius, y);
context.quadraticCurveTo(x + radius, y, x + radius, y + halfRadius);
context.quadraticCurveTo(x + radius, y, x + radiusAndHalf, y);
context.quadraticCurveTo(x + diameter, y, x + diameter, y + halfRadius);
context.quadraticCurveTo(x + diameter, y + radius, x + radiusAndHalf, y + radiusAndHalf);
context.lineTo(x + radius, y + diameter);
context.lineTo(x + halfRadius, y + radiusAndHalf);
context.quadraticCurveTo(x, y + radius, x, y + halfRadius);
async draw(data) {
const { drawHeart } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./Utils.js"))) : new Promise((resolve_1, reject_1) => { require(["./Utils.js"], resolve_1, reject_1); }).then(__importStar));
drawHeart(data);
}

@@ -28,0 +43,0 @@ }

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

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) {

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

else if (typeof define === "function" && define.amd) {
define(["require", "exports", "./HeartDrawer.js"], factory);
define(["require", "exports"], factory);
}
})(function (require, exports) {
"use strict";
var __syncRequire = typeof module === "object" && typeof module.exports === "object";
Object.defineProperty(exports, "__esModule", { value: true });
exports.loadHeartShape = void 0;
const HeartDrawer_js_1 = require("./HeartDrawer.js");
async function loadHeartShape(engine, refresh = true) {
await engine.addShape("heart", new HeartDrawer_js_1.HeartDrawer(), refresh);
const { HeartDrawer } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./HeartDrawer.js"))) : new Promise((resolve_1, reject_1) => { require(["./HeartDrawer.js"], resolve_1, reject_1); }).then(__importStar));
await engine.addShape("heart", new HeartDrawer(), refresh);
}
exports.loadHeartShape = loadHeartShape;
});

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