@tsparticles/interaction-external-slow 4.0.0-beta.0 → 4.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{253.min.js → 249.min.js} +1 -1
- package/browser/index.js +4 -3
- package/cjs/index.js +4 -3
- package/dist_browser_Slower_js.js +1 -1
- package/esm/index.js +4 -3
- package/package.json +10 -7
- package/report.html +84 -29
- package/tsparticles.interaction.external.slow.js +2 -2
- package/tsparticles.interaction.external.slow.min.js +2 -2
- package/umd/Options/Classes/Slow.js +0 -34
- package/umd/Options/Classes/SlowOptions.js +0 -12
- package/umd/Options/Interfaces/ISlow.js +0 -12
- package/umd/Slower.js +0 -67
- package/umd/Types.js +0 -12
- package/umd/index.js +0 -62
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(this.webpackChunk_tsparticles_interaction_external_slow=this.webpackChunk_tsparticles_interaction_external_slow||[]).push([[
|
|
1
|
+
"use strict";(this.webpackChunk_tsparticles_interaction_external_slow=this.webpackChunk_tsparticles_interaction_external_slow||[]).push([[249],{249(t,e,i){i.d(e,{Slower:()=>o});var s=i(702),a=i(303),n=i(720);class o extends s.ExternalInteractorBase{_maxDistance;constructor(t){super(t),this._maxDistance=0}get maxDistance(){return this._maxDistance}clear(t,e,i){(!t.slow.inRange||i)&&(t.slow.factor=1)}init(){let t=this.container,e=t.actualOptions.interactivity?.modes.slow;e&&(this._maxDistance=e.radius,t.retina.slowModeRadius=e.radius*t.retina.pixelRatio)}interact(){}isEnabled(t,e){let i=this.container,s=t.mouse,n=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!n?.onHover.enable&&!!s.position&&(0,a.isInArray)("slow",n.onHover.mode)}loadModeOptions(t,...e){for(let i of(t.slow??=new n.w,e))t.slow.load(i?.slow)}reset(t,e){e.slow.inRange=!1;let i=this.container,s=i.actualOptions,n=t.mouse.position,o=i.retina.slowModeRadius,r=s.interactivity?.modes.slow;if(!r||!o||o<0||!n)return;let l=e.getPosition(),c=(0,a.getDistance)(n,l),u=r.factor,{slow:w}=e;c>o||(w.inRange=!0,w.factor=c/o/u)}}}}]);
|
package/browser/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import {} from "@tsparticles/engine";
|
|
1
2
|
export async function loadExternalSlowInteraction(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-beta.
|
|
3
|
-
await engine.register(async (e) => {
|
|
3
|
+
engine.checkVersion("4.0.0-beta.2");
|
|
4
|
+
await engine.pluginManager.register(async (e) => {
|
|
4
5
|
const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity");
|
|
5
6
|
ensureInteractivityPluginLoaded(e);
|
|
6
|
-
e.addInteractor?.("externalSlow", async (container) => {
|
|
7
|
+
e.pluginManager.addInteractor?.("externalSlow", async (container) => {
|
|
7
8
|
const { Slower } = await import("./Slower.js");
|
|
8
9
|
return new Slower(container);
|
|
9
10
|
});
|
package/cjs/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import {} from "@tsparticles/engine";
|
|
1
2
|
export async function loadExternalSlowInteraction(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-beta.
|
|
3
|
-
await engine.register(async (e) => {
|
|
3
|
+
engine.checkVersion("4.0.0-beta.2");
|
|
4
|
+
await engine.pluginManager.register(async (e) => {
|
|
4
5
|
const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity");
|
|
5
6
|
ensureInteractivityPluginLoaded(e);
|
|
6
|
-
e.addInteractor?.("externalSlow", async (container) => {
|
|
7
|
+
e.pluginManager.addInteractor?.("externalSlow", async (container) => {
|
|
7
8
|
const { Slower } = await import("./Slower.js");
|
|
8
9
|
return new Slower(container);
|
|
9
10
|
});
|
package/esm/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import {} from "@tsparticles/engine";
|
|
1
2
|
export async function loadExternalSlowInteraction(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-beta.
|
|
3
|
-
await engine.register(async (e) => {
|
|
3
|
+
engine.checkVersion("4.0.0-beta.2");
|
|
4
|
+
await engine.pluginManager.register(async (e) => {
|
|
4
5
|
const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity");
|
|
5
6
|
ensureInteractivityPluginLoaded(e);
|
|
6
|
-
e.addInteractor?.("externalSlow", async (container) => {
|
|
7
|
+
e.pluginManager.addInteractor?.("externalSlow", async (container) => {
|
|
7
8
|
const { Slower } = await import("./Slower.js");
|
|
8
9
|
return new Slower(container);
|
|
9
10
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/interaction-external-slow",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.2",
|
|
4
4
|
"description": "tsParticles slow external interaction",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -81,17 +81,20 @@
|
|
|
81
81
|
"browser": "./browser/index.js",
|
|
82
82
|
"import": "./esm/index.js",
|
|
83
83
|
"require": "./cjs/index.js",
|
|
84
|
-
"
|
|
85
|
-
"default": "./cjs/index.js"
|
|
84
|
+
"default": "./esm/index.js"
|
|
86
85
|
},
|
|
87
86
|
"./package.json": "./package.json"
|
|
88
87
|
},
|
|
89
|
-
"
|
|
90
|
-
"@tsparticles/engine": "4.0.0-beta.
|
|
91
|
-
"@tsparticles/plugin-interactivity": "4.0.0-beta.
|
|
88
|
+
"peerDepdendencies": {
|
|
89
|
+
"@tsparticles/engine": "4.0.0-beta.1",
|
|
90
|
+
"@tsparticles/plugin-interactivity": "4.0.0-beta.1"
|
|
92
91
|
},
|
|
93
92
|
"publishConfig": {
|
|
94
93
|
"access": "public"
|
|
95
94
|
},
|
|
96
|
-
"type": "module"
|
|
95
|
+
"type": "module",
|
|
96
|
+
"peerDependencies": {
|
|
97
|
+
"@tsparticles/engine": "4.0.0-beta.1",
|
|
98
|
+
"@tsparticles/plugin-interactivity": "4.0.0-beta.1"
|
|
99
|
+
}
|
|
97
100
|
}
|