@tsparticles/interaction-external-trail 4.1.3 → 4.2.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/browser/Options/Classes/Trail.js +8 -20
- package/browser/Options/Classes/TrailColorComponent.js +1 -4
- package/browser/Options/Classes/TrailColorCoords.js +3 -8
- package/browser/Options/Classes/TrailColorWeight.js +5 -12
- package/browser/TrailMaker.js +2 -5
- package/browser/index.js +1 -1
- package/browser/index.lazy.js +1 -1
- package/cjs/Options/Classes/Trail.js +8 -20
- package/cjs/Options/Classes/TrailColorComponent.js +1 -4
- package/cjs/Options/Classes/TrailColorCoords.js +3 -8
- package/cjs/Options/Classes/TrailColorWeight.js +5 -12
- package/cjs/TrailMaker.js +2 -5
- package/cjs/index.js +1 -1
- package/cjs/index.lazy.js +1 -1
- package/esm/Options/Classes/Trail.js +8 -20
- package/esm/Options/Classes/TrailColorComponent.js +1 -4
- package/esm/Options/Classes/TrailColorCoords.js +3 -8
- package/esm/Options/Classes/TrailColorWeight.js +5 -12
- package/esm/TrailMaker.js +2 -5
- package/esm/index.js +1 -1
- package/esm/index.lazy.js +1 -1
- package/package.json +3 -3
- package/report.html +1 -1
- package/tsparticles.interaction.external.trail.js +18 -49
- package/tsparticles.interaction.external.trail.min.js +1 -1
- package/types/Options/Classes/Trail.d.ts +0 -1
- package/types/Options/Classes/TrailColorComponent.d.ts +0 -1
- package/types/Options/Classes/TrailColorCoords.d.ts +0 -1
- package/types/Options/Classes/TrailColorWeight.d.ts +1 -2
- package/types/Options/Classes/TrailOptions.d.ts +4 -2
|
@@ -1,29 +1,17 @@
|
|
|
1
|
-
import { deepExtend, isNull, } from "@tsparticles/engine";
|
|
1
|
+
import { deepExtend, isNull, loadProperty, } from "@tsparticles/engine";
|
|
2
2
|
import { TrailColorCoords } from "./TrailColorCoords.js";
|
|
3
3
|
export class Trail {
|
|
4
|
-
colorCoords;
|
|
5
|
-
delay;
|
|
4
|
+
colorCoords = new TrailColorCoords();
|
|
5
|
+
delay = 1;
|
|
6
6
|
particles;
|
|
7
|
-
pauseOnStop;
|
|
8
|
-
quantity;
|
|
9
|
-
constructor() {
|
|
10
|
-
this.delay = 1;
|
|
11
|
-
this.pauseOnStop = false;
|
|
12
|
-
this.quantity = 1;
|
|
13
|
-
this.colorCoords = new TrailColorCoords();
|
|
14
|
-
}
|
|
7
|
+
pauseOnStop = false;
|
|
8
|
+
quantity = 1;
|
|
15
9
|
load(data) {
|
|
16
10
|
if (isNull(data))
|
|
17
11
|
return;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (data.quantity !== undefined) {
|
|
22
|
-
this.quantity = data.quantity;
|
|
23
|
-
}
|
|
24
|
-
if (data.pauseOnStop !== undefined) {
|
|
25
|
-
this.pauseOnStop = data.pauseOnStop;
|
|
26
|
-
}
|
|
12
|
+
loadProperty(this, "delay", data.delay);
|
|
13
|
+
loadProperty(this, "quantity", data.quantity);
|
|
14
|
+
loadProperty(this, "pauseOnStop", data.pauseOnStop);
|
|
27
15
|
if (data.particles !== undefined) {
|
|
28
16
|
this.particles = deepExtend({}, data.particles);
|
|
29
17
|
}
|
|
@@ -2,10 +2,7 @@ import { isNull, setRangeValue } from "@tsparticles/engine";
|
|
|
2
2
|
import { TrailColorWeight } from "./TrailColorWeight.js";
|
|
3
3
|
export class TrailColorComponent {
|
|
4
4
|
value;
|
|
5
|
-
weights;
|
|
6
|
-
constructor() {
|
|
7
|
-
this.weights = new TrailColorWeight();
|
|
8
|
-
}
|
|
5
|
+
weights = new TrailColorWeight();
|
|
9
6
|
load(data) {
|
|
10
7
|
if (!data) {
|
|
11
8
|
return;
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import { TrailColorComponent } from "./TrailColorComponent.js";
|
|
2
2
|
export class TrailColorCoords {
|
|
3
|
-
h;
|
|
4
|
-
l;
|
|
5
|
-
s;
|
|
6
|
-
constructor() {
|
|
7
|
-
this.h = new TrailColorComponent();
|
|
8
|
-
this.s = new TrailColorComponent();
|
|
9
|
-
this.l = new TrailColorComponent();
|
|
10
|
-
}
|
|
3
|
+
h = new TrailColorComponent();
|
|
4
|
+
l = new TrailColorComponent();
|
|
5
|
+
s = new TrailColorComponent();
|
|
11
6
|
load(data) {
|
|
12
7
|
if (!data) {
|
|
13
8
|
return;
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
+
import { loadProperty } from "@tsparticles/engine";
|
|
1
2
|
export class TrailColorWeight {
|
|
2
|
-
x;
|
|
3
|
-
y;
|
|
4
|
-
constructor() {
|
|
5
|
-
this.x = 0;
|
|
6
|
-
this.y = 0;
|
|
7
|
-
}
|
|
3
|
+
x = 0;
|
|
4
|
+
y = 0;
|
|
8
5
|
load(data) {
|
|
9
6
|
if (!data) {
|
|
10
7
|
return;
|
|
11
8
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
if (data.y !== undefined) {
|
|
16
|
-
this.y = data.y;
|
|
17
|
-
}
|
|
9
|
+
loadProperty(this, "x", data.x);
|
|
10
|
+
loadProperty(this, "y", data.y);
|
|
18
11
|
}
|
|
19
12
|
}
|
package/browser/TrailMaker.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnimatableColor, deepExtend, getRangeMax, getRangeMin, hMax, isInArray, itemFromSingleOrMultiple, lMax, millisecondsToSeconds, rangeColorToHsl, sMax, } from "@tsparticles/engine";
|
|
1
|
+
import { AnimatableColor, deepExtend, getRangeMax, getRangeMin, hMax, isInArray, itemFromSingleOrMultiple, lMax, loadOptionProperty, millisecondsToSeconds, rangeColorToHsl, sMax, } from "@tsparticles/engine";
|
|
2
2
|
import { ExternalInteractorBase, } from "@tsparticles/plugin-interactivity";
|
|
3
3
|
import { Trail } from "./Options/Classes/Trail.js";
|
|
4
4
|
const trailMode = "trail", defaultMin = 0, defaultWeight = 0;
|
|
@@ -84,10 +84,7 @@ export class TrailMaker extends ExternalInteractorBase {
|
|
|
84
84
|
(mouse.inside && !!mouse.position && isInArray(trailMode, events.onHover.mode))));
|
|
85
85
|
}
|
|
86
86
|
loadModeOptions(options, ...sources) {
|
|
87
|
-
options
|
|
88
|
-
for (const source of sources) {
|
|
89
|
-
options.trail.load(source?.trail);
|
|
90
|
-
}
|
|
87
|
+
loadOptionProperty(options, "trail", Trail, ...sources);
|
|
91
88
|
}
|
|
92
89
|
reset() {
|
|
93
90
|
}
|
package/browser/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ensureInteractivityPluginLoaded } from "@tsparticles/plugin-interactivity";
|
|
2
2
|
import { TrailMaker } from "./TrailMaker.js";
|
|
3
3
|
export async function loadExternalTrailInteraction(engine) {
|
|
4
|
-
engine.checkVersion("4.
|
|
4
|
+
engine.checkVersion("4.2.0");
|
|
5
5
|
await engine.pluginManager.register((e) => {
|
|
6
6
|
ensureInteractivityPluginLoaded(e);
|
|
7
7
|
e.pluginManager.addInteractor?.("externalTrail", container => {
|
package/browser/index.lazy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export async function loadExternalTrailInteraction(engine) {
|
|
2
|
-
engine.checkVersion("4.
|
|
2
|
+
engine.checkVersion("4.2.0");
|
|
3
3
|
await engine.pluginManager.register(async (e) => {
|
|
4
4
|
const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity/lazy");
|
|
5
5
|
ensureInteractivityPluginLoaded(e);
|
|
@@ -1,29 +1,17 @@
|
|
|
1
|
-
import { deepExtend, isNull, } from "@tsparticles/engine";
|
|
1
|
+
import { deepExtend, isNull, loadProperty, } from "@tsparticles/engine";
|
|
2
2
|
import { TrailColorCoords } from "./TrailColorCoords.js";
|
|
3
3
|
export class Trail {
|
|
4
|
-
colorCoords;
|
|
5
|
-
delay;
|
|
4
|
+
colorCoords = new TrailColorCoords();
|
|
5
|
+
delay = 1;
|
|
6
6
|
particles;
|
|
7
|
-
pauseOnStop;
|
|
8
|
-
quantity;
|
|
9
|
-
constructor() {
|
|
10
|
-
this.delay = 1;
|
|
11
|
-
this.pauseOnStop = false;
|
|
12
|
-
this.quantity = 1;
|
|
13
|
-
this.colorCoords = new TrailColorCoords();
|
|
14
|
-
}
|
|
7
|
+
pauseOnStop = false;
|
|
8
|
+
quantity = 1;
|
|
15
9
|
load(data) {
|
|
16
10
|
if (isNull(data))
|
|
17
11
|
return;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (data.quantity !== undefined) {
|
|
22
|
-
this.quantity = data.quantity;
|
|
23
|
-
}
|
|
24
|
-
if (data.pauseOnStop !== undefined) {
|
|
25
|
-
this.pauseOnStop = data.pauseOnStop;
|
|
26
|
-
}
|
|
12
|
+
loadProperty(this, "delay", data.delay);
|
|
13
|
+
loadProperty(this, "quantity", data.quantity);
|
|
14
|
+
loadProperty(this, "pauseOnStop", data.pauseOnStop);
|
|
27
15
|
if (data.particles !== undefined) {
|
|
28
16
|
this.particles = deepExtend({}, data.particles);
|
|
29
17
|
}
|
|
@@ -2,10 +2,7 @@ import { isNull, setRangeValue } from "@tsparticles/engine";
|
|
|
2
2
|
import { TrailColorWeight } from "./TrailColorWeight.js";
|
|
3
3
|
export class TrailColorComponent {
|
|
4
4
|
value;
|
|
5
|
-
weights;
|
|
6
|
-
constructor() {
|
|
7
|
-
this.weights = new TrailColorWeight();
|
|
8
|
-
}
|
|
5
|
+
weights = new TrailColorWeight();
|
|
9
6
|
load(data) {
|
|
10
7
|
if (!data) {
|
|
11
8
|
return;
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import { TrailColorComponent } from "./TrailColorComponent.js";
|
|
2
2
|
export class TrailColorCoords {
|
|
3
|
-
h;
|
|
4
|
-
l;
|
|
5
|
-
s;
|
|
6
|
-
constructor() {
|
|
7
|
-
this.h = new TrailColorComponent();
|
|
8
|
-
this.s = new TrailColorComponent();
|
|
9
|
-
this.l = new TrailColorComponent();
|
|
10
|
-
}
|
|
3
|
+
h = new TrailColorComponent();
|
|
4
|
+
l = new TrailColorComponent();
|
|
5
|
+
s = new TrailColorComponent();
|
|
11
6
|
load(data) {
|
|
12
7
|
if (!data) {
|
|
13
8
|
return;
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
+
import { loadProperty } from "@tsparticles/engine";
|
|
1
2
|
export class TrailColorWeight {
|
|
2
|
-
x;
|
|
3
|
-
y;
|
|
4
|
-
constructor() {
|
|
5
|
-
this.x = 0;
|
|
6
|
-
this.y = 0;
|
|
7
|
-
}
|
|
3
|
+
x = 0;
|
|
4
|
+
y = 0;
|
|
8
5
|
load(data) {
|
|
9
6
|
if (!data) {
|
|
10
7
|
return;
|
|
11
8
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
if (data.y !== undefined) {
|
|
16
|
-
this.y = data.y;
|
|
17
|
-
}
|
|
9
|
+
loadProperty(this, "x", data.x);
|
|
10
|
+
loadProperty(this, "y", data.y);
|
|
18
11
|
}
|
|
19
12
|
}
|
package/cjs/TrailMaker.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnimatableColor, deepExtend, getRangeMax, getRangeMin, hMax, isInArray, itemFromSingleOrMultiple, lMax, millisecondsToSeconds, rangeColorToHsl, sMax, } from "@tsparticles/engine";
|
|
1
|
+
import { AnimatableColor, deepExtend, getRangeMax, getRangeMin, hMax, isInArray, itemFromSingleOrMultiple, lMax, loadOptionProperty, millisecondsToSeconds, rangeColorToHsl, sMax, } from "@tsparticles/engine";
|
|
2
2
|
import { ExternalInteractorBase, } from "@tsparticles/plugin-interactivity";
|
|
3
3
|
import { Trail } from "./Options/Classes/Trail.js";
|
|
4
4
|
const trailMode = "trail", defaultMin = 0, defaultWeight = 0;
|
|
@@ -84,10 +84,7 @@ export class TrailMaker extends ExternalInteractorBase {
|
|
|
84
84
|
(mouse.inside && !!mouse.position && isInArray(trailMode, events.onHover.mode))));
|
|
85
85
|
}
|
|
86
86
|
loadModeOptions(options, ...sources) {
|
|
87
|
-
options
|
|
88
|
-
for (const source of sources) {
|
|
89
|
-
options.trail.load(source?.trail);
|
|
90
|
-
}
|
|
87
|
+
loadOptionProperty(options, "trail", Trail, ...sources);
|
|
91
88
|
}
|
|
92
89
|
reset() {
|
|
93
90
|
}
|
package/cjs/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ensureInteractivityPluginLoaded } from "@tsparticles/plugin-interactivity";
|
|
2
2
|
import { TrailMaker } from "./TrailMaker.js";
|
|
3
3
|
export async function loadExternalTrailInteraction(engine) {
|
|
4
|
-
engine.checkVersion("4.
|
|
4
|
+
engine.checkVersion("4.2.0");
|
|
5
5
|
await engine.pluginManager.register((e) => {
|
|
6
6
|
ensureInteractivityPluginLoaded(e);
|
|
7
7
|
e.pluginManager.addInteractor?.("externalTrail", container => {
|
package/cjs/index.lazy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export async function loadExternalTrailInteraction(engine) {
|
|
2
|
-
engine.checkVersion("4.
|
|
2
|
+
engine.checkVersion("4.2.0");
|
|
3
3
|
await engine.pluginManager.register(async (e) => {
|
|
4
4
|
const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity/lazy");
|
|
5
5
|
ensureInteractivityPluginLoaded(e);
|
|
@@ -1,29 +1,17 @@
|
|
|
1
|
-
import { deepExtend, isNull, } from "@tsparticles/engine";
|
|
1
|
+
import { deepExtend, isNull, loadProperty, } from "@tsparticles/engine";
|
|
2
2
|
import { TrailColorCoords } from "./TrailColorCoords.js";
|
|
3
3
|
export class Trail {
|
|
4
|
-
colorCoords;
|
|
5
|
-
delay;
|
|
4
|
+
colorCoords = new TrailColorCoords();
|
|
5
|
+
delay = 1;
|
|
6
6
|
particles;
|
|
7
|
-
pauseOnStop;
|
|
8
|
-
quantity;
|
|
9
|
-
constructor() {
|
|
10
|
-
this.delay = 1;
|
|
11
|
-
this.pauseOnStop = false;
|
|
12
|
-
this.quantity = 1;
|
|
13
|
-
this.colorCoords = new TrailColorCoords();
|
|
14
|
-
}
|
|
7
|
+
pauseOnStop = false;
|
|
8
|
+
quantity = 1;
|
|
15
9
|
load(data) {
|
|
16
10
|
if (isNull(data))
|
|
17
11
|
return;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (data.quantity !== undefined) {
|
|
22
|
-
this.quantity = data.quantity;
|
|
23
|
-
}
|
|
24
|
-
if (data.pauseOnStop !== undefined) {
|
|
25
|
-
this.pauseOnStop = data.pauseOnStop;
|
|
26
|
-
}
|
|
12
|
+
loadProperty(this, "delay", data.delay);
|
|
13
|
+
loadProperty(this, "quantity", data.quantity);
|
|
14
|
+
loadProperty(this, "pauseOnStop", data.pauseOnStop);
|
|
27
15
|
if (data.particles !== undefined) {
|
|
28
16
|
this.particles = deepExtend({}, data.particles);
|
|
29
17
|
}
|
|
@@ -2,10 +2,7 @@ import { isNull, setRangeValue } from "@tsparticles/engine";
|
|
|
2
2
|
import { TrailColorWeight } from "./TrailColorWeight.js";
|
|
3
3
|
export class TrailColorComponent {
|
|
4
4
|
value;
|
|
5
|
-
weights;
|
|
6
|
-
constructor() {
|
|
7
|
-
this.weights = new TrailColorWeight();
|
|
8
|
-
}
|
|
5
|
+
weights = new TrailColorWeight();
|
|
9
6
|
load(data) {
|
|
10
7
|
if (!data) {
|
|
11
8
|
return;
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import { TrailColorComponent } from "./TrailColorComponent.js";
|
|
2
2
|
export class TrailColorCoords {
|
|
3
|
-
h;
|
|
4
|
-
l;
|
|
5
|
-
s;
|
|
6
|
-
constructor() {
|
|
7
|
-
this.h = new TrailColorComponent();
|
|
8
|
-
this.s = new TrailColorComponent();
|
|
9
|
-
this.l = new TrailColorComponent();
|
|
10
|
-
}
|
|
3
|
+
h = new TrailColorComponent();
|
|
4
|
+
l = new TrailColorComponent();
|
|
5
|
+
s = new TrailColorComponent();
|
|
11
6
|
load(data) {
|
|
12
7
|
if (!data) {
|
|
13
8
|
return;
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
+
import { loadProperty } from "@tsparticles/engine";
|
|
1
2
|
export class TrailColorWeight {
|
|
2
|
-
x;
|
|
3
|
-
y;
|
|
4
|
-
constructor() {
|
|
5
|
-
this.x = 0;
|
|
6
|
-
this.y = 0;
|
|
7
|
-
}
|
|
3
|
+
x = 0;
|
|
4
|
+
y = 0;
|
|
8
5
|
load(data) {
|
|
9
6
|
if (!data) {
|
|
10
7
|
return;
|
|
11
8
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
if (data.y !== undefined) {
|
|
16
|
-
this.y = data.y;
|
|
17
|
-
}
|
|
9
|
+
loadProperty(this, "x", data.x);
|
|
10
|
+
loadProperty(this, "y", data.y);
|
|
18
11
|
}
|
|
19
12
|
}
|
package/esm/TrailMaker.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnimatableColor, deepExtend, getRangeMax, getRangeMin, hMax, isInArray, itemFromSingleOrMultiple, lMax, millisecondsToSeconds, rangeColorToHsl, sMax, } from "@tsparticles/engine";
|
|
1
|
+
import { AnimatableColor, deepExtend, getRangeMax, getRangeMin, hMax, isInArray, itemFromSingleOrMultiple, lMax, loadOptionProperty, millisecondsToSeconds, rangeColorToHsl, sMax, } from "@tsparticles/engine";
|
|
2
2
|
import { ExternalInteractorBase, } from "@tsparticles/plugin-interactivity";
|
|
3
3
|
import { Trail } from "./Options/Classes/Trail.js";
|
|
4
4
|
const trailMode = "trail", defaultMin = 0, defaultWeight = 0;
|
|
@@ -84,10 +84,7 @@ export class TrailMaker extends ExternalInteractorBase {
|
|
|
84
84
|
(mouse.inside && !!mouse.position && isInArray(trailMode, events.onHover.mode))));
|
|
85
85
|
}
|
|
86
86
|
loadModeOptions(options, ...sources) {
|
|
87
|
-
options
|
|
88
|
-
for (const source of sources) {
|
|
89
|
-
options.trail.load(source?.trail);
|
|
90
|
-
}
|
|
87
|
+
loadOptionProperty(options, "trail", Trail, ...sources);
|
|
91
88
|
}
|
|
92
89
|
reset() {
|
|
93
90
|
}
|
package/esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ensureInteractivityPluginLoaded } from "@tsparticles/plugin-interactivity";
|
|
2
2
|
import { TrailMaker } from "./TrailMaker.js";
|
|
3
3
|
export async function loadExternalTrailInteraction(engine) {
|
|
4
|
-
engine.checkVersion("4.
|
|
4
|
+
engine.checkVersion("4.2.0");
|
|
5
5
|
await engine.pluginManager.register((e) => {
|
|
6
6
|
ensureInteractivityPluginLoaded(e);
|
|
7
7
|
e.pluginManager.addInteractor?.("externalTrail", container => {
|
package/esm/index.lazy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export async function loadExternalTrailInteraction(engine) {
|
|
2
|
-
engine.checkVersion("4.
|
|
2
|
+
engine.checkVersion("4.2.0");
|
|
3
3
|
await engine.pluginManager.register(async (e) => {
|
|
4
4
|
const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity/lazy");
|
|
5
5
|
ensureInteractivityPluginLoaded(e);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/interaction-external-trail",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "tsParticles trail external interaction",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
},
|
|
98
98
|
"type": "module",
|
|
99
99
|
"peerDependencies": {
|
|
100
|
-
"@tsparticles/engine": "4.
|
|
101
|
-
"@tsparticles/plugin-interactivity": "4.
|
|
100
|
+
"@tsparticles/engine": "4.2.0",
|
|
101
|
+
"@tsparticles/plugin-interactivity": "4.2.0"
|
|
102
102
|
}
|
|
103
103
|
}
|
package/report.html
CHANGED
|
@@ -4930,7 +4930,7 @@ var drawChart = (function (exports) {
|
|
|
4930
4930
|
</script>
|
|
4931
4931
|
<script>
|
|
4932
4932
|
/*<!--*/
|
|
4933
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"tsparticles.interaction.external.trail.js","children":[{"name":"dist/browser","children":[{"name":"Options/Classes","children":[{"uid":"
|
|
4933
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"tsparticles.interaction.external.trail.js","children":[{"name":"dist/browser","children":[{"name":"Options/Classes","children":[{"uid":"05962cd2-1","name":"TrailColorWeight.js"},{"uid":"05962cd2-3","name":"TrailColorComponent.js"},{"uid":"05962cd2-5","name":"TrailColorCoords.js"},{"uid":"05962cd2-7","name":"Trail.js"}]},{"uid":"05962cd2-9","name":"TrailMaker.js"},{"uid":"05962cd2-11","name":"index.js"},{"uid":"05962cd2-13","name":"browser.js"}]}]}],"isRoot":true},"nodeParts":{"05962cd2-1":{"renderedLength":262,"gzipLength":0,"brotliLength":0,"metaUid":"05962cd2-0"},"05962cd2-3":{"renderedLength":463,"gzipLength":0,"brotliLength":0,"metaUid":"05962cd2-2"},"05962cd2-5":{"renderedLength":638,"gzipLength":0,"brotliLength":0,"metaUid":"05962cd2-4"},"05962cd2-7":{"renderedLength":750,"gzipLength":0,"brotliLength":0,"metaUid":"05962cd2-6"},"05962cd2-9":{"renderedLength":4713,"gzipLength":0,"brotliLength":0,"metaUid":"05962cd2-8"},"05962cd2-11":{"renderedLength":410,"gzipLength":0,"brotliLength":0,"metaUid":"05962cd2-10"},"05962cd2-13":{"renderedLength":199,"gzipLength":0,"brotliLength":0,"metaUid":"05962cd2-12"}},"nodeMetas":{"05962cd2-0":{"id":"/dist/browser/Options/Classes/TrailColorWeight.js","moduleParts":{"tsparticles.interaction.external.trail.js":"05962cd2-1"},"imported":[{"uid":"05962cd2-15"}],"importedBy":[{"uid":"05962cd2-2"}]},"05962cd2-2":{"id":"/dist/browser/Options/Classes/TrailColorComponent.js","moduleParts":{"tsparticles.interaction.external.trail.js":"05962cd2-3"},"imported":[{"uid":"05962cd2-15"},{"uid":"05962cd2-0"}],"importedBy":[{"uid":"05962cd2-4"}]},"05962cd2-4":{"id":"/dist/browser/Options/Classes/TrailColorCoords.js","moduleParts":{"tsparticles.interaction.external.trail.js":"05962cd2-5"},"imported":[{"uid":"05962cd2-2"}],"importedBy":[{"uid":"05962cd2-6"}]},"05962cd2-6":{"id":"/dist/browser/Options/Classes/Trail.js","moduleParts":{"tsparticles.interaction.external.trail.js":"05962cd2-7"},"imported":[{"uid":"05962cd2-15"},{"uid":"05962cd2-4"}],"importedBy":[{"uid":"05962cd2-10"},{"uid":"05962cd2-8"}]},"05962cd2-8":{"id":"/dist/browser/TrailMaker.js","moduleParts":{"tsparticles.interaction.external.trail.js":"05962cd2-9"},"imported":[{"uid":"05962cd2-15"},{"uid":"05962cd2-14"},{"uid":"05962cd2-6"}],"importedBy":[{"uid":"05962cd2-10"}]},"05962cd2-10":{"id":"/dist/browser/index.js","moduleParts":{"tsparticles.interaction.external.trail.js":"05962cd2-11"},"imported":[{"uid":"05962cd2-14"},{"uid":"05962cd2-8"},{"uid":"05962cd2-6"}],"importedBy":[{"uid":"05962cd2-12"}]},"05962cd2-12":{"id":"/dist/browser/browser.js","moduleParts":{"tsparticles.interaction.external.trail.js":"05962cd2-13"},"imported":[{"uid":"05962cd2-10"}],"importedBy":[],"isEntry":true},"05962cd2-14":{"id":"@tsparticles/plugin-interactivity","moduleParts":{},"imported":[],"importedBy":[{"uid":"05962cd2-10"},{"uid":"05962cd2-8"}],"isExternal":true},"05962cd2-15":{"id":"@tsparticles/engine","moduleParts":{},"imported":[],"importedBy":[{"uid":"05962cd2-8"},{"uid":"05962cd2-6"},{"uid":"05962cd2-2"},{"uid":"05962cd2-0"}],"isExternal":true}},"env":{"rollup":"4.62.0"},"options":{"gzip":false,"brotli":false,"sourcemap":false}};
|
|
4934
4934
|
|
|
4935
4935
|
const run = () => {
|
|
4936
4936
|
const width = window.innerWidth;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(g){g.__tsParticlesInternals=g.__tsParticlesInternals||{};g.__tsParticlesInternals.bundles=g.__tsParticlesInternals.bundles||{};g.__tsParticlesInternals.effects=g.__tsParticlesInternals.effects||{};g.__tsParticlesInternals.engine=g.__tsParticlesInternals.engine||{};g.__tsParticlesInternals.interactions=g.__tsParticlesInternals.interactions||{};g.__tsParticlesInternals.palettes=g.__tsParticlesInternals.palettes||{};g.__tsParticlesInternals.paths=g.__tsParticlesInternals.paths||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins.emittersShapes=g.__tsParticlesInternals.plugins.emittersShapes||{};g.__tsParticlesInternals.presets=g.__tsParticlesInternals.presets||{};g.__tsParticlesInternals.shapes=g.__tsParticlesInternals.shapes||{};g.__tsParticlesInternals.updaters=g.__tsParticlesInternals.updaters||{};g.__tsParticlesInternals.utils=g.__tsParticlesInternals.utils||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas.utils=g.__tsParticlesInternals.canvas.utils||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path.utils=g.__tsParticlesInternals.path.utils||{};var __tsProxyFactory=typeof Proxy!=="undefined"?function(obj){return new Proxy(obj,{get:function(target,key){if(!(key in target)){target[key]={};}return target[key];}});}:function(obj){return obj;};g.__tsParticlesInternals.bundles=__tsProxyFactory(g.__tsParticlesInternals.bundles);g.__tsParticlesInternals.effects=__tsProxyFactory(g.__tsParticlesInternals.effects);g.__tsParticlesInternals.interactions=__tsProxyFactory(g.__tsParticlesInternals.interactions);g.__tsParticlesInternals.palettes=__tsProxyFactory(g.__tsParticlesInternals.palettes);g.__tsParticlesInternals.paths=__tsProxyFactory(g.__tsParticlesInternals.paths);g.__tsParticlesInternals.plugins=__tsProxyFactory(g.__tsParticlesInternals.plugins);g.__tsParticlesInternals.plugins.emittersShapes=__tsProxyFactory(g.__tsParticlesInternals.plugins.emittersShapes);g.__tsParticlesInternals.presets=__tsProxyFactory(g.__tsParticlesInternals.presets);g.__tsParticlesInternals.shapes=__tsProxyFactory(g.__tsParticlesInternals.shapes);g.__tsParticlesInternals.updaters=__tsProxyFactory(g.__tsParticlesInternals.updaters);g.__tsParticlesInternals.utils=__tsProxyFactory(g.__tsParticlesInternals.utils);g.__tsParticlesInternals.canvas=__tsProxyFactory(g.__tsParticlesInternals.canvas);g.__tsParticlesInternals.path=__tsProxyFactory(g.__tsParticlesInternals.path);g.tsparticlesInternalExports=g.tsparticlesInternalExports||{};})(typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:this);
|
|
2
|
-
/* External Interaction v4.
|
|
2
|
+
/* External Interaction v4.2.0 */
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tsparticles/plugin-interactivity'), require('@tsparticles/engine')) :
|
|
5
5
|
typeof define === 'function' && define.amd ? define(['exports', '@tsparticles/plugin-interactivity', '@tsparticles/engine'], factory) :
|
|
@@ -7,31 +7,20 @@
|
|
|
7
7
|
})(this, (function (exports, pluginInteractivity, engine) { 'use strict';
|
|
8
8
|
|
|
9
9
|
class TrailColorWeight {
|
|
10
|
-
x;
|
|
11
|
-
y;
|
|
12
|
-
constructor() {
|
|
13
|
-
this.x = 0;
|
|
14
|
-
this.y = 0;
|
|
15
|
-
}
|
|
10
|
+
x = 0;
|
|
11
|
+
y = 0;
|
|
16
12
|
load(data) {
|
|
17
13
|
if (!data) {
|
|
18
14
|
return;
|
|
19
15
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
if (data.y !== undefined) {
|
|
24
|
-
this.y = data.y;
|
|
25
|
-
}
|
|
16
|
+
engine.loadProperty(this, "x", data.x);
|
|
17
|
+
engine.loadProperty(this, "y", data.y);
|
|
26
18
|
}
|
|
27
19
|
}
|
|
28
20
|
|
|
29
21
|
class TrailColorComponent {
|
|
30
22
|
value;
|
|
31
|
-
weights;
|
|
32
|
-
constructor() {
|
|
33
|
-
this.weights = new TrailColorWeight();
|
|
34
|
-
}
|
|
23
|
+
weights = new TrailColorWeight();
|
|
35
24
|
load(data) {
|
|
36
25
|
if (!data) {
|
|
37
26
|
return;
|
|
@@ -47,14 +36,9 @@
|
|
|
47
36
|
}
|
|
48
37
|
|
|
49
38
|
class TrailColorCoords {
|
|
50
|
-
h;
|
|
51
|
-
l;
|
|
52
|
-
s;
|
|
53
|
-
constructor() {
|
|
54
|
-
this.h = new TrailColorComponent();
|
|
55
|
-
this.s = new TrailColorComponent();
|
|
56
|
-
this.l = new TrailColorComponent();
|
|
57
|
-
}
|
|
39
|
+
h = new TrailColorComponent();
|
|
40
|
+
l = new TrailColorComponent();
|
|
41
|
+
s = new TrailColorComponent();
|
|
58
42
|
load(data) {
|
|
59
43
|
if (!data) {
|
|
60
44
|
return;
|
|
@@ -75,29 +59,17 @@
|
|
|
75
59
|
}
|
|
76
60
|
|
|
77
61
|
class Trail {
|
|
78
|
-
colorCoords;
|
|
79
|
-
delay;
|
|
62
|
+
colorCoords = new TrailColorCoords();
|
|
63
|
+
delay = 1;
|
|
80
64
|
particles;
|
|
81
|
-
pauseOnStop;
|
|
82
|
-
quantity;
|
|
83
|
-
constructor() {
|
|
84
|
-
this.delay = 1;
|
|
85
|
-
this.pauseOnStop = false;
|
|
86
|
-
this.quantity = 1;
|
|
87
|
-
this.colorCoords = new TrailColorCoords();
|
|
88
|
-
}
|
|
65
|
+
pauseOnStop = false;
|
|
66
|
+
quantity = 1;
|
|
89
67
|
load(data) {
|
|
90
68
|
if (engine.isNull(data))
|
|
91
69
|
return;
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
if (data.quantity !== undefined) {
|
|
96
|
-
this.quantity = data.quantity;
|
|
97
|
-
}
|
|
98
|
-
if (data.pauseOnStop !== undefined) {
|
|
99
|
-
this.pauseOnStop = data.pauseOnStop;
|
|
100
|
-
}
|
|
70
|
+
engine.loadProperty(this, "delay", data.delay);
|
|
71
|
+
engine.loadProperty(this, "quantity", data.quantity);
|
|
72
|
+
engine.loadProperty(this, "pauseOnStop", data.pauseOnStop);
|
|
101
73
|
if (data.particles !== undefined) {
|
|
102
74
|
this.particles = engine.deepExtend({}, data.particles);
|
|
103
75
|
}
|
|
@@ -191,17 +163,14 @@
|
|
|
191
163
|
(mouse.inside && !!mouse.position && engine.isInArray(trailMode, events.onHover.mode))));
|
|
192
164
|
}
|
|
193
165
|
loadModeOptions(options, ...sources) {
|
|
194
|
-
options
|
|
195
|
-
for (const source of sources) {
|
|
196
|
-
options.trail.load(source?.trail);
|
|
197
|
-
}
|
|
166
|
+
engine.loadOptionProperty(options, "trail", Trail, ...sources);
|
|
198
167
|
}
|
|
199
168
|
reset() {
|
|
200
169
|
}
|
|
201
170
|
}
|
|
202
171
|
|
|
203
172
|
async function loadExternalTrailInteraction(engine) {
|
|
204
|
-
engine.checkVersion("4.
|
|
173
|
+
engine.checkVersion("4.2.0");
|
|
205
174
|
await engine.pluginManager.register((e) => {
|
|
206
175
|
pluginInteractivity.ensureInteractivityPluginLoaded(e);
|
|
207
176
|
e.pluginManager.addInteractor?.("externalTrail", container => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var s="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,s){return s in t||(t[s]={}),t[s]}})}:function(t){return t};t.__tsParticlesInternals.bundles=s(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=s(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=s(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=s(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=s(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=s(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=s(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=s(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=s(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=s(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=s(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=s(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=s(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,s){"object"==typeof exports&&"undefined"!=typeof module?s(exports,require("@tsparticles/plugin-interactivity"),require("@tsparticles/engine")):"function"==typeof define&&define.amd?define(["exports","@tsparticles/plugin-interactivity","@tsparticles/engine"],s):s(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.interactions.externalTrail=t.__tsParticlesInternals.interactions.externalTrail||{}),t.__tsParticlesInternals.plugins.interactivity,t.__tsParticlesInternals.engine)}(this,function(t,s,e){"use strict";class
|
|
1
|
+
!function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var s="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,s){return s in t||(t[s]={}),t[s]}})}:function(t){return t};t.__tsParticlesInternals.bundles=s(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=s(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=s(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=s(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=s(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=s(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=s(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=s(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=s(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=s(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=s(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=s(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=s(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,s){"object"==typeof exports&&"undefined"!=typeof module?s(exports,require("@tsparticles/plugin-interactivity"),require("@tsparticles/engine")):"function"==typeof define&&define.amd?define(["exports","@tsparticles/plugin-interactivity","@tsparticles/engine"],s):s(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.interactions.externalTrail=t.__tsParticlesInternals.interactions.externalTrail||{}),t.__tsParticlesInternals.plugins.interactivity,t.__tsParticlesInternals.engine)}(this,function(t,s,e){"use strict";class a{x=0;y=0;load(t){t&&(e.loadProperty(this,"x",t.x),e.loadProperty(this,"y",t.y))}}class n{value;weights=new a;load(t){t&&(t.weights&&(this.weights??=new a,this.weights.load(t.weights)),e.isNull(t.value)||(this.value=e.setRangeValue(t.value)))}}class l{h=new n;l=new n;s=new n;load(t){t&&(t.h&&(this.h??=new n,this.h.load(t.h)),t.s&&(this.s??=new n,this.s.load(t.s)),t.l&&(this.l??=new n,this.l.load(t.l)))}}class i{colorCoords=new l;delay=1;particles;pauseOnStop=!1;quantity=1;load(t){e.isNull(t)||(e.loadProperty(this,"delay",t.delay),e.loadProperty(this,"quantity",t.quantity),e.loadProperty(this,"pauseOnStop",t.pauseOnStop),void 0!==t.particles&&(this.particles=e.deepExtend({},t.particles)),t.colorCoords&&(this.colorCoords??=new l,this.colorCoords.load(t.colorCoords)))}}const r="trail";class c extends s.ExternalInteractorBase{maxDistance=0;#t;#s;#e;constructor(t,s){super(s),this.#e=t,this.#t=0}clear(){}init(){}interact(t,s){const a=this.container;if(!a.retina.reduceFactor)return;const n=a.actualOptions,l=n.interactivity?.modes.trail;if(!l)return;const i=l.delay*e.millisecondsToSeconds/this.container.retina.reduceFactor;if(this.#t<i&&(this.#t+=s.value),this.#t<i)return;const r=t.mouse.position,c=!(l.pauseOnStop&&(r===this.#s||r?.x===this.#s?.x&&r?.y===this.#s?.y));if(this.#s=r?{...r}:void 0,c&&r){let t=l.particles;const s=l.colorCoords;if(s){const{width:n,height:i}=a.canvas.size,c={x:r.x/n,y:r.y/i},o=t=>!!(t?.weights?.x??t?.weights?.y),_=(t,s,a)=>{if(!o(t))return;const n=t?.weights,l=c.x*(n?.x??0)+c.y*(n?.y??0),i=t?.value??s,r=e.getRangeMin(i??0),_=e.getRangeMax(i??a),p=r+l*(_-r);return Math.min(_,Math.max(r,p))},p=l.particles?.paint?e.itemFromSingleOrMultiple(l.particles.paint):void 0,d=p?.fill,P=d?e.rangeColorToHsl(this.#e,e.AnimatableColor.create(void 0,d.color)):void 0,u=_(s.h,P?.h,e.hMax),I=_(s.s,P?.s,e.sMax),h=_(s.l,P?.l,e.lMax);void 0===u&&void 0===I&&void 0===h||(t=e.deepExtend({},l.particles,{paint:{fill:{color:{value:{h:u??P?.h,s:I??P?.s,l:h??P?.l}}}}}))}a.particles.push(l.quantity,r,t)}this.#t-=i}isEnabled(t,s){const a=this.container.actualOptions,n=t.mouse,l=(s?.interactivity??a.interactivity)?.events;return!!l&&(n.clicking&&n.inside&&!!n.position&&e.isInArray(r,l.onClick.mode)||n.inside&&!!n.position&&e.isInArray(r,l.onHover.mode))}loadModeOptions(t,...s){e.loadOptionProperty(t,"trail",i,...s)}reset(){}}async function o(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{s.ensureInteractivityPluginLoaded(t),t.pluginManager.addInteractor?.("externalTrail",s=>Promise.resolve(new c(t.pluginManager,s)))})}const _=globalThis;_.__tsParticlesInternals=_.__tsParticlesInternals??{},_.loadExternalTrailInteraction=o,t.Trail=i,t.loadExternalTrailInteraction=o}),Object.assign(globalThis.window||globalThis,{loadExternalTrailInteraction:(globalThis.__tsParticlesInternals.interactions.externalTrail||{}).loadExternalTrailInteraction}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
|
|
@@ -4,6 +4,5 @@ import { TrailColorWeight } from "./TrailColorWeight.js";
|
|
|
4
4
|
export declare class TrailColorComponent implements ITrailColorComponent, IOptionLoader<ITrailColorComponent> {
|
|
5
5
|
value?: RangeValue;
|
|
6
6
|
weights?: TrailColorWeight;
|
|
7
|
-
constructor();
|
|
8
7
|
load(data?: RecursivePartial<ITrailColorComponent>): void;
|
|
9
8
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type IOptionLoader, type RecursivePartial } from "@tsparticles/engine";
|
|
2
2
|
import type { ITrailColorWeight } from "../Interfaces/ITrailColorWeight.js";
|
|
3
3
|
export declare class TrailColorWeight implements ITrailColorWeight, IOptionLoader<ITrailColorWeight> {
|
|
4
4
|
x: number;
|
|
5
5
|
y: number;
|
|
6
|
-
constructor();
|
|
7
6
|
load(data?: RecursivePartial<ITrailColorWeight>): void;
|
|
8
7
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { InteractivityOptions } from "@tsparticles/plugin-interactivity";
|
|
2
|
-
import type {
|
|
2
|
+
import type { Trail } from "./Trail.js";
|
|
3
3
|
export type TrailOptions = InteractivityOptions & {
|
|
4
4
|
interactivity?: {
|
|
5
|
-
modes:
|
|
5
|
+
modes: {
|
|
6
|
+
trail?: Trail;
|
|
7
|
+
};
|
|
6
8
|
};
|
|
7
9
|
};
|