@tsparticles/interaction-particles-links 3.0.0-beta.3 → 3.0.0-beta.5

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/browser/Linker.js CHANGED
@@ -94,7 +94,7 @@ export class Linker extends ParticlesInteractorBase {
94
94
  options.links = new Links();
95
95
  }
96
96
  for (const source of sources) {
97
- options.links.load(source?.links ?? source?.lineLinked ?? source?.line_linked);
97
+ options.links.load(source?.links);
98
98
  }
99
99
  }
100
100
  reset() {
package/browser/Utils.js CHANGED
@@ -1,4 +1,11 @@
1
- import { drawLine, drawTriangle, getDistance, getDistances, getRandom, getStyleFromRgb, rangeColorToRgb, } from "@tsparticles/engine";
1
+ import { drawLine, getDistance, getDistances, getRandom, getStyleFromRgb, rangeColorToRgb, } from "@tsparticles/engine";
2
+ export function drawTriangle(context, p1, p2, p3) {
3
+ context.beginPath();
4
+ context.moveTo(p1.x, p1.y);
5
+ context.lineTo(p2.x, p2.y);
6
+ context.lineTo(p3.x, p3.y);
7
+ context.closePath();
8
+ }
2
9
  export function drawLinkLine(params) {
3
10
  let drawn = false;
4
11
  const { begin, end, maxDistance, context, canvasSize, width, backgroundMask, colorLine, opacity, links } = params;
package/cjs/Linker.js CHANGED
@@ -97,7 +97,7 @@ class Linker extends engine_1.ParticlesInteractorBase {
97
97
  options.links = new Links_js_1.Links();
98
98
  }
99
99
  for (const source of sources) {
100
- options.links.load(source?.links ?? source?.lineLinked ?? source?.line_linked);
100
+ options.links.load(source?.links);
101
101
  }
102
102
  }
103
103
  reset() {
package/cjs/Utils.js CHANGED
@@ -1,7 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.setLinkFrequency = exports.getLinkKey = exports.drawLinkTriangle = exports.drawLinkLine = void 0;
3
+ exports.setLinkFrequency = exports.getLinkKey = exports.drawLinkTriangle = exports.drawLinkLine = exports.drawTriangle = void 0;
4
4
  const engine_1 = require("@tsparticles/engine");
5
+ function drawTriangle(context, p1, p2, p3) {
6
+ context.beginPath();
7
+ context.moveTo(p1.x, p1.y);
8
+ context.lineTo(p2.x, p2.y);
9
+ context.lineTo(p3.x, p3.y);
10
+ context.closePath();
11
+ }
12
+ exports.drawTriangle = drawTriangle;
5
13
  function drawLinkLine(params) {
6
14
  let drawn = false;
7
15
  const { begin, end, maxDistance, context, canvasSize, width, backgroundMask, colorLine, opacity, links } = params;
@@ -75,7 +83,7 @@ function drawLinkLine(params) {
75
83
  exports.drawLinkLine = drawLinkLine;
76
84
  function drawLinkTriangle(params) {
77
85
  const { context, pos1, pos2, pos3, backgroundMask, colorTriangle, opacityTriangle } = params;
78
- (0, engine_1.drawTriangle)(context, pos1, pos2, pos3);
86
+ drawTriangle(context, pos1, pos2, pos3);
79
87
  if (backgroundMask.enable) {
80
88
  context.globalCompositeOperation = backgroundMask.composite;
81
89
  }
package/esm/Linker.js CHANGED
@@ -94,7 +94,7 @@ export class Linker extends ParticlesInteractorBase {
94
94
  options.links = new Links();
95
95
  }
96
96
  for (const source of sources) {
97
- options.links.load(source?.links ?? source?.lineLinked ?? source?.line_linked);
97
+ options.links.load(source?.links);
98
98
  }
99
99
  }
100
100
  reset() {
package/esm/Utils.js CHANGED
@@ -1,4 +1,11 @@
1
- import { drawLine, drawTriangle, getDistance, getDistances, getRandom, getStyleFromRgb, rangeColorToRgb, } from "@tsparticles/engine";
1
+ import { drawLine, getDistance, getDistances, getRandom, getStyleFromRgb, rangeColorToRgb, } from "@tsparticles/engine";
2
+ export function drawTriangle(context, p1, p2, p3) {
3
+ context.beginPath();
4
+ context.moveTo(p1.x, p1.y);
5
+ context.lineTo(p2.x, p2.y);
6
+ context.lineTo(p3.x, p3.y);
7
+ context.closePath();
8
+ }
2
9
  export function drawLinkLine(params) {
3
10
  let drawn = false;
4
11
  const { begin, end, maxDistance, context, canvasSize, width, backgroundMask, colorLine, opacity, links } = params;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/interaction-particles-links",
3
- "version": "3.0.0-beta.3",
3
+ "version": "3.0.0-beta.5",
4
4
  "description": "tsParticles links particles interaction",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -60,7 +60,7 @@
60
60
  "confettijs",
61
61
  "fireworksjs",
62
62
  "canvas-confetti",
63
- "@tsparticles/plugin",
63
+ "tsparticles-plugin",
64
64
  "@tsparticles/interaction"
65
65
  ],
66
66
  "author": "Matteo Bruni <matteo.bruni@me.com>",
@@ -87,7 +87,7 @@
87
87
  "./package.json": "./package.json"
88
88
  },
89
89
  "dependencies": {
90
- "@tsparticles/engine": "^3.0.0-beta.3"
90
+ "@tsparticles/engine": "^3.0.0-beta.5"
91
91
  },
92
92
  "publishConfig": {
93
93
  "access": "public"