@tsparticles/interaction-external-repulse 4.0.0-alpha.8 → 4.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/747.min.js +1 -0
- package/README.md +5 -0
- package/browser/Options/Classes/Repulse.js +1 -0
- package/browser/Options/Classes/RepulseBase.js +6 -0
- package/browser/Options/Classes/RepulseDiv.js +1 -0
- package/browser/Repulser.js +92 -77
- package/browser/index.js +3 -3
- package/cjs/Options/Classes/Repulse.js +1 -0
- package/cjs/Options/Classes/RepulseBase.js +6 -0
- package/cjs/Options/Classes/RepulseDiv.js +1 -0
- package/cjs/Repulser.js +92 -77
- package/cjs/index.js +3 -3
- package/dist_browser_Repulser_js.js +2 -2
- package/esm/Options/Classes/Repulse.js +1 -0
- package/esm/Options/Classes/RepulseBase.js +6 -0
- package/esm/Options/Classes/RepulseDiv.js +1 -0
- package/esm/Repulser.js +92 -77
- package/esm/index.js +3 -3
- package/package.json +3 -3
- package/report.html +1 -1
- package/tsparticles.interaction.external.repulse.js +45 -33
- package/tsparticles.interaction.external.repulse.min.js +2 -2
- package/types/Repulser.d.ts +4 -0
- package/umd/Options/Classes/Repulse.js +1 -0
- package/umd/Options/Classes/RepulseBase.js +6 -0
- package/umd/Options/Classes/RepulseDiv.js +1 -0
- package/umd/Repulser.js +92 -77
- package/umd/index.js +3 -3
- package/783.min.js +0 -2
- package/783.min.js.LICENSE.txt +0 -1
- package/tsparticles.interaction.external.repulse.min.js.LICENSE.txt +0 -1
package/esm/Repulser.js
CHANGED
|
@@ -3,86 +3,17 @@ import { DivType, ExternalInteractorBase, divMode, divModeExecute, isDivModeEnab
|
|
|
3
3
|
import { Repulse } from "./Options/Classes/Repulse.js";
|
|
4
4
|
const repulseMode = "repulse", minDistance = 0, repulseRadiusFactor = 6, repulseRadiusPower = 3, squarePower = 2, minRadius = 0, minSpeed = 0, easingOffset = 1;
|
|
5
5
|
export class Repulser extends ExternalInteractorBase {
|
|
6
|
+
handleClickMode;
|
|
7
|
+
_clickVec;
|
|
8
|
+
_engine;
|
|
9
|
+
_maxDistance;
|
|
10
|
+
_normVec;
|
|
6
11
|
constructor(engine, container) {
|
|
7
12
|
super(container);
|
|
8
|
-
this._clickRepulse = interactivityData => {
|
|
9
|
-
const container = this.container, repulseOptions = container.actualOptions.interactivity?.modes.repulse;
|
|
10
|
-
if (!repulseOptions) {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
const repulse = container.repulse ?? { particles: [] };
|
|
14
|
-
if (!repulse.finish) {
|
|
15
|
-
repulse.count ??= 0;
|
|
16
|
-
repulse.count++;
|
|
17
|
-
if (repulse.count === container.particles.count) {
|
|
18
|
-
repulse.finish = true;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
if (repulse.clicking) {
|
|
22
|
-
const repulseDistance = container.retina.repulseModeDistance;
|
|
23
|
-
if (!repulseDistance || repulseDistance < minDistance) {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
const repulseRadius = Math.pow(repulseDistance / repulseRadiusFactor, repulseRadiusPower), mouseClickPos = interactivityData.mouse.clickPosition;
|
|
27
|
-
if (mouseClickPos === undefined) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
const range = new Circle(mouseClickPos.x, mouseClickPos.y, repulseRadius), query = container.particles.quadTree.query(range, p => this.isEnabled(interactivityData, p));
|
|
31
|
-
for (const particle of query) {
|
|
32
|
-
const { dx, dy, distance } = getDistances(mouseClickPos, particle.position), d = distance ** squarePower, velocity = repulseOptions.speed, force = (-repulseRadius * velocity) / d;
|
|
33
|
-
if (d <= repulseRadius) {
|
|
34
|
-
repulse.particles.push(particle);
|
|
35
|
-
const vect = Vector.create(dx, dy);
|
|
36
|
-
vect.length = force;
|
|
37
|
-
particle.velocity.setTo(vect);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
else if (repulse.clicking === false) {
|
|
42
|
-
for (const particle of repulse.particles) {
|
|
43
|
-
particle.velocity.setTo(particle.initialVelocity);
|
|
44
|
-
}
|
|
45
|
-
repulse.particles = [];
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
this._hoverRepulse = interactivityData => {
|
|
49
|
-
const container = this.container, mousePos = interactivityData.mouse.position, repulseRadius = container.retina.repulseModeDistance;
|
|
50
|
-
if (!repulseRadius || repulseRadius < minRadius || !mousePos) {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
this._processRepulse(interactivityData, mousePos, repulseRadius, new Circle(mousePos.x, mousePos.y, repulseRadius));
|
|
54
|
-
};
|
|
55
|
-
this._processRepulse = (interactivityData, position, repulseRadius, area, divRepulse) => {
|
|
56
|
-
const container = this.container, query = container.particles.quadTree.query(area, p => this.isEnabled(interactivityData, p)), repulseOptions = container.actualOptions.interactivity?.modes.repulse;
|
|
57
|
-
if (!repulseOptions) {
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
const { easing, speed, factor, maxSpeed } = repulseOptions, easingFunc = this._engine.getEasing(easing), velocity = (divRepulse?.speed ?? speed) * factor;
|
|
61
|
-
for (const particle of query) {
|
|
62
|
-
const { dx, dy, distance } = getDistances(particle.position, position), repulseFactor = clamp(easingFunc(easingOffset - distance / repulseRadius) * velocity, minSpeed, maxSpeed), normVec = Vector.create(!distance ? velocity : (dx / distance) * repulseFactor, !distance ? velocity : (dy / distance) * repulseFactor);
|
|
63
|
-
particle.position.addTo(normVec);
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
this._singleSelectorRepulse = (interactivityData, selector, div) => {
|
|
67
|
-
const container = this.container, repulse = container.actualOptions.interactivity?.modes.repulse;
|
|
68
|
-
if (!repulse) {
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
const query = safeDocument().querySelectorAll(selector);
|
|
72
|
-
if (!query.length) {
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
query.forEach(item => {
|
|
76
|
-
const elem = item, pxRatio = container.retina.pixelRatio, pos = {
|
|
77
|
-
x: (elem.offsetLeft + elem.offsetWidth * half) * pxRatio,
|
|
78
|
-
y: (elem.offsetTop + elem.offsetHeight * half) * pxRatio,
|
|
79
|
-
}, repulseRadius = elem.offsetWidth * half * pxRatio, area = div.type === DivType.circle
|
|
80
|
-
? new Circle(pos.x, pos.y, repulseRadius)
|
|
81
|
-
: new Rectangle(elem.offsetLeft * pxRatio, elem.offsetTop * pxRatio, elem.offsetWidth * pxRatio, elem.offsetHeight * pxRatio), divs = repulse.divs, divRepulse = divMode(divs, elem);
|
|
82
|
-
this._processRepulse(interactivityData, pos, repulseRadius, area, divRepulse);
|
|
83
|
-
});
|
|
84
|
-
};
|
|
85
13
|
this._engine = engine;
|
|
14
|
+
this._maxDistance = 0;
|
|
15
|
+
this._normVec = Vector.origin;
|
|
16
|
+
this._clickVec = Vector.origin;
|
|
86
17
|
container.repulse ??= { particles: [] };
|
|
87
18
|
this.handleClickMode = (mode, interactivityData) => {
|
|
88
19
|
const options = this.container.actualOptions, repulseOpts = options.interactivity?.modes.repulse;
|
|
@@ -109,6 +40,9 @@ export class Repulser extends ExternalInteractorBase {
|
|
|
109
40
|
}, repulseOpts.duration * millisecondsToSeconds);
|
|
110
41
|
};
|
|
111
42
|
}
|
|
43
|
+
get maxDistance() {
|
|
44
|
+
return this._maxDistance;
|
|
45
|
+
}
|
|
112
46
|
clear() {
|
|
113
47
|
}
|
|
114
48
|
init() {
|
|
@@ -116,6 +50,7 @@ export class Repulser extends ExternalInteractorBase {
|
|
|
116
50
|
if (!repulse) {
|
|
117
51
|
return;
|
|
118
52
|
}
|
|
53
|
+
this._maxDistance = repulse.distance;
|
|
119
54
|
container.retina.repulseModeDistance = repulse.distance * container.retina.pixelRatio;
|
|
120
55
|
}
|
|
121
56
|
interact(interactivityData) {
|
|
@@ -156,4 +91,84 @@ export class Repulser extends ExternalInteractorBase {
|
|
|
156
91
|
}
|
|
157
92
|
reset() {
|
|
158
93
|
}
|
|
94
|
+
_clickRepulse = interactivityData => {
|
|
95
|
+
const container = this.container, repulseOptions = container.actualOptions.interactivity?.modes.repulse;
|
|
96
|
+
if (!repulseOptions) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
const repulse = container.repulse ?? { particles: [] };
|
|
100
|
+
if (!repulse.finish) {
|
|
101
|
+
repulse.count ??= 0;
|
|
102
|
+
repulse.count++;
|
|
103
|
+
if (repulse.count === container.particles.count) {
|
|
104
|
+
repulse.finish = true;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
if (repulse.clicking) {
|
|
108
|
+
const repulseDistance = container.retina.repulseModeDistance;
|
|
109
|
+
if (!repulseDistance || repulseDistance < minDistance) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
const repulseRadius = Math.pow(repulseDistance / repulseRadiusFactor, repulseRadiusPower), mouseClickPos = interactivityData.mouse.clickPosition;
|
|
113
|
+
if (mouseClickPos === undefined) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
const range = new Circle(mouseClickPos.x, mouseClickPos.y, repulseRadius), query = container.particles.grid.query(range, p => this.isEnabled(interactivityData, p));
|
|
117
|
+
for (const particle of query) {
|
|
118
|
+
const { dx, dy, distance } = getDistances(mouseClickPos, particle.position), d = distance ** squarePower, velocity = repulseOptions.speed, force = (-repulseRadius * velocity) / d;
|
|
119
|
+
if (d <= repulseRadius) {
|
|
120
|
+
repulse.particles.push(particle);
|
|
121
|
+
this._clickVec.x = dx;
|
|
122
|
+
this._clickVec.y = dy;
|
|
123
|
+
this._clickVec.length = force;
|
|
124
|
+
particle.velocity.setTo(this._clickVec);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
else if (repulse.clicking === false) {
|
|
129
|
+
for (const particle of repulse.particles) {
|
|
130
|
+
particle.velocity.setTo(particle.initialVelocity);
|
|
131
|
+
}
|
|
132
|
+
repulse.particles = [];
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
_hoverRepulse = interactivityData => {
|
|
136
|
+
const container = this.container, mousePos = interactivityData.mouse.position, repulseRadius = container.retina.repulseModeDistance;
|
|
137
|
+
if (!repulseRadius || repulseRadius < minRadius || !mousePos) {
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
this._processRepulse(interactivityData, mousePos, repulseRadius, new Circle(mousePos.x, mousePos.y, repulseRadius));
|
|
141
|
+
};
|
|
142
|
+
_processRepulse = (interactivityData, position, repulseRadius, area, divRepulse) => {
|
|
143
|
+
const container = this.container, query = container.particles.grid.query(area, p => this.isEnabled(interactivityData, p)), repulseOptions = container.actualOptions.interactivity?.modes.repulse;
|
|
144
|
+
if (!repulseOptions) {
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
const { easing, speed, factor, maxSpeed } = repulseOptions, easingFunc = this._engine.getEasing(easing), velocity = (divRepulse?.speed ?? speed) * factor;
|
|
148
|
+
for (const particle of query) {
|
|
149
|
+
const { dx, dy, distance } = getDistances(particle.position, position), repulseFactor = clamp(easingFunc(easingOffset - distance / repulseRadius) * velocity, minSpeed, maxSpeed);
|
|
150
|
+
this._normVec.x = !distance ? velocity : (dx / distance) * repulseFactor;
|
|
151
|
+
this._normVec.y = !distance ? velocity : (dy / distance) * repulseFactor;
|
|
152
|
+
particle.position.addTo(this._normVec);
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
_singleSelectorRepulse = (interactivityData, selector, div) => {
|
|
156
|
+
const container = this.container, repulse = container.actualOptions.interactivity?.modes.repulse;
|
|
157
|
+
if (!repulse) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
const query = safeDocument().querySelectorAll(selector);
|
|
161
|
+
if (!query.length) {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
query.forEach(item => {
|
|
165
|
+
const elem = item, pxRatio = container.retina.pixelRatio, pos = {
|
|
166
|
+
x: (elem.offsetLeft + elem.offsetWidth * half) * pxRatio,
|
|
167
|
+
y: (elem.offsetTop + elem.offsetHeight * half) * pxRatio,
|
|
168
|
+
}, repulseRadius = elem.offsetWidth * half * pxRatio, area = div.type === DivType.circle
|
|
169
|
+
? new Circle(pos.x, pos.y, repulseRadius)
|
|
170
|
+
: new Rectangle(elem.offsetLeft * pxRatio, elem.offsetTop * pxRatio, elem.offsetWidth * pxRatio, elem.offsetHeight * pxRatio), divs = repulse.divs, divRepulse = divMode(divs, elem);
|
|
171
|
+
this._processRepulse(interactivityData, pos, repulseRadius, area, divRepulse);
|
|
172
|
+
});
|
|
173
|
+
};
|
|
159
174
|
}
|
package/esm/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export async function loadExternalRepulseInteraction(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-
|
|
2
|
+
engine.checkVersion("4.0.0-beta.0");
|
|
3
3
|
await engine.register(async (e) => {
|
|
4
|
-
const {
|
|
5
|
-
|
|
4
|
+
const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity");
|
|
5
|
+
ensureInteractivityPluginLoaded(e);
|
|
6
6
|
e.addInteractor?.("externalRepulse", async (container) => {
|
|
7
7
|
const { Repulser } = await import("./Repulser.js");
|
|
8
8
|
return new Repulser(engine, container);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/interaction-external-repulse",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-beta.0",
|
|
4
4
|
"description": "tsParticles repulse external interaction",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -87,8 +87,8 @@
|
|
|
87
87
|
"./package.json": "./package.json"
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
|
-
"@tsparticles/engine": "4.0.0-
|
|
91
|
-
"@tsparticles/plugin-interactivity": "4.0.0-
|
|
90
|
+
"@tsparticles/engine": "4.0.0-beta.0",
|
|
91
|
+
"@tsparticles/plugin-interactivity": "4.0.0-beta.0"
|
|
92
92
|
},
|
|
93
93
|
"publishConfig": {
|
|
94
94
|
"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-repulse [
|
|
6
|
+
<title>@tsparticles/interaction-external-repulse [19 Mar 2026 at 13:59]</title>
|
|
7
7
|
<link rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAABrVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+O1foceMD///+J0/qK1Pr7/v8Xdr/9///W8P4UdL7L7P0Scr2r4Pyj3vwad8D5/f/2/f+55f3E6f34+/2H0/ojfMKpzOd0rNgQcb3F3O/j9f7c8v6g3Pz0/P/w+v/q+P7n9v6T1/uQ1vuE0vqLut/y+v+Z2fvt+f+15Pzv9fuc2/vR7v2V2Pvd6/bg9P7I6/285/2y4/yp3/zp8vk8i8kqgMT7/P31+fyv4vxGkcz6/P6/6P3j7vfS5PNnpNUxhcbO7f7F6v3O4vHK3/DA2u631Ouy0eqXweKJud5wqthfoNMMbLvY8f73+v2dxeR8sNtTmdDx9/zX6PSjyeaCtd1YnNGX2PuQveCGt95Nls42h8dLlM3F4vBtAAAAM3RSTlMAAyOx0/sKBvik8opWGBMOAe3l1snDm2E9LSb06eHcu5JpHbarfHZCN9CBb08zzkdNS0kYaptYAAAFV0lEQVRYw92X51/aYBDHHS2O2qqttVbrqNq9m+TJIAYIShBkWwqIiCgoWvfeq7Z2/s29hyQNyUcR7LveGwVyXy6XH8/9rqxglLfUPLxVduUor3h0rfp2TYvpivk37929TkG037hffoX0+peVtZQc1589rigVUdXS/ABSAyEmGIO/1XfvldSK8vs3OqB6u3m0nxmIrvgB0dj7rr7Y9IbuF68hnfFaiHA/sxqm0wciIG43P60qKv9WXWc1RXGh/mFESFABTSBi0sNAKzqet17eCtOb3kZIDwxEEU0oAIJGYxNBDhBND29e0rtXXbcpuPmED9IhEAAQ/AXEaF8EPmnrrKsv0LvWR3fg5sWDNAFZOgAgaKvZDogHNU9MFwnnYROkc56RD5CjAbQX9Ow4g7upCsvYu55aSI/Nj0H1akgKQEUM94dwK65hYRmFU9MIcH/fqJYOZYcnuJSU/waKDgTOEVaVKhwrTRP5XzgSpAITYzom7UvkhFX5VutmxeNnWDjjswTKTyfgluNDGbUpWissXhF3s7mlSml+czWkg3D0l1nNjGNjz3myOQOa1KM/jOS6ebdbAVTCi4gljHSFrviza7tOgRWcS0MOUX9zdNgag5w7rRqA44Lzw0hr1WqES36dFliSJFlh2rXIae3FFcDDgKdxrUIDePr8jGcSClV1u7A9xeN0ModY/pHMxmR1EzRh8TJiwqsHmKW0l4FCEZI+jHio+JdPPE9qwQtTRxku2D8sIeRL2LnxWSllANCQGOIiqVHAz2ye2JR0DcH+HoxDkaADLjgxjKQ+AwCX/g0+DNgdG0ukYCONAe+dbc2IAc6fwt1ARoDSezNHxV2Cmzwv3O6lDMV55edBGwGK9n1+x2F8EDfAGCxug8MhpsMEcTEAWf3rx2vZhe/LAmtIn/6apE6PN0ULKgywD9mmdxbmFl3OvD5AS5fW5zLbv/YHmcsBTjf/afDz3MaZTVCfAP9z6/Bw6ycv8EUBWJIn9zYcoAWWlW9+OzO3vkTy8H+RANLmdrpOuYWdZYEXpo+TlCJrW5EARb7fF+bWdqf3hhyZI1nWJQHgznErZhbjoEsWqi8dQNoE294aldzFurwSABL2XXMf9+H1VQGke9exw5P/AnA5Pv5ngMul7LOvO922iwACu8WkCwLCafvM4CeWPxfA8lNHcWZSoi8EwMAIciKX2Z4SWCMAa3snCZ/G4EA8D6CMLNFsGQhkkz/gQNEBbPCbWsxGUpYVu3z8IyNAknwJkfPMEhLyrdi5RTyUVACkw4GSFRNWJNEW+fgPGwHD8/JxnRuLabN4CGNRkAE23na2+VmEAUmrYymSGjMAYqH84YUIyzgzs3XC7gNgH36Vcc4zKY9o9fgPBXUAiHHwVboBHGLiX6Zcjp1f2wu4tvzZKo0ecPnDtQYDQvJXaBeNzce45Fp28ZQLrEZVuFqgBwOalArKXnW1UzlnSusQKJqKYNuz4tOnI6sZG4zanpemv+7ySU2jbA9h6uhcgpfy6G2PahirDZ6zvq6zDduMVFTKvzw8wgyEdelwY9in3XkEPs3osJuwRQ4qTkfzifndg9Gfc4pdsu82+tTnHZTBa2EAMrqr2t43pguc8tNm7JQVQ2S0ukj2d22dhXYP0/veWtwKrCkNoNimAN5+Xr/oLrxswKbVJjteWrX7eR63o4j9q0GxnaBdWgGA5VStpanIjQmEhV0/nVt5VOFUvix6awJhPcAaTEShgrG+iGyvb5a0Ndb1YGHFPEwoqAinoaykaID1o1pdPNu7XsnCKQ3R+hwWIIhGvORcJUBYXe3Xa3vq/mF/N9V13ugufMkfXn+KHsRD0B8AAAAASUVORK5CYII=" type="image/x-icon" />
|
|
8
8
|
|
|
9
9
|
<script>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Demo / Generator : https://particles.js.org/
|
|
5
5
|
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
6
|
* How to use? : Check the GitHub README
|
|
7
|
-
* v4.0.0-
|
|
7
|
+
* v4.0.0-beta.0
|
|
8
8
|
*/
|
|
9
9
|
/*
|
|
10
10
|
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
@@ -28,13 +28,33 @@ return /******/ (() => { // webpackBootstrap
|
|
|
28
28
|
/******/ "use strict";
|
|
29
29
|
/******/ var __webpack_modules__ = ({
|
|
30
30
|
|
|
31
|
+
/***/ "@tsparticles/engine"
|
|
32
|
+
/*!*********************************************************************************************************************************!*\
|
|
33
|
+
!*** external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"} ***!
|
|
34
|
+
\*********************************************************************************************************************************/
|
|
35
|
+
(module) {
|
|
36
|
+
|
|
37
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
|
|
38
|
+
|
|
39
|
+
/***/ },
|
|
40
|
+
|
|
41
|
+
/***/ "@tsparticles/plugin-interactivity"
|
|
42
|
+
/*!***************************************************************************************************************************************************************************!*\
|
|
43
|
+
!*** external {"commonjs":"@tsparticles/plugin-interactivity","commonjs2":"@tsparticles/plugin-interactivity","amd":"@tsparticles/plugin-interactivity","root":"window"} ***!
|
|
44
|
+
\***************************************************************************************************************************************************************************/
|
|
45
|
+
(module) {
|
|
46
|
+
|
|
47
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_interactivity__;
|
|
48
|
+
|
|
49
|
+
/***/ },
|
|
50
|
+
|
|
31
51
|
/***/ "./dist/browser/Options/Classes/Repulse.js"
|
|
32
52
|
/*!*************************************************!*\
|
|
33
53
|
!*** ./dist/browser/Options/Classes/Repulse.js ***!
|
|
34
54
|
\*************************************************/
|
|
35
55
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
36
56
|
|
|
37
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Repulse: () => (/* binding */ Repulse)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _RepulseBase_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RepulseBase.js */ \"./dist/browser/Options/Classes/RepulseBase.js\");\n/* harmony import */ var _RepulseDiv_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./RepulseDiv.js */ \"./dist/browser/Options/Classes/RepulseDiv.js\");\n\n\n\nclass Repulse extends _RepulseBase_js__WEBPACK_IMPORTED_MODULE_1__.RepulseBase {\n
|
|
57
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Repulse: () => (/* binding */ Repulse)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _RepulseBase_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RepulseBase.js */ \"./dist/browser/Options/Classes/RepulseBase.js\");\n/* harmony import */ var _RepulseDiv_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./RepulseDiv.js */ \"./dist/browser/Options/Classes/RepulseDiv.js\");\n\n\n\nclass Repulse extends _RepulseBase_js__WEBPACK_IMPORTED_MODULE_1__.RepulseBase {\n divs;\n load(data) {\n super.load(data);\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n this.divs = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.executeOnSingleOrMultiple)(data.divs, (div)=>{\n const tmp = new _RepulseDiv_js__WEBPACK_IMPORTED_MODULE_2__.RepulseDiv();\n tmp.load(div);\n return tmp;\n });\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/interaction-external-repulse/./dist/browser/Options/Classes/Repulse.js?\n}");
|
|
38
58
|
|
|
39
59
|
/***/ },
|
|
40
60
|
|
|
@@ -44,7 +64,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
44
64
|
\*****************************************************/
|
|
45
65
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
46
66
|
|
|
47
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RepulseBase: () => (/* binding */ RepulseBase)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n\nclass RepulseBase {\n
|
|
67
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RepulseBase: () => (/* binding */ RepulseBase)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n\nclass RepulseBase {\n distance;\n duration;\n easing;\n factor;\n maxSpeed;\n speed;\n constructor(){\n this.distance = 200;\n this.duration = 0.4;\n this.factor = 100;\n this.speed = 1;\n this.maxSpeed = 50;\n this.easing = _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.EasingType.easeOutQuad;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.distance !== undefined) {\n this.distance = data.distance;\n }\n if (data.duration !== undefined) {\n this.duration = data.duration;\n }\n if (data.easing !== undefined) {\n this.easing = data.easing;\n }\n if (data.factor !== undefined) {\n this.factor = data.factor;\n }\n if (data.speed !== undefined) {\n this.speed = data.speed;\n }\n if (data.maxSpeed !== undefined) {\n this.maxSpeed = data.maxSpeed;\n }\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/interaction-external-repulse/./dist/browser/Options/Classes/RepulseBase.js?\n}");
|
|
48
68
|
|
|
49
69
|
/***/ },
|
|
50
70
|
|
|
@@ -54,7 +74,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
54
74
|
\****************************************************/
|
|
55
75
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
56
76
|
|
|
57
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RepulseDiv: () => (/* binding */ RepulseDiv)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _RepulseBase_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RepulseBase.js */ \"./dist/browser/Options/Classes/RepulseBase.js\");\n\n\nclass RepulseDiv extends _RepulseBase_js__WEBPACK_IMPORTED_MODULE_1__.RepulseBase {\n
|
|
77
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RepulseDiv: () => (/* binding */ RepulseDiv)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _RepulseBase_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RepulseBase.js */ \"./dist/browser/Options/Classes/RepulseBase.js\");\n\n\nclass RepulseDiv extends _RepulseBase_js__WEBPACK_IMPORTED_MODULE_1__.RepulseBase {\n selectors;\n constructor(){\n super();\n this.selectors = [];\n }\n load(data) {\n super.load(data);\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.selectors !== undefined) {\n this.selectors = data.selectors;\n }\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/interaction-external-repulse/./dist/browser/Options/Classes/RepulseDiv.js?\n}");
|
|
58
78
|
|
|
59
79
|
/***/ },
|
|
60
80
|
|
|
@@ -64,27 +84,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
64
84
|
\*******************************/
|
|
65
85
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
66
86
|
|
|
67
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Repulse: () => (/* reexport safe */ _Options_Classes_Repulse_js__WEBPACK_IMPORTED_MODULE_2__.Repulse),\n/* harmony export */ RepulseBase: () => (/* reexport safe */ _Options_Classes_RepulseBase_js__WEBPACK_IMPORTED_MODULE_0__.RepulseBase),\n/* harmony export */ RepulseDiv: () => (/* reexport safe */ _Options_Classes_RepulseDiv_js__WEBPACK_IMPORTED_MODULE_1__.RepulseDiv),\n/* harmony export */ loadExternalRepulseInteraction: () => (/* binding */ loadExternalRepulseInteraction)\n/* harmony export */ });\n/* harmony import */ var _Options_Classes_RepulseBase_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Options/Classes/RepulseBase.js */ \"./dist/browser/Options/Classes/RepulseBase.js\");\n/* harmony import */ var _Options_Classes_RepulseDiv_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Options/Classes/RepulseDiv.js */ \"./dist/browser/Options/Classes/RepulseDiv.js\");\n/* harmony import */ var _Options_Classes_Repulse_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Options/Classes/Repulse.js */ \"./dist/browser/Options/Classes/Repulse.js\");\nasync function loadExternalRepulseInteraction(engine) {\n
|
|
68
|
-
|
|
69
|
-
/***/ },
|
|
70
|
-
|
|
71
|
-
/***/ "@tsparticles/engine"
|
|
72
|
-
/*!*********************************************************************************************************************************!*\
|
|
73
|
-
!*** external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"} ***!
|
|
74
|
-
\*********************************************************************************************************************************/
|
|
75
|
-
(module) {
|
|
76
|
-
|
|
77
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
|
|
78
|
-
|
|
79
|
-
/***/ },
|
|
80
|
-
|
|
81
|
-
/***/ "@tsparticles/plugin-interactivity"
|
|
82
|
-
/*!***************************************************************************************************************************************************************************!*\
|
|
83
|
-
!*** external {"commonjs":"@tsparticles/plugin-interactivity","commonjs2":"@tsparticles/plugin-interactivity","amd":"@tsparticles/plugin-interactivity","root":"window"} ***!
|
|
84
|
-
\***************************************************************************************************************************************************************************/
|
|
85
|
-
(module) {
|
|
86
|
-
|
|
87
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_interactivity__;
|
|
87
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Repulse: () => (/* reexport safe */ _Options_Classes_Repulse_js__WEBPACK_IMPORTED_MODULE_2__.Repulse),\n/* harmony export */ RepulseBase: () => (/* reexport safe */ _Options_Classes_RepulseBase_js__WEBPACK_IMPORTED_MODULE_0__.RepulseBase),\n/* harmony export */ RepulseDiv: () => (/* reexport safe */ _Options_Classes_RepulseDiv_js__WEBPACK_IMPORTED_MODULE_1__.RepulseDiv),\n/* harmony export */ loadExternalRepulseInteraction: () => (/* binding */ loadExternalRepulseInteraction)\n/* harmony export */ });\n/* harmony import */ var _Options_Classes_RepulseBase_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Options/Classes/RepulseBase.js */ \"./dist/browser/Options/Classes/RepulseBase.js\");\n/* harmony import */ var _Options_Classes_RepulseDiv_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Options/Classes/RepulseDiv.js */ \"./dist/browser/Options/Classes/RepulseDiv.js\");\n/* harmony import */ var _Options_Classes_Repulse_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Options/Classes/Repulse.js */ \"./dist/browser/Options/Classes/Repulse.js\");\nasync function loadExternalRepulseInteraction(engine) {\n engine.checkVersion(\"4.0.0-beta.0\");\n await engine.register(async (e)=>{\n const { ensureInteractivityPluginLoaded } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/plugin-interactivity */ \"@tsparticles/plugin-interactivity\", 19));\n ensureInteractivityPluginLoaded(e);\n e.addInteractor?.(\"externalRepulse\", async (container)=>{\n const { Repulser } = await __webpack_require__.e(/*! import() */ \"dist_browser_Repulser_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./Repulser.js */ \"./dist/browser/Repulser.js\"));\n return new Repulser(engine, container);\n });\n });\n}\n\n\n\n\n\n//# sourceURL=webpack://@tsparticles/interaction-external-repulse/./dist/browser/index.js?\n}");
|
|
88
88
|
|
|
89
89
|
/***/ }
|
|
90
90
|
|
|
@@ -100,12 +100,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_interactivity__;
|
|
|
100
100
|
/******/ if (cachedModule !== undefined) {
|
|
101
101
|
/******/ return cachedModule.exports;
|
|
102
102
|
/******/ }
|
|
103
|
-
/******/ // Check if module exists (development only)
|
|
104
|
-
/******/ if (__webpack_modules__[moduleId] === undefined) {
|
|
105
|
-
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
|
|
106
|
-
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
107
|
-
/******/ throw e;
|
|
108
|
-
/******/ }
|
|
109
103
|
/******/ // Create a new module (and put it into the cache)
|
|
110
104
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
111
105
|
/******/ // no module.id needed
|
|
@@ -114,6 +108,12 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_interactivity__;
|
|
|
114
108
|
/******/ };
|
|
115
109
|
/******/
|
|
116
110
|
/******/ // Execute the module function
|
|
111
|
+
/******/ if (!(moduleId in __webpack_modules__)) {
|
|
112
|
+
/******/ delete __webpack_module_cache__[moduleId];
|
|
113
|
+
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
|
|
114
|
+
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
115
|
+
/******/ throw e;
|
|
116
|
+
/******/ }
|
|
117
117
|
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
118
118
|
/******/
|
|
119
119
|
/******/ // Return the exports of the module
|
|
@@ -188,6 +188,18 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_interactivity__;
|
|
|
188
188
|
/******/ };
|
|
189
189
|
/******/ })();
|
|
190
190
|
/******/
|
|
191
|
+
/******/ /* webpack/runtime/global */
|
|
192
|
+
/******/ (() => {
|
|
193
|
+
/******/ __webpack_require__.g = (function() {
|
|
194
|
+
/******/ if (typeof globalThis === 'object') return globalThis;
|
|
195
|
+
/******/ try {
|
|
196
|
+
/******/ return this || new Function('return this')();
|
|
197
|
+
/******/ } catch (e) {
|
|
198
|
+
/******/ if (typeof window === 'object') return window;
|
|
199
|
+
/******/ }
|
|
200
|
+
/******/ })();
|
|
201
|
+
/******/ })();
|
|
202
|
+
/******/
|
|
191
203
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
192
204
|
/******/ (() => {
|
|
193
205
|
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
@@ -252,8 +264,8 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_interactivity__;
|
|
|
252
264
|
/******/ /* webpack/runtime/publicPath */
|
|
253
265
|
/******/ (() => {
|
|
254
266
|
/******/ var scriptUrl;
|
|
255
|
-
/******/ if (
|
|
256
|
-
/******/ var document =
|
|
267
|
+
/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + "";
|
|
268
|
+
/******/ var document = __webpack_require__.g.document;
|
|
257
269
|
/******/ if (!scriptUrl && document) {
|
|
258
270
|
/******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')
|
|
259
271
|
/******/ scriptUrl = document.currentScript.src;
|
|
@@ -1,2 +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},155(e,t,r){r.d(t,{Z:()=>s});var i=r(303),o=r(10),n=r(556);class s extends o._{divs;load(e){super.load(e),(0,i.isNull)(e)||(this.divs=(0,i.executeOnSingleOrMultiple)(e.divs,e=>{let t=new n.W;return t.load(e),t}))}}},10(e,t,r){r.d(t,{_:()=>o});var i=r(303);class o{distance;duration;easing;factor;maxSpeed;speed;constructor(){this.distance=200,this.duration=.4,this.factor=100,this.speed=1,this.maxSpeed=50,this.easing=i.EasingType.easeOutQuad}load(e){(0,i.isNull)(e)||(void 0!==e.distance&&(this.distance=e.distance),void 0!==e.duration&&(this.duration=e.duration),void 0!==e.easing&&(this.easing=e.easing),void 0!==e.factor&&(this.factor=e.factor),void 0!==e.speed&&(this.speed=e.speed),void 0!==e.maxSpeed&&(this.maxSpeed=e.maxSpeed))}}},556(e,t,r){r.d(t,{W:()=>n});var i=r(303),o=r(10);class n extends o._{selectors;constructor(){super(),this.selectors=[]}load(e){super.load(e),(0,i.isNull)(e)||void 0!==e.selectors&&(this.selectors=e.selectors)}}}},s={};function a(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={exports:{}};return n[e](r,r.exports,a),r.exports}a.m=n,l=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.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);a.r(r);var i={};c=c||[null,l({}),l([]),l(l)];for(var o=2&t&&e;("object"==typeof o||"function"==typeof o)&&!~c.indexOf(o);o=l(o))Object.getOwnPropertyNames(o).forEach(t=>i[t]=()=>e[t]);return i.default=()=>e,a.d(r,i),r},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce((t,r)=>(a.f[r](e,t),t),[])),a.u=e=>""+e+".min.js",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),p={},a.l=(e,t,r,i)=>{if(p[e])return void p[e].push(t);if(void 0!==r)for(var o,n,s=document.getElementsByTagName("script"),c=0;c<s.length;c++){var l=s[c];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")=="@tsparticles/interaction-external-repulse:"+r){o=l;break}}o||(n=!0,(o=document.createElement("script")).charset="utf-8",a.nc&&o.setAttribute("nonce",a.nc),o.setAttribute("data-webpack","@tsparticles/interaction-external-repulse:"+r),o.src=e),p[e]=[t];var u=(t,r)=>{o.onerror=o.onload=null,clearTimeout(d);var i=p[e];if(delete p[e],o.parentNode&&o.parentNode.removeChild(o),i&&i.forEach(e=>e(r)),t)return t(r)},d=setTimeout(u.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=u.bind(null,o.onerror),o.onload=u.bind(null,o.onload),n&&document.head.appendChild(o)},a.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.g.importScripts&&(u=a.g.location+"");var c,l,p,u,d=a.g.document;if(!u&&d&&(d.currentScript&&"SCRIPT"===d.currentScript.tagName.toUpperCase()&&(u=d.currentScript.src),!u)){var f=d.getElementsByTagName("script");if(f.length)for(var h=f.length-1;h>-1&&(!u||!/^http(s?):/.test(u));)u=f[h--].src}if(!u)throw Error("Automatic publicPath is not supported in this browser");a.p=u=u.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r={64:0},a.f.j=(e,t)=>{var i=a.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=a.p+a.u(e),s=Error();a.l(n,t=>{if(a.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;s.message="Loading chunk "+e+` failed.
|
|
2
|
+
(`+o+": "+n+")",s.name="ChunkLoadError",s.type=o,s.request=n,i[1](s)}},"chunk-"+e,e)}},i=(e,t)=>{var i,o,[n,s,c]=t,l=0;if(n.some(e=>0!==r[e])){for(i in s)a.o(s,i)&&(a.m[i]=s[i]);c&&c(a)}for(e&&e(t);l<n.length;l++)o=n[l],a.o(r,o)&&r[o]&&r[o][0](),r[o]=0},(o=this.webpackChunk_tsparticles_interaction_external_repulse=this.webpackChunk_tsparticles_interaction_external_repulse||[]).forEach(i.bind(null,0)),o.push=i.bind(null,o.push.bind(o));var v={};a.r(v),a.d(v,{Repulse:()=>m.Z,RepulseBase:()=>b._,RepulseDiv:()=>g.W,loadExternalRepulseInteraction:()=>y});var b=a(10),g=a(556),m=a(155);async function y(e){e.checkVersion("4.0.0-beta.0"),await e.register(async t=>{let{ensureInteractivityPluginLoaded:r}=await Promise.resolve().then(a.t.bind(a,702,19));r(t),t.addInteractor?.("externalRepulse",async t=>{let{Repulser:r}=await a.e(747).then(a.bind(a,747));return new r(e,t)})})}return v})());
|
package/types/Repulser.d.ts
CHANGED
|
@@ -3,8 +3,12 @@ import { ExternalInteractorBase, type IInteractivityData, type IModes, type Inte
|
|
|
3
3
|
import type { IRepulseMode, RepulseContainer, RepulseMode } from "./Types.js";
|
|
4
4
|
export declare class Repulser extends ExternalInteractorBase<RepulseContainer> {
|
|
5
5
|
handleClickMode: (mode: string, interactivityData: IInteractivityData) => void;
|
|
6
|
+
private readonly _clickVec;
|
|
6
7
|
private readonly _engine;
|
|
8
|
+
private _maxDistance;
|
|
9
|
+
private readonly _normVec;
|
|
7
10
|
constructor(engine: Engine, container: RepulseContainer);
|
|
11
|
+
get maxDistance(): number;
|
|
8
12
|
clear(): void;
|
|
9
13
|
init(): void;
|
|
10
14
|
interact(interactivityData: IInteractivityData): void;
|