@tsparticles/interaction-particles-links 4.0.0-beta.0 → 4.0.0-beta.2

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.
Files changed (42) hide show
  1. package/212.min.js +1 -0
  2. package/513.min.js +1 -0
  3. package/866.min.js +1 -0
  4. package/browser/LinkInstance.js +7 -5
  5. package/browser/Linker.js +4 -4
  6. package/browser/LinksPlugin.js +5 -4
  7. package/browser/index.js +6 -6
  8. package/cjs/LinkInstance.js +7 -5
  9. package/cjs/Linker.js +4 -4
  10. package/cjs/LinksPlugin.js +5 -4
  11. package/cjs/index.js +6 -6
  12. package/dist_browser_LinkInstance_js.js +2 -2
  13. package/dist_browser_Linker_js.js +2 -2
  14. package/dist_browser_LinksPlugin_js.js +2 -2
  15. package/esm/LinkInstance.js +7 -5
  16. package/esm/Linker.js +4 -4
  17. package/esm/LinksPlugin.js +5 -4
  18. package/esm/index.js +6 -6
  19. package/package.json +12 -8
  20. package/report.html +84 -29
  21. package/tsparticles.interaction.particles.links.js +2 -2
  22. package/tsparticles.interaction.particles.links.min.js +2 -2
  23. package/types/LinkInstance.d.ts +4 -4
  24. package/types/Linker.d.ts +3 -3
  25. package/types/LinksPlugin.d.ts +3 -3
  26. package/13.min.js +0 -1
  27. package/342.min.js +0 -1
  28. package/823.min.js +0 -1
  29. package/umd/CircleWarp.js +0 -63
  30. package/umd/Interfaces.js +0 -12
  31. package/umd/LinkInstance.js +0 -177
  32. package/umd/Linker.js +0 -127
  33. package/umd/LinksPlugin.js +0 -64
  34. package/umd/Options/Classes/Links.js +0 -80
  35. package/umd/Options/Classes/LinksShadow.js +0 -38
  36. package/umd/Options/Classes/LinksTriangle.js +0 -42
  37. package/umd/Options/Interfaces/ILinks.js +0 -12
  38. package/umd/Options/Interfaces/ILinksShadow.js +0 -12
  39. package/umd/Options/Interfaces/ILinksTriangle.js +0 -12
  40. package/umd/Types.js +0 -12
  41. package/umd/Utils.js +0 -27
  42. package/umd/index.js +0 -68
@@ -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.0");
52
- await engine.register(async (e) => {
53
- const [{ 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
- e.addPlugin(new LinksPlugin(e));
59
- e.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(container, e);
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
- });