@tsparticles/interaction-external-attract 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/Attractor.js +1 -1
- package/browser/index.js +3 -3
- package/browser/package.json +1 -0
- package/cjs/Attractor.js +2 -2
- package/cjs/index.js +4 -4
- package/cjs/package.json +1 -0
- package/esm/Attractor.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.attract.js +1 -1
- package/tsparticles.interaction.external.attract.min.js.LICENSE.txt +1 -1
- package/types/Attractor.d.ts +1 -1
- package/types/Options/Classes/Attract.d.ts +1 -1
- package/types/Options/Classes/AttractOptions.d.ts +1 -1
- package/types/Types.d.ts +3 -3
- package/types/index.d.ts +2 -2
- package/umd/Attractor.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 Attract External Interaction v3.0.0-beta.
|
|
1
|
+
/*! tsParticles Attract External Interaction v3.0.0-beta.2 by Matteo Bruni */
|
package/types/Attractor.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AttractContainer, AttractMode, IAttractMode } from "./Types";
|
|
1
|
+
import type { AttractContainer, AttractMode, IAttractMode } from "./Types.js";
|
|
2
2
|
import { type Engine, ExternalInteractorBase, type IModes, type Modes, type Particle, type RecursivePartial } from "@tsparticles/engine";
|
|
3
3
|
export declare class Attractor extends ExternalInteractorBase<AttractContainer> {
|
|
4
4
|
handleClickMode: (mode: string) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EasingType, type EasingTypeAlt, type IOptionLoader, type RecursivePartial } from "@tsparticles/engine";
|
|
2
|
-
import type { IAttract } from "../Interfaces/IAttract";
|
|
2
|
+
import type { IAttract } from "../Interfaces/IAttract.js";
|
|
3
3
|
export declare class Attract implements IAttract, IOptionLoader<IAttract> {
|
|
4
4
|
distance: number;
|
|
5
5
|
duration: number;
|
package/types/Types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Container, Particle } from "@tsparticles/engine";
|
|
2
|
-
import type { Attract } from "./Options/Classes/Attract";
|
|
3
|
-
import type { AttractOptions } from "./Options/Classes/AttractOptions";
|
|
4
|
-
import type { IAttract } from "./Options/Interfaces/IAttract";
|
|
2
|
+
import type { Attract } from "./Options/Classes/Attract.js";
|
|
3
|
+
import type { AttractOptions } from "./Options/Classes/AttractOptions.js";
|
|
4
|
+
import type { IAttract } from "./Options/Interfaces/IAttract.js";
|
|
5
5
|
export type IAttractMode = {
|
|
6
6
|
attract: IAttract;
|
|
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 loadExternalAttractInteraction(engine: Engine, refresh?: boolean): Promise<void>;
|
|
3
|
-
export * from "./Options/Classes/Attract";
|
|
4
|
-
export * from "./Options/Interfaces/IAttract";
|
|
3
|
+
export * from "./Options/Classes/Attract.js";
|
|
4
|
+
export * from "./Options/Interfaces/IAttract.js";
|
package/umd/Attractor.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/Attract"], factory);
|
|
7
|
+
define(["require", "exports", "@tsparticles/engine", "./Options/Classes/Attract.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Attractor = void 0;
|
|
13
13
|
const engine_1 = require("@tsparticles/engine");
|
|
14
|
-
const
|
|
14
|
+
const Attract_js_1 = require("./Options/Classes/Attract.js");
|
|
15
15
|
class Attractor extends engine_1.ExternalInteractorBase {
|
|
16
16
|
constructor(engine, container) {
|
|
17
17
|
super(container);
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
}
|
|
125
125
|
loadModeOptions(options, ...sources) {
|
|
126
126
|
if (!options.attract) {
|
|
127
|
-
options.attract = new
|
|
127
|
+
options.attract = new Attract_js_1.Attract();
|
|
128
128
|
}
|
|
129
129
|
for (const source of sources) {
|
|
130
130
|
options.attract.load(source?.attract);
|
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", "./Attractor", "./Options/Classes/Attract", "./Options/Interfaces/IAttract"], factory);
|
|
21
|
+
define(["require", "exports", "./Attractor.js", "./Options/Classes/Attract.js", "./Options/Interfaces/IAttract.js"], factory);
|
|
22
22
|
}
|
|
23
23
|
})(function (require, exports) {
|
|
24
24
|
"use strict";
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.loadExternalAttractInteraction = void 0;
|
|
27
|
-
const
|
|
27
|
+
const Attractor_js_1 = require("./Attractor.js");
|
|
28
28
|
async function loadExternalAttractInteraction(engine, refresh = true) {
|
|
29
|
-
await engine.addInteractor("externalAttract", (container) => new
|
|
29
|
+
await engine.addInteractor("externalAttract", (container) => new Attractor_js_1.Attractor(engine, container), refresh);
|
|
30
30
|
}
|
|
31
31
|
exports.loadExternalAttractInteraction = loadExternalAttractInteraction;
|
|
32
|
-
__exportStar(require("./Options/Classes/Attract"), exports);
|
|
33
|
-
__exportStar(require("./Options/Interfaces/IAttract"), exports);
|
|
32
|
+
__exportStar(require("./Options/Classes/Attract.js"), exports);
|
|
33
|
+
__exportStar(require("./Options/Interfaces/IAttract.js"), exports);
|
|
34
34
|
});
|