@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
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
[](https://www.npmjs.com/package/@tsparticles/updater-wobble)
|
|
7
7
|
[](https://www.npmjs.com/package/@tsparticles/updater-wobble) [](https://github.com/sponsors/matteobruni)
|
|
8
8
|
|
|
9
|
-
[tsParticles](https://github.com/
|
|
9
|
+
[tsParticles](https://github.com/tsparticles/tsparticles) updater plugin for wobble animations.
|
|
10
10
|
|
|
11
11
|
## How to use it
|
|
12
12
|
|
package/browser/WobbleUpdater.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getRandom, getRangeValue, } from "@tsparticles/engine";
|
|
2
|
-
import { Wobble } from "./Options/Classes/Wobble";
|
|
3
|
-
import { updateWobble } from "./Utils";
|
|
2
|
+
import { Wobble } from "./Options/Classes/Wobble.js";
|
|
3
|
+
import { updateWobble } from "./Utils.js";
|
|
4
4
|
export class WobbleUpdater {
|
|
5
5
|
constructor(container) {
|
|
6
6
|
this.container = container;
|
package/browser/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WobbleUpdater } from "./WobbleUpdater";
|
|
1
|
+
import { WobbleUpdater } from "./WobbleUpdater.js";
|
|
2
2
|
export async function loadWobbleUpdater(engine, refresh = true) {
|
|
3
3
|
await engine.addParticleUpdater("wobble", (container) => new WobbleUpdater(container), refresh);
|
|
4
4
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "type": "module" }
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Wobble = void 0;
|
|
4
4
|
const engine_1 = require("@tsparticles/engine");
|
|
5
|
-
const
|
|
5
|
+
const WobbleSpeed_js_1 = require("./WobbleSpeed.js");
|
|
6
6
|
class Wobble {
|
|
7
7
|
constructor() {
|
|
8
8
|
this.distance = 5;
|
|
9
9
|
this.enable = false;
|
|
10
|
-
this.speed = new
|
|
10
|
+
this.speed = new WobbleSpeed_js_1.WobbleSpeed();
|
|
11
11
|
}
|
|
12
12
|
load(data) {
|
|
13
13
|
if (!data) {
|
package/cjs/WobbleUpdater.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.WobbleUpdater = void 0;
|
|
4
4
|
const engine_1 = require("@tsparticles/engine");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const Wobble_js_1 = require("./Options/Classes/Wobble.js");
|
|
6
|
+
const Utils_js_1 = require("./Utils.js");
|
|
7
7
|
class WobbleUpdater {
|
|
8
8
|
constructor(container) {
|
|
9
9
|
this.container = container;
|
|
@@ -31,7 +31,7 @@ class WobbleUpdater {
|
|
|
31
31
|
}
|
|
32
32
|
loadOptions(options, ...sources) {
|
|
33
33
|
if (!options.wobble) {
|
|
34
|
-
options.wobble = new
|
|
34
|
+
options.wobble = new Wobble_js_1.Wobble();
|
|
35
35
|
}
|
|
36
36
|
for (const source of sources) {
|
|
37
37
|
options.wobble.load(source?.wobble);
|
|
@@ -41,7 +41,7 @@ class WobbleUpdater {
|
|
|
41
41
|
if (!this.isEnabled(particle)) {
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
|
-
(0,
|
|
44
|
+
(0, Utils_js_1.updateWobble)(particle, delta);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
exports.WobbleUpdater = WobbleUpdater;
|
package/cjs/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.loadWobbleUpdater = void 0;
|
|
4
|
-
const
|
|
4
|
+
const WobbleUpdater_js_1 = require("./WobbleUpdater.js");
|
|
5
5
|
async function loadWobbleUpdater(engine, refresh = true) {
|
|
6
|
-
await engine.addParticleUpdater("wobble", (container) => new
|
|
6
|
+
await engine.addParticleUpdater("wobble", (container) => new WobbleUpdater_js_1.WobbleUpdater(container), refresh);
|
|
7
7
|
}
|
|
8
8
|
exports.loadWobbleUpdater = loadWobbleUpdater;
|
package/cjs/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "type": "commonjs" }
|
package/esm/WobbleUpdater.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getRandom, getRangeValue, } from "@tsparticles/engine";
|
|
2
|
-
import { Wobble } from "./Options/Classes/Wobble";
|
|
3
|
-
import { updateWobble } from "./Utils";
|
|
2
|
+
import { Wobble } from "./Options/Classes/Wobble.js";
|
|
3
|
+
import { updateWobble } from "./Utils.js";
|
|
4
4
|
export class WobbleUpdater {
|
|
5
5
|
constructor(container) {
|
|
6
6
|
this.container = container;
|
package/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WobbleUpdater } from "./WobbleUpdater";
|
|
1
|
+
import { WobbleUpdater } from "./WobbleUpdater.js";
|
|
2
2
|
export async function loadWobbleUpdater(engine, refresh = true) {
|
|
3
3
|
await engine.addParticleUpdater("wobble", (container) => new WobbleUpdater(container), refresh);
|
|
4
4
|
}
|
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/updater-wobble",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.2",
|
|
4
4
|
"description": "tsParticles particles wobble updater",
|
|
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": "updaters/wobble"
|
|
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.updater.wobble.min.js",
|
|
73
73
|
"unpkg": "tsparticles.updater.wobble.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"
|