@tsparticles/updater-wobble 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/Wobble.js +1 -1
- package/browser/WobbleUpdater.js +2 -2
- package/browser/index.js +1 -1
- package/browser/package.json +1 -0
- package/cjs/Options/Classes/Wobble.js +2 -2
- package/cjs/WobbleUpdater.js +4 -4
- package/cjs/index.js +2 -2
- package/cjs/package.json +1 -0
- package/esm/Options/Classes/Wobble.js +1 -1
- package/esm/WobbleUpdater.js +2 -2
- package/esm/index.js +1 -1
- package/esm/package.json +1 -0
- package/package.json +18 -6
- package/report.html +23 -5
- package/tsparticles.updater.wobble.js +1 -1
- package/tsparticles.updater.wobble.min.js.LICENSE.txt +1 -1
- package/types/Options/Classes/Wobble.d.ts +2 -2
- package/types/Options/Classes/WobbleSpeed.d.ts +1 -1
- package/types/Options/Interfaces/IWobble.d.ts +1 -1
- package/types/Types.d.ts +2 -2
- package/types/Utils.d.ts +1 -1
- package/types/WobbleUpdater.d.ts +1 -1
- package/umd/Options/Classes/Wobble.js +3 -3
- package/umd/WobbleUpdater.js +5 -5
- package/umd/index.js +3 -3
|
@@ -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 Wobble Updater v3.0.0-beta.
|
|
1
|
+
/*! tsParticles Wobble Updater v3.0.0-beta.2 by Matteo Bruni */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type IOptionLoader, type RangeValue, type RecursivePartial } from "@tsparticles/engine";
|
|
2
|
-
import type { IWobble } from "../Interfaces/IWobble";
|
|
3
|
-
import { WobbleSpeed } from "./WobbleSpeed";
|
|
2
|
+
import type { IWobble } from "../Interfaces/IWobble.js";
|
|
3
|
+
import { WobbleSpeed } from "./WobbleSpeed.js";
|
|
4
4
|
export declare class Wobble implements IWobble, IOptionLoader<IWobble> {
|
|
5
5
|
distance: RangeValue;
|
|
6
6
|
enable: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type IOptionLoader, type RangeValue, type RecursivePartial } from "@tsparticles/engine";
|
|
2
|
-
import type { IWobbleSpeed } from "../Interfaces/IWobbleSpeed";
|
|
2
|
+
import type { IWobbleSpeed } from "../Interfaces/IWobbleSpeed.js";
|
|
3
3
|
export declare class WobbleSpeed implements IWobbleSpeed, IOptionLoader<IWobbleSpeed> {
|
|
4
4
|
angle: RangeValue;
|
|
5
5
|
move: RangeValue;
|
package/types/Types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IParticlesOptions, Particle, ParticlesOptions } from "@tsparticles/engine";
|
|
2
|
-
import type { IWobble } from "./Options/Interfaces/IWobble";
|
|
3
|
-
import type { Wobble } from "./Options/Classes/Wobble";
|
|
2
|
+
import type { IWobble } from "./Options/Interfaces/IWobble.js";
|
|
3
|
+
import type { Wobble } from "./Options/Classes/Wobble.js";
|
|
4
4
|
interface IParticleWobble {
|
|
5
5
|
angle: number;
|
|
6
6
|
angleSpeed: number;
|
package/types/Utils.d.ts
CHANGED
package/types/WobbleUpdater.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Container, type IDelta, type IParticleUpdater, type RecursivePartial } from "@tsparticles/engine";
|
|
2
|
-
import type { IWobbleParticlesOptions, WobbleParticle, WobbleParticlesOptions } from "./Types";
|
|
2
|
+
import type { IWobbleParticlesOptions, WobbleParticle, WobbleParticlesOptions } from "./Types.js";
|
|
3
3
|
export declare class WobbleUpdater implements IParticleUpdater {
|
|
4
4
|
private readonly container;
|
|
5
5
|
constructor(container: Container);
|
|
@@ -4,19 +4,19 @@
|
|
|
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", "./WobbleSpeed"], factory);
|
|
7
|
+
define(["require", "exports", "@tsparticles/engine", "./WobbleSpeed.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Wobble = void 0;
|
|
13
13
|
const engine_1 = require("@tsparticles/engine");
|
|
14
|
-
const
|
|
14
|
+
const WobbleSpeed_js_1 = require("./WobbleSpeed.js");
|
|
15
15
|
class Wobble {
|
|
16
16
|
constructor() {
|
|
17
17
|
this.distance = 5;
|
|
18
18
|
this.enable = false;
|
|
19
|
-
this.speed = new
|
|
19
|
+
this.speed = new WobbleSpeed_js_1.WobbleSpeed();
|
|
20
20
|
}
|
|
21
21
|
load(data) {
|
|
22
22
|
if (!data) {
|
package/umd/WobbleUpdater.js
CHANGED
|
@@ -4,15 +4,15 @@
|
|
|
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/Wobble", "./Utils"], factory);
|
|
7
|
+
define(["require", "exports", "@tsparticles/engine", "./Options/Classes/Wobble.js", "./Utils.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.WobbleUpdater = void 0;
|
|
13
13
|
const engine_1 = require("@tsparticles/engine");
|
|
14
|
-
const
|
|
15
|
-
const
|
|
14
|
+
const Wobble_js_1 = require("./Options/Classes/Wobble.js");
|
|
15
|
+
const Utils_js_1 = require("./Utils.js");
|
|
16
16
|
class WobbleUpdater {
|
|
17
17
|
constructor(container) {
|
|
18
18
|
this.container = container;
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
}
|
|
41
41
|
loadOptions(options, ...sources) {
|
|
42
42
|
if (!options.wobble) {
|
|
43
|
-
options.wobble = new
|
|
43
|
+
options.wobble = new Wobble_js_1.Wobble();
|
|
44
44
|
}
|
|
45
45
|
for (const source of sources) {
|
|
46
46
|
options.wobble.load(source?.wobble);
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
if (!this.isEnabled(particle)) {
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
53
|
-
(0,
|
|
53
|
+
(0, Utils_js_1.updateWobble)(particle, delta);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
exports.WobbleUpdater = WobbleUpdater;
|
package/umd/index.js
CHANGED
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
if (v !== undefined) module.exports = v;
|
|
5
5
|
}
|
|
6
6
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "./WobbleUpdater"], factory);
|
|
7
|
+
define(["require", "exports", "./WobbleUpdater.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.loadWobbleUpdater = void 0;
|
|
13
|
-
const
|
|
13
|
+
const WobbleUpdater_js_1 = require("./WobbleUpdater.js");
|
|
14
14
|
async function loadWobbleUpdater(engine, refresh = true) {
|
|
15
|
-
await engine.addParticleUpdater("wobble", (container) => new
|
|
15
|
+
await engine.addParticleUpdater("wobble", (container) => new WobbleUpdater_js_1.WobbleUpdater(container), refresh);
|
|
16
16
|
}
|
|
17
17
|
exports.loadWobbleUpdater = loadWobbleUpdater;
|
|
18
18
|
});
|