@tsparticles/interaction-external-attract 3.1.0 → 3.2.1
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/409.min.js +2 -0
- package/409.min.js.LICENSE.txt +1 -0
- package/696.min.js +2 -0
- package/696.min.js.LICENSE.txt +1 -0
- package/browser/Attractor.js +7 -50
- package/browser/Utils.js +45 -0
- package/browser/index.js +4 -2
- package/cjs/Attractor.js +29 -49
- package/cjs/Utils.js +50 -0
- package/cjs/index.js +16 -2
- package/dist_browser_Attractor_js.js +30 -0
- package/dist_browser_Utils_js.js +30 -0
- package/esm/Attractor.js +7 -50
- package/esm/Utils.js +45 -0
- package/esm/index.js +4 -2
- package/package.json +2 -2
- package/report.html +3 -3
- package/tsparticles.interaction.external.attract.js +251 -216
- package/tsparticles.interaction.external.attract.min.js +1 -1
- package/tsparticles.interaction.external.attract.min.js.LICENSE.txt +1 -1
- package/types/Attractor.d.ts +0 -3
- package/types/Utils.d.ts +4 -0
- package/umd/Attractor.js +30 -49
- package/umd/Utils.js +60 -0
- package/umd/index.js +18 -3
package/409.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 409.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_interaction_external_attract=this.webpackChunk_tsparticles_interaction_external_attract||[]).push([[409],{409:(t,c,i)=>{i.d(c,{clickAttract:()=>o,hoverAttract:()=>u});var n=i(533);const e=1,a=1,r=0;function s(t,c,i,r,s){const o=t.actualOptions.interactivity.modes.attract;if(!o)return;const u=t.particles.quadTree.query(r,s);for(const t of u){const{dx:r,dy:s,distance:u}=(0,n.getDistances)(t.position,c),l=o.speed*o.factor,p=(0,n.clamp)((0,n.getEasing)(o.easing)(a-u/i)*l,e,o.maxSpeed),f=n.Vector.create(u?r/u*p:l,u?s/u*p:l);t.position.subFrom(f)}}function o(t,c){t.attract||(t.attract={particles:[]});const{attract:i}=t;if(i.finish||(i.count||(i.count=0),i.count++,i.count===t.particles.count&&(i.finish=!0)),i.clicking){const i=t.interactivity.mouse.clickPosition,e=t.retina.attractModeDistance;if(!e||e<r||!i)return;s(t,i,e,new n.Circle(i.x,i.y,e),(t=>c(t)))}else!1===i.clicking&&(i.particles=[])}function u(t,c){const i=t.interactivity.mouse.position,e=t.retina.attractModeDistance;!e||e<r||!i||s(t,i,e,new n.Circle(i.x,i.y,e),(t=>c(t)))}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Attract External Interaction v3.2.1 by Matteo Bruni */
|
package/696.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 696.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_interaction_external_attract=this.webpackChunk_tsparticles_interaction_external_attract||[]).push([[696],{696:(t,a,i)=>{i.d(a,{Attractor:()=>r});var e=i(533),n=i(368);const c="attract";class r extends e.ExternalInteractorBase{constructor(t,a){super(a),this._engine=t,a.attract||(a.attract={particles:[]}),this.handleClickMode=t=>{const i=this.container.actualOptions.interactivity.modes.attract;if(i&&t===c){a.attract||(a.attract={particles:[]}),a.attract.clicking=!0,a.attract.count=0;for(const t of a.attract.particles)this.isEnabled(t)&&t.velocity.setTo(t.initialVelocity);a.attract.particles=[],a.attract.finish=!1,setTimeout((()=>{a.destroyed||(a.attract||(a.attract={particles:[]}),a.attract.clicking=!1)}),i.duration*e.millisecondsToSeconds)}}}clear(){}init(){const t=this.container,a=t.actualOptions.interactivity.modes.attract;a&&(t.retina.attractModeDistance=a.distance*t.retina.pixelRatio)}async interact(){const t=this.container,a=t.actualOptions,n=t.interactivity.status===e.mouseMoveEvent,r=a.interactivity.events,{enable:s,mode:o}=r.onHover,{enable:l,mode:d}=r.onClick;if(n&&s&&(0,e.isInArray)(c,o)){const{hoverAttract:t}=await i.e(409).then(i.bind(i,409));t(this.container,(t=>this.isEnabled(t)))}else if(l&&(0,e.isInArray)(c,d)){const{clickAttract:t}=await i.e(409).then(i.bind(i,409));t(this.container,(t=>this.isEnabled(t)))}}isEnabled(t){const a=this.container,i=a.actualOptions,n=a.interactivity.mouse,r=(t?.interactivity??i.interactivity).events;if(!(n.position&&r.onHover.enable||n.clickPosition&&r.onClick.enable))return!1;const s=r.onHover.mode,o=r.onClick.mode;return(0,e.isInArray)(c,s)||(0,e.isInArray)(c,o)}loadModeOptions(t,...a){t.attract||(t.attract=new n.L);for(const i of a)t.attract.load(i?.attract)}reset(){}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Attract External Interaction v3.2.1 by Matteo Bruni */
|
package/browser/Attractor.js
CHANGED
|
@@ -1,53 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExternalInteractorBase, isInArray, millisecondsToSeconds, mouseMoveEvent, } from "@tsparticles/engine";
|
|
2
2
|
import { Attract } from "./Options/Classes/Attract.js";
|
|
3
|
-
const attractMode = "attract"
|
|
3
|
+
const attractMode = "attract";
|
|
4
4
|
export class Attractor extends ExternalInteractorBase {
|
|
5
5
|
constructor(engine, container) {
|
|
6
6
|
super(container);
|
|
7
|
-
this._clickAttract = () => {
|
|
8
|
-
const container = this.container;
|
|
9
|
-
if (!container.attract) {
|
|
10
|
-
container.attract = { particles: [] };
|
|
11
|
-
}
|
|
12
|
-
const { attract } = container;
|
|
13
|
-
if (!attract.finish) {
|
|
14
|
-
if (!attract.count) {
|
|
15
|
-
attract.count = 0;
|
|
16
|
-
}
|
|
17
|
-
attract.count++;
|
|
18
|
-
if (attract.count === container.particles.count) {
|
|
19
|
-
attract.finish = true;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
if (attract.clicking) {
|
|
23
|
-
const mousePos = container.interactivity.mouse.clickPosition, attractRadius = container.retina.attractModeDistance;
|
|
24
|
-
if (!attractRadius || attractRadius < minRadius || !mousePos) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
this._processAttract(mousePos, attractRadius, new Circle(mousePos.x, mousePos.y, attractRadius));
|
|
28
|
-
}
|
|
29
|
-
else if (attract.clicking === false) {
|
|
30
|
-
attract.particles = [];
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
this._hoverAttract = () => {
|
|
34
|
-
const container = this.container, mousePos = container.interactivity.mouse.position, attractRadius = container.retina.attractModeDistance;
|
|
35
|
-
if (!attractRadius || attractRadius < minRadius || !mousePos) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
this._processAttract(mousePos, attractRadius, new Circle(mousePos.x, mousePos.y, attractRadius));
|
|
39
|
-
};
|
|
40
|
-
this._processAttract = (position, attractRadius, area) => {
|
|
41
|
-
const container = this.container, attractOptions = container.actualOptions.interactivity.modes.attract;
|
|
42
|
-
if (!attractOptions) {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
const query = container.particles.quadTree.query(area, (p) => this.isEnabled(p));
|
|
46
|
-
for (const particle of query) {
|
|
47
|
-
const { dx, dy, distance } = getDistances(particle.position, position), velocity = attractOptions.speed * attractOptions.factor, attractFactor = clamp(getEasing(attractOptions.easing)(identity - distance / attractRadius) * velocity, minFactor, attractOptions.maxSpeed), normVec = Vector.create(!distance ? velocity : (dx / distance) * attractFactor, !distance ? velocity : (dy / distance) * attractFactor);
|
|
48
|
-
particle.position.subFrom(normVec);
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
7
|
this._engine = engine;
|
|
52
8
|
if (!container.attract) {
|
|
53
9
|
container.attract = { particles: [] };
|
|
@@ -91,14 +47,15 @@ export class Attractor extends ExternalInteractorBase {
|
|
|
91
47
|
container.retina.attractModeDistance = attract.distance * container.retina.pixelRatio;
|
|
92
48
|
}
|
|
93
49
|
async interact() {
|
|
94
|
-
const container = this.container, options = container.actualOptions, mouseMoveStatus = container.interactivity.status === mouseMoveEvent, events = options.interactivity.events,
|
|
50
|
+
const container = this.container, options = container.actualOptions, mouseMoveStatus = container.interactivity.status === mouseMoveEvent, events = options.interactivity.events, { enable: hoverEnabled, mode: hoverMode } = events.onHover, { enable: clickEnabled, mode: clickMode } = events.onClick;
|
|
95
51
|
if (mouseMoveStatus && hoverEnabled && isInArray(attractMode, hoverMode)) {
|
|
96
|
-
|
|
52
|
+
const { hoverAttract } = await import("./Utils.js");
|
|
53
|
+
hoverAttract(this.container, (p) => this.isEnabled(p));
|
|
97
54
|
}
|
|
98
55
|
else if (clickEnabled && isInArray(attractMode, clickMode)) {
|
|
99
|
-
|
|
56
|
+
const { clickAttract } = await import("./Utils.js");
|
|
57
|
+
clickAttract(this.container, (p) => this.isEnabled(p));
|
|
100
58
|
}
|
|
101
|
-
await Promise.resolve();
|
|
102
59
|
}
|
|
103
60
|
isEnabled(particle) {
|
|
104
61
|
const container = this.container, options = container.actualOptions, mouse = container.interactivity.mouse, events = (particle?.interactivity ?? options.interactivity).events;
|
package/browser/Utils.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Circle, Vector, clamp, getDistances, getEasing, } from "@tsparticles/engine";
|
|
2
|
+
const minFactor = 1, identity = 1, minRadius = 0;
|
|
3
|
+
function processAttract(container, position, attractRadius, area, queryCb) {
|
|
4
|
+
const attractOptions = container.actualOptions.interactivity.modes.attract;
|
|
5
|
+
if (!attractOptions) {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
const query = container.particles.quadTree.query(area, queryCb);
|
|
9
|
+
for (const particle of query) {
|
|
10
|
+
const { dx, dy, distance } = getDistances(particle.position, position), velocity = attractOptions.speed * attractOptions.factor, attractFactor = clamp(getEasing(attractOptions.easing)(identity - distance / attractRadius) * velocity, minFactor, attractOptions.maxSpeed), normVec = Vector.create(!distance ? velocity : (dx / distance) * attractFactor, !distance ? velocity : (dy / distance) * attractFactor);
|
|
11
|
+
particle.position.subFrom(normVec);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export function clickAttract(container, enabledCb) {
|
|
15
|
+
if (!container.attract) {
|
|
16
|
+
container.attract = { particles: [] };
|
|
17
|
+
}
|
|
18
|
+
const { attract } = container;
|
|
19
|
+
if (!attract.finish) {
|
|
20
|
+
if (!attract.count) {
|
|
21
|
+
attract.count = 0;
|
|
22
|
+
}
|
|
23
|
+
attract.count++;
|
|
24
|
+
if (attract.count === container.particles.count) {
|
|
25
|
+
attract.finish = true;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
if (attract.clicking) {
|
|
29
|
+
const mousePos = container.interactivity.mouse.clickPosition, attractRadius = container.retina.attractModeDistance;
|
|
30
|
+
if (!attractRadius || attractRadius < minRadius || !mousePos) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
processAttract(container, mousePos, attractRadius, new Circle(mousePos.x, mousePos.y, attractRadius), (p) => enabledCb(p));
|
|
34
|
+
}
|
|
35
|
+
else if (attract.clicking === false) {
|
|
36
|
+
attract.particles = [];
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export function hoverAttract(container, enabledCb) {
|
|
40
|
+
const mousePos = container.interactivity.mouse.position, attractRadius = container.retina.attractModeDistance;
|
|
41
|
+
if (!attractRadius || attractRadius < minRadius || !mousePos) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
processAttract(container, mousePos, attractRadius, new Circle(mousePos.x, mousePos.y, attractRadius), (p) => enabledCb(p));
|
|
45
|
+
}
|
package/browser/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { Attractor } from "./Attractor.js";
|
|
2
1
|
export async function loadExternalAttractInteraction(engine, refresh = true) {
|
|
3
|
-
await engine.addInteractor("externalAttract", (container) =>
|
|
2
|
+
await engine.addInteractor("externalAttract", async (container) => {
|
|
3
|
+
const { Attractor } = await import("./Attractor.js");
|
|
4
|
+
return new Attractor(engine, container);
|
|
5
|
+
}, refresh);
|
|
4
6
|
}
|
|
5
7
|
export * from "./Options/Classes/Attract.js";
|
|
6
8
|
export * from "./Options/Interfaces/IAttract.js";
|
package/cjs/Attractor.js
CHANGED
|
@@ -1,56 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.Attractor = void 0;
|
|
4
27
|
const engine_1 = require("@tsparticles/engine");
|
|
5
28
|
const Attract_js_1 = require("./Options/Classes/Attract.js");
|
|
6
|
-
const attractMode = "attract"
|
|
29
|
+
const attractMode = "attract";
|
|
7
30
|
class Attractor extends engine_1.ExternalInteractorBase {
|
|
8
31
|
constructor(engine, container) {
|
|
9
32
|
super(container);
|
|
10
|
-
this._clickAttract = () => {
|
|
11
|
-
const container = this.container;
|
|
12
|
-
if (!container.attract) {
|
|
13
|
-
container.attract = { particles: [] };
|
|
14
|
-
}
|
|
15
|
-
const { attract } = container;
|
|
16
|
-
if (!attract.finish) {
|
|
17
|
-
if (!attract.count) {
|
|
18
|
-
attract.count = 0;
|
|
19
|
-
}
|
|
20
|
-
attract.count++;
|
|
21
|
-
if (attract.count === container.particles.count) {
|
|
22
|
-
attract.finish = true;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
if (attract.clicking) {
|
|
26
|
-
const mousePos = container.interactivity.mouse.clickPosition, attractRadius = container.retina.attractModeDistance;
|
|
27
|
-
if (!attractRadius || attractRadius < minRadius || !mousePos) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
this._processAttract(mousePos, attractRadius, new engine_1.Circle(mousePos.x, mousePos.y, attractRadius));
|
|
31
|
-
}
|
|
32
|
-
else if (attract.clicking === false) {
|
|
33
|
-
attract.particles = [];
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
this._hoverAttract = () => {
|
|
37
|
-
const container = this.container, mousePos = container.interactivity.mouse.position, attractRadius = container.retina.attractModeDistance;
|
|
38
|
-
if (!attractRadius || attractRadius < minRadius || !mousePos) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
this._processAttract(mousePos, attractRadius, new engine_1.Circle(mousePos.x, mousePos.y, attractRadius));
|
|
42
|
-
};
|
|
43
|
-
this._processAttract = (position, attractRadius, area) => {
|
|
44
|
-
const container = this.container, attractOptions = container.actualOptions.interactivity.modes.attract;
|
|
45
|
-
if (!attractOptions) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
const query = container.particles.quadTree.query(area, (p) => this.isEnabled(p));
|
|
49
|
-
for (const particle of query) {
|
|
50
|
-
const { dx, dy, distance } = (0, engine_1.getDistances)(particle.position, position), velocity = attractOptions.speed * attractOptions.factor, attractFactor = (0, engine_1.clamp)((0, engine_1.getEasing)(attractOptions.easing)(identity - distance / attractRadius) * velocity, minFactor, attractOptions.maxSpeed), normVec = engine_1.Vector.create(!distance ? velocity : (dx / distance) * attractFactor, !distance ? velocity : (dy / distance) * attractFactor);
|
|
51
|
-
particle.position.subFrom(normVec);
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
33
|
this._engine = engine;
|
|
55
34
|
if (!container.attract) {
|
|
56
35
|
container.attract = { particles: [] };
|
|
@@ -94,14 +73,15 @@ class Attractor extends engine_1.ExternalInteractorBase {
|
|
|
94
73
|
container.retina.attractModeDistance = attract.distance * container.retina.pixelRatio;
|
|
95
74
|
}
|
|
96
75
|
async interact() {
|
|
97
|
-
const container = this.container, options = container.actualOptions, mouseMoveStatus = container.interactivity.status === engine_1.mouseMoveEvent, events = options.interactivity.events,
|
|
76
|
+
const container = this.container, options = container.actualOptions, mouseMoveStatus = container.interactivity.status === engine_1.mouseMoveEvent, events = options.interactivity.events, { enable: hoverEnabled, mode: hoverMode } = events.onHover, { enable: clickEnabled, mode: clickMode } = events.onClick;
|
|
98
77
|
if (mouseMoveStatus && hoverEnabled && (0, engine_1.isInArray)(attractMode, hoverMode)) {
|
|
99
|
-
|
|
78
|
+
const { hoverAttract } = await Promise.resolve().then(() => __importStar(require("./Utils.js")));
|
|
79
|
+
hoverAttract(this.container, (p) => this.isEnabled(p));
|
|
100
80
|
}
|
|
101
81
|
else if (clickEnabled && (0, engine_1.isInArray)(attractMode, clickMode)) {
|
|
102
|
-
|
|
82
|
+
const { clickAttract } = await Promise.resolve().then(() => __importStar(require("./Utils.js")));
|
|
83
|
+
clickAttract(this.container, (p) => this.isEnabled(p));
|
|
103
84
|
}
|
|
104
|
-
await Promise.resolve();
|
|
105
85
|
}
|
|
106
86
|
isEnabled(particle) {
|
|
107
87
|
const container = this.container, options = container.actualOptions, mouse = container.interactivity.mouse, events = (particle?.interactivity ?? options.interactivity).events;
|
package/cjs/Utils.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.hoverAttract = exports.clickAttract = void 0;
|
|
4
|
+
const engine_1 = require("@tsparticles/engine");
|
|
5
|
+
const minFactor = 1, identity = 1, minRadius = 0;
|
|
6
|
+
function processAttract(container, position, attractRadius, area, queryCb) {
|
|
7
|
+
const attractOptions = container.actualOptions.interactivity.modes.attract;
|
|
8
|
+
if (!attractOptions) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
const query = container.particles.quadTree.query(area, queryCb);
|
|
12
|
+
for (const particle of query) {
|
|
13
|
+
const { dx, dy, distance } = (0, engine_1.getDistances)(particle.position, position), velocity = attractOptions.speed * attractOptions.factor, attractFactor = (0, engine_1.clamp)((0, engine_1.getEasing)(attractOptions.easing)(identity - distance / attractRadius) * velocity, minFactor, attractOptions.maxSpeed), normVec = engine_1.Vector.create(!distance ? velocity : (dx / distance) * attractFactor, !distance ? velocity : (dy / distance) * attractFactor);
|
|
14
|
+
particle.position.subFrom(normVec);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function clickAttract(container, enabledCb) {
|
|
18
|
+
if (!container.attract) {
|
|
19
|
+
container.attract = { particles: [] };
|
|
20
|
+
}
|
|
21
|
+
const { attract } = container;
|
|
22
|
+
if (!attract.finish) {
|
|
23
|
+
if (!attract.count) {
|
|
24
|
+
attract.count = 0;
|
|
25
|
+
}
|
|
26
|
+
attract.count++;
|
|
27
|
+
if (attract.count === container.particles.count) {
|
|
28
|
+
attract.finish = true;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
if (attract.clicking) {
|
|
32
|
+
const mousePos = container.interactivity.mouse.clickPosition, attractRadius = container.retina.attractModeDistance;
|
|
33
|
+
if (!attractRadius || attractRadius < minRadius || !mousePos) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
processAttract(container, mousePos, attractRadius, new engine_1.Circle(mousePos.x, mousePos.y, attractRadius), (p) => enabledCb(p));
|
|
37
|
+
}
|
|
38
|
+
else if (attract.clicking === false) {
|
|
39
|
+
attract.particles = [];
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.clickAttract = clickAttract;
|
|
43
|
+
function hoverAttract(container, enabledCb) {
|
|
44
|
+
const mousePos = container.interactivity.mouse.position, attractRadius = container.retina.attractModeDistance;
|
|
45
|
+
if (!attractRadius || attractRadius < minRadius || !mousePos) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
processAttract(container, mousePos, attractRadius, new engine_1.Circle(mousePos.x, mousePos.y, attractRadius), (p) => enabledCb(p));
|
|
49
|
+
}
|
|
50
|
+
exports.hoverAttract = hoverAttract;
|
package/cjs/index.js
CHANGED
|
@@ -10,14 +10,28 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
11
|
o[k2] = m[k];
|
|
12
12
|
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
13
25
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
26
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
27
|
};
|
|
16
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
29
|
exports.loadExternalAttractInteraction = void 0;
|
|
18
|
-
const Attractor_js_1 = require("./Attractor.js");
|
|
19
30
|
async function loadExternalAttractInteraction(engine, refresh = true) {
|
|
20
|
-
await engine.addInteractor("externalAttract", (container) =>
|
|
31
|
+
await engine.addInteractor("externalAttract", async (container) => {
|
|
32
|
+
const { Attractor } = await Promise.resolve().then(() => __importStar(require("./Attractor.js")));
|
|
33
|
+
return new Attractor(engine, container);
|
|
34
|
+
}, refresh);
|
|
21
35
|
}
|
|
22
36
|
exports.loadExternalAttractInteraction = loadExternalAttractInteraction;
|
|
23
37
|
__exportStar(require("./Options/Classes/Attract.js"), exports);
|
|
@@ -0,0 +1,30 @@
|
|
|
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_external_attract"] = this["webpackChunk_tsparticles_interaction_external_attract"] || []).push([["dist_browser_Attractor_js"],{
|
|
19
|
+
|
|
20
|
+
/***/ "./dist/browser/Attractor.js":
|
|
21
|
+
/*!***********************************!*\
|
|
22
|
+
!*** ./dist/browser/Attractor.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 */ Attractor: () => (/* binding */ Attractor)\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/* harmony import */ var _Options_Classes_Attract_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Options/Classes/Attract.js */ \"./dist/browser/Options/Classes/Attract.js\");\n\n\nconst attractMode = \"attract\";\nclass Attractor extends _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ExternalInteractorBase {\n constructor(engine, container) {\n super(container);\n this._engine = engine;\n if (!container.attract) {\n container.attract = {\n particles: []\n };\n }\n this.handleClickMode = mode => {\n const options = this.container.actualOptions,\n attract = options.interactivity.modes.attract;\n if (!attract || mode !== attractMode) {\n return;\n }\n if (!container.attract) {\n container.attract = {\n particles: []\n };\n }\n container.attract.clicking = true;\n container.attract.count = 0;\n for (const particle of container.attract.particles) {\n if (!this.isEnabled(particle)) {\n continue;\n }\n particle.velocity.setTo(particle.initialVelocity);\n }\n container.attract.particles = [];\n container.attract.finish = false;\n setTimeout(() => {\n if (container.destroyed) {\n return;\n }\n if (!container.attract) {\n container.attract = {\n particles: []\n };\n }\n container.attract.clicking = false;\n }, attract.duration * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.millisecondsToSeconds);\n };\n }\n clear() {}\n init() {\n const container = this.container,\n attract = container.actualOptions.interactivity.modes.attract;\n if (!attract) {\n return;\n }\n container.retina.attractModeDistance = attract.distance * container.retina.pixelRatio;\n }\n async interact() {\n const container = this.container,\n options = container.actualOptions,\n mouseMoveStatus = container.interactivity.status === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.mouseMoveEvent,\n events = options.interactivity.events,\n {\n enable: hoverEnabled,\n mode: hoverMode\n } = events.onHover,\n {\n enable: clickEnabled,\n mode: clickMode\n } = events.onClick;\n if (mouseMoveStatus && hoverEnabled && (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isInArray)(attractMode, hoverMode)) {\n const {\n hoverAttract\n } = await __webpack_require__.e(/*! import() */ \"dist_browser_Utils_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./Utils.js */ \"./dist/browser/Utils.js\"));\n hoverAttract(this.container, p => this.isEnabled(p));\n } else if (clickEnabled && (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isInArray)(attractMode, clickMode)) {\n const {\n clickAttract\n } = await __webpack_require__.e(/*! import() */ \"dist_browser_Utils_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./Utils.js */ \"./dist/browser/Utils.js\"));\n clickAttract(this.container, p => this.isEnabled(p));\n }\n }\n isEnabled(particle) {\n const container = this.container,\n options = container.actualOptions,\n mouse = container.interactivity.mouse,\n events = (particle?.interactivity ?? options.interactivity).events;\n if ((!mouse.position || !events.onHover.enable) && (!mouse.clickPosition || !events.onClick.enable)) {\n return false;\n }\n const hoverMode = events.onHover.mode,\n clickMode = events.onClick.mode;\n return (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isInArray)(attractMode, hoverMode) || (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isInArray)(attractMode, clickMode);\n }\n loadModeOptions(options, ...sources) {\n if (!options.attract) {\n options.attract = new _Options_Classes_Attract_js__WEBPACK_IMPORTED_MODULE_1__.Attract();\n }\n for (const source of sources) {\n options.attract.load(source?.attract);\n }\n }\n reset() {}\n}\n\n//# sourceURL=webpack://@tsparticles/interaction-external-attract/./dist/browser/Attractor.js?");
|
|
27
|
+
|
|
28
|
+
/***/ })
|
|
29
|
+
|
|
30
|
+
}]);
|
|
@@ -0,0 +1,30 @@
|
|
|
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_external_attract"] = this["webpackChunk_tsparticles_interaction_external_attract"] || []).push([["dist_browser_Utils_js"],{
|
|
19
|
+
|
|
20
|
+
/***/ "./dist/browser/Utils.js":
|
|
21
|
+
/*!*******************************!*\
|
|
22
|
+
!*** ./dist/browser/Utils.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 */ clickAttract: () => (/* binding */ clickAttract),\n/* harmony export */ hoverAttract: () => (/* binding */ hoverAttract)\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 minFactor = 1,\n identity = 1,\n minRadius = 0;\nfunction processAttract(container, position, attractRadius, area, queryCb) {\n const attractOptions = container.actualOptions.interactivity.modes.attract;\n if (!attractOptions) {\n return;\n }\n const query = container.particles.quadTree.query(area, queryCb);\n for (const particle of query) {\n const {\n dx,\n dy,\n distance\n } = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getDistances)(particle.position, position),\n velocity = attractOptions.speed * attractOptions.factor,\n attractFactor = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.clamp)((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getEasing)(attractOptions.easing)(identity - distance / attractRadius) * velocity, minFactor, attractOptions.maxSpeed),\n normVec = _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.Vector.create(!distance ? velocity : dx / distance * attractFactor, !distance ? velocity : dy / distance * attractFactor);\n particle.position.subFrom(normVec);\n }\n}\nfunction clickAttract(container, enabledCb) {\n if (!container.attract) {\n container.attract = {\n particles: []\n };\n }\n const {\n attract\n } = container;\n if (!attract.finish) {\n if (!attract.count) {\n attract.count = 0;\n }\n attract.count++;\n if (attract.count === container.particles.count) {\n attract.finish = true;\n }\n }\n if (attract.clicking) {\n const mousePos = container.interactivity.mouse.clickPosition,\n attractRadius = container.retina.attractModeDistance;\n if (!attractRadius || attractRadius < minRadius || !mousePos) {\n return;\n }\n processAttract(container, mousePos, attractRadius, new _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.Circle(mousePos.x, mousePos.y, attractRadius), p => enabledCb(p));\n } else if (attract.clicking === false) {\n attract.particles = [];\n }\n}\nfunction hoverAttract(container, enabledCb) {\n const mousePos = container.interactivity.mouse.position,\n attractRadius = container.retina.attractModeDistance;\n if (!attractRadius || attractRadius < minRadius || !mousePos) {\n return;\n }\n processAttract(container, mousePos, attractRadius, new _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.Circle(mousePos.x, mousePos.y, attractRadius), p => enabledCb(p));\n}\n\n//# sourceURL=webpack://@tsparticles/interaction-external-attract/./dist/browser/Utils.js?");
|
|
27
|
+
|
|
28
|
+
/***/ })
|
|
29
|
+
|
|
30
|
+
}]);
|
package/esm/Attractor.js
CHANGED
|
@@ -1,53 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExternalInteractorBase, isInArray, millisecondsToSeconds, mouseMoveEvent, } from "@tsparticles/engine";
|
|
2
2
|
import { Attract } from "./Options/Classes/Attract.js";
|
|
3
|
-
const attractMode = "attract"
|
|
3
|
+
const attractMode = "attract";
|
|
4
4
|
export class Attractor extends ExternalInteractorBase {
|
|
5
5
|
constructor(engine, container) {
|
|
6
6
|
super(container);
|
|
7
|
-
this._clickAttract = () => {
|
|
8
|
-
const container = this.container;
|
|
9
|
-
if (!container.attract) {
|
|
10
|
-
container.attract = { particles: [] };
|
|
11
|
-
}
|
|
12
|
-
const { attract } = container;
|
|
13
|
-
if (!attract.finish) {
|
|
14
|
-
if (!attract.count) {
|
|
15
|
-
attract.count = 0;
|
|
16
|
-
}
|
|
17
|
-
attract.count++;
|
|
18
|
-
if (attract.count === container.particles.count) {
|
|
19
|
-
attract.finish = true;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
if (attract.clicking) {
|
|
23
|
-
const mousePos = container.interactivity.mouse.clickPosition, attractRadius = container.retina.attractModeDistance;
|
|
24
|
-
if (!attractRadius || attractRadius < minRadius || !mousePos) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
this._processAttract(mousePos, attractRadius, new Circle(mousePos.x, mousePos.y, attractRadius));
|
|
28
|
-
}
|
|
29
|
-
else if (attract.clicking === false) {
|
|
30
|
-
attract.particles = [];
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
this._hoverAttract = () => {
|
|
34
|
-
const container = this.container, mousePos = container.interactivity.mouse.position, attractRadius = container.retina.attractModeDistance;
|
|
35
|
-
if (!attractRadius || attractRadius < minRadius || !mousePos) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
this._processAttract(mousePos, attractRadius, new Circle(mousePos.x, mousePos.y, attractRadius));
|
|
39
|
-
};
|
|
40
|
-
this._processAttract = (position, attractRadius, area) => {
|
|
41
|
-
const container = this.container, attractOptions = container.actualOptions.interactivity.modes.attract;
|
|
42
|
-
if (!attractOptions) {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
const query = container.particles.quadTree.query(area, (p) => this.isEnabled(p));
|
|
46
|
-
for (const particle of query) {
|
|
47
|
-
const { dx, dy, distance } = getDistances(particle.position, position), velocity = attractOptions.speed * attractOptions.factor, attractFactor = clamp(getEasing(attractOptions.easing)(identity - distance / attractRadius) * velocity, minFactor, attractOptions.maxSpeed), normVec = Vector.create(!distance ? velocity : (dx / distance) * attractFactor, !distance ? velocity : (dy / distance) * attractFactor);
|
|
48
|
-
particle.position.subFrom(normVec);
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
7
|
this._engine = engine;
|
|
52
8
|
if (!container.attract) {
|
|
53
9
|
container.attract = { particles: [] };
|
|
@@ -91,14 +47,15 @@ export class Attractor extends ExternalInteractorBase {
|
|
|
91
47
|
container.retina.attractModeDistance = attract.distance * container.retina.pixelRatio;
|
|
92
48
|
}
|
|
93
49
|
async interact() {
|
|
94
|
-
const container = this.container, options = container.actualOptions, mouseMoveStatus = container.interactivity.status === mouseMoveEvent, events = options.interactivity.events,
|
|
50
|
+
const container = this.container, options = container.actualOptions, mouseMoveStatus = container.interactivity.status === mouseMoveEvent, events = options.interactivity.events, { enable: hoverEnabled, mode: hoverMode } = events.onHover, { enable: clickEnabled, mode: clickMode } = events.onClick;
|
|
95
51
|
if (mouseMoveStatus && hoverEnabled && isInArray(attractMode, hoverMode)) {
|
|
96
|
-
|
|
52
|
+
const { hoverAttract } = await import("./Utils.js");
|
|
53
|
+
hoverAttract(this.container, (p) => this.isEnabled(p));
|
|
97
54
|
}
|
|
98
55
|
else if (clickEnabled && isInArray(attractMode, clickMode)) {
|
|
99
|
-
|
|
56
|
+
const { clickAttract } = await import("./Utils.js");
|
|
57
|
+
clickAttract(this.container, (p) => this.isEnabled(p));
|
|
100
58
|
}
|
|
101
|
-
await Promise.resolve();
|
|
102
59
|
}
|
|
103
60
|
isEnabled(particle) {
|
|
104
61
|
const container = this.container, options = container.actualOptions, mouse = container.interactivity.mouse, events = (particle?.interactivity ?? options.interactivity).events;
|
package/esm/Utils.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Circle, Vector, clamp, getDistances, getEasing, } from "@tsparticles/engine";
|
|
2
|
+
const minFactor = 1, identity = 1, minRadius = 0;
|
|
3
|
+
function processAttract(container, position, attractRadius, area, queryCb) {
|
|
4
|
+
const attractOptions = container.actualOptions.interactivity.modes.attract;
|
|
5
|
+
if (!attractOptions) {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
const query = container.particles.quadTree.query(area, queryCb);
|
|
9
|
+
for (const particle of query) {
|
|
10
|
+
const { dx, dy, distance } = getDistances(particle.position, position), velocity = attractOptions.speed * attractOptions.factor, attractFactor = clamp(getEasing(attractOptions.easing)(identity - distance / attractRadius) * velocity, minFactor, attractOptions.maxSpeed), normVec = Vector.create(!distance ? velocity : (dx / distance) * attractFactor, !distance ? velocity : (dy / distance) * attractFactor);
|
|
11
|
+
particle.position.subFrom(normVec);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export function clickAttract(container, enabledCb) {
|
|
15
|
+
if (!container.attract) {
|
|
16
|
+
container.attract = { particles: [] };
|
|
17
|
+
}
|
|
18
|
+
const { attract } = container;
|
|
19
|
+
if (!attract.finish) {
|
|
20
|
+
if (!attract.count) {
|
|
21
|
+
attract.count = 0;
|
|
22
|
+
}
|
|
23
|
+
attract.count++;
|
|
24
|
+
if (attract.count === container.particles.count) {
|
|
25
|
+
attract.finish = true;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
if (attract.clicking) {
|
|
29
|
+
const mousePos = container.interactivity.mouse.clickPosition, attractRadius = container.retina.attractModeDistance;
|
|
30
|
+
if (!attractRadius || attractRadius < minRadius || !mousePos) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
processAttract(container, mousePos, attractRadius, new Circle(mousePos.x, mousePos.y, attractRadius), (p) => enabledCb(p));
|
|
34
|
+
}
|
|
35
|
+
else if (attract.clicking === false) {
|
|
36
|
+
attract.particles = [];
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export function hoverAttract(container, enabledCb) {
|
|
40
|
+
const mousePos = container.interactivity.mouse.position, attractRadius = container.retina.attractModeDistance;
|
|
41
|
+
if (!attractRadius || attractRadius < minRadius || !mousePos) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
processAttract(container, mousePos, attractRadius, new Circle(mousePos.x, mousePos.y, attractRadius), (p) => enabledCb(p));
|
|
45
|
+
}
|
package/esm/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { Attractor } from "./Attractor.js";
|
|
2
1
|
export async function loadExternalAttractInteraction(engine, refresh = true) {
|
|
3
|
-
await engine.addInteractor("externalAttract", (container) =>
|
|
2
|
+
await engine.addInteractor("externalAttract", async (container) => {
|
|
3
|
+
const { Attractor } = await import("./Attractor.js");
|
|
4
|
+
return new Attractor(engine, container);
|
|
5
|
+
}, refresh);
|
|
4
6
|
}
|
|
5
7
|
export * from "./Options/Classes/Attract.js";
|
|
6
8
|
export * from "./Options/Interfaces/IAttract.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/interaction-external-attract",
|
|
3
|
-
"version": "3.1
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"description": "tsParticles attract external 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.1
|
|
90
|
+
"@tsparticles/engine": "^3.2.1"
|
|
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-external-attract [
|
|
6
|
+
<title>@tsparticles/interaction-external-attract [31 Jan 2024 at 09:48]</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>
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
<body>
|
|
32
32
|
<div id="app"></div>
|
|
33
33
|
<script>
|
|
34
|
-
window.chartData = [
|
|
35
|
-
window.entrypoints = ["tsparticles.interaction.external.attract
|
|
34
|
+
window.chartData = [];
|
|
35
|
+
window.entrypoints = ["tsparticles.interaction.external.attract.min"];
|
|
36
36
|
window.defaultSizes = "parsed";
|
|
37
37
|
</script>
|
|
38
38
|
</body>
|