@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
|
@@ -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 Rotate Updater v3.0.0-beta.
|
|
1
|
+
/*! tsParticles Rotate Updater v3.0.0-beta.2 by Matteo Bruni */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type IOptionLoader, type RecursivePartial, RotateDirection, type RotateDirectionAlt, ValueWithRandom } from "@tsparticles/engine";
|
|
2
|
-
import type { IRotate } from "../Interfaces/IRotate";
|
|
3
|
-
import { RotateAnimation } from "./RotateAnimation";
|
|
2
|
+
import type { IRotate } from "../Interfaces/IRotate.js";
|
|
3
|
+
import { RotateAnimation } from "./RotateAnimation.js";
|
|
4
4
|
export declare class Rotate extends ValueWithRandom implements IRotate, IOptionLoader<IRotate> {
|
|
5
5
|
animation: RotateAnimation;
|
|
6
6
|
direction: RotateDirection | keyof typeof RotateDirection | RotateDirectionAlt;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type IOptionLoader, type RangeValue, type RecursivePartial } from "@tsparticles/engine";
|
|
2
|
-
import type { IRotateAnimation } from "../Interfaces/IRotateAnimation";
|
|
2
|
+
import type { IRotateAnimation } from "../Interfaces/IRotateAnimation.js";
|
|
3
3
|
export declare class RotateAnimation implements IRotateAnimation, IOptionLoader<IRotateAnimation> {
|
|
4
4
|
decay: RangeValue;
|
|
5
5
|
enable: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IValueWithRandom, RotateDirection, RotateDirectionAlt } from "@tsparticles/engine";
|
|
2
|
-
import type { IRotateAnimation } from "./IRotateAnimation";
|
|
2
|
+
import type { IRotateAnimation } from "./IRotateAnimation.js";
|
|
3
3
|
export interface IRotate extends IValueWithRandom {
|
|
4
4
|
animation: IRotateAnimation;
|
|
5
5
|
direction: RotateDirection | keyof typeof RotateDirection | RotateDirectionAlt;
|
package/types/RotateUpdater.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Container, type IDelta, type IParticleUpdater, type IParticleValueAnimation, type IParticlesOptions, type Particle, type ParticlesOptions, type RecursivePartial } from "@tsparticles/engine";
|
|
2
|
-
import type { IRotate } from "./Options/Interfaces/IRotate";
|
|
3
|
-
import { Rotate } from "./Options/Classes/Rotate";
|
|
2
|
+
import type { IRotate } from "./Options/Interfaces/IRotate.js";
|
|
3
|
+
import { Rotate } from "./Options/Classes/Rotate.js";
|
|
4
4
|
type RotateParticle = Particle & {
|
|
5
5
|
options: RotateParticlesOptions;
|
|
6
6
|
rotate?: IParticleValueAnimation<number>;
|
|
@@ -4,18 +4,18 @@
|
|
|
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", "./RotateAnimation"], factory);
|
|
7
|
+
define(["require", "exports", "@tsparticles/engine", "./RotateAnimation.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Rotate = void 0;
|
|
13
13
|
const engine_1 = require("@tsparticles/engine");
|
|
14
|
-
const
|
|
14
|
+
const RotateAnimation_js_1 = require("./RotateAnimation.js");
|
|
15
15
|
class Rotate extends engine_1.ValueWithRandom {
|
|
16
16
|
constructor() {
|
|
17
17
|
super();
|
|
18
|
-
this.animation = new
|
|
18
|
+
this.animation = new RotateAnimation_js_1.RotateAnimation();
|
|
19
19
|
this.direction = "clockwise";
|
|
20
20
|
this.path = false;
|
|
21
21
|
this.value = 0;
|
package/umd/RotateUpdater.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/Rotate"], factory);
|
|
7
|
+
define(["require", "exports", "@tsparticles/engine", "./Options/Classes/Rotate.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.RotateUpdater = void 0;
|
|
13
13
|
const engine_1 = require("@tsparticles/engine");
|
|
14
|
-
const
|
|
14
|
+
const Rotate_js_1 = require("./Options/Classes/Rotate.js");
|
|
15
15
|
function updateRotate(particle, delta) {
|
|
16
16
|
const rotate = particle.rotate, rotateOptions = particle.options.rotate;
|
|
17
17
|
if (!rotate || !rotateOptions) {
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
}
|
|
89
89
|
loadOptions(options, ...sources) {
|
|
90
90
|
if (!options.rotate) {
|
|
91
|
-
options.rotate = new
|
|
91
|
+
options.rotate = new Rotate_js_1.Rotate();
|
|
92
92
|
}
|
|
93
93
|
for (const source of sources) {
|
|
94
94
|
options.rotate.load(source?.rotate);
|
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", "./RotateUpdater"], factory);
|
|
7
|
+
define(["require", "exports", "./RotateUpdater.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.loadRotateUpdater = void 0;
|
|
13
|
-
const
|
|
13
|
+
const RotateUpdater_js_1 = require("./RotateUpdater.js");
|
|
14
14
|
async function loadRotateUpdater(engine, refresh = true) {
|
|
15
|
-
await engine.addParticleUpdater("rotate", (container) => new
|
|
15
|
+
await engine.addParticleUpdater("rotate", (container) => new RotateUpdater_js_1.RotateUpdater(container), refresh);
|
|
16
16
|
}
|
|
17
17
|
exports.loadRotateUpdater = loadRotateUpdater;
|
|
18
18
|
});
|