@tsparticles/interaction-external-repulse 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/Options/Classes/Repulse.js +2 -2
- package/browser/Options/Classes/RepulseDiv.js +1 -1
- package/browser/Repulser.js +1 -1
- package/browser/index.js +7 -7
- package/browser/package.json +1 -0
- package/cjs/Options/Classes/Repulse.js +4 -4
- package/cjs/Options/Classes/RepulseDiv.js +2 -2
- package/cjs/Repulser.js +2 -2
- package/cjs/index.js +8 -8
- package/cjs/package.json +1 -0
- package/esm/Options/Classes/Repulse.js +2 -2
- package/esm/Options/Classes/RepulseDiv.js +1 -1
- package/esm/Repulser.js +1 -1
- package/esm/index.js +7 -7
- package/esm/package.json +1 -0
- package/package.json +18 -6
- package/report.html +23 -5
- package/tsparticles.interaction.external.repulse.js +1 -1
- package/tsparticles.interaction.external.repulse.min.js.LICENSE.txt +1 -1
- package/types/Options/Classes/Repulse.d.ts +3 -3
- package/types/Options/Classes/RepulseBase.d.ts +1 -1
- package/types/Options/Classes/RepulseDiv.d.ts +2 -2
- package/types/Options/Classes/RepulseOptions.d.ts +1 -1
- package/types/Options/Interfaces/IRepulse.d.ts +2 -2
- package/types/Options/Interfaces/IRepulseDiv.d.ts +1 -1
- package/types/Repulser.d.ts +1 -1
- package/types/Types.d.ts +3 -3
- package/types/index.d.ts +6 -6
- package/umd/Options/Classes/Repulse.js +5 -5
- package/umd/Options/Classes/RepulseDiv.js +3 -3
- package/umd/Repulser.js +3 -3
- package/umd/index.js +9 -9
|
@@ -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 Repulse External Interaction v3.0.0-beta.
|
|
1
|
+
/*! tsParticles Repulse External Interaction v3.0.0-beta.2 by Matteo Bruni */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type IOptionLoader, type RecursivePartial, type SingleOrMultiple } from "@tsparticles/engine";
|
|
2
|
-
import type { IRepulse } from "../Interfaces/IRepulse";
|
|
3
|
-
import { RepulseBase } from "./RepulseBase";
|
|
4
|
-
import { RepulseDiv } from "./RepulseDiv";
|
|
2
|
+
import type { IRepulse } from "../Interfaces/IRepulse.js";
|
|
3
|
+
import { RepulseBase } from "./RepulseBase.js";
|
|
4
|
+
import { RepulseDiv } from "./RepulseDiv.js";
|
|
5
5
|
export declare class Repulse extends RepulseBase implements IRepulse, IOptionLoader<IRepulse> {
|
|
6
6
|
divs?: SingleOrMultiple<RepulseDiv>;
|
|
7
7
|
load(data?: RecursivePartial<IRepulse>): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EasingType, type EasingTypeAlt, type IOptionLoader, type RecursivePartial } from "@tsparticles/engine";
|
|
2
|
-
import type { IRepulseBase } from "../Interfaces/IRepulseBase";
|
|
2
|
+
import type { IRepulseBase } from "../Interfaces/IRepulseBase.js";
|
|
3
3
|
export declare abstract class RepulseBase implements IRepulseBase, IOptionLoader<IRepulseBase> {
|
|
4
4
|
distance: number;
|
|
5
5
|
duration: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type IOptionLoader, type RecursivePartial, type SingleOrMultiple } from "@tsparticles/engine";
|
|
2
|
-
import type { IRepulseDiv } from "../Interfaces/IRepulseDiv";
|
|
3
|
-
import { RepulseBase } from "./RepulseBase";
|
|
2
|
+
import type { IRepulseDiv } from "../Interfaces/IRepulseDiv.js";
|
|
3
|
+
import { RepulseBase } from "./RepulseBase.js";
|
|
4
4
|
export declare class RepulseDiv extends RepulseBase implements IRepulseDiv, IOptionLoader<IRepulseDiv> {
|
|
5
5
|
selectors: SingleOrMultiple<string>;
|
|
6
6
|
constructor();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { IRepulseBase } from "./IRepulseBase";
|
|
2
|
-
import type { IRepulseDiv } from "./IRepulseDiv";
|
|
1
|
+
import type { IRepulseBase } from "./IRepulseBase.js";
|
|
2
|
+
import type { IRepulseDiv } from "./IRepulseDiv.js";
|
|
3
3
|
import type { SingleOrMultiple } from "@tsparticles/engine";
|
|
4
4
|
export interface IRepulse extends IRepulseBase {
|
|
5
5
|
divs?: SingleOrMultiple<IRepulseDiv>;
|
package/types/Repulser.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Engine, ExternalInteractorBase, type IModes, type Modes, type Particle, type RecursivePartial } from "@tsparticles/engine";
|
|
2
|
-
import type { IRepulseMode, RepulseContainer, RepulseMode } from "./Types";
|
|
2
|
+
import type { IRepulseMode, RepulseContainer, RepulseMode } from "./Types.js";
|
|
3
3
|
export declare class Repulser extends ExternalInteractorBase<RepulseContainer> {
|
|
4
4
|
handleClickMode: (mode: string) => void;
|
|
5
5
|
private readonly _engine;
|
package/types/Types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Container, Particle } from "@tsparticles/engine";
|
|
2
|
-
import type { IRepulse } from "./Options/Interfaces/IRepulse";
|
|
3
|
-
import type { Repulse } from "./Options/Classes/Repulse";
|
|
4
|
-
import type { RepulseOptions } from "./Options/Classes/RepulseOptions";
|
|
2
|
+
import type { IRepulse } from "./Options/Interfaces/IRepulse.js";
|
|
3
|
+
import type { Repulse } from "./Options/Classes/Repulse.js";
|
|
4
|
+
import type { RepulseOptions } from "./Options/Classes/RepulseOptions.js";
|
|
5
5
|
export type IRepulseMode = {
|
|
6
6
|
repulse: IRepulse;
|
|
7
7
|
};
|
package/types/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Engine } from "@tsparticles/engine";
|
|
2
2
|
export declare function loadExternalRepulseInteraction(engine: Engine, refresh?: boolean): Promise<void>;
|
|
3
|
-
export * from "./Options/Classes/RepulseBase";
|
|
4
|
-
export * from "./Options/Classes/RepulseDiv";
|
|
5
|
-
export * from "./Options/Classes/Repulse";
|
|
6
|
-
export * from "./Options/Interfaces/IRepulseBase";
|
|
7
|
-
export * from "./Options/Interfaces/IRepulseDiv";
|
|
8
|
-
export * from "./Options/Interfaces/IRepulse";
|
|
3
|
+
export * from "./Options/Classes/RepulseBase.js";
|
|
4
|
+
export * from "./Options/Classes/RepulseDiv.js";
|
|
5
|
+
export * from "./Options/Classes/Repulse.js";
|
|
6
|
+
export * from "./Options/Interfaces/IRepulseBase.js";
|
|
7
|
+
export * from "./Options/Interfaces/IRepulseDiv.js";
|
|
8
|
+
export * from "./Options/Interfaces/IRepulse.js";
|
|
@@ -4,23 +4,23 @@
|
|
|
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", "./RepulseBase", "./RepulseDiv"], factory);
|
|
7
|
+
define(["require", "exports", "@tsparticles/engine", "./RepulseBase.js", "./RepulseDiv.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Repulse = void 0;
|
|
13
13
|
const engine_1 = require("@tsparticles/engine");
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
class Repulse extends
|
|
14
|
+
const RepulseBase_js_1 = require("./RepulseBase.js");
|
|
15
|
+
const RepulseDiv_js_1 = require("./RepulseDiv.js");
|
|
16
|
+
class Repulse extends RepulseBase_js_1.RepulseBase {
|
|
17
17
|
load(data) {
|
|
18
18
|
super.load(data);
|
|
19
19
|
if (!data) {
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
22
|
this.divs = (0, engine_1.executeOnSingleOrMultiple)(data.divs, (div) => {
|
|
23
|
-
const tmp = new
|
|
23
|
+
const tmp = new RepulseDiv_js_1.RepulseDiv();
|
|
24
24
|
tmp.load(div);
|
|
25
25
|
return tmp;
|
|
26
26
|
});
|
|
@@ -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", "./RepulseBase"], factory);
|
|
7
|
+
define(["require", "exports", "./RepulseBase.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.RepulseDiv = void 0;
|
|
13
|
-
const
|
|
14
|
-
class RepulseDiv extends
|
|
13
|
+
const RepulseBase_js_1 = require("./RepulseBase.js");
|
|
14
|
+
class RepulseDiv extends RepulseBase_js_1.RepulseBase {
|
|
15
15
|
constructor() {
|
|
16
16
|
super();
|
|
17
17
|
this.selectors = [];
|
package/umd/Repulser.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/Repulse"], factory);
|
|
7
|
+
define(["require", "exports", "@tsparticles/engine", "./Options/Classes/Repulse.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Repulser = void 0;
|
|
13
13
|
const engine_1 = require("@tsparticles/engine");
|
|
14
|
-
const
|
|
14
|
+
const Repulse_js_1 = require("./Options/Classes/Repulse.js");
|
|
15
15
|
class Repulser extends engine_1.ExternalInteractorBase {
|
|
16
16
|
constructor(engine, container) {
|
|
17
17
|
super(container);
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
}
|
|
156
156
|
loadModeOptions(options, ...sources) {
|
|
157
157
|
if (!options.repulse) {
|
|
158
|
-
options.repulse = new
|
|
158
|
+
options.repulse = new Repulse_js_1.Repulse();
|
|
159
159
|
}
|
|
160
160
|
for (const source of sources) {
|
|
161
161
|
options.repulse.load(source?.repulse);
|
package/umd/index.js
CHANGED
|
@@ -18,21 +18,21 @@ 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", "./Repulser", "./Options/Classes/RepulseBase", "./Options/Classes/RepulseDiv", "./Options/Classes/Repulse", "./Options/Interfaces/IRepulseBase", "./Options/Interfaces/IRepulseDiv", "./Options/Interfaces/IRepulse"], factory);
|
|
21
|
+
define(["require", "exports", "./Repulser.js", "./Options/Classes/RepulseBase.js", "./Options/Classes/RepulseDiv.js", "./Options/Classes/Repulse.js", "./Options/Interfaces/IRepulseBase.js", "./Options/Interfaces/IRepulseDiv.js", "./Options/Interfaces/IRepulse.js"], factory);
|
|
22
22
|
}
|
|
23
23
|
})(function (require, exports) {
|
|
24
24
|
"use strict";
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.loadExternalRepulseInteraction = void 0;
|
|
27
|
-
const
|
|
27
|
+
const Repulser_js_1 = require("./Repulser.js");
|
|
28
28
|
async function loadExternalRepulseInteraction(engine, refresh = true) {
|
|
29
|
-
await engine.addInteractor("externalRepulse", (container) => new
|
|
29
|
+
await engine.addInteractor("externalRepulse", (container) => new Repulser_js_1.Repulser(engine, container), refresh);
|
|
30
30
|
}
|
|
31
31
|
exports.loadExternalRepulseInteraction = loadExternalRepulseInteraction;
|
|
32
|
-
__exportStar(require("./Options/Classes/RepulseBase"), exports);
|
|
33
|
-
__exportStar(require("./Options/Classes/RepulseDiv"), exports);
|
|
34
|
-
__exportStar(require("./Options/Classes/Repulse"), exports);
|
|
35
|
-
__exportStar(require("./Options/Interfaces/IRepulseBase"), exports);
|
|
36
|
-
__exportStar(require("./Options/Interfaces/IRepulseDiv"), exports);
|
|
37
|
-
__exportStar(require("./Options/Interfaces/IRepulse"), exports);
|
|
32
|
+
__exportStar(require("./Options/Classes/RepulseBase.js"), exports);
|
|
33
|
+
__exportStar(require("./Options/Classes/RepulseDiv.js"), exports);
|
|
34
|
+
__exportStar(require("./Options/Classes/Repulse.js"), exports);
|
|
35
|
+
__exportStar(require("./Options/Interfaces/IRepulseBase.js"), exports);
|
|
36
|
+
__exportStar(require("./Options/Interfaces/IRepulseDiv.js"), exports);
|
|
37
|
+
__exportStar(require("./Options/Interfaces/IRepulse.js"), exports);
|
|
38
38
|
});
|