@tsparticles/interaction-particles-links 4.0.0-beta.1 → 4.0.0-beta.10

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.
@@ -1 +1 @@
1
- "use strict";(this.webpackChunk_tsparticles_interaction_particles_links=this.webpackChunk_tsparticles_interaction_particles_links||[]).push([[212],{212(e,i,t){t.d(i,{LinkInstance:()=>s});var n=t(303);function l(e,i){let t=[...e.map(e=>e.id)].sort((e,i)=>e-i).join("_"),l=i.get(t);return void 0===l&&(l=(0,n.getRandom)(),i.set(t,l)),l}class s{_colorCache=new Map;_container;_freqs;_pluginManager;constructor(e,i){this._pluginManager=e,this._container=i,this._freqs={links:new Map,triangles:new Map}}drawParticle(e,i){let{links:t,options:l}=i;if(!t?.length||!l.links)return;let s=l.links,a=i.retina.linksWidth??0,o=i.getPosition(),r=i.options.twinkle?.links,c=s.triangles.enable,h=c?new Set(t.map(e=>e.destination.id)):null,g=e.globalAlpha,d="",p=-1,_=-1,k=!1,u=()=>{k&&(e.stroke(),k=!1)};for(let g of t){if(s.frequency<1&&this._getLinkFrequency(i,g.destination)>s.frequency)continue;let t=g.destination.getPosition();if(c&&!g.isWarped&&h&&(u(),this._drawTriangles(l,i,g,h,o,t,e)),g.opacity<=0||a<=0||!s.enable)continue;let y=g.opacity,f=g.color,b=r?.enable&&(0,n.getRandom)()<r.frequency?(0,n.rangeColorToRgb)(this._pluginManager,r.color):void 0;if(r&&b&&(f=b,y=(0,n.getRangeValue)(r.opacity)),!f){let e=void 0!==s.id?this._container.particles.linksColors.get(s.id):this._container.particles.linksColor;f=(0,n.getLinkColor)(i,g.destination,e)}if(!f)continue;let q=this._getCachedStyle(f);if((q!==d||a!==p||y!==_)&&(u(),e.strokeStyle=q,e.lineWidth=a,e.globalAlpha=y,d=q,p=a,_=y,e.beginPath(),k=!0),g.isWarped){let i=this._container.canvas.size,l=t.x-o.x,s=t.y-o.y,a=n.originPoint.x,r=n.originPoint.y;Math.abs(l)>i.width*n.half&&(a=l>0?-i.width:i.width),Math.abs(s)>i.height*n.half&&(r=s>0?-i.height:i.height),e.moveTo(o.x,o.y),e.lineTo(t.x+a,t.y+r),e.moveTo(o.x-a,o.y-r),e.lineTo(t.x,t.y)}else e.moveTo(o.x,o.y),e.lineTo(t.x,t.y)}u(),e.globalAlpha=g}init(){return this._freqs.links.clear(),this._freqs.triangles.clear(),this._colorCache.clear(),Promise.resolve()}particleCreated(e){if(e.links=[],!e.options.links)return;e.linksDistance=e.options.links.distance,e.linksWidth=e.options.links.width;let i=this._container.retina.pixelRatio;e.retina.linksDistance=e.linksDistance*i,e.retina.linksWidth=e.linksWidth*i}particleDestroyed(e){e.links=[]}_drawTriangles(e,i,t,l,s,a,o){let r=t.destination,c=e.links?.triangles;if(!c?.enable||!r.options.links?.triangles.enable)return;let h=r.links;if(h?.length)for(let g of h){if(g.isWarped||this._getLinkFrequency(r,g.destination)>r.options.links.frequency||!l.has(g.destination.id))continue;let h=g.destination;if(this._getTriangleFrequency(i,r,h)>(e.links?.triangles.frequency??0))continue;let d=c.opacity??(t.opacity+g.opacity)*n.half,p=(0,n.rangeColorToRgb)(this._pluginManager,c.color)??t.color;if(!p||d<=0)continue;let _=h.getPosition();o.save(),o.fillStyle=this._getCachedStyle(p),o.globalAlpha=d,o.beginPath(),o.moveTo(s.x,s.y),o.lineTo(a.x,a.y),o.lineTo(_.x,_.y),o.closePath(),o.fill(),o.restore()}}_getCachedStyle(e){let i=`${e.r},${e.g},${e.b}`,t=this._colorCache.get(i);return t||(t=(0,n.getStyleFromRgb)(e,this._container.hdr),this._colorCache.set(i,t)),t}_getLinkFrequency(e,i){return l([e,i],this._freqs.links)}_getTriangleFrequency(e,i,t){return l([e,i,t],this._freqs.triangles)}}}}]);
1
+ "use strict";(this.webpackChunk_tsparticles_interaction_particles_links=this.webpackChunk_tsparticles_interaction_particles_links||[]).push([[218],{218(e,i,t){t.d(i,{LinkInstance:()=>s});var n=t(303);function l(e,i){let t=[...e.map(e=>e.id)].sort((e,i)=>e-i).join("_"),l=i.get(t);return void 0===l&&(l=(0,n.getRandom)(),i.set(t,l)),l}class s{_colorCache=new Map;_container;_freqs;_pluginManager;constructor(e,i){this._pluginManager=e,this._container=i,this._freqs={links:new Map,triangles:new Map}}drawParticle(e,i){let{links:t,options:l}=i;if(!t?.length||!l.links)return;let s=l.links,a=i.retina.linksWidth??0,o=i.getPosition(),r=i.options.twinkle?.links,c=s.triangles.enable,h=c?new Set(t.map(e=>e.destination.id)):null,g=e.globalAlpha,d="",p=-1,_=-1,k=!1,u=()=>{k&&(e.stroke(),k=!1)};for(let g of t){if(s.frequency<1&&this._getLinkFrequency(i,g.destination)>s.frequency)continue;let t=g.destination.getPosition();if(c&&!g.isWarped&&h&&(u(),this._drawTriangles(l,i,g,h,o,t,e)),g.opacity<=0||a<=0||!s.enable)continue;let y=g.opacity,f=g.color,b=r?.enable&&(0,n.getRandom)()<r.frequency?(0,n.rangeColorToRgb)(this._pluginManager,r.color):void 0;if(r&&b&&(f=b,y=(0,n.getRangeValue)(r.opacity)),!f){let e=void 0!==s.id?this._container.particles.linksColors.get(s.id):this._container.particles.linksColor;f=(0,n.getLinkColor)(i,g.destination,e)}if(!f)continue;let q=this._getCachedStyle(f);if((q!==d||a!==p||y!==_)&&(u(),e.strokeStyle=q,e.lineWidth=a,e.globalAlpha=y,d=q,p=a,_=y,e.beginPath(),k=!0),g.isWarped){let i=this._container.canvas.size,l=t.x-o.x,s=t.y-o.y,a=n.originPoint.x,r=n.originPoint.y;Math.abs(l)>i.width*n.half&&(a=l>0?-i.width:i.width),Math.abs(s)>i.height*n.half&&(r=s>0?-i.height:i.height),e.moveTo(o.x,o.y),e.lineTo(t.x+a,t.y+r),e.moveTo(o.x-a,o.y-r),e.lineTo(t.x,t.y)}else e.moveTo(o.x,o.y),e.lineTo(t.x,t.y)}u(),e.globalAlpha=g}init(){return this._freqs.links.clear(),this._freqs.triangles.clear(),this._colorCache.clear(),Promise.resolve()}particleCreated(e){if(e.links=[],!e.options.links)return;e.linksDistance=e.options.links.distance,e.linksWidth=e.options.links.width;let i=this._container.retina.pixelRatio;e.retina.linksDistance=e.linksDistance*i,e.retina.linksWidth=e.linksWidth*i}particleDestroyed(e){e.links=[]}_drawTriangles(e,i,t,l,s,a,o){let r=t.destination,c=e.links?.triangles;if(!c?.enable||!r.options.links?.triangles.enable)return;let h=r.links;if(h?.length)for(let g of h){if(g.isWarped||this._getLinkFrequency(r,g.destination)>r.options.links.frequency||!l.has(g.destination.id))continue;let h=g.destination;if(this._getTriangleFrequency(i,r,h)>(e.links?.triangles.frequency??0))continue;let d=c.opacity??(t.opacity+g.opacity)*n.half,p=(0,n.rangeColorToRgb)(this._pluginManager,c.color)??t.color;if(!p||d<=0)continue;let _=h.getPosition();o.save(),o.fillStyle=this._getCachedStyle(p),o.globalAlpha=d,o.beginPath(),o.moveTo(s.x,s.y),o.lineTo(a.x,a.y),o.lineTo(_.x,_.y),o.closePath(),o.fill(),o.restore()}}_getCachedStyle(e){let i=`${e.r},${e.g},${e.b}`,t=this._colorCache.get(i);return t||(t=(0,n.getStyleFromRgb)(e,this._container.hdr),this._colorCache.set(i,t)),t}_getLinkFrequency(e,i){return l([e,i],this._freqs.links)}_getTriangleFrequency(e,i,t){return l([e,i,t],this._freqs.triangles)}}}}]);
package/540.min.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(this.webpackChunk_tsparticles_interaction_particles_links=this.webpackChunk_tsparticles_interaction_particles_links||[]).push([[540],{540(n,i,t){t.r(i),t.d(i,{LinksPlugin:()=>s});class s{id="links";_pluginManager;constructor(n){this._pluginManager=n}async getPlugin(n){let{LinkInstance:i}=await t.e(218).then(t.bind(t,218));return new i(this._pluginManager,n)}loadOptions(){}needsPlugin(){return!0}}}}]);
package/907.min.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(this.webpackChunk_tsparticles_interaction_particles_links=this.webpackChunk_tsparticles_interaction_particles_links||[]).push([[907],{907(i,t,n){n.d(t,{Linker:()=>a});var s=n(303);class e extends s.Circle{canvasSize;constructor(i,t,n,s){super(i,t,n),this.canvasSize=s}contains(i){if(super.contains(i))return!0;let{width:t,height:n}=this.canvasSize,{x:s,y:e}=i;return super.contains({x:s-t,y:e})||super.contains({x:s+t,y:e})||super.contains({x:s,y:e-n})||super.contains({x:s,y:e+n})||super.contains({x:s-t,y:e-n})||super.contains({x:s+t,y:e+n})||super.contains({x:s-t,y:e+n})||super.contains({x:s+t,y:e-n})}intersects(i){if(super.intersects(i))return!0;let{width:t,height:n}=this.canvasSize,e=i.position;for(let r of[{x:-t,y:0},{x:t,y:0},{x:0,y:-n},{x:0,y:n},{x:-t,y:-n},{x:t,y:n},{x:-t,y:n},{x:t,y:-n}]){let t,n={x:e.x+r.x,y:e.y+r.y};if(t=i instanceof s.Circle?new s.Circle(n.x,n.y,i.radius):new s.Rectangle(n.x,n.y,i.size.width,i.size.height),super.intersects(t))return!0}return!1}}var r=n(861),o=n(702);class a extends o.ParticlesInteractorBase{_maxDistance;_pluginManager;constructor(i,t){super(t),this._pluginManager=i,this._maxDistance=0}get maxDistance(){return this._maxDistance}clear(){}init(){this.container.particles.linksColor=void 0,this.container.particles.linksColors=new Map}interact(i){if(!i.options.links)return;i.links=[],i.linksDistance&&i.linksDistance>this._maxDistance&&(this._maxDistance=i.linksDistance);let t=i.getPosition(),n=this.container,r=n.canvas.size;if(t.x<s.originPoint.x||t.y<s.originPoint.y||t.x>r.width||t.y>r.height)return;let o=i.options.links,a=o.opacity,l=i.retina.linksDistance??0,c=o.warp,p=c?new e(t.x,t.y,l,r):new s.Circle(t.x,t.y,l);for(let e of n.particles.grid.query(p)){let n=e.options.links;if(i===e||!n?.enable||o.id!==n.id||e.spawning||e.destroyed||!e.links||i.links.some(i=>i.destination===e)||e.links.some(t=>t.destination===i))continue;let p=e.getPosition();if(p.x<s.originPoint.x||p.y<s.originPoint.y||p.x>r.width||p.y>r.height)continue;let u=(0,s.getDistances)(t,p).distance,h=c&&n.warp?function(i,t,n){let{dx:e,dy:r}=(0,s.getDistances)(i,t),o={x:Math.abs(e),y:Math.abs(r)},a={x:Math.min(o.x,n.width-o.x),y:Math.min(o.y,n.height-o.y)};return Math.hypot(a.x,a.y)}(t,p,r):u,x=Math.min(u,h);if(x>l)continue;let k=(1-x/l)*a;this._setColor(i),i.links.push({destination:e,opacity:k,color:this._getLinkColor(i,e),isWarped:h<u})}}isEnabled(i){return!!i.options.links?.enable}loadParticlesOptions(i,...t){for(let n of(i.links??=new r.q,t))i.links.load(n?.links)}reset(){}_getLinkColor(i,t){let n=this.container,e=i.options.links;if(!e)return;let r=void 0!==e.id?n.particles.linksColors.get(e.id):n.particles.linksColor;return(0,s.getLinkColor)(i,t,r)}_setColor(i){if(!i.options.links)return;let t=this.container,n=i.options.links,e=void 0===n.id?t.particles.linksColor:t.particles.linksColors.get(n.id);e||(e=(0,s.getLinkRandomColor)(this._pluginManager,n.color,n.blink,n.consent),void 0===n.id?t.particles.linksColor=e:t.particles.linksColors.set(n.id,e))}}}}]);
package/README.md CHANGED
@@ -8,6 +8,12 @@
8
8
 
