@tsparticles/updater-rotate 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/Rotate.js +1 -1
- package/browser/RotateUpdater.js +1 -1
- package/browser/index.js +1 -1
- package/browser/package.json +1 -0
- package/cjs/Options/Classes/Rotate.js +2 -2
- package/cjs/RotateUpdater.js +2 -2
- package/cjs/index.js +2 -2
- package/cjs/package.json +1 -0
- package/esm/Options/Classes/Rotate.js +1 -1
- package/esm/RotateUpdater.js +1 -1
- 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.rotate.js +1 -1
- package/tsparticles.updater.rotate.min.js.LICENSE.txt +1 -1
- package/types/Options/Classes/Rotate.d.ts +2 -2
- package/types/Options/Classes/RotateAnimation.d.ts +1 -1
- package/types/Options/Interfaces/IRotate.d.ts +1 -1
- package/types/RotateUpdater.d.ts +2 -2
- package/umd/Options/Classes/Rotate.js +3 -3
- package/umd/RotateUpdater.js +3 -3
- package/umd/index.js +3 -3
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
[](https://www.npmjs.com/package/@tsparticles/updater-rotate)
|
|
7
7
|
[](https://www.npmjs.com/package/@tsparticles/updater-rotate) [](https://github.com/sponsors/matteobruni)
|
|
8
8
|
|
|
9
|
-
[tsParticles](https://github.com/
|
|
9
|
+
[tsParticles](https://github.com/tsparticles/tsparticles) updater plugin for rotate animations.
|
|
10
10
|
|
|
11
11
|
## How to use it
|
|
12
12
|
|
package/browser/RotateUpdater.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getRandom, getRangeValue, } from "@tsparticles/engine";
|
|
2
|
-
import { Rotate } from "./Options/Classes/Rotate";
|
|
2
|
+
import { Rotate } from "./Options/Classes/Rotate.js";
|
|
3
3
|
function updateRotate(particle, delta) {
|
|
4
4
|
const rotate = particle.rotate, rotateOptions = particle.options.rotate;
|
|
5
5
|
if (!rotate || !rotateOptions) {
|
package/browser/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RotateUpdater } from "./RotateUpdater";
|
|
1
|
+
import { RotateUpdater } from "./RotateUpdater.js";
|
|
2
2
|
export async function loadRotateUpdater(engine, refresh = true) {
|
|
3
3
|
await engine.addParticleUpdater("rotate", (container) => new RotateUpdater(container), refresh);
|
|
4
4
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "type": "module" }
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Rotate = void 0;
|
|
4
4
|
const engine_1 = require("@tsparticles/engine");
|
|
5
|
-
const
|
|
5
|
+
const RotateAnimation_js_1 = require("./RotateAnimation.js");
|
|
6
6
|
class Rotate extends engine_1.ValueWithRandom {
|
|
7
7
|
constructor() {
|
|
8
8
|
super();
|
|
9
|
-
this.animation = new
|
|
9
|
+
this.animation = new RotateAnimation_js_1.RotateAnimation();
|
|
10
10
|
this.direction = "clockwise";
|
|
11
11
|
this.path = false;
|
|
12
12
|
this.value = 0;
|
package/cjs/RotateUpdater.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RotateUpdater = void 0;
|
|
4
4
|
const engine_1 = require("@tsparticles/engine");
|
|
5
|
-
const
|
|
5
|
+
const Rotate_js_1 = require("./Options/Classes/Rotate.js");
|
|
6
6
|
function updateRotate(particle, delta) {
|
|
7
7
|
const rotate = particle.rotate, rotateOptions = particle.options.rotate;
|
|
8
8
|
if (!rotate || !rotateOptions) {
|
|
@@ -79,7 +79,7 @@ class RotateUpdater {
|
|
|
79
79
|
}
|
|
80
80
|
loadOptions(options, ...sources) {
|
|
81
81
|
if (!options.rotate) {
|
|
82
|
-
options.rotate = new
|
|
82
|
+
options.rotate = new Rotate_js_1.Rotate();
|
|
83
83
|
}
|
|
84
84
|
for (const source of sources) {
|
|
85
85
|
options.rotate.load(source?.rotate);
|
package/cjs/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.loadRotateUpdater = void 0;
|
|
4
|
-
const
|
|
4
|
+
const RotateUpdater_js_1 = require("./RotateUpdater.js");
|
|
5
5
|
async function loadRotateUpdater(engine, refresh = true) {
|
|
6
|
-
await engine.addParticleUpdater("rotate", (container) => new
|
|
6
|
+
await engine.addParticleUpdater("rotate", (container) => new RotateUpdater_js_1.RotateUpdater(container), refresh);
|
|
7
7
|
}
|
|
8
8
|
exports.loadRotateUpdater = loadRotateUpdater;
|
package/cjs/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "type": "commonjs" }
|
package/esm/RotateUpdater.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getRandom, getRangeValue, } from "@tsparticles/engine";
|
|
2
|
-
import { Rotate } from "./Options/Classes/Rotate";
|
|
2
|
+
import { Rotate } from "./Options/Classes/Rotate.js";
|
|
3
3
|
function updateRotate(particle, delta) {
|
|
4
4
|
const rotate = particle.rotate, rotateOptions = particle.options.rotate;
|
|
5
5
|
if (!rotate || !rotateOptions) {
|
package/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RotateUpdater } from "./RotateUpdater";
|
|
1
|
+
import { RotateUpdater } from "./RotateUpdater.js";
|
|
2
2
|
export async function loadRotateUpdater(engine, refresh = true) {
|
|
3
3
|
await engine.addParticleUpdater("rotate", (container) => new RotateUpdater(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-rotate",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.2",
|
|
4
4
|
"description": "tsParticles particles rotate 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/rotate"
|
|
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.rotate.min.js",
|
|
73
73
|
"unpkg": "tsparticles.updater.rotate.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"
|