@tsparticles/interaction-external-bounce 3.0.0-beta.0 → 3.0.0-beta.2
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/browser/Bouncer.js +1 -1
- package/browser/index.js +3 -3
- package/browser/package.json +1 -0
- package/cjs/Bouncer.js +2 -2
- package/cjs/index.js +4 -4
- package/cjs/package.json +1 -0
- package/esm/Bouncer.js +1 -1
- package/esm/index.js +3 -3
- package/esm/package.json +1 -0
- package/package.json +18 -6
- package/report.html +23 -5
- package/tsparticles.interaction.external.bounce.js +1 -1
- package/tsparticles.interaction.external.bounce.min.js.LICENSE.txt +1 -1
- package/types/Bouncer.d.ts +1 -1
- package/types/Options/Classes/Bounce.d.ts +1 -1
- package/types/Options/Classes/BounceOptions.d.ts +1 -1
- package/types/Types.d.ts +3 -3
- package/types/index.d.ts +2 -2
- package/umd/Bouncer.js +3 -3
- package/umd/index.js +5 -5
package/README.md
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
[![npmjs](https://badge.fury.io/js/@tsparticles/interaction-external-bounce.svg)](https://www.npmjs.com/package/@tsparticles/interaction-external-bounce)
|
7
7
|
[![npmjs](https://img.shields.io/npm/dt/@tsparticles/interaction-external-bounce)](https://www.npmjs.com/package/@tsparticles/interaction-external-bounce) [![GitHub Sponsors](https://img.shields.io/github/sponsors/matteobruni)](https://github.com/sponsors/matteobruni)
|
8
8
|
|
9
|
-
[tsParticles](https://github.com/
|
9
|
+
[tsParticles](https://github.com/tsparticles/tsparticles) interaction plugin for bounce effect around mouse or HTML
|
10
10
|
elements.
|
11
11
|
|
12
12
|
## How to use it
|
package/browser/Bouncer.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Circle, ExternalInteractorBase, Rectangle, Vector, calculateBounds, circleBounce, circleBounceDataFromParticle, divModeExecute, isDivModeEnabled, isInArray, mouseMoveEvent, rectBounce, } from "@tsparticles/engine";
|
2
|
-
import { Bounce } from "./Options/Classes/Bounce";
|
2
|
+
import { Bounce } from "./Options/Classes/Bounce.js";
|
3
3
|
export class Bouncer extends ExternalInteractorBase {
|
4
4
|
constructor(container) {
|
5
5
|
super(container);
|
package/browser/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import { Bouncer } from "./Bouncer";
|
1
|
+
import { Bouncer } from "./Bouncer.js";
|
2
2
|
export async function loadExternalBounceInteraction(engine, refresh = true) {
|
3
3
|
await engine.addInteractor("externalBounce", (container) => new Bouncer(container), refresh);
|
4
4
|
}
|
5
|
-
export * from "./Options/Classes/Bounce";
|
6
|
-
export * from "./Options/Interfaces/IBounce";
|
5
|
+
export * from "./Options/Classes/Bounce.js";
|
6
|
+
export * from "./Options/Interfaces/IBounce.js";
|
@@ -0,0 +1 @@
|
|
1
|
+
{ "type": "module" }
|
package/cjs/Bouncer.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.Bouncer = void 0;
|
4
4
|
const engine_1 = require("@tsparticles/engine");
|
5
|
-
const
|
5
|
+
const Bounce_js_1 = require("./Options/Classes/Bounce.js");
|
6
6
|
class Bouncer extends engine_1.ExternalInteractorBase {
|
7
7
|
constructor(container) {
|
8
8
|
super(container);
|
@@ -71,7 +71,7 @@ class Bouncer extends engine_1.ExternalInteractorBase {
|
|
71
71
|
}
|
72
72
|
loadModeOptions(options, ...sources) {
|
73
73
|
if (!options.bounce) {
|
74
|
-
options.bounce = new
|
74
|
+
options.bounce = new Bounce_js_1.Bounce();
|
75
75
|
}
|
76
76
|
for (const source of sources) {
|
77
77
|
options.bounce.load(source?.bounce);
|
package/cjs/index.js
CHANGED
@@ -15,10 +15,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
17
|
exports.loadExternalBounceInteraction = void 0;
|
18
|
-
const
|
18
|
+
const Bouncer_js_1 = require("./Bouncer.js");
|
19
19
|
async function loadExternalBounceInteraction(engine, refresh = true) {
|
20
|
-
await engine.addInteractor("externalBounce", (container) => new
|
20
|
+
await engine.addInteractor("externalBounce", (container) => new Bouncer_js_1.Bouncer(container), refresh);
|
21
21
|
}
|
22
22
|
exports.loadExternalBounceInteraction = loadExternalBounceInteraction;
|
23
|
-
__exportStar(require("./Options/Classes/Bounce"), exports);
|
24
|
-
__exportStar(require("./Options/Interfaces/IBounce"), exports);
|
23
|
+
__exportStar(require("./Options/Classes/Bounce.js"), exports);
|
24
|
+
__exportStar(require("./Options/Interfaces/IBounce.js"), exports);
|
package/cjs/package.json
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{ "type": "commonjs" }
|
package/esm/Bouncer.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Circle, ExternalInteractorBase, Rectangle, Vector, calculateBounds, circleBounce, circleBounceDataFromParticle, divModeExecute, isDivModeEnabled, isInArray, mouseMoveEvent, rectBounce, } from "@tsparticles/engine";
|
2
|
-
import { Bounce } from "./Options/Classes/Bounce";
|
2
|
+
import { Bounce } from "./Options/Classes/Bounce.js";
|
3
3
|
export class Bouncer extends ExternalInteractorBase {
|
4
4
|
constructor(container) {
|
5
5
|
super(container);
|
package/esm/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import { Bouncer } from "./Bouncer";
|
1
|
+
import { Bouncer } from "./Bouncer.js";
|
2
2
|
export async function loadExternalBounceInteraction(engine, refresh = true) {
|
3
3
|
await engine.addInteractor("externalBounce", (container) => new Bouncer(container), refresh);
|
4
4
|
}
|
5
|
-
export * from "./Options/Classes/Bounce";
|
6
|
-
export * from "./Options/Interfaces/IBounce";
|
5
|
+
export * from "./Options/Classes/Bounce.js";
|
6
|
+
export * from "./Options/Interfaces/IBounce.js";
|
package/esm/package.json
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{ "type": "module" }
|
package/package.json
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "@tsparticles/interaction-external-bounce",
|
3
|
-
"version": "3.0.0-beta.
|
3
|
+
"version": "3.0.0-beta.2",
|
4
4
|
"description": "tsParticles bounce external interaction",
|
5
5
|
"homepage": "https://particles.js.org",
|
6
6
|
"repository": {
|
7
7
|
"type": "git",
|
8
|
-
"url": "git+https://github.com/
|
8
|
+
"url": "git+https://github.com/tsparticles/tsparticles.git",
|
9
9
|
"directory": "interactions/external/bounce"
|
10
10
|
},
|
11
11
|
"keywords": [
|
@@ -66,16 +66,28 @@
|
|
66
66
|
"author": "Matteo Bruni <matteo.bruni@me.com>",
|
67
67
|
"license": "MIT",
|
68
68
|
"bugs": {
|
69
|
-
"url": "https://github.com/
|
69
|
+
"url": "https://github.com/tsparticles/tsparticles/issues"
|
70
70
|
},
|
71
|
-
"
|
71
|
+
"sideEffects": false,
|
72
72
|
"jsdelivr": "tsparticles.interaction.external.bounce.min.js",
|
73
73
|
"unpkg": "tsparticles.interaction.external.bounce.min.js",
|
74
|
+
"browser": "browser/index.js",
|
75
|
+
"main": "cjs/index.js",
|
74
76
|
"module": "esm/index.js",
|
75
77
|
"types": "types/index.d.ts",
|
76
|
-
"
|
78
|
+
"exports": {
|
79
|
+
".": {
|
80
|
+
"types": "./types/index.d.ts",
|
81
|
+
"browser": "./browser/index.js",
|
82
|
+
"import": "./esm/index.js",
|
83
|
+
"require": "./cjs/index.js",
|
84
|
+
"umd": "./umd/index.js",
|
85
|
+
"default": "./cjs/index.js"
|
86
|
+
},
|
87
|
+
"./package.json": "./package.json"
|
88
|
+
},
|
77
89
|
"dependencies": {
|
78
|
-
"@tsparticles/engine": "^3.0.0-beta.
|
90
|
+
"@tsparticles/engine": "^3.0.0-beta.2"
|
79
91
|
},
|
80
92
|
"publishConfig": {
|
81
93
|
"access": "public"
|