9
9
  [tsParticles](https://github.com/tsparticles/tsparticles) interaction plugin for links effect between particles.
10
10
 
11
+ ## Quick checklist
12
+
13
+ 1. Install `@tsparticles/engine` (or use the CDN bundle below)
14
+ 2. Call the package loader function(s) before `tsParticles.load(...)`
15
+ 3. Apply the package options in your `tsParticles.load(...)` config
16
+
11
17
  ## How to use it
12
18
 
13
19
  ### CDN / Vanilla JS / jQuery
@@ -78,3 +84,28 @@ import { loadParticlesLinksInteraction } from "@tsparticles/interaction-particle
78
84
  await loadParticlesLinksInteraction(tsParticles);
79
85
  })();
80
86
  ```
87
+
88
+ ## Option mapping
89
+
90
+ - Primary options key: `particles.links`
91
+
92
+ ```json
93
+ {
94
+ "particles": {
95
+ "links": {
96
+ "enable": true
97
+ }
98
+ }
99
+ }
100
+ ```
101
+
102
+ ## Common pitfalls
103
+
104
+ - Calling `tsParticles.load(...)` before `loadInteractivityPlugin(...)`
105
+ - Verify required peer packages before enabling advanced options
106
+ - Change one option group at a time to isolate regressions quickly
107
+
108
+ ## Related docs
109
+
110
+ - All packages catalog: <https://github.com/tsparticles/tsparticles>
111
+ - Main docs: <https://particles.js.org/docs/>
package/browser/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export async function loadParticlesLinksInteraction(engine) {
2
- engine.checkVersion("4.0.0-beta.1");
2
+ engine.checkVersion("4.0.0-beta.10");
3
3
  await engine.pluginManager.register(async (e) => {
4
4
  const pluginManager = e.pluginManager, [{ ensureInteractivityPluginLoaded }, { LinksPlugin },] = await Promise.all([
5
5
  import("@tsparticles/plugin-interactivity"),
package/cjs/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export async function loadParticlesLinksInteraction(engine) {
2
- engine.checkVersion("4.0.0-beta.1");
2
+ engine.checkVersion("4.0.0-beta.10");
3
3
  await engine.pluginManager.register(async (e) => {
4
4
  const pluginManager = e.pluginManager, [{ ensureInteractivityPluginLoaded }, { LinksPlugin },] = await Promise.all([
5
5
  import("@tsparticles/plugin-interactivity"),
@@ -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
- * v4.0.0-beta.1
7
+ * v4.0.0-beta.10
8
8
  */
9
9
  "use strict";
10
10
  /*
@@ -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
- * v4.0.0-beta.1
7
+ * v4.0.0-beta.10
8
8
  */
9
9
  "use strict";
10
10
  /*
@@ -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
- * v4.0.0-beta.1
7
+ * v4.0.0-beta.10
8
8
  */
9
9
  "use strict";
10
10
  /*
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export async function loadParticlesLinksInteraction(engine) {
2
- engine.checkVersion("4.0.0-beta.1");
2
+ engine.checkVersion("4.0.0-beta.10");
3
3
  await engine.pluginManager.register(async (e) => {
4
4
  const pluginManager = e.pluginManager, [{ ensureInteractivityPluginLoaded }, { LinksPlugin },] = await Promise.all([
5
5
  import("@tsparticles/plugin-interactivity"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/interaction-particles-links",
3
- "version": "4.0.0-beta.1",
3
+ "version": "4.0.0-beta.10",
4
4
  "description": "tsParticles links particles interaction",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -81,12 +81,11 @@
81
81
  "browser": "./browser/index.js",
82
82
  "import": "./esm/index.js",
83
83
  "require": "./cjs/index.js",
84
- "umd": "./umd/index.js",
85
- "default": "./cjs/index.js"
84
+ "default": "./esm/index.js"
86
85
  },
87
86
  "./package.json": "./package.json"
88
87
  },
89
- "dependencies": {
88
+ "peerDepdendencies": {
90
89
  "@tsparticles/canvas-utils": "4.0.0-beta.1",
91
90
  "@tsparticles/engine": "4.0.0-beta.1",
92
91
  "@tsparticles/plugin-interactivity": "4.0.0-beta.1"
@@ -94,5 +93,10 @@
94
93
  "publishConfig": {
95
94
  "access": "public"
96
95
  },
97
- "type": "module"
96
+ "type": "module",
97
+ "peerDependencies": {
98
+ "@tsparticles/canvas-utils": "4.0.0-beta.10",
99
+ "@tsparticles/engine": "4.0.0-beta.10",
100
+ "@tsparticles/plugin-interactivity": "4.0.0-beta.10"
101
+ }
98
102
  }
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 [31 Mar 2026 at 08:46]</title>
6
+ <title>@tsparticles/interaction-particles-links [8 Apr 2026 at 15:55]</title>
7
7
  <link
8
8
  rel="shortcut icon"
9
9
  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="
@@ -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
- * v4.0.0-beta.1
7
+ * v4.0.0-beta.10
8
8
  */
9
9
  /*
10
10
  * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
@@ -84,7 +84,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
84
84
  \*******************************/
85
85
  (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
86
86
 
87
- 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) {\n engine.checkVersion(\"4.0.0-beta.1\");\n await engine.pluginManager.register(async (e)=>{\n const pluginManager = e.pluginManager, [{ ensureInteractivityPluginLoaded }, { LinksPlugin }] = await Promise.all([\n Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/plugin-interactivity */ \"@tsparticles/plugin-interactivity\", 19)),\n __webpack_require__.e(/*! import() */ \"dist_browser_LinksPlugin_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./LinksPlugin.js */ \"./dist/browser/LinksPlugin.js\"))\n ]);\n ensureInteractivityPluginLoaded(e);\n pluginManager.addPlugin(new LinksPlugin(pluginManager));\n pluginManager.addInteractor?.(\"particlesLinks\", async (container)=>{\n const { Linker } = 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(pluginManager, container);\n });\n });\n}\n\n\n\n\n\n//# sourceURL=webpack://@tsparticles/interaction-particles-links/./dist/browser/index.js?\n}");
87
+ 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) {\n engine.checkVersion(\"4.0.0-beta.10\");\n await engine.pluginManager.register(async (e)=>{\n const pluginManager = e.pluginManager, [{ ensureInteractivityPluginLoaded }, { LinksPlugin }] = await Promise.all([\n Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/plugin-interactivity */ \"@tsparticles/plugin-interactivity\", 19)),\n __webpack_require__.e(/*! import() */ \"dist_browser_LinksPlugin_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./LinksPlugin.js */ \"./dist/browser/LinksPlugin.js\"))\n ]);\n ensureInteractivityPluginLoaded(e);\n pluginManager.addPlugin(new LinksPlugin(pluginManager));\n pluginManager.addInteractor?.(\"particlesLinks\", async (container)=>{\n const { Linker } = 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(pluginManager, container);\n });\n });\n}\n\n\n\n\n\n//# sourceURL=webpack://@tsparticles/interaction-particles-links/./dist/browser/index.js?\n}");
88
88
 
89
89
  /***/ }
90
90
 
@@ -1,2 +1,2 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"),require("@tsparticles/plugin-interactivity"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine","@tsparticles/plugin-interactivity"],t);else{var r="object"==typeof exports?t(require("@tsparticles/engine"),require("@tsparticles/plugin-interactivity")):t(e.window,e.window);for(var i in r)("object"==typeof exports?exports:e)[i]=r[i]}}(this,(e,t)=>(()=>{"use strict";var r,i,o,n={303(t){t.exports=e},702(e){e.exports=t},56(e,t,r){r.d(t,{q:()=>a});var i=r(303),o=r(656),n=r(36);class a{blink;color;consent;distance;enable;frequency;id;opacity;shadow;triangles;warp;width;constructor(){this.blink=!1,this.color=new i.OptionsColor,this.color.value="#fff",this.consent=!1,this.distance=100,this.enable=!1,this.frequency=1,this.opacity=1,this.shadow=new o.s,this.triangles=new n.G,this.width=1,this.warp=!1}load(e){(0,i.isNull)(e)||(void 0!==e.id&&(this.id=e.id),void 0!==e.blink&&(this.blink=e.blink),this.color=i.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))}}},656(e,t,r){r.d(t,{s:()=>o});var i=r(303);class o{blur;color;enable;constructor(){this.blur=5,this.color=new i.OptionsColor,this.color.value="#000",this.enable=!1}load(e){(0,i.isNull)(e)||(void 0!==e.blur&&(this.blur=e.blur),this.color=i.OptionsColor.create(this.color,e.color),void 0!==e.enable&&(this.enable=e.enable))}}},36(e,t,r){r.d(t,{G:()=>o});var i=r(303);class o{color;enable;frequency;opacity;constructor(){this.enable=!1,this.frequency=1}load(e){(0,i.isNull)(e)||(void 0!==e.color&&(this.color=i.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))}}}},a={};function s(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={exports:{}};return n[e](r,r.exports,s),r.exports}s.m=n,c=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(e,t){if(1&t&&(e=this(e)),8&t||"object"==typeof e&&e&&(4&t&&e.__esModule||16&t&&"function"==typeof e.then))return e;var r=Object.create(null);s.r(r);var i={};l=l||[null,c({}),c([]),c(c)];for(var o=2&t&&e;("object"==typeof o||"function"==typeof o)&&!~l.indexOf(o);o=c(o))Object.getOwnPropertyNames(o).forEach(t=>i[t]=()=>e[t]);return i.default=()=>e,s.d(r,i),r},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce((t,r)=>(s.f[r](e,t),t),[])),s.u=e=>""+e+".min.js",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),p={},s.l=(e,t,r,i)=>{if(p[e])return void p[e].push(t);if(void 0!==r)for(var o,n,a=document.getElementsByTagName("script"),l=0;l<a.length;l++){var c=a[l];if(c.getAttribute("src")==e||c.getAttribute("data-webpack")=="@tsparticles/interaction-particles-links:"+r){o=c;break}}o||(n=!0,(o=document.createElement("script")).charset="utf-8",s.nc&&o.setAttribute("nonce",s.nc),o.setAttribute("data-webpack","@tsparticles/interaction-particles-links:"+r),o.src=e),p[e]=[t];var d=(t,r)=>{o.onerror=o.onload=null,clearTimeout(u);var i=p[e];if(delete p[e],o.parentNode&&o.parentNode.removeChild(o),i&&i.forEach(e=>e(r)),t)return t(r)},u=setTimeout(d.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=d.bind(null,o.onerror),o.onload=d.bind(null,o.onload),n&&document.head.appendChild(o)},s.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.g.importScripts&&(d=s.g.location+"");var l,c,p,d,u=s.g.document;if(!d&&u&&(u.currentScript&&"SCRIPT"===u.currentScript.tagName.toUpperCase()&&(d=u.currentScript.src),!d)){var h=u.getElementsByTagName("script");if(h.length)for(var f=h.length-1;f>-1&&(!d||!/^http(s?):/.test(d));)d=h[f--].src}if(!d)throw Error("Automatic publicPath is not supported in this browser");s.p=d=d.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r={203:0},s.f.j=(e,t)=>{var i=s.o(r,e)?r[e]:void 0;if(0!==i)if(i)t.push(i[2]);else{var o=new Promise((t,o)=>i=r[e]=[t,o]);t.push(i[2]=o);var n=s.p+s.u(e),a=Error();s.l(n,t=>{if(s.o(r,e)&&(0!==(i=r[e])&&(r[e]=void 0),i)){var o=t&&("load"===t.type?"missing":t.type),n=t&&t.target&&t.target.src;a.message="Loading chunk "+e+` failed.
2
- (`+o+": "+n+")",a.name="ChunkLoadError",a.type=o,a.request=n,i[1](a)}},"chunk-"+e,e)}},i=(e,t)=>{var i,o,[n,a,l]=t,c=0;if(n.some(e=>0!==r[e])){for(i in a)s.o(a,i)&&(s.m[i]=a[i]);l&&l(s)}for(e&&e(t);c<n.length;c++)o=n[c],s.o(r,o)&&r[o]&&r[o][0](),r[o]=0},(o=this.webpackChunk_tsparticles_interaction_particles_links=this.webpackChunk_tsparticles_interaction_particles_links||[]).forEach(i.bind(null,0)),o.push=i.bind(null,o.push.bind(o));var b={};s.r(b),s.d(b,{Links:()=>v.q,LinksShadow:()=>y.s,LinksTriangle:()=>g.G,loadParticlesLinksInteraction:()=>w});var v=s(56),y=s(656),g=s(36);async function w(e){e.checkVersion("4.0.0-beta.1"),await e.pluginManager.register(async e=>{let t=e.pluginManager,[{ensureInteractivityPluginLoaded:r},{LinksPlugin:i}]=await Promise.all([Promise.resolve().then(s.t.bind(s,702,19)),s.e(513).then(s.bind(s,513))]);r(e),t.addPlugin(new i(t)),t.addInteractor?.("particlesLinks",async e=>{let{Linker:r}=await s.e(866).then(s.bind(s,866));return new r(t,e)})})}return b})());
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"),require("@tsparticles/plugin-interactivity"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine","@tsparticles/plugin-interactivity"],t);else{var r="object"==typeof exports?t(require("@tsparticles/engine"),require("@tsparticles/plugin-interactivity")):t(e.window,e.window);for(var i in r)("object"==typeof exports?exports:e)[i]=r[i]}}(this,(e,t)=>(()=>{"use strict";var r,i,o,n={303(t){t.exports=e},702(e){e.exports=t},861(e,t,r){r.d(t,{q:()=>a});var i=r(303),o=r(853),n=r(517);class a{blink;color;consent;distance;enable;frequency;id;opacity;shadow;triangles;warp;width;constructor(){this.blink=!1,this.color=new i.OptionsColor,this.color.value="#fff",this.consent=!1,this.distance=100,this.enable=!1,this.frequency=1,this.opacity=1,this.shadow=new o.s,this.triangles=new n.G,this.width=1,this.warp=!1}load(e){(0,i.isNull)(e)||(void 0!==e.id&&(this.id=e.id),void 0!==e.blink&&(this.blink=e.blink),this.color=i.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))}}},853(e,t,r){r.d(t,{s:()=>o});var i=r(303);class o{blur;color;enable;constructor(){this.blur=5,this.color=new i.OptionsColor,this.color.value="#000",this.enable=!1}load(e){(0,i.isNull)(e)||(void 0!==e.blur&&(this.blur=e.blur),this.color=i.OptionsColor.create(this.color,e.color),void 0!==e.enable&&(this.enable=e.enable))}}},517(e,t,r){r.d(t,{G:()=>o});var i=r(303);class o{color;enable;frequency;opacity;constructor(){this.enable=!1,this.frequency=1}load(e){(0,i.isNull)(e)||(void 0!==e.color&&(this.color=i.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))}}}},a={};function s(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={exports:{}};return n[e](r,r.exports,s),r.exports}s.m=n,c=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(e,t){if(1&t&&(e=this(e)),8&t||"object"==typeof e&&e&&(4&t&&e.__esModule||16&t&&"function"==typeof e.then))return e;var r=Object.create(null);s.r(r);var i={};l=l||[null,c({}),c([]),c(c)];for(var o=2&t&&e;("object"==typeof o||"function"==typeof o)&&!~l.indexOf(o);o=c(o))Object.getOwnPropertyNames(o).forEach(t=>i[t]=()=>e[t]);return i.default=()=>e,s.d(r,i),r},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce((t,r)=>(s.f[r](e,t),t),[])),s.u=e=>""+e+".min.js",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),p={},s.l=(e,t,r,i)=>{if(p[e])return void p[e].push(t);if(void 0!==r)for(var o,n,a=document.getElementsByTagName("script"),l=0;l<a.length;l++){var c=a[l];if(c.getAttribute("src")==e||c.getAttribute("data-webpack")=="@tsparticles/interaction-particles-links:"+r){o=c;break}}o||(n=!0,(o=document.createElement("script")).charset="utf-8",s.nc&&o.setAttribute("nonce",s.nc),o.setAttribute("data-webpack","@tsparticles/interaction-particles-links:"+r),o.src=e),p[e]=[t];var d=(t,r)=>{o.onerror=o.onload=null,clearTimeout(u);var i=p[e];if(delete p[e],o.parentNode&&o.parentNode.removeChild(o),i&&i.forEach(e=>e(r)),t)return t(r)},u=setTimeout(d.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=d.bind(null,o.onerror),o.onload=d.bind(null,o.onload),n&&document.head.appendChild(o)},s.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.g.importScripts&&(d=s.g.location+"");var l,c,p,d,u=s.g.document;if(!d&&u&&(u.currentScript&&"SCRIPT"===u.currentScript.tagName.toUpperCase()&&(d=u.currentScript.src),!d)){var h=u.getElementsByTagName("script");if(h.length)for(var f=h.length-1;f>-1&&(!d||!/^http(s?):/.test(d));)d=h[f--].src}if(!d)throw Error("Automatic publicPath is not supported in this browser");s.p=d=d.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r={203:0},s.f.j=(e,t)=>{var i=s.o(r,e)?r[e]:void 0;if(0!==i)if(i)t.push(i[2]);else{var o=new Promise((t,o)=>i=r[e]=[t,o]);t.push(i[2]=o);var n=s.p+s.u(e),a=Error();s.l(n,t=>{if(s.o(r,e)&&(0!==(i=r[e])&&(r[e]=void 0),i)){var o=t&&("load"===t.type?"missing":t.type),n=t&&t.target&&t.target.src;a.message="Loading chunk "+e+` failed.
2
+ (`+o+": "+n+")",a.name="ChunkLoadError",a.type=o,a.request=n,i[1](a)}},"chunk-"+e,e)}},i=(e,t)=>{var i,o,[n,a,l]=t,c=0;if(n.some(e=>0!==r[e])){for(i in a)s.o(a,i)&&(s.m[i]=a[i]);l&&l(s)}for(e&&e(t);c<n.length;c++)o=n[c],s.o(r,o)&&r[o]&&r[o][0](),r[o]=0},(o=this.webpackChunk_tsparticles_interaction_particles_links=this.webpackChunk_tsparticles_interaction_particles_links||[]).forEach(i.bind(null,0)),o.push=i.bind(null,o.push.bind(o));var b={};s.r(b),s.d(b,{Links:()=>v.q,LinksShadow:()=>y.s,LinksTriangle:()=>g.G,loadParticlesLinksInteraction:()=>w});var v=s(861),y=s(853),g=s(517);async function w(e){e.checkVersion("4.0.0-beta.10"),await e.pluginManager.register(async e=>{let t=e.pluginManager,[{ensureInteractivityPluginLoaded:r},{LinksPlugin:i}]=await Promise.all([Promise.resolve().then(s.t.bind(s,702,19)),s.e(540).then(s.bind(s,540))]);r(e),t.addPlugin(new i(t)),t.addInteractor?.("particlesLinks",async e=>{let{Linker:r}=await s.e(907).then(s.bind(s,907));return new r(t,e)})})}return b})());
package/513.min.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(this.webpackChunk_tsparticles_interaction_particles_links=this.webpackChunk_tsparticles_interaction_particles_links||[]).push([[513],{513(n,i,t){t.r(i),t.d(i,{LinksPlugin:()=>s});class s{id="links";_pluginManager;constructor(n){this._pluginManager=n}async getPlugin(n){let{LinkInstance:i}=await t.e(212).then(t.bind(t,212));return new i(this._pluginManager,n)}loadOptions(){}needsPlugin(){return!0}}}}]);
package/866.min.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(this.webpackChunk_tsparticles_interaction_particles_links=this.webpackChunk_tsparticles_interaction_particles_links||[]).push([[866],{866(i,t,n){n.d(t,{Linker:()=>a});var s=n(303);class e extends s.Circle{canvasSize;constructor(i,t,n,s){super(i,t,n),this.canvasSize=s}contains(i){if(super.contains(i))return!0;let{width:t,height:n}=this.canvasSize,{x:s,y:e}=i;return super.contains({x:s-t,y:e})||super.contains({x:s+t,y:e})||super.contains({x:s,y:e-n})||super.contains({x:s,y:e+n})||super.contains({x:s-t,y:e-n})||super.contains({x:s+t,y:e+n})||super.contains({x:s-t,y:e+n})||super.contains({x:s+t,y:e-n})}intersects(i){if(super.intersects(i))return!0;let{width:t,height:n}=this.canvasSize,e=i.position;for(let r of[{x:-t,y:0},{x:t,y:0},{x:0,y:-n},{x:0,y:n},{x:-t,y:-n},{x:t,y:n},{x:-t,y:n},{x:t,y:-n}]){let t,n={x:e.x+r.x,y:e.y+r.y};if(t=i instanceof s.Circle?new s.Circle(n.x,n.y,i.radius):new s.Rectangle(n.x,n.y,i.size.width,i.size.height),super.intersects(t))return!0}return!1}}var r=n(56),o=n(702);class a extends o.ParticlesInteractorBase{_maxDistance;_pluginManager;constructor(i,t){super(t),this._pluginManager=i,this._maxDistance=0}get maxDistance(){return this._maxDistance}clear(){}init(){this.container.particles.linksColor=void 0,this.container.particles.linksColors=new Map}interact(i){if(!i.options.links)return;i.links=[],i.linksDistance&&i.linksDistance>this._maxDistance&&(this._maxDistance=i.linksDistance);let t=i.getPosition(),n=this.container,r=n.canvas.size;if(t.x<s.originPoint.x||t.y<s.originPoint.y||t.x>r.width||t.y>r.height)return;let o=i.options.links,a=o.opacity,l=i.retina.linksDistance??0,c=o.warp,p=c?new e(t.x,t.y,l,r):new s.Circle(t.x,t.y,l);for(let e of n.particles.grid.query(p)){let n=e.options.links;if(i===e||!n?.enable||o.id!==n.id||e.spawning||e.destroyed||!e.links||i.links.some(i=>i.destination===e)||e.links.some(t=>t.destination===i))continue;let p=e.getPosition();if(p.x<s.originPoint.x||p.y<s.originPoint.y||p.x>r.width||p.y>r.height)continue;let u=(0,s.getDistances)(t,p).distance,h=c&&n.warp?function(i,t,n){let{dx:e,dy:r}=(0,s.getDistances)(i,t),o={x:Math.abs(e),y:Math.abs(r)},a={x:Math.min(o.x,n.width-o.x),y:Math.min(o.y,n.height-o.y)};return Math.hypot(a.x,a.y)}(t,p,r):u,x=Math.min(u,h);if(x>l)continue;let k=(1-x/l)*a;this._setColor(i),i.links.push({destination:e,opacity:k,color:this._getLinkColor(i,e),isWarped:h<u})}}isEnabled(i){return!!i.options.links?.enable}loadParticlesOptions(i,...t){for(let n of(i.links??=new r.q,t))i.links.load(n?.links)}reset(){}_getLinkColor(i,t){let n=this.container,e=i.options.links;if(!e)return;let r=void 0!==e.id?n.particles.linksColors.get(e.id):n.particles.linksColor;return(0,s.getLinkColor)(i,t,r)}_setColor(i){if(!i.options.links)return;let t=this.container,n=i.options.links,e=void 0===n.id?t.particles.linksColor:t.particles.linksColors.get(n.id);e||(e=(0,s.getLinkRandomColor)(this._pluginManager,n.color,n.blink,n.consent),void 0===n.id?t.particles.linksColor=e:t.particles.linksColors.set(n.id,e))}}}}]);
package/umd/CircleWarp.js DELETED
@@ -1,63 +0,0 @@
1
- (function (factory) {
2
- if (typeof module === "object" && typeof module.exports === "object") {
3
- var v = factory(require, exports);
4
- if (v !== undefined) module.exports = v;
5
- }
6
- else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports", "@tsparticles/engine"], factory);
8
- }
9
- })(function (require, exports) {
10
- "use strict";
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.CircleWarp = void 0;
13
- const engine_1 = require("@tsparticles/engine");
14
- class CircleWarp extends engine_1.Circle {
15
- canvasSize;
16
- constructor(x, y, radius, canvasSize) {
17
- super(x, y, radius);
18
- this.canvasSize = canvasSize;
19
- }
20
- contains(point) {
21
- if (super.contains(point))
22
- return true;
23
- const { width, height } = this.canvasSize, { x, y } = point;
24
- return (super.contains({ x: x - width, y }) ||
25
- super.contains({ x: x + width, y }) ||
26
- super.contains({ x, y: y - height }) ||
27
- super.contains({ x, y: y + height }) ||
28
- super.contains({ x: x - width, y: y - height }) ||
29
- super.contains({ x: x + width, y: y + height }) ||
30
- super.contains({ x: x - width, y: y + height }) ||
31
- super.contains({ x: x + width, y: y - height }));
32
- }
33
- intersects(range) {
34
- if (super.intersects(range))
35
- return true;
36
- const { width, height } = this.canvasSize, pos = range.position, shifts = [
37
- { x: -width, y: 0 },
38
- { x: width, y: 0 },
39
- { x: 0, y: -height },
40
- { x: 0, y: height },
41
- { x: -width, y: -height },
42
- { x: width, y: height },
43
- { x: -width, y: height },
44
- { x: width, y: -height },
45
- ];
46
- for (const shift of shifts) {
47
- const shiftedPos = { x: pos.x + shift.x, y: pos.y + shift.y };
48
- let shiftedRange;
49
- if (range instanceof engine_1.Circle) {
50
- shiftedRange = new engine_1.Circle(shiftedPos.x, shiftedPos.y, range.radius);
51
- }
52
- else {
53
- const rect = range;
54
- shiftedRange = new engine_1.Rectangle(shiftedPos.x, shiftedPos.y, rect.size.width, rect.size.height);
55
- }
56
- if (super.intersects(shiftedRange))
57
- return true;
58
- }
59
- return false;
60
- }
61
- }
62
- exports.CircleWarp = CircleWarp;
63
- });
package/umd/Interfaces.js DELETED
@@ -1,12 +0,0 @@
1
- (function (factory) {
2
- if (typeof module === "object" && typeof module.exports === "object") {
3
- var v = factory(require, exports);
4
- if (v !== undefined) module.exports = v;
5
- }
6
- else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports"], factory);
8
- }
9
- })(function (require, exports) {
10
- "use strict";
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- });
@@ -1,179 +0,0 @@
1
- (function (factory) {
2
- if (typeof module === "object" && typeof module.exports === "object") {
3
- var v = factory(require, exports);
4
- if (v !== undefined) module.exports = v;
5
- }
6
- else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports", "@tsparticles/engine", "./Utils.js"], factory);
8
- }
9
- })(function (require, exports) {
10
- "use strict";
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.LinkInstance = void 0;
13
- const engine_1 = require("@tsparticles/engine");
14
- const Utils_js_1 = require("./Utils.js");
15
- const minOpacity = 0, minWidth = 0, minDistance = 0, maxFrequency = 1, defaultFrequency = 0;
16
- class LinkInstance {
17
- _colorCache = new Map();
18
- _container;
19
- _freqs;
20
- _pluginManager;
21
- constructor(pluginManager, container) {
22
- this._pluginManager = pluginManager;
23
- this._container = container;
24
- this._freqs = { links: new Map(), triangles: new Map() };
25
- }
26
- drawParticle(context, particle) {
27
- const { links, options } = particle;
28
- if (!links?.length || !options.links) {
29
- return;
30
- }
31
- const linkOpts = options.links, width = particle.retina.linksWidth ?? minWidth, pos1 = particle.getPosition(), twinkle = particle.options["twinkle"]?.links, trianglesEnabled = linkOpts.triangles.enable, p1Destinations = trianglesEnabled ? new Set(links.map(l => l.destination.id)) : null, originalAlpha = context.globalAlpha;
32
- let currentColorStyle = "", currentWidth = -1, currentAlpha = -1, pathOpen = false;
33
- const flushLines = () => {
34
- if (pathOpen) {
35
- context.stroke();
36
- pathOpen = false;
37
- }
38
- };
39
- for (const link of links) {
40
- if (linkOpts.frequency < maxFrequency &&
41
- this._getLinkFrequency(particle, link.destination) > linkOpts.frequency) {
42
- continue;
43
- }
44
- const pos2 = link.destination.getPosition();
45
- if (trianglesEnabled && !link.isWarped && p1Destinations) {
46
- flushLines();
47
- this._drawTriangles(options, particle, link, p1Destinations, pos1, pos2, context);
48
- }
49
- if (link.opacity <= minOpacity || width <= minWidth) {
50
- continue;
51
- }
52
- if (!linkOpts.enable) {
53
- continue;
54
- }
55
- let opacity = link.opacity, colorLine = link.color;
56
- const twinkleRgb = twinkle?.enable && (0, engine_1.getRandom)() < twinkle.frequency
57
- ? (0, engine_1.rangeColorToRgb)(this._pluginManager, twinkle.color)
58
- : undefined;
59
- if (twinkle && twinkleRgb) {
60
- colorLine = twinkleRgb;
61
- opacity = (0, engine_1.getRangeValue)(twinkle.opacity);
62
- }
63
- if (!colorLine) {
64
- const linkColor = linkOpts.id !== undefined
65
- ? this._container.particles.linksColors.get(linkOpts.id)
66
- : this._container.particles.linksColor;
67
- colorLine = (0, engine_1.getLinkColor)(particle, link.destination, linkColor);
68
- }
69
- if (!colorLine) {
70
- continue;
71
- }
72
- const colorStyle = this._getCachedStyle(colorLine);
73
- if (colorStyle !== currentColorStyle || width !== currentWidth || opacity !== currentAlpha) {
74
- flushLines();
75
- context.strokeStyle = colorStyle;
76
- context.lineWidth = width;
77
- context.globalAlpha = opacity;
78
- currentColorStyle = colorStyle;
79
- currentWidth = width;
80
- currentAlpha = opacity;
81
- context.beginPath();
82
- pathOpen = true;
83
- }
84
- if (link.isWarped) {
85
- const canvasSize = this._container.canvas.size, dx = pos2.x - pos1.x, dy = pos2.y - pos1.y;
86
- let sx = engine_1.originPoint.x, sy = engine_1.originPoint.y;
87
- if (Math.abs(dx) > canvasSize.width * engine_1.half) {
88
- sx = dx > minDistance ? -canvasSize.width : canvasSize.width;
89
- }
90
- if (Math.abs(dy) > canvasSize.height * engine_1.half) {
91
- sy = dy > minDistance ? -canvasSize.height : canvasSize.height;
92
- }
93
- context.moveTo(pos1.x, pos1.y);
94
- context.lineTo(pos2.x + sx, pos2.y + sy);
95
- context.moveTo(pos1.x - sx, pos1.y - sy);
96
- context.lineTo(pos2.x, pos2.y);
97
- }
98
- else {
99
- context.moveTo(pos1.x, pos1.y);
100
- context.lineTo(pos2.x, pos2.y);
101
- }
102
- }
103
- flushLines();
104
- context.globalAlpha = originalAlpha;
105
- }
106
- init() {
107
- this._freqs.links.clear();
108
- this._freqs.triangles.clear();
109
- this._colorCache.clear();
110
- return Promise.resolve();
111
- }
112
- particleCreated(particle) {
113
- particle.links = [];
114
- if (!particle.options.links) {
115
- return;
116
- }
117
- particle.linksDistance = particle.options.links.distance;
118
- particle.linksWidth = particle.options.links.width;
119
- const ratio = this._container.retina.pixelRatio;
120
- particle.retina.linksDistance = particle.linksDistance * ratio;
121
- particle.retina.linksWidth = particle.linksWidth * ratio;
122
- }
123
- particleDestroyed(particle) {
124
- particle.links = [];
125
- }
126
- _drawTriangles(options, p1, link, p1Destinations, pos1, pos2, context) {
127
- const p2 = link.destination, triangleOptions = options.links?.triangles;
128
- if (!triangleOptions?.enable || !p2.options.links?.triangles.enable) {
129
- return;
130
- }
131
- const p2Links = p2.links;
132
- if (!p2Links?.length) {
133
- return;
134
- }
135
- for (const vertex of p2Links) {
136
- if (vertex.isWarped ||
137
- this._getLinkFrequency(p2, vertex.destination) > p2.options.links.frequency ||
138
- !p1Destinations.has(vertex.destination.id)) {
139
- continue;
140
- }
141
- const p3 = vertex.destination;
142
- if (this._getTriangleFrequency(p1, p2, p3) > (options.links?.triangles.frequency ?? defaultFrequency)) {
143
- continue;
144
- }
145
- const opacityTriangle = triangleOptions.opacity ?? (link.opacity + vertex.opacity) * engine_1.half, colorTriangle = (0, engine_1.rangeColorToRgb)(this._pluginManager, triangleOptions.color) ?? link.color;
146
- if (!colorTriangle || opacityTriangle <= minOpacity) {
147
- continue;
148
- }
149
- const pos3 = p3.getPosition();
150
- context.save();
151
- context.fillStyle = this._getCachedStyle(colorTriangle);
152
- context.globalAlpha = opacityTriangle;
153
- context.beginPath();
154
- context.moveTo(pos1.x, pos1.y);
155
- context.lineTo(pos2.x, pos2.y);
156
- context.lineTo(pos3.x, pos3.y);
157
- context.closePath();
158
- context.fill();
159
- context.restore();
160
- }
161
- }
162
- _getCachedStyle(rgb) {
163
- const key = `${rgb.r},${rgb.g},${rgb.b}`;
164
- let style = this._colorCache.get(key);
165
- if (!style) {
166
- style = (0, engine_1.getStyleFromRgb)(rgb, this._container.hdr);
167
- this._colorCache.set(key, style);
168
- }
169
- return style;
170
- }
171
- _getLinkFrequency(p1, p2) {
172
- return (0, Utils_js_1.setLinkFrequency)([p1, p2], this._freqs.links);
173
- }
174
- _getTriangleFrequency(p1, p2, p3) {
175
- return (0, Utils_js_1.setLinkFrequency)([p1, p2, p3], this._freqs.triangles);
176
- }
177
- }
178
- exports.LinkInstance = LinkInstance;
179
- });
package/umd/Linker.js DELETED
@@ -1,127 +0,0 @@
1
- (function (factory) {
2
- if (typeof module === "object" && typeof module.exports === "object") {
3
- var v = factory(require, exports);
4
- if (v !== undefined) module.exports = v;
5
- }
6
- else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports", "@tsparticles/engine", "./CircleWarp.js", "./Options/Classes/Links.js", "@tsparticles/plugin-interactivity"], factory);
8
- }
9
- })(function (require, exports) {
10
- "use strict";
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.Linker = void 0;
13
- const engine_1 = require("@tsparticles/engine");
14
- const CircleWarp_js_1 = require("./CircleWarp.js");
15
- const Links_js_1 = require("./Options/Classes/Links.js");
16
- const plugin_interactivity_1 = require("@tsparticles/plugin-interactivity");
17
- const opacityOffset = 1, minDistance = 0;
18
- function getWarpDistance(pos1, pos2, canvasSize) {
19
- const { dx, dy } = (0, engine_1.getDistances)(pos1, pos2), absDiffs = { x: Math.abs(dx), y: Math.abs(dy) }, warpDistances = {
20
- x: Math.min(absDiffs.x, canvasSize.width - absDiffs.x),
21
- y: Math.min(absDiffs.y, canvasSize.height - absDiffs.y),
22
- };
23
- return Math.hypot(warpDistances.x, warpDistances.y);
24
- }
25
- class Linker extends plugin_interactivity_1.ParticlesInteractorBase {
26
- _maxDistance;
27
- _pluginManager;
28
- constructor(pluginManager, container) {
29
- super(container);
30
- this._pluginManager = pluginManager;
31
- this._maxDistance = 0;
32
- }
33
- get maxDistance() {
34
- return this._maxDistance;
35
- }
36
- clear() {
37
- }
38
- init() {
39
- this.container.particles.linksColor = undefined;
40
- this.container.particles.linksColors = new Map();
41
- }
42
- interact(p1) {
43
- if (!p1.options.links) {
44
- return;
45
- }
46
- p1.links = [];
47
- if (p1.linksDistance && p1.linksDistance > this._maxDistance) {
48
- this._maxDistance = p1.linksDistance;
49
- }
50
- const pos1 = p1.getPosition(), container = this.container, canvasSize = container.canvas.size;
51
- if (pos1.x < engine_1.originPoint.x || pos1.y < engine_1.originPoint.y || pos1.x > canvasSize.width || pos1.y > canvasSize.height) {
52
- return;
53
- }
54
- const linkOpt1 = p1.options.links, optOpacity = linkOpt1.opacity, optDistance = p1.retina.linksDistance ?? minDistance, warp = linkOpt1.warp, range = warp ? new CircleWarp_js_1.CircleWarp(pos1.x, pos1.y, optDistance, canvasSize) : new engine_1.Circle(pos1.x, pos1.y, optDistance), query = container.particles.grid.query(range);
55
- for (const p2 of query) {
56
- const linkOpt2 = p2.options.links;
57
- if (p1 === p2 ||
58
- !linkOpt2?.enable ||
59
- linkOpt1.id !== linkOpt2.id ||
60
- p2.spawning ||
61
- p2.destroyed ||
62
- !p2.links ||
63
- p1.links.some(t => t.destination === p2) ||
64
- p2.links.some(t => t.destination === p1)) {
65
- continue;
66
- }
67
- const pos2 = p2.getPosition();
68
- if (pos2.x < engine_1.originPoint.x || pos2.y < engine_1.originPoint.y || pos2.x > canvasSize.width || pos2.y > canvasSize.height) {
69
- continue;
70
- }
71
- const distDirect = (0, engine_1.getDistances)(pos1, pos2).distance, distWarp = warp && linkOpt2.warp ? getWarpDistance(pos1, pos2, canvasSize) : distDirect, distance = Math.min(distDirect, distWarp);
72
- if (distance > optDistance) {
73
- continue;
74
- }
75
- const opacityLine = (opacityOffset - distance / optDistance) * optOpacity;
76
- this._setColor(p1);
77
- p1.links.push({
78
- destination: p2,
79
- opacity: opacityLine,
80
- color: this._getLinkColor(p1, p2),
81
- isWarped: distWarp < distDirect,
82
- });
83
- }
84
- }
85
- isEnabled(particle) {
86
- return !!particle.options.links?.enable;
87
- }
88
- loadParticlesOptions(options, ...sources) {
89
- options.links ??= new Links_js_1.Links();
90
- for (const source of sources) {
91
- options.links.load(source?.links);
92
- }
93
- }
94
- reset() {
95
- }
96
- _getLinkColor(p1, p2) {
97
- const container = this.container, linksOptions = p1.options.links;
98
- if (!linksOptions) {
99
- return;
100
- }
101
- const linkColor = linksOptions.id !== undefined
102
- ? container.particles.linksColors.get(linksOptions.id)
103
- : container.particles.linksColor;
104
- return (0, engine_1.getLinkColor)(p1, p2, linkColor);
105
- }
106
- _setColor(p1) {
107
- if (!p1.options.links) {
108
- return;
109
- }
110
- const container = this.container, linksOptions = p1.options.links;
111
- let linkColor = linksOptions.id === undefined
112
- ? container.particles.linksColor
113
- : container.particles.linksColors.get(linksOptions.id);
114
- if (linkColor) {
115
- return;
116
- }
117
- linkColor = (0, engine_1.getLinkRandomColor)(this._pluginManager, linksOptions.color, linksOptions.blink, linksOptions.consent);
118
- if (linksOptions.id === undefined) {
119
- container.particles.linksColor = linkColor;
120
- }
121
- else {
122
- container.particles.linksColors.set(linksOptions.id, linkColor);
123
- }
124
- }
125
- }
126
- exports.Linker = Linker;
127
- });
@@ -1,64 +0,0 @@
1
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2
- if (k2 === undefined) k2 = k;
3
- var desc = Object.getOwnPropertyDescriptor(m, k);
4
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
5
- desc = { enumerable: true, get: function() { return m[k]; } };
6
- }
7
- Object.defineProperty(o, k2, desc);
8
- }) : (function(o, m, k, k2) {
9
- if (k2 === undefined) k2 = k;
10
- o[k2] = m[k];
11
- }));
12
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
13
- Object.defineProperty(o, "default", { enumerable: true, value: v });
14
- }) : function(o, v) {
15
- o["default"] = v;
16
- });
17
- var __importStar = (this && this.__importStar) || (function () {
18
- var ownKeys = function(o) {
19
- ownKeys = Object.getOwnPropertyNames || function (o) {
20
- var ar = [];
21
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
22
- return ar;
23
- };
24
- return ownKeys(o);
25
- };
26
- return function (mod) {
27
- if (mod && mod.__esModule) return mod;
28
- var result = {};
29
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
30
- __setModuleDefault(result, mod);
31
- return result;
32
- };
33
- })();
34
- (function (factory) {
35
- if (typeof module === "object" && typeof module.exports === "object") {
36
- var v = factory(require, exports);
37
- if (v !== undefined) module.exports = v;
38
- }
39
- else if (typeof define === "function" && define.amd) {
40
- define(["require", "exports"], factory);
41
- }
42
- })(function (require, exports) {
43
- "use strict";
44
- var __syncRequire = typeof module === "object" && typeof module.exports === "object";
45
- Object.defineProperty(exports, "__esModule", { value: true });
46
- exports.LinksPlugin = void 0;
47
- class LinksPlugin {
48
- id = "links";
49
- _pluginManager;
50
- constructor(pluginManager) {
51
- this._pluginManager = pluginManager;
52
- }
53
- async getPlugin(container) {
54
- 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));
55
- return new LinkInstance(this._pluginManager, container);
56
- }
57
- loadOptions() {
58
- }
59
- needsPlugin() {
60
- return true;
61
- }
62
- }
63
- exports.LinksPlugin = LinksPlugin;
64
- });
@@ -1,80 +0,0 @@
1
- (function (factory) {
2
- if (typeof module === "object" && typeof module.exports === "object") {
3
- var v = factory(require, exports);
4
- if (v !== undefined) module.exports = v;
5
- }
6
- else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports", "@tsparticles/engine", "./LinksShadow.js", "./LinksTriangle.js"], factory);
8
- }
9
- })(function (require, exports) {
10
- "use strict";
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.Links = void 0;
13
- const engine_1 = require("@tsparticles/engine");
14
- const LinksShadow_js_1 = require("./LinksShadow.js");
15
- const LinksTriangle_js_1 = require("./LinksTriangle.js");
16
- class Links {
17
- blink;
18
- color;
19
- consent;
20
- distance;
21
- enable;
22
- frequency;
23
- id;
24
- opacity;
25
- shadow;
26
- triangles;
27
- warp;
28
- width;
29
- constructor() {
30
- this.blink = false;
31
- this.color = new engine_1.OptionsColor();
32
- this.color.value = "#fff";
33
- this.consent = false;
34
- this.distance = 100;
35
- this.enable = false;
36
- this.frequency = 1;
37
- this.opacity = 1;
38
- this.shadow = new LinksShadow_js_1.LinksShadow();
39
- this.triangles = new LinksTriangle_js_1.LinksTriangle();
40
- this.width = 1;
41
- this.warp = false;
42
- }
43
- load(data) {
44
- if ((0, engine_1.isNull)(data)) {
45
- return;
46
- }
47
- if (data.id !== undefined) {
48
- this.id = data.id;
49
- }
50
- if (data.blink !== undefined) {
51
- this.blink = data.blink;
52
- }
53
- this.color = engine_1.OptionsColor.create(this.color, data.color);
54
- if (data.consent !== undefined) {
55
- this.consent = data.consent;
56
- }
57
- if (data.distance !== undefined) {
58
- this.distance = data.distance;
59
- }
60
- if (data.enable !== undefined) {
61
- this.enable = data.enable;
62
- }
63
- if (data.frequency !== undefined) {
64
- this.frequency = data.frequency;
65
- }
66
- if (data.opacity !== undefined) {
67
- this.opacity = data.opacity;
68
- }
69
- this.shadow.load(data.shadow);
70
- this.triangles.load(data.triangles);
71
- if (data.width !== undefined) {
72
- this.width = data.width;
73
- }
74
- if (data.warp !== undefined) {
75
- this.warp = data.warp;
76
- }
77
- }
78
- }
79
- exports.Links = Links;
80
- });
@@ -1,38 +0,0 @@
1
- (function (factory) {
2
- if (typeof module === "object" && typeof module.exports === "object") {
3
- var v = factory(require, exports);
4
- if (v !== undefined) module.exports = v;
5
- }
6
- else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports", "@tsparticles/engine"], factory);
8
- }
9
- })(function (require, exports) {
10
- "use strict";
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.LinksShadow = void 0;
13
- const engine_1 = require("@tsparticles/engine");
14
- class LinksShadow {
15
- blur;
16
- color;
17
- enable;
18
- constructor() {
19
- this.blur = 5;
20
- this.color = new engine_1.OptionsColor();
21
- this.color.value = "#000";
22
- this.enable = false;
23
- }
24
- load(data) {
25
- if ((0, engine_1.isNull)(data)) {
26
- return;
27
- }
28
- if (data.blur !== undefined) {
29
- this.blur = data.blur;
30
- }
31
- this.color = engine_1.OptionsColor.create(this.color, data.color);
32
- if (data.enable !== undefined) {
33
- this.enable = data.enable;
34
- }
35
- }
36
- }
37
- exports.LinksShadow = LinksShadow;
38
- });
@@ -1,42 +0,0 @@
1
- (function (factory) {
2
- if (typeof module === "object" && typeof module.exports === "object") {
3
- var v = factory(require, exports);
4
- if (v !== undefined) module.exports = v;
5
- }
6
- else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports", "@tsparticles/engine"], factory);
8
- }
9
- })(function (require, exports) {
10
- "use strict";
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.LinksTriangle = void 0;
13
- const engine_1 = require("@tsparticles/engine");
14
- class LinksTriangle {
15
- color;
16
- enable;
17
- frequency;
18
- opacity;
19
- constructor() {
20
- this.enable = false;
21
- this.frequency = 1;
22
- }
23
- load(data) {
24
- if ((0, engine_1.isNull)(data)) {
25
- return;
26
- }
27
- if (data.color !== undefined) {
28
- this.color = engine_1.OptionsColor.create(this.color, data.color);
29
- }
30
- if (data.enable !== undefined) {
31
- this.enable = data.enable;
32
- }
33
- if (data.frequency !== undefined) {
34
- this.frequency = data.frequency;
35
- }
36
- if (data.opacity !== undefined) {
37
- this.opacity = data.opacity;
38
- }
39
- }
40
- }
41
- exports.LinksTriangle = LinksTriangle;
42
- });
@@ -1,12 +0,0 @@
1
- (function (factory) {
2
- if (typeof module === "object" && typeof module.exports === "object") {
3
- var v = factory(require, exports);
4
- if (v !== undefined) module.exports = v;
5
- }
6
- else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports"], factory);
8
- }
9
- })(function (require, exports) {
10
- "use strict";
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- });
@@ -1,12 +0,0 @@
1
- (function (factory) {
2
- if (typeof module === "object" && typeof module.exports === "object") {
3
- var v = factory(require, exports);
4
- if (v !== undefined) module.exports = v;
5
- }
6
- else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports"], factory);
8
- }
9
- })(function (require, exports) {
10
- "use strict";
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- });
@@ -1,12 +0,0 @@
1
- (function (factory) {
2
- if (typeof module === "object" && typeof module.exports === "object") {
3
- var v = factory(require, exports);
4
- if (v !== undefined) module.exports = v;
5
- }
6
- else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports"], factory);
8
- }
9
- })(function (require, exports) {
10
- "use strict";
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- });
package/umd/Types.js DELETED
@@ -1,12 +0,0 @@
1
- (function (factory) {
2
- if (typeof module === "object" && typeof module.exports === "object") {
3
- var v = factory(require, exports);
4
- if (v !== undefined) module.exports = v;
5
- }
6
- else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports"], factory);
8
- }
9
- })(function (require, exports) {
10
- "use strict";
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- });
package/umd/Utils.js DELETED
@@ -1,27 +0,0 @@
1
- (function (factory) {
2
- if (typeof module === "object" && typeof module.exports === "object") {
3
- var v = factory(require, exports);
4
- if (v !== undefined) module.exports = v;
5
- }
6
- else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports", "@tsparticles/engine"], factory);
8
- }
9
- })(function (require, exports) {
10
- "use strict";
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.getLinkKey = getLinkKey;
13
- exports.setLinkFrequency = setLinkFrequency;
14
- const engine_1 = require("@tsparticles/engine");
15
- function getLinkKey(ids) {
16
- return [...ids].sort((a, b) => a - b).join("_");
17
- }
18
- function setLinkFrequency(particles, dictionary) {
19
- const key = getLinkKey(particles.map(t => t.id));
20
- let res = dictionary.get(key);
21
- if (res === undefined) {
22
- res = (0, engine_1.getRandom)();
23
- dictionary.set(key, res);
24
- }
25
- return res;
26
- }
27
- });
package/umd/index.js DELETED
@@ -1,68 +0,0 @@
1
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2
- if (k2 === undefined) k2 = k;
3
- var desc = Object.getOwnPropertyDescriptor(m, k);
4
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
5
- desc = { enumerable: true, get: function() { return m[k]; } };
6
- }
7
- Object.defineProperty(o, k2, desc);
8
- }) : (function(o, m, k, k2) {
9
- if (k2 === undefined) k2 = k;
10
- o[k2] = m[k];
11
- }));
12
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
13
- Object.defineProperty(o, "default", { enumerable: true, value: v });
14
- }) : function(o, v) {
15
- o["default"] = v;
16
- });
17
- var __importStar = (this && this.__importStar) || (function () {
18
- var ownKeys = function(o) {
19
- ownKeys = Object.getOwnPropertyNames || function (o) {
20
- var ar = [];
21
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
22
- return ar;
23
- };
24
- return ownKeys(o);
25
- };
26
- return function (mod) {
27
- if (mod && mod.__esModule) return mod;
28
- var result = {};
29
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
30
- __setModuleDefault(result, mod);
31
- return result;
32
- };
33
- })();
34
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
35
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
36
- };
37
- (function (factory) {
38
- if (typeof module === "object" && typeof module.exports === "object") {
39
- var v = factory(require, exports);
40
- if (v !== undefined) module.exports = v;
41
- }
42
- else if (typeof define === "function" && define.amd) {
43
- define(["require", "exports", "./Options/Classes/Links.js", "./Options/Classes/LinksShadow.js", "./Options/Classes/LinksTriangle.js"], factory);
44
- }
45
- })(function (require, exports) {
46
- "use strict";
47
- var __syncRequire = typeof module === "object" && typeof module.exports === "object";
48
- Object.defineProperty(exports, "__esModule", { value: true });
49
- exports.loadParticlesLinksInteraction = loadParticlesLinksInteraction;
50
- async function loadParticlesLinksInteraction(engine) {
51
- engine.checkVersion("4.0.0-beta.1");
52
- await engine.pluginManager.register(async (e) => {
53
- const pluginManager = e.pluginManager, [{ ensureInteractivityPluginLoaded }, { LinksPlugin },] = await Promise.all([
54
- __syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/plugin-interactivity"))) : new Promise((resolve_1, reject_1) => { require(["@tsparticles/plugin-interactivity"], resolve_1, reject_1); }).then(__importStar),
55
- __syncRequire ? Promise.resolve().then(() => __importStar(require("./LinksPlugin.js"))) : new Promise((resolve_2, reject_2) => { require(["./LinksPlugin.js"], resolve_2, reject_2); }).then(__importStar),
56
- ]);
57
- ensureInteractivityPluginLoaded(e);
58
- pluginManager.addPlugin(new LinksPlugin(pluginManager));
59
- pluginManager.addInteractor?.("particlesLinks", async (container) => {
60
- const { Linker } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./Linker.js"))) : new Promise((resolve_3, reject_3) => { require(["./Linker.js"], resolve_3, reject_3); }).then(__importStar));
61
- return new Linker(pluginManager, container);
62
- });
63
- });
64
- }
65
- __exportStar(require("./Options/Classes/Links.js"), exports);
66
- __exportStar(require("./Options/Classes/LinksShadow.js"), exports);
67
- __exportStar(require("./Options/Classes/LinksTriangle.js"), exports);
68
- });