@tsparticles/interaction-particles-links 3.2.1 → 3.3.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.
- package/33.min.js +2 -0
- package/33.min.js.LICENSE.txt +1 -0
- package/38.min.js +2 -0
- package/38.min.js.LICENSE.txt +1 -0
- package/572.min.js +2 -0
- package/572.min.js.LICENSE.txt +1 -0
- package/905.min.js +2 -0
- package/905.min.js.LICENSE.txt +1 -0
- package/958.min.js +2 -0
- package/958.min.js.LICENSE.txt +1 -0
- package/browser/CircleWarp.js +1 -2
- package/browser/LinkInstance.js +5 -4
- package/browser/Linker.js +2 -2
- package/browser/LinksPlugin.js +14 -0
- package/browser/index.js +1 -2
- package/browser/plugin.js +1 -15
- package/cjs/CircleWarp.js +1 -2
- package/cjs/LinkInstance.js +5 -4
- package/cjs/Linker.js +3 -26
- package/cjs/LinksPlugin.js +18 -0
- package/cjs/index.js +3 -4
- package/cjs/interaction.js +1 -24
- package/cjs/plugin.js +1 -38
- package/dist_browser_LinkInstance_js.js +2 -2
- package/dist_browser_Linker_js.js +12 -2
- package/dist_browser_LinksPlugin_js.js +30 -0
- package/dist_browser_interaction_js.js +30 -0
- package/dist_browser_plugin_js.js +30 -0
- package/esm/CircleWarp.js +1 -2
- package/esm/LinkInstance.js +5 -4
- package/esm/Linker.js +2 -2
- package/esm/LinksPlugin.js +14 -0
- package/esm/index.js +1 -2
- package/esm/plugin.js +1 -15
- package/package.json +2 -2
- package/report.html +1 -1
- package/tsparticles.interaction.particles.links.js +3 -23
- package/tsparticles.interaction.particles.links.min.js +1 -1
- package/tsparticles.interaction.particles.links.min.js.LICENSE.txt +1 -1
- package/types/CircleWarp.d.ts +2 -2
- package/types/LinkInstance.d.ts +1 -1
- package/types/Linker.d.ts +1 -1
- package/types/LinksPlugin.d.ts +10 -0
- package/umd/CircleWarp.js +1 -2
- package/umd/LinkInstance.js +5 -4
- package/umd/Linker.js +4 -28
- package/umd/LinksPlugin.js +52 -0
- package/umd/index.js +17 -5
- package/umd/plugin.js +1 -15
- package/356.min.js +0 -2
- package/356.min.js.LICENSE.txt +0 -1
- package/806.min.js +0 -2
- package/806.min.js.LICENSE.txt +0 -1
- package/838.min.js +0 -2
- package/838.min.js.LICENSE.txt +0 -1
- package/dist_browser_CircleWarp_js.js +0 -30
package/esm/Linker.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Circle, ParticlesInteractorBase, getDistances, getLinkRandomColor, } from "@tsparticles/engine";
|
|
2
|
+
import { CircleWarp } from "./CircleWarp.js";
|
|
2
3
|
import { Links } from "./Options/Classes/Links.js";
|
|
3
4
|
const squarePower = 2, opacityOffset = 1, origin = {
|
|
4
5
|
x: 0,
|
|
@@ -49,7 +50,7 @@ export class Linker extends ParticlesInteractorBase {
|
|
|
49
50
|
this.linkContainer.particles.linksColor = undefined;
|
|
50
51
|
this.linkContainer.particles.linksColors = new Map();
|
|
51
52
|
}
|
|
52
|
-
|
|
53
|
+
interact(p1) {
|
|
53
54
|
if (!p1.options.links) {
|
|
54
55
|
return;
|
|
55
56
|
}
|
|
@@ -61,7 +62,6 @@ export class Linker extends ParticlesInteractorBase {
|
|
|
61
62
|
const linkOpt1 = p1.options.links, optOpacity = linkOpt1.opacity, optDistance = p1.retina.linksDistance ?? minDistance, warp = linkOpt1.warp;
|
|
62
63
|
let range;
|
|
63
64
|
if (warp) {
|
|
64
|
-
const { CircleWarp } = await import("./CircleWarp.js");
|
|
65
65
|
range = new CircleWarp(pos1.x, pos1.y, optDistance, canvasSize);
|
|
66
66
|
}
|
|
67
67
|
else {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export class LinksPlugin {
|
|
2
|
+
constructor() {
|
|
3
|
+
this.id = "links";
|
|
4
|
+
}
|
|
5
|
+
async getPlugin(container) {
|
|
6
|
+
const { LinkInstance } = await import("./LinkInstance.js");
|
|
7
|
+
return new LinkInstance(container);
|
|
8
|
+
}
|
|
9
|
+
loadOptions() {
|
|
10
|
+
}
|
|
11
|
+
needsPlugin() {
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
}
|
package/esm/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { loadLinksInteraction } from "./interaction.js";
|
|
2
|
-
import { loadLinksPlugin } from "./plugin.js";
|
|
3
1
|
export async function loadParticlesLinksInteraction(engine, refresh = true) {
|
|
2
|
+
const { loadLinksInteraction } = await import("./interaction.js"), { loadLinksPlugin } = await import("./plugin.js");
|
|
4
3
|
await loadLinksInteraction(engine, refresh);
|
|
5
4
|
await loadLinksPlugin(engine, refresh);
|
|
6
5
|
}
|
package/esm/plugin.js
CHANGED
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
class LinksPlugin {
|
|
2
|
-
constructor() {
|
|
3
|
-
this.id = "links";
|
|
4
|
-
}
|
|
5
|
-
async getPlugin(container) {
|
|
6
|
-
const { LinkInstance } = await import("./LinkInstance.js");
|
|
7
|
-
return new LinkInstance(container);
|
|
8
|
-
}
|
|
9
|
-
loadOptions() {
|
|
10
|
-
}
|
|
11
|
-
needsPlugin() {
|
|
12
|
-
return true;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
1
|
export async function loadLinksPlugin(engine, refresh = true) {
|
|
16
|
-
const plugin = new LinksPlugin();
|
|
2
|
+
const { LinksPlugin } = await import("./LinksPlugin.js"), plugin = new LinksPlugin();
|
|
17
3
|
await engine.addPlugin(plugin, refresh);
|
|
18
4
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/interaction-particles-links",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "tsParticles links particles interaction",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"./package.json": "./package.json"
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
|
-
"@tsparticles/engine": "^3.
|
|
90
|
+
"@tsparticles/engine": "^3.3.0"
|
|
91
91
|
},
|
|
92
92
|
"publishConfig": {
|
|
93
93
|
"access": "public"
|
package/report.html
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8"/>
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
6
|
-
<title>@tsparticles/interaction-particles-links [
|
|
6
|
+
<title>@tsparticles/interaction-particles-links [27 Feb 2024 at 12:15]</title>
|
|
7
7
|
<link rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAABrVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+O1foceMD///+J0/qK1Pr7/v8Xdr/9///W8P4UdL7L7P0Scr2r4Pyj3vwad8D5/f/2/f+55f3E6f34+/2H0/ojfMKpzOd0rNgQcb3F3O/j9f7c8v6g3Pz0/P/w+v/q+P7n9v6T1/uQ1vuE0vqLut/y+v+Z2fvt+f+15Pzv9fuc2/vR7v2V2Pvd6/bg9P7I6/285/2y4/yp3/zp8vk8i8kqgMT7/P31+fyv4vxGkcz6/P6/6P3j7vfS5PNnpNUxhcbO7f7F6v3O4vHK3/DA2u631Ouy0eqXweKJud5wqthfoNMMbLvY8f73+v2dxeR8sNtTmdDx9/zX6PSjyeaCtd1YnNGX2PuQveCGt95Nls42h8dLlM3F4vBtAAAAM3RSTlMAAyOx0/sKBvik8opWGBMOAe3l1snDm2E9LSb06eHcu5JpHbarfHZCN9CBb08zzkdNS0kYaptYAAAFV0lEQVRYw92X51/aYBDHHS2O2qqttVbrqNq9m+TJIAYIShBkWwqIiCgoWvfeq7Z2/s29hyQNyUcR7LveGwVyXy6XH8/9rqxglLfUPLxVduUor3h0rfp2TYvpivk37929TkG037hffoX0+peVtZQc1589rigVUdXS/ABSAyEmGIO/1XfvldSK8vs3OqB6u3m0nxmIrvgB0dj7rr7Y9IbuF68hnfFaiHA/sxqm0wciIG43P60qKv9WXWc1RXGh/mFESFABTSBi0sNAKzqet17eCtOb3kZIDwxEEU0oAIJGYxNBDhBND29e0rtXXbcpuPmED9IhEAAQ/AXEaF8EPmnrrKsv0LvWR3fg5sWDNAFZOgAgaKvZDogHNU9MFwnnYROkc56RD5CjAbQX9Ow4g7upCsvYu55aSI/Nj0H1akgKQEUM94dwK65hYRmFU9MIcH/fqJYOZYcnuJSU/waKDgTOEVaVKhwrTRP5XzgSpAITYzom7UvkhFX5VutmxeNnWDjjswTKTyfgluNDGbUpWissXhF3s7mlSml+czWkg3D0l1nNjGNjz3myOQOa1KM/jOS6ebdbAVTCi4gljHSFrviza7tOgRWcS0MOUX9zdNgag5w7rRqA44Lzw0hr1WqES36dFliSJFlh2rXIae3FFcDDgKdxrUIDePr8jGcSClV1u7A9xeN0ModY/pHMxmR1EzRh8TJiwqsHmKW0l4FCEZI+jHio+JdPPE9qwQtTRxku2D8sIeRL2LnxWSllANCQGOIiqVHAz2ye2JR0DcH+HoxDkaADLjgxjKQ+AwCX/g0+DNgdG0ukYCONAe+dbc2IAc6fwt1ARoDSezNHxV2Cmzwv3O6lDMV55edBGwGK9n1+x2F8EDfAGCxug8MhpsMEcTEAWf3rx2vZhe/LAmtIn/6apE6PN0ULKgywD9mmdxbmFl3OvD5AS5fW5zLbv/YHmcsBTjf/afDz3MaZTVCfAP9z6/Bw6ycv8EUBWJIn9zYcoAWWlW9+OzO3vkTy8H+RANLmdrpOuYWdZYEXpo+TlCJrW5EARb7fF+bWdqf3hhyZI1nWJQHgznErZhbjoEsWqi8dQNoE294aldzFurwSABL2XXMf9+H1VQGke9exw5P/AnA5Pv5ngMul7LOvO922iwACu8WkCwLCafvM4CeWPxfA8lNHcWZSoi8EwMAIciKX2Z4SWCMAa3snCZ/G4EA8D6CMLNFsGQhkkz/gQNEBbPCbWsxGUpYVu3z8IyNAknwJkfPMEhLyrdi5RTyUVACkw4GSFRNWJNEW+fgPGwHD8/JxnRuLabN4CGNRkAE23na2+VmEAUmrYymSGjMAYqH84YUIyzgzs3XC7gNgH36Vcc4zKY9o9fgPBXUAiHHwVboBHGLiX6Zcjp1f2wu4tvzZKo0ecPnDtQYDQvJXaBeNzce45Fp28ZQLrEZVuFqgBwOalArKXnW1UzlnSusQKJqKYNuz4tOnI6sZG4zanpemv+7ySU2jbA9h6uhcgpfy6G2PahirDZ6zvq6zDduMVFTKvzw8wgyEdelwY9in3XkEPs3osJuwRQ4qTkfzifndg9Gfc4pdsu82+tTnHZTBa2EAMrqr2t43pguc8tNm7JQVQ2S0ukj2d22dhXYP0/veWtwKrCkNoNimAN5+Xr/oLrxswKbVJjteWrX7eR63o4j9q0GxnaBdWgGA5VStpanIjQmEhV0/nVt5VOFUvix6awJhPcAaTEShgrG+iGyvb5a0Ndb1YGHFPEwoqAinoaykaID1o1pdPNu7XsnCKQ3R+hwWIIhGvORcJUBYXe3Xa3vq/mF/N9V13ugufMkfXn+KHsRD0B8AAAAASUVORK5CYII=" type="image/x-icon" />
|
|
8
8
|
|
|
9
9
|
<script>
|
|
@@ -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.
|
|
7
|
+
* v3.3.0
|
|
8
8
|
*/
|
|
9
9
|
/*
|
|
10
10
|
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
@@ -64,27 +64,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
64
64
|
\*******************************/
|
|
65
65
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
66
66
|
|
|
67
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Links: () => (/* reexport safe */
|
|
68
|
-
|
|
69
|
-
/***/ }),
|
|
70
|
-
|
|
71
|
-
/***/ "./dist/browser/interaction.js":
|
|
72
|
-
/*!*************************************!*\
|
|
73
|
-
!*** ./dist/browser/interaction.js ***!
|
|
74
|
-
\*************************************/
|
|
75
|
-
/***/ ((__unused_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 */ loadLinksInteraction: () => (/* binding */ loadLinksInteraction)\n/* harmony export */ });\nasync function loadLinksInteraction(engine, refresh = true) {\n await engine.addInteractor(\"particlesLinks\", async container => {\n const {\n Linker\n } = await __webpack_require__.e(/*! import() */ \"dist_browser_Linker_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./Linker.js */ \"./dist/browser/Linker.js\"));\n return new Linker(container);\n }, refresh);\n}\n\n//# sourceURL=webpack://@tsparticles/interaction-particles-links/./dist/browser/interaction.js?");
|
|
78
|
-
|
|
79
|
-
/***/ }),
|
|
80
|
-
|
|
81
|
-
/***/ "./dist/browser/plugin.js":
|
|
82
|
-
/*!********************************!*\
|
|
83
|
-
!*** ./dist/browser/plugin.js ***!
|
|
84
|
-
\********************************/
|
|
85
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
86
|
-
|
|
87
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadLinksPlugin: () => (/* binding */ loadLinksPlugin)\n/* harmony export */ });\nclass LinksPlugin {\n constructor() {\n this.id = \"links\";\n }\n async getPlugin(container) {\n const {\n LinkInstance\n } = await __webpack_require__.e(/*! import() */ \"dist_browser_LinkInstance_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./LinkInstance.js */ \"./dist/browser/LinkInstance.js\"));\n return new LinkInstance(container);\n }\n loadOptions() {}\n needsPlugin() {\n return true;\n }\n}\nasync function loadLinksPlugin(engine, refresh = true) {\n const plugin = new LinksPlugin();\n await engine.addPlugin(plugin, refresh);\n}\n\n//# sourceURL=webpack://@tsparticles/interaction-particles-links/./dist/browser/plugin.js?");
|
|
67
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Links: () => (/* reexport safe */ _Options_Classes_Links_js__WEBPACK_IMPORTED_MODULE_0__.Links),\n/* harmony export */ LinksShadow: () => (/* reexport safe */ _Options_Classes_LinksShadow_js__WEBPACK_IMPORTED_MODULE_1__.LinksShadow),\n/* harmony export */ LinksTriangle: () => (/* reexport safe */ _Options_Classes_LinksTriangle_js__WEBPACK_IMPORTED_MODULE_2__.LinksTriangle),\n/* harmony export */ loadParticlesLinksInteraction: () => (/* binding */ loadParticlesLinksInteraction)\n/* harmony export */ });\n/* harmony import */ var _Options_Classes_Links_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Options/Classes/Links.js */ \"./dist/browser/Options/Classes/Links.js\");\n/* harmony import */ var _Options_Classes_LinksShadow_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Options/Classes/LinksShadow.js */ \"./dist/browser/Options/Classes/LinksShadow.js\");\n/* harmony import */ var _Options_Classes_LinksTriangle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Options/Classes/LinksTriangle.js */ \"./dist/browser/Options/Classes/LinksTriangle.js\");\nasync function loadParticlesLinksInteraction(engine, refresh = true) {\n const {\n loadLinksInteraction\n } = await __webpack_require__.e(/*! import() */ \"dist_browser_interaction_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./interaction.js */ \"./dist/browser/interaction.js\")),\n {\n loadLinksPlugin\n } = await __webpack_require__.e(/*! import() */ \"dist_browser_plugin_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./plugin.js */ \"./dist/browser/plugin.js\"));\n await loadLinksInteraction(engine, refresh);\n await loadLinksPlugin(engine, refresh);\n}\n\n\n\n\n\n\n\n//# sourceURL=webpack://@tsparticles/interaction-particles-links/./dist/browser/index.js?");
|
|
88
68
|
|
|
89
69
|
/***/ }),
|
|
90
70
|
|
|
@@ -260,7 +240,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
|
|
|
260
240
|
/******/ var scripts = document.getElementsByTagName("script");
|
|
261
241
|
/******/ if(scripts.length) {
|
|
262
242
|
/******/ var i = scripts.length - 1;
|
|
263
|
-
/******/ while (i > -1 && !scriptUrl) scriptUrl = scripts[i--].src;
|
|
243
|
+
/******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;
|
|
264
244
|
/******/ }
|
|
265
245
|
/******/ }
|
|
266
246
|
/******/ }
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see tsparticles.interaction.particles.links.min.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],t);else{var i="object"==typeof exports?t(require("@tsparticles/engine")):t(e.window);for(var
|
|
2
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],t);else{var i="object"==typeof exports?t(require("@tsparticles/engine")):t(e.window);for(var o in i)("object"==typeof exports?exports:e)[o]=i[o]}}(this,(e=>(()=>{var t,i,o={983:(e,t,i)=>{i.d(t,{q:()=>s});var o=i(303),r=i(307),n=i(555);class s{constructor(){this.blink=!1,this.color=new o.OptionsColor,this.color.value="#fff",this.consent=!1,this.distance=100,this.enable=!1,this.frequency=1,this.opacity=1,this.shadow=new r.s,this.triangles=new n.G,this.width=1,this.warp=!1}load(e){e&&(void 0!==e.id&&(this.id=e.id),void 0!==e.blink&&(this.blink=e.blink),this.color=o.OptionsColor.create(this.color,e.color),void 0!==e.consent&&(this.consent=e.consent),void 0!==e.distance&&(this.distance=e.distance),void 0!==e.enable&&(this.enable=e.enable),void 0!==e.frequency&&(this.frequency=e.frequency),void 0!==e.opacity&&(this.opacity=e.opacity),this.shadow.load(e.shadow),this.triangles.load(e.triangles),void 0!==e.width&&(this.width=e.width),void 0!==e.warp&&(this.warp=e.warp))}}},307:(e,t,i)=>{i.d(t,{s:()=>r});var o=i(303);class r{constructor(){this.blur=5,this.color=new o.OptionsColor,this.color.value="#000",this.enable=!1}load(e){e&&(void 0!==e.blur&&(this.blur=e.blur),this.color=o.OptionsColor.create(this.color,e.color),void 0!==e.enable&&(this.enable=e.enable))}}},555:(e,t,i)=>{i.d(t,{G:()=>r});var o=i(303);class r{constructor(){this.enable=!1,this.frequency=1}load(e){e&&(void 0!==e.color&&(this.color=o.OptionsColor.create(this.color,e.color)),void 0!==e.enable&&(this.enable=e.enable),void 0!==e.frequency&&(this.frequency=e.frequency),void 0!==e.opacity&&(this.opacity=e.opacity))}}},303:t=>{t.exports=e}},r={};function n(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return o[e](i,i.exports,n),i.exports}n.m=o,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,i)=>(n.f[i](e,t),t)),[])),n.u=e=>e+".min.js",n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},i="@tsparticles/interaction-particles-links:",n.l=(e,o,r,s)=>{if(t[e])t[e].push(o);else{var a,l;if(void 0!==r)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var h=c[d];if(h.getAttribute("src")==e||h.getAttribute("data-webpack")==i+r){a=h;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,n.nc&&a.setAttribute("nonce",n.nc),a.setAttribute("data-webpack",i+r),a.src=e),t[e]=[o];var u=(i,o)=>{a.onerror=a.onload=null,clearTimeout(p);var r=t[e];if(delete t[e],a.parentNode&&a.parentNode.removeChild(a),r&&r.forEach((e=>e(o))),i)return i(o)},p=setTimeout(u.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=u.bind(null,a.onerror),a.onload=u.bind(null,a.onload),l&&document.head.appendChild(a)}},n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var i=t.getElementsByTagName("script");if(i.length)for(var o=i.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=i[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{var e={203:0};n.f.j=(t,i)=>{var o=n.o(e,t)?e[t]:void 0;if(0!==o)if(o)i.push(o[2]);else{var r=new Promise(((i,r)=>o=e[t]=[i,r]));i.push(o[2]=r);var s=n.p+n.u(t),a=new Error;n.l(s,(i=>{if(n.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var r=i&&("load"===i.type?"missing":i.type),s=i&&i.target&&i.target.src;a.message="Loading chunk "+t+" failed.\n("+r+": "+s+")",a.name="ChunkLoadError",a.type=r,a.request=s,o[1](a)}}),"chunk-"+t,t)}};var t=(t,i)=>{var o,r,s=i[0],a=i[1],l=i[2],c=0;if(s.some((t=>0!==e[t]))){for(o in a)n.o(a,o)&&(n.m[o]=a[o]);if(l)l(n)}for(t&&t(i);c<s.length;c++)r=s[c],n.o(e,r)&&e[r]&&e[r][0](),e[r]=0},i=this.webpackChunk_tsparticles_interaction_particles_links=this.webpackChunk_tsparticles_interaction_particles_links||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var s={};return(()=>{n.r(s),n.d(s,{Links:()=>e.q,LinksShadow:()=>t.s,LinksTriangle:()=>i.G,loadParticlesLinksInteraction:()=>o});var e=n(983),t=n(307),i=n(555);async function o(e,t=!0){const{loadLinksInteraction:i}=await n.e(572).then(n.bind(n,572)),{loadLinksPlugin:o}=await n.e(905).then(n.bind(n,905));await i(e,t),await o(e,t)}})(),s})()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! tsParticles Links Particles Interaction v3.
|
|
1
|
+
/*! tsParticles Links Particles Interaction v3.3.0 by Matteo Bruni */
|
package/types/CircleWarp.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Circle, type ICoordinates, type IDimension
|
|
1
|
+
import { type BaseRange, Circle, type ICoordinates, type IDimension } from "@tsparticles/engine";
|
|
2
2
|
export declare class CircleWarp extends Circle {
|
|
3
3
|
private readonly canvasSize;
|
|
4
4
|
constructor(x: number, y: number, radius: number, canvasSize: IDimension);
|
|
5
5
|
contains(point: ICoordinates): boolean;
|
|
6
|
-
intersects(range:
|
|
6
|
+
intersects(range: BaseRange): boolean;
|
|
7
7
|
}
|
package/types/LinkInstance.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare class LinkInstance implements IContainerPlugin {
|
|
|
4
4
|
private readonly container;
|
|
5
5
|
private readonly _freqs;
|
|
6
6
|
constructor(container: LinkContainer);
|
|
7
|
-
drawParticle(context: CanvasRenderingContext2D, particle: LinkParticle):
|
|
7
|
+
drawParticle(context: CanvasRenderingContext2D, particle: LinkParticle): void;
|
|
8
8
|
init(): Promise<void>;
|
|
9
9
|
particleCreated(particle: LinkParticle): void;
|
|
10
10
|
particleDestroyed(particle: LinkParticle): void;
|
package/types/Linker.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare class Linker extends ParticlesInteractorBase {
|
|
|
5
5
|
constructor(container: LinkContainer);
|
|
6
6
|
clear(): void;
|
|
7
7
|
init(): void;
|
|
8
|
-
interact(p1: LinkParticle):
|
|
8
|
+
interact(p1: LinkParticle): void;
|
|
9
9
|
isEnabled(particle: LinkParticle): boolean;
|
|
10
10
|
loadParticlesOptions(options: ParticlesLinkOptions, ...sources: (RecursivePartial<IParticlesLinkOptions> | undefined)[]): void;
|
|
11
11
|
reset(): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IPlugin } from "@tsparticles/engine";
|
|
2
|
+
import type { LinkContainer } from "./Types.js";
|
|
3
|
+
import type { LinkInstance } from "./LinkInstance.js";
|
|
4
|
+
export declare class LinksPlugin implements IPlugin {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
constructor();
|
|
7
|
+
getPlugin(container: LinkContainer): Promise<LinkInstance>;
|
|
8
|
+
loadOptions(): void;
|
|
9
|
+
needsPlugin(): boolean;
|
|
10
|
+
}
|
package/umd/CircleWarp.js
CHANGED
|
@@ -19,8 +19,7 @@
|
|
|
19
19
|
this.canvasSize = { ...canvasSize };
|
|
20
20
|
}
|
|
21
21
|
contains(point) {
|
|
22
|
-
const { width, height } = this.canvasSize;
|
|
23
|
-
const { x, y } = point;
|
|
22
|
+
const { width, height } = this.canvasSize, { x, y } = point;
|
|
24
23
|
return (super.contains(point) ||
|
|
25
24
|
super.contains({ x: x - width, y }) ||
|
|
26
25
|
super.contains({ x: x - width, y: y - height }) ||
|
package/umd/LinkInstance.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
exports.LinkInstance = void 0;
|
|
13
13
|
const engine_1 = require("@tsparticles/engine");
|
|
14
14
|
const Utils_js_1 = require("./Utils.js");
|
|
15
|
-
const minOpacity = 0, minWidth = 0, minDistance = 0, half = 0.5;
|
|
15
|
+
const minOpacity = 0, minWidth = 0, minDistance = 0, half = 0.5, maxFrequency = 1;
|
|
16
16
|
class LinkInstance {
|
|
17
17
|
constructor(container) {
|
|
18
18
|
this.container = container;
|
|
@@ -131,19 +131,20 @@
|
|
|
131
131
|
triangles: new Map(),
|
|
132
132
|
};
|
|
133
133
|
}
|
|
134
|
-
|
|
134
|
+
drawParticle(context, particle) {
|
|
135
135
|
const { links, options } = particle;
|
|
136
136
|
if (!links?.length) {
|
|
137
137
|
return;
|
|
138
138
|
}
|
|
139
|
-
const p1Links = links.filter((l) => options.links &&
|
|
139
|
+
const p1Links = links.filter((l) => options.links &&
|
|
140
|
+
(options.links.frequency >= maxFrequency ||
|
|
141
|
+
this._getLinkFrequency(particle, l.destination) <= options.links.frequency));
|
|
140
142
|
for (const link of p1Links) {
|
|
141
143
|
this._drawTriangles(options, particle, link, p1Links);
|
|
142
144
|
if (link.opacity > minOpacity && (particle.retina.linksWidth ?? minWidth) > minWidth) {
|
|
143
145
|
this._drawLinkLine(particle, link);
|
|
144
146
|
}
|
|
145
147
|
}
|
|
146
|
-
await Promise.resolve();
|
|
147
148
|
}
|
|
148
149
|
async init() {
|
|
149
150
|
this._freqs.links = new Map();
|
package/umd/Linker.js
CHANGED
|
@@ -1,40 +1,17 @@
|
|
|
1
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
|
-
if (k2 === undefined) k2 = k;
|
|
3
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
6
|
-
}
|
|
7
|
-
Object.defineProperty(o, k2, desc);
|
|
8
|
-
}) : (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
o[k2] = m[k];
|
|
11
|
-
}));
|
|
12
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
13
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
14
|
-
}) : function(o, v) {
|
|
15
|
-
o["default"] = v;
|
|
16
|
-
});
|
|
17
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
18
|
-
if (mod && mod.__esModule) return mod;
|
|
19
|
-
var result = {};
|
|
20
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
-
__setModuleDefault(result, mod);
|
|
22
|
-
return result;
|
|
23
|
-
};
|
|
24
1
|
(function (factory) {
|
|
25
2
|
if (typeof module === "object" && typeof module.exports === "object") {
|
|
26
3
|
var v = factory(require, exports);
|
|
27
4
|
if (v !== undefined) module.exports = v;
|
|
28
5
|
}
|
|
29
6
|
else if (typeof define === "function" && define.amd) {
|
|
30
|
-
define(["require", "exports", "@tsparticles/engine", "./Options/Classes/Links.js"], factory);
|
|
7
|
+
define(["require", "exports", "@tsparticles/engine", "./CircleWarp.js", "./Options/Classes/Links.js"], factory);
|
|
31
8
|
}
|
|
32
9
|
})(function (require, exports) {
|
|
33
10
|
"use strict";
|
|
34
|
-
var __syncRequire = typeof module === "object" && typeof module.exports === "object";
|
|
35
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
12
|
exports.Linker = void 0;
|
|
37
13
|
const engine_1 = require("@tsparticles/engine");
|
|
14
|
+
const CircleWarp_js_1 = require("./CircleWarp.js");
|
|
38
15
|
const Links_js_1 = require("./Options/Classes/Links.js");
|
|
39
16
|
const squarePower = 2, opacityOffset = 1, origin = {
|
|
40
17
|
x: 0,
|
|
@@ -85,7 +62,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
85
62
|
this.linkContainer.particles.linksColor = undefined;
|
|
86
63
|
this.linkContainer.particles.linksColors = new Map();
|
|
87
64
|
}
|
|
88
|
-
|
|
65
|
+
interact(p1) {
|
|
89
66
|
if (!p1.options.links) {
|
|
90
67
|
return;
|
|
91
68
|
}
|
|
@@ -97,8 +74,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
97
74
|
const linkOpt1 = p1.options.links, optOpacity = linkOpt1.opacity, optDistance = p1.retina.linksDistance ?? minDistance, warp = linkOpt1.warp;
|
|
98
75
|
let range;
|
|
99
76
|
if (warp) {
|
|
100
|
-
|
|
101
|
-
range = new CircleWarp(pos1.x, pos1.y, optDistance, canvasSize);
|
|
77
|
+
range = new CircleWarp_js_1.CircleWarp(pos1.x, pos1.y, optDistance, canvasSize);
|
|
102
78
|
}
|
|
103
79
|
else {
|
|
104
80
|
range = new engine_1.Circle(pos1.x, pos1.y, optDistance);
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
|
+
if (k2 === undefined) k2 = k;
|
|
3
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
6
|
+
}
|
|
7
|
+
Object.defineProperty(o, k2, desc);
|
|
8
|
+
}) : (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
o[k2] = m[k];
|
|
11
|
+
}));
|
|
12
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
13
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
14
|
+
}) : function(o, v) {
|
|
15
|
+
o["default"] = v;
|
|
16
|
+
});
|
|
17
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
18
|
+
if (mod && mod.__esModule) return mod;
|
|
19
|
+
var result = {};
|
|
20
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
+
__setModuleDefault(result, mod);
|
|
22
|
+
return result;
|
|
23
|
+
};
|
|
24
|
+
(function (factory) {
|
|
25
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
26
|
+
var v = factory(require, exports);
|
|
27
|
+
if (v !== undefined) module.exports = v;
|
|
28
|
+
}
|
|
29
|
+
else if (typeof define === "function" && define.amd) {
|
|
30
|
+
define(["require", "exports"], factory);
|
|
31
|
+
}
|
|
32
|
+
})(function (require, exports) {
|
|
33
|
+
"use strict";
|
|
34
|
+
var __syncRequire = typeof module === "object" && typeof module.exports === "object";
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.LinksPlugin = void 0;
|
|
37
|
+
class LinksPlugin {
|
|
38
|
+
constructor() {
|
|
39
|
+
this.id = "links";
|
|
40
|
+
}
|
|
41
|
+
async getPlugin(container) {
|
|
42
|
+
const { LinkInstance } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./LinkInstance.js"))) : new Promise((resolve_1, reject_1) => { require(["./LinkInstance.js"], resolve_1, reject_1); }).then(__importStar));
|
|
43
|
+
return new LinkInstance(container);
|
|
44
|
+
}
|
|
45
|
+
loadOptions() {
|
|
46
|
+
}
|
|
47
|
+
needsPlugin() {
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.LinksPlugin = LinksPlugin;
|
|
52
|
+
});
|
package/umd/index.js
CHANGED
|
@@ -9,6 +9,18 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
9
9
|
if (k2 === undefined) k2 = k;
|
|
10
10
|
o[k2] = m[k];
|
|
11
11
|
}));
|
|
12
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
13
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
14
|
+
}) : function(o, v) {
|
|
15
|
+
o["default"] = v;
|
|
16
|
+
});
|
|
17
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
18
|
+
if (mod && mod.__esModule) return mod;
|
|
19
|
+
var result = {};
|
|
20
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
+
__setModuleDefault(result, mod);
|
|
22
|
+
return result;
|
|
23
|
+
};
|
|
12
24
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
13
25
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
14
26
|
};
|
|
@@ -18,17 +30,17 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
18
30
|
if (v !== undefined) module.exports = v;
|
|
19
31
|
}
|
|
20
32
|
else if (typeof define === "function" && define.amd) {
|
|
21
|
-
define(["require", "exports", "./
|
|
33
|
+
define(["require", "exports", "./Options/Classes/Links.js", "./Options/Classes/LinksShadow.js", "./Options/Classes/LinksTriangle.js", "./Options/Interfaces/ILinks.js", "./Options/Interfaces/ILinksShadow.js", "./Options/Interfaces/ILinksTriangle.js"], factory);
|
|
22
34
|
}
|
|
23
35
|
})(function (require, exports) {
|
|
24
36
|
"use strict";
|
|
37
|
+
var __syncRequire = typeof module === "object" && typeof module.exports === "object";
|
|
25
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
39
|
exports.loadParticlesLinksInteraction = void 0;
|
|
27
|
-
const interaction_js_1 = require("./interaction.js");
|
|
28
|
-
const plugin_js_1 = require("./plugin.js");
|
|
29
40
|
async function loadParticlesLinksInteraction(engine, refresh = true) {
|
|
30
|
-
await (
|
|
31
|
-
await (
|
|
41
|
+
const { loadLinksInteraction } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./interaction.js"))) : new Promise((resolve_1, reject_1) => { require(["./interaction.js"], resolve_1, reject_1); }).then(__importStar)), { loadLinksPlugin } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./plugin.js"))) : new Promise((resolve_2, reject_2) => { require(["./plugin.js"], resolve_2, reject_2); }).then(__importStar));
|
|
42
|
+
await loadLinksInteraction(engine, refresh);
|
|
43
|
+
await loadLinksPlugin(engine, refresh);
|
|
32
44
|
}
|
|
33
45
|
exports.loadParticlesLinksInteraction = loadParticlesLinksInteraction;
|
|
34
46
|
__exportStar(require("./Options/Classes/Links.js"), exports);
|
package/umd/plugin.js
CHANGED
|
@@ -34,22 +34,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
34
34
|
var __syncRequire = typeof module === "object" && typeof module.exports === "object";
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.loadLinksPlugin = void 0;
|
|
37
|
-
class LinksPlugin {
|
|
38
|
-
constructor() {
|
|
39
|
-
this.id = "links";
|
|
40
|
-
}
|
|
41
|
-
async getPlugin(container) {
|
|
42
|
-
const { LinkInstance } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./LinkInstance.js"))) : new Promise((resolve_1, reject_1) => { require(["./LinkInstance.js"], resolve_1, reject_1); }).then(__importStar));
|
|
43
|
-
return new LinkInstance(container);
|
|
44
|
-
}
|
|
45
|
-
loadOptions() {
|
|
46
|
-
}
|
|
47
|
-
needsPlugin() {
|
|
48
|
-
return true;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
37
|
async function loadLinksPlugin(engine, refresh = true) {
|
|
52
|
-
const plugin = new LinksPlugin();
|
|
38
|
+
const { LinksPlugin } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./LinksPlugin.js"))) : new Promise((resolve_1, reject_1) => { require(["./LinksPlugin.js"], resolve_1, reject_1); }).then(__importStar)), plugin = new LinksPlugin();
|
|
53
39
|
await engine.addPlugin(plugin, refresh);
|
|
54
40
|
}
|
|
55
41
|
exports.loadLinksPlugin = loadLinksPlugin;
|
package/356.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 356.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_interaction_particles_links=this.webpackChunk_tsparticles_interaction_particles_links||[]).push([[356],{356:(s,i,t)=>{t.d(i,{CircleWarp:()=>n});var e=t(533);class n extends e.Circle{constructor(s,i,t,e){super(s,i,t),this.canvasSize=e,this.canvasSize={...e}}contains(s){const{width:i,height:t}=this.canvasSize,{x:e,y:n}=s;return super.contains(s)||super.contains({x:e-i,y:n})||super.contains({x:e-i,y:n-t})||super.contains({x:e,y:n-t})}intersects(s){if(super.intersects(s))return!0;const i=s,t=s,n={x:s.position.x-this.canvasSize.width,y:s.position.y-this.canvasSize.height};if(void 0!==t.radius){const s=new e.Circle(n.x,n.y,2*t.radius);return super.intersects(s)}if(void 0!==i.size){const s=new e.Rectangle(n.x,n.y,2*i.size.width,2*i.size.height);return super.intersects(s)}return!1}}}}]);
|
package/356.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Links Particles Interaction v3.2.1 by Matteo Bruni */
|
package/806.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 806.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_interaction_particles_links=this.webpackChunk_tsparticles_interaction_particles_links||[]).push([[806],{806:(i,n,t)=>{t.d(n,{Linker:()=>a});var s=t(533),e=t(515);const o=0,r=0;function l(i,n,t,e,o){const{dx:r,dy:l,distance:a}=(0,s.getDistances)(i,n);if(!o||a<=t)return a;const c={x:Math.abs(r),y:Math.abs(l)},k=Math.min(c.x,e.width-c.x),p=Math.min(c.y,e.height-c.y);return Math.sqrt(k**2+p**2)}class a extends s.ParticlesInteractorBase{constructor(i){super(i),this._setColor=i=>{if(!i.options.links)return;const n=this.linkContainer,t=i.options.links;let e=void 0===t.id?n.particles.linksColor:n.particles.linksColors.get(t.id);if(e)return;const o=t.color;e=(0,s.getLinkRandomColor)(o,t.blink,t.consent),void 0===t.id?n.particles.linksColor=e:n.particles.linksColors.set(t.id,e)},this.linkContainer=i}clear(){}init(){this.linkContainer.particles.linksColor=void 0,this.linkContainer.particles.linksColors=new Map}async interact(i){if(!i.options.links)return;i.links=[];const n=i.getPosition(),e=this.container,a=e.canvas.size;if(n.x<o||n.y<r||n.x>a.width||n.y>a.height)return;const c=i.options.links,k=c.opacity,p=i.retina.linksDistance??0,d=c.warp;let h;if(d){const{CircleWarp:i}=await t.e(356).then(t.bind(t,356));h=new i(n.x,n.y,p,a)}else h=new s.Circle(n.x,n.y,p);const u=e.particles.quadTree.query(h);for(const t of u){const s=t.options.links;if(i===t||!s?.enable||c.id!==s.id||t.spawning||t.destroyed||!t.links||i.links.some((i=>i.destination===t))||t.links.some((n=>n.destination===i)))continue;const e=t.getPosition();if(e.x<o||e.y<r||e.x>a.width||e.y>a.height)continue;const h=l(n,e,p,a,d&&s.warp);if(h>p)continue;const u=(1-h/p)*k;this._setColor(i),i.links.push({destination:t,opacity:u})}}isEnabled(i){return!!i.options.links?.enable}loadParticlesOptions(i,...n){i.links||(i.links=new e.y);for(const t of n)i.links.load(t?.links)}reset(){}}}}]);
|
package/806.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Links Particles Interaction v3.2.1 by Matteo Bruni */
|
package/838.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 838.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_interaction_particles_links=this.webpackChunk_tsparticles_interaction_particles_links||[]).push([[838],{838:(i,n,t)=>{t.d(n,{LinkInstance:()=>o});var e=t(533);function s(i,n){const t=((s=i.map((i=>i.id))).sort(((i,n)=>i-n)),s.join("_"));var s;let o=n.get(t);return void 0===o&&(o=(0,e.getRandom)(),n.set(t,o)),o}class o{constructor(i){this.container=i,this._drawLinkLine=(i,n)=>{const t=i.options.links;if(!t?.enable)return;const s=this.container,o=s.actualOptions,a=n.destination,r=i.getPosition(),l=a.getPosition();let c=n.opacity;s.canvas.draw((n=>{let d;const g=i.options.twinkle?.lines;if(g?.enable){const i=g.frequency,n=(0,e.rangeColorToRgb)(g.color);(0,e.getRandom)()<i&&n&&(d=n,c=(0,e.getRangeValue)(g.opacity))}if(!d){const n=void 0!==t.id?s.particles.linksColors.get(t.id):s.particles.linksColor;d=(0,e.getLinkColor)(i,a,n)}if(!d)return;const k=i.retina.linksWidth??0,p=i.retina.linksDistance??0,{backgroundMask:h}=o;!function(i){let n=!1;const{begin:t,end:s,maxDistance:o,context:a,canvasSize:r,width:l,backgroundMask:c,colorLine:d,opacity:g,links:k}=i;if((0,e.getDistance)(t,s)<=o)(0,e.drawLine)(a,t,s),n=!0;else if(k.warp){let i,l;const c={x:s.x-r.width,y:s.y},d=(0,e.getDistances)(t,c);if(d.distance<=o){const n=t.y-d.dy/d.dx*t.x;i={x:0,y:n},l={x:r.width,y:n}}else{const n={x:s.x,y:s.y-r.height},a=(0,e.getDistances)(t,n);if(a.distance<=o){const n=-(t.y-a.dy/a.dx*t.x)/(a.dy/a.dx);i={x:n,y:0},l={x:n,y:r.height}}else{const n={x:s.x-r.width,y:s.y-r.height},a=(0,e.getDistances)(t,n);if(a.distance<=o){const n=t.y-a.dy/a.dx*t.x;i={x:-n/(a.dy/a.dx),y:n},l={x:i.x+r.width,y:i.y+r.height}}}}i&&l&&((0,e.drawLine)(a,t,i),(0,e.drawLine)(a,s,l),n=!0)}if(!n)return;a.lineWidth=l,c.enable&&(a.globalCompositeOperation=c.composite),a.strokeStyle=(0,e.getStyleFromRgb)(d,g);const{shadow:p}=k;if(p.enable){const i=(0,e.rangeColorToRgb)(p.color);i&&(a.shadowBlur=p.blur,a.shadowColor=(0,e.getStyleFromRgb)(i))}a.stroke()}({context:n,width:k,begin:r,end:l,maxDistance:p,canvasSize:s.canvas.size,links:t,backgroundMask:h,colorLine:d,opacity:c})}))},this._drawLinkTriangle=(i,n,t)=>{const s=i.options.links;if(!s?.enable)return;const o=s.triangles;if(!o.enable)return;const a=this.container,r=a.actualOptions,l=n.destination,c=t.destination,d=o.opacity??.5*(n.opacity+t.opacity);d<=0||a.canvas.draw((n=>{const t=i.getPosition(),g=l.getPosition(),k=c.getPosition(),p=i.retina.linksDistance??0;if((0,e.getDistance)(t,g)>p||(0,e.getDistance)(k,g)>p||(0,e.getDistance)(k,t)>p)return;let h=(0,e.rangeColorToRgb)(o.color);if(!h){const n=void 0!==s.id?a.particles.linksColors.get(s.id):a.particles.linksColor;h=(0,e.getLinkColor)(i,l,n)}h&&function(i){const{context:n,pos1:t,pos2:s,pos3:o,backgroundMask:a,colorTriangle:r,opacityTriangle:l}=i;!function(i,n,t,e){i.beginPath(),i.moveTo(n.x,n.y),i.lineTo(t.x,t.y),i.lineTo(e.x,e.y),i.closePath()}(n,t,s,o),a.enable&&(n.globalCompositeOperation=a.composite),n.fillStyle=(0,e.getStyleFromRgb)(r,l),n.fill()}({context:n,pos1:t,pos2:g,pos3:k,backgroundMask:r.backgroundMask,colorTriangle:h,opacityTriangle:d})}))},this._drawTriangles=(i,n,t,e)=>{const s=t.destination;if(!i.links?.triangles.enable||!s.options.links?.triangles.enable)return;const o=s.links?.filter((i=>{const n=this._getLinkFrequency(s,i.destination);return s.options.links&&n<=s.options.links.frequency&&e.findIndex((n=>n.destination===i.destination))>=0}));if(o?.length)for(const e of o){const o=e.destination;this._getTriangleFrequency(n,s,o)>i.links.triangles.frequency||this._drawLinkTriangle(n,t,e)}},this._getLinkFrequency=(i,n)=>s([i,n],this._freqs.links),this._getTriangleFrequency=(i,n,t)=>s([i,n,t],this._freqs.triangles),this._freqs={links:new Map,triangles:new Map}}async drawParticle(i,n){const{links:t,options:e}=n;if(!t?.length)return;const s=t.filter((i=>e.links&&this._getLinkFrequency(n,i.destination)<=e.links.frequency));for(const i of s)this._drawTriangles(e,n,i,s),i.opacity>0&&(n.retina.linksWidth??0)>0&&this._drawLinkLine(n,i);await Promise.resolve()}async init(){this._freqs.links=new Map,this._freqs.triangles=new Map,await Promise.resolve()}particleCreated(i){if(i.links=[],!i.options.links)return;const n=this.container.retina.pixelRatio,{retina:t}=i,{distance:e,width:s}=i.options.links;t.linksDistance=e*n,t.linksWidth=s*n}particleDestroyed(i){i.links=[]}}}}]);
|
package/838.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Links Particles Interaction v3.2.1 by Matteo Bruni */
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Author : Matteo Bruni
|
|
3
|
-
* MIT license: https://opensource.org/licenses/MIT
|
|
4
|
-
* Demo / Generator : https://particles.js.org/
|
|
5
|
-
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
|
-
* How to use? : Check the GitHub README
|
|
7
|
-
* v3.2.1
|
|
8
|
-
*/
|
|
9
|
-
"use strict";
|
|
10
|
-
/*
|
|
11
|
-
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
12
|
-
* This devtool is neither made for production nor for readable output files.
|
|
13
|
-
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
14
|
-
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
15
|
-
* or disable the default devtool with "devtool: false".
|
|
16
|
-
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
17
|
-
*/
|
|
18
|
-
(this["webpackChunk_tsparticles_interaction_particles_links"] = this["webpackChunk_tsparticles_interaction_particles_links"] || []).push([["dist_browser_CircleWarp_js"],{
|
|
19
|
-
|
|
20
|
-
/***/ "./dist/browser/CircleWarp.js":
|
|
21
|
-
/*!************************************!*\
|
|
22
|
-
!*** ./dist/browser/CircleWarp.js ***!
|
|
23
|
-
\************************************/
|
|
24
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
25
|
-
|
|
26
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CircleWarp: () => (/* binding */ CircleWarp)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n\nconst double = 2;\nclass CircleWarp extends _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.Circle {\n constructor(x, y, radius, canvasSize) {\n super(x, y, radius);\n this.canvasSize = canvasSize;\n this.canvasSize = {\n ...canvasSize\n };\n }\n contains(point) {\n const {\n width,\n height\n } = this.canvasSize;\n const {\n x,\n y\n } = point;\n return super.contains(point) || super.contains({\n x: x - width,\n y\n }) || super.contains({\n x: x - width,\n y: y - height\n }) || super.contains({\n x,\n y: y - height\n });\n }\n intersects(range) {\n if (super.intersects(range)) {\n return true;\n }\n const rect = range,\n circle = range,\n newPos = {\n x: range.position.x - this.canvasSize.width,\n y: range.position.y - this.canvasSize.height\n };\n if (circle.radius !== undefined) {\n const biggerCircle = new _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.Circle(newPos.x, newPos.y, circle.radius * double);\n return super.intersects(biggerCircle);\n } else if (rect.size !== undefined) {\n const rectSW = new _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.Rectangle(newPos.x, newPos.y, rect.size.width * double, rect.size.height * double);\n return super.intersects(rectSW);\n }\n return false;\n }\n}\n\n//# sourceURL=webpack://@tsparticles/interaction-particles-links/./dist/browser/CircleWarp.js?");
|
|
27
|
-
|
|
28
|
-
/***/ })
|
|
29
|
-
|
|
30
|
-
}]);
|