@tsparticles/updater-roll 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/Roll.js +1 -1
- package/browser/RollUpdater.js +2 -2
- package/browser/index.js +1 -1
- package/browser/package.json +1 -0
- package/cjs/Options/Classes/Roll.js +3 -3
- package/cjs/RollUpdater.js +5 -5
- package/cjs/index.js +2 -2
- package/cjs/package.json +1 -0
- package/esm/Options/Classes/Roll.js +1 -1
- package/esm/RollUpdater.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.roll.js +1 -1
- package/tsparticles.updater.roll.min.js.LICENSE.txt +1 -1
- package/types/Options/Classes/Roll.d.ts +3 -3
- package/types/Options/Classes/RollLight.d.ts +1 -1
- package/types/Options/Interfaces/IRoll.d.ts +2 -2
- package/types/RollUpdater.d.ts +1 -1
- package/types/Types.d.ts +2 -2
- package/types/Utils.d.ts +1 -1
- package/umd/Options/Classes/Roll.js +4 -4
- package/umd/RollUpdater.js +6 -6
- 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 Roll Updater v3.0.0-beta.
|
|
1
|
+
/*! tsParticles Roll Updater v3.0.0-beta.2 by Matteo Bruni */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type IOptionLoader, OptionsColor, type RangeValue, type RecursivePartial } from "@tsparticles/engine";
|
|
2
|
-
import type { IRoll } from "../Interfaces/IRoll";
|
|
3
|
-
import { RollLight } from "./RollLight";
|
|
4
|
-
import { RollMode } from "../../RollMode";
|
|
2
|
+
import type { IRoll } from "../Interfaces/IRoll.js";
|
|
3
|
+
import { RollLight } from "./RollLight.js";
|
|
4
|
+
import { RollMode } from "../../RollMode.js";
|
|
5
5
|
export declare class Roll implements IRoll, IOptionLoader<IRoll> {
|
|
6
6
|
backColor?: OptionsColor;
|
|
7
7
|
darken: RollLight;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type IOptionLoader, type RangeValue, type RecursivePartial } from "@tsparticles/engine";
|
|
2
|
-
import type { IRollLight } from "../Interfaces/IRollLight";
|
|
2
|
+
import type { IRollLight } from "../Interfaces/IRollLight.js";
|
|
3
3
|
export declare class RollLight implements IRollLight, IOptionLoader<IRollLight> {
|
|
4
4
|
enable: boolean;
|
|
5
5
|
value: RangeValue;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IOptionsColor, RangeValue, SingleOrMultiple } from "@tsparticles/engine";
|
|
2
|
-
import type { IRollLight } from "./IRollLight";
|
|
3
|
-
import type { RollMode } from "../../RollMode";
|
|
2
|
+
import type { IRollLight } from "./IRollLight.js";
|
|
3
|
+
import type { RollMode } from "../../RollMode.js";
|
|
4
4
|
export interface IRoll {
|
|
5
5
|
backColor?: SingleOrMultiple<string> | IOptionsColor;
|
|
6
6
|
darken: IRollLight;
|
package/types/RollUpdater.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type IDelta, type IParticleTransformValues, type IParticleUpdater, type Particle, type RecursivePartial } from "@tsparticles/engine";
|
|
2
|
-
import type { IRollParticlesOptions, RollParticle, RollParticlesOptions } from "./Types";
|
|
2
|
+
import type { IRollParticlesOptions, RollParticle, RollParticlesOptions } from "./Types.js";
|
|
3
3
|
export declare class RollUpdater implements IParticleUpdater {
|
|
4
4
|
getTransformValues(particle: Particle): IParticleTransformValues;
|
|
5
5
|
init(particle: RollParticle): void;
|
package/types/Types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type IParticlesOptions, type Particle, type ParticlesOptions } from "@tsparticles/engine";
|
|
2
|
-
import type { IRoll } from "./Options/Interfaces/IRoll";
|
|
3
|
-
import type { Roll } from "./Options/Classes/Roll";
|
|
2
|
+
import type { IRoll } from "./Options/Interfaces/IRoll.js";
|
|
3
|
+
import type { Roll } from "./Options/Classes/Roll.js";
|
|
4
4
|
export type RollParticle = Particle & {
|
|
5
5
|
options: RollParticlesOptions;
|
|
6
6
|
};
|
package/types/Utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type IDelta } from "@tsparticles/engine";
|
|
2
|
-
import type { RollParticle } from "./Types";
|
|
2
|
+
import type { RollParticle } from "./Types.js";
|
|
3
3
|
export declare function initParticle(particle: RollParticle): void;
|
|
4
4
|
export declare function updateRoll(particle: RollParticle, delta: IDelta): void;
|
|
@@ -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", "./RollLight"], factory);
|
|
7
|
+
define(["require", "exports", "@tsparticles/engine", "./RollLight.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Roll = void 0;
|
|
13
13
|
const engine_1 = require("@tsparticles/engine");
|
|
14
|
-
const
|
|
14
|
+
const RollLight_js_1 = require("./RollLight.js");
|
|
15
15
|
class Roll {
|
|
16
16
|
constructor() {
|
|
17
|
-
this.darken = new
|
|
17
|
+
this.darken = new RollLight_js_1.RollLight();
|
|
18
18
|
this.enable = false;
|
|
19
|
-
this.enlighten = new
|
|
19
|
+
this.enlighten = new RollLight_js_1.RollLight();
|
|
20
20
|
this.mode = "vertical";
|
|
21
21
|
this.speed = 25;
|
|
22
22
|
}
|
package/umd/RollUpdater.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", "./Utils", "./Options/Classes/Roll"], factory);
|
|
7
|
+
define(["require", "exports", "./Utils.js", "./Options/Classes/Roll.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.RollUpdater = void 0;
|
|
13
|
-
const
|
|
14
|
-
const
|
|
13
|
+
const Utils_js_1 = require("./Utils.js");
|
|
14
|
+
const Roll_js_1 = require("./Options/Classes/Roll.js");
|
|
15
15
|
class RollUpdater {
|
|
16
16
|
getTransformValues(particle) {
|
|
17
17
|
const roll = particle.roll?.enable && particle.roll, rollHorizontal = roll && roll.horizontal, rollVertical = roll && roll.vertical;
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
init(particle) {
|
|
24
|
-
(0,
|
|
24
|
+
(0, Utils_js_1.initParticle)(particle);
|
|
25
25
|
}
|
|
26
26
|
isEnabled(particle) {
|
|
27
27
|
const roll = particle.options.roll;
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
}
|
|
30
30
|
loadOptions(options, ...sources) {
|
|
31
31
|
if (!options.roll) {
|
|
32
|
-
options.roll = new
|
|
32
|
+
options.roll = new Roll_js_1.Roll();
|
|
33
33
|
}
|
|
34
34
|
for (const source of sources) {
|
|
35
35
|
options.roll.load(source?.roll);
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
if (!this.isEnabled(particle)) {
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
|
-
(0,
|
|
42
|
+
(0, Utils_js_1.updateRoll)(particle, delta);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
exports.RollUpdater = RollUpdater;
|
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", "./RollUpdater"], factory);
|
|
7
|
+
define(["require", "exports", "./RollUpdater.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.loadRollUpdater = void 0;
|
|
13
|
-
const
|
|
13
|
+
const RollUpdater_js_1 = require("./RollUpdater.js");
|
|
14
14
|
async function loadRollUpdater(engine, refresh = true) {
|
|
15
|
-
await engine.addParticleUpdater("roll", () => new
|
|
15
|
+
await engine.addParticleUpdater("roll", () => new RollUpdater_js_1.RollUpdater(), refresh);
|
|
16
16
|
}
|
|
17
17
|
exports.loadRollUpdater = loadRollUpdater;
|
|
18
18
|
});
|