@tsparticles/updater-twinkle 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/Twinkle.js +1 -1
- package/browser/TwinkleUpdater.js +1 -1
- package/browser/index.js +1 -1
- package/browser/package.json +1 -0
- package/cjs/Options/Classes/Twinkle.js +3 -3
- package/cjs/TwinkleUpdater.js +2 -2
- package/cjs/index.js +2 -2
- package/cjs/package.json +1 -0
- package/esm/Options/Classes/Twinkle.js +1 -1
- package/esm/TwinkleUpdater.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.twinkle.js +1 -1
- package/tsparticles.updater.twinkle.min.js.LICENSE.txt +1 -1
- package/types/Options/Classes/Twinkle.d.ts +2 -2
- package/types/Options/Classes/TwinkleValues.d.ts +1 -1
- package/types/Options/Interfaces/ITwinkle.d.ts +1 -1
- package/types/TwinkleUpdater.d.ts +1 -1
- package/types/Types.d.ts +2 -2
- package/umd/Options/Classes/Twinkle.js +4 -4
- package/umd/TwinkleUpdater.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 Twinkle Updater v3.0.0-beta.
|
|
1
|
+
/*! tsParticles Twinkle Updater v3.0.0-beta.2 by Matteo Bruni */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IOptionLoader, RecursivePartial } from "@tsparticles/engine";
|
|
2
|
-
import type { ITwinkle } from "../Interfaces/ITwinkle";
|
|
3
|
-
import { TwinkleValues } from "./TwinkleValues";
|
|
2
|
+
import type { ITwinkle } from "../Interfaces/ITwinkle.js";
|
|
3
|
+
import { TwinkleValues } from "./TwinkleValues.js";
|
|
4
4
|
export declare class Twinkle implements ITwinkle, IOptionLoader<ITwinkle> {
|
|
5
5
|
lines: TwinkleValues;
|
|
6
6
|
particles: TwinkleValues;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type IOptionLoader, OptionsColor, type RangeValue, type RecursivePartial } from "@tsparticles/engine";
|
|
2
|
-
import type { ITwinkleValues } from "../Interfaces/ITwinkleValues";
|
|
2
|
+
import type { ITwinkleValues } from "../Interfaces/ITwinkleValues.js";
|
|
3
3
|
export declare class TwinkleValues implements ITwinkleValues, IOptionLoader<ITwinkleValues> {
|
|
4
4
|
color?: OptionsColor;
|
|
5
5
|
enable: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type IParticleColorStyle, type IParticleUpdater, type Particle, type RecursivePartial } from "@tsparticles/engine";
|
|
2
|
-
import type { ITwinkleParticlesOptions, TwinkeParticle, TwinkleParticlesOptions } from "./Types";
|
|
2
|
+
import type { ITwinkleParticlesOptions, TwinkeParticle, TwinkleParticlesOptions } from "./Types.js";
|
|
3
3
|
export declare class TwinkleUpdater implements IParticleUpdater {
|
|
4
4
|
getColorStyles(particle: Particle, context: CanvasRenderingContext2D, radius: number, opacity: number): IParticleColorStyle;
|
|
5
5
|
init(): void;
|
package/types/Types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IParticlesOptions, Particle, ParticlesOptions } from "@tsparticles/engine";
|
|
2
|
-
import type { ITwinkle } from "./Options/Interfaces/ITwinkle";
|
|
3
|
-
import type { Twinkle } from "./Options/Classes/Twinkle";
|
|
2
|
+
import type { ITwinkle } from "./Options/Interfaces/ITwinkle.js";
|
|
3
|
+
import type { Twinkle } from "./Options/Classes/Twinkle.js";
|
|
4
4
|
export type TwinkeParticle = Particle & {
|
|
5
5
|
options: TwinkleParticlesOptions;
|
|
6
6
|
};
|
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
if (v !== undefined) module.exports = v;
|
|
5
5
|
}
|
|
6
6
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "./TwinkleValues"], factory);
|
|
7
|
+
define(["require", "exports", "./TwinkleValues.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Twinkle = void 0;
|
|
13
|
-
const
|
|
13
|
+
const TwinkleValues_js_1 = require("./TwinkleValues.js");
|
|
14
14
|
class Twinkle {
|
|
15
15
|
constructor() {
|
|
16
|
-
this.lines = new
|
|
17
|
-
this.particles = new
|
|
16
|
+
this.lines = new TwinkleValues_js_1.TwinkleValues();
|
|
17
|
+
this.particles = new TwinkleValues_js_1.TwinkleValues();
|
|
18
18
|
}
|
|
19
19
|
load(data) {
|
|
20
20
|
if (!data) {
|
package/umd/TwinkleUpdater.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/Twinkle"], factory);
|
|
7
|
+
define(["require", "exports", "@tsparticles/engine", "./Options/Classes/Twinkle.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.TwinkleUpdater = void 0;
|
|
13
13
|
const engine_1 = require("@tsparticles/engine");
|
|
14
|
-
const
|
|
14
|
+
const Twinkle_js_1 = require("./Options/Classes/Twinkle.js");
|
|
15
15
|
class TwinkleUpdater {
|
|
16
16
|
getColorStyles(particle, context, radius, opacity) {
|
|
17
17
|
const pOptions = particle.options, twinkleOptions = pOptions.twinkle;
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
}
|
|
35
35
|
loadOptions(options, ...sources) {
|
|
36
36
|
if (!options.twinkle) {
|
|
37
|
-
options.twinkle = new
|
|
37
|
+
options.twinkle = new Twinkle_js_1.Twinkle();
|
|
38
38
|
}
|
|
39
39
|
for (const source of sources) {
|
|
40
40
|
options.twinkle.load(source?.twinkle);
|
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", "./TwinkleUpdater"], factory);
|
|
7
|
+
define(["require", "exports", "./TwinkleUpdater.js"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.loadTwinkleUpdater = void 0;
|
|
13
|
-
const
|
|
13
|
+
const TwinkleUpdater_js_1 = require("./TwinkleUpdater.js");
|
|
14
14
|
async function loadTwinkleUpdater(engine, refresh = true) {
|
|
15
|
-
await engine.addParticleUpdater("twinkle", () => new
|
|
15
|
+
await engine.addParticleUpdater("twinkle", () => new TwinkleUpdater_js_1.TwinkleUpdater(), refresh);
|
|
16
16
|
}
|
|
17
17
|
exports.loadTwinkleUpdater = loadTwinkleUpdater;
|
|
18
18
|
});
|