@tsparticles/interaction-external-bounce 3.0.0-beta.0 → 3.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/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
@@ -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
|
-
* v3.0.0-beta.
|
7
|
+
* v3.0.0-beta.2
|
8
8
|
*/
|
9
9
|
(function webpackUniversalModuleDefinition(root, factory) {
|
10
10
|
if(typeof exports === 'object' && typeof module === 'object')
|
@@ -1 +1 @@
|
|
1
|
-
/*! tsParticles Bounce External Interaction v3.0.0-beta.
|
1
|
+
/*! tsParticles Bounce External Interaction v3.0.0-beta.2 by Matteo Bruni */
|
package/types/Bouncer.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { BounceContainer, BounceMode, IBounceMode } from "./Types";
|
1
|
+
import type { BounceContainer, BounceMode, IBounceMode } from "./Types.js";
|
2
2
|
import { ExternalInteractorBase, type IModes, type Modes, type Particle, type RecursivePartial } from "@tsparticles/engine";
|
3
3
|
export declare class Bouncer extends ExternalInteractorBase<BounceContainer> {
|
4
4
|
constructor(container: BounceContainer);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { IOptionLoader, RecursivePartial } from "@tsparticles/engine";
|
2
|
-
import type { IBounce } from "../Interfaces/IBounce";
|
2
|
+
import type { IBounce } from "../Interfaces/IBounce.js";
|
3
3
|
export declare class Bounce implements IBounce, IOptionLoader<IBounce> {
|
4
4
|
distance: number;
|
5
5
|
constructor();
|
package/types/Types.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import type { Bounce } from "./Options/Classes/Bounce";
|
2
|
-
import type { BounceOptions } from "./Options/Classes/BounceOptions";
|
1
|
+
import type { Bounce } from "./Options/Classes/Bounce.js";
|
2
|
+
import type { BounceOptions } from "./Options/Classes/BounceOptions.js";
|
3
3
|
import type { Container } from "@tsparticles/engine";
|
4
|
-
import type { IBounce } from "./Options/Interfaces/IBounce";
|
4
|
+
import type { IBounce } from "./Options/Interfaces/IBounce.js";
|
5
5
|
export type IBounceMode = {
|
6
6
|
bounce: IBounce;
|
7
7
|
};
|
package/types/index.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
import type { Engine } from "@tsparticles/engine";
|
2
2
|
export declare function loadExternalBounceInteraction(engine: Engine, refresh?: boolean): Promise<void>;
|
3
|
-
export * from "./Options/Classes/Bounce";
|
4
|
-
export * from "./Options/Interfaces/IBounce";
|
3
|
+
export * from "./Options/Classes/Bounce.js";
|
4
|
+
export * from "./Options/Interfaces/IBounce.js";
|
package/umd/Bouncer.js
CHANGED
@@ -4,14 +4,14 @@
|
|
4
4
|
if (v !== undefined) module.exports = v;
|
5
5
|
}
|
6
6
|
else if (typeof define === "function" && define.amd) {
|
7
|
-
define(["require", "exports", "@tsparticles/engine", "./Options/Classes/Bounce"], factory);
|
7
|
+
define(["require", "exports", "@tsparticles/engine", "./Options/Classes/Bounce.js"], factory);
|
8
8
|
}
|
9
9
|
})(function (require, exports) {
|
10
10
|
"use strict";
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
12
|
exports.Bouncer = void 0;
|
13
13
|
const engine_1 = require("@tsparticles/engine");
|
14
|
-
const
|
14
|
+
const Bounce_js_1 = require("./Options/Classes/Bounce.js");
|
15
15
|
class Bouncer extends engine_1.ExternalInteractorBase {
|
16
16
|
constructor(container) {
|
17
17
|
super(container);
|
@@ -80,7 +80,7 @@
|
|
80
80
|
}
|
81
81
|
loadModeOptions(options, ...sources) {
|
82
82
|
if (!options.bounce) {
|
83
|
-
options.bounce = new
|
83
|
+
options.bounce = new Bounce_js_1.Bounce();
|
84
84
|
}
|
85
85
|
for (const source of sources) {
|
86
86
|
options.bounce.load(source?.bounce);
|
package/umd/index.js
CHANGED
@@ -18,17 +18,17 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
18
18
|
if (v !== undefined) module.exports = v;
|
19
19
|
}
|
20
20
|
else if (typeof define === "function" && define.amd) {
|
21
|
-
define(["require", "exports", "./Bouncer", "./Options/Classes/Bounce", "./Options/Interfaces/IBounce"], factory);
|
21
|
+
define(["require", "exports", "./Bouncer.js", "./Options/Classes/Bounce.js", "./Options/Interfaces/IBounce.js"], factory);
|
22
22
|
}
|
23
23
|
})(function (require, exports) {
|
24
24
|
"use strict";
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
26
|
exports.loadExternalBounceInteraction = void 0;
|
27
|
-
const
|
27
|
+
const Bouncer_js_1 = require("./Bouncer.js");
|
28
28
|
async function loadExternalBounceInteraction(engine, refresh = true) {
|
29
|
-
await engine.addInteractor("externalBounce", (container) => new
|
29
|
+
await engine.addInteractor("externalBounce", (container) => new Bouncer_js_1.Bouncer(container), refresh);
|
30
30
|
}
|
31
31
|
exports.loadExternalBounceInteraction = loadExternalBounceInteraction;
|
32
|
-
__exportStar(require("./Options/Classes/Bounce"), exports);
|
33
|
-
__exportStar(require("./Options/Interfaces/IBounce"), exports);
|
32
|
+
__exportStar(require("./Options/Classes/Bounce.js"), exports);
|
33
|
+
__exportStar(require("./Options/Interfaces/IBounce.js"), exports);
|
34
34
|
});
|