@tsparticles/updater-gradient 3.0.0-alpha.0
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/LICENSE +21 -0
- package/README.md +70 -0
- package/browser/GradientUpdater.js +227 -0
- package/browser/Options/Classes/AnimatableGradient.js +25 -0
- package/browser/Options/Classes/AnimatableGradientColor.js +26 -0
- package/browser/Options/Classes/GradientAngle.js +20 -0
- package/browser/Options/Classes/GradientAngleAnimation.js +30 -0
- package/browser/Options/Classes/GradientColorOpacity.js +17 -0
- package/browser/Options/Classes/GradientColorOpacityAnimation.js +31 -0
- package/browser/Options/Interfaces/Gradients.js +1 -0
- package/browser/Options/Interfaces/IAnimatableGradient.js +1 -0
- package/browser/Options/Interfaces/IOptionsGradient.js +1 -0
- package/browser/index.js +4 -0
- package/cjs/GradientUpdater.js +231 -0
- package/cjs/Options/Classes/AnimatableGradient.js +29 -0
- package/cjs/Options/Classes/AnimatableGradientColor.js +30 -0
- package/cjs/Options/Classes/GradientAngle.js +24 -0
- package/cjs/Options/Classes/GradientAngleAnimation.js +34 -0
- package/cjs/Options/Classes/GradientColorOpacity.js +21 -0
- package/cjs/Options/Classes/GradientColorOpacityAnimation.js +35 -0
- package/cjs/Options/Interfaces/Gradients.js +2 -0
- package/cjs/Options/Interfaces/IAnimatableGradient.js +2 -0
- package/cjs/Options/Interfaces/IOptionsGradient.js +2 -0
- package/cjs/index.js +8 -0
- package/esm/GradientUpdater.js +227 -0
- package/esm/Options/Classes/AnimatableGradient.js +25 -0
- package/esm/Options/Classes/AnimatableGradientColor.js +26 -0
- package/esm/Options/Classes/GradientAngle.js +20 -0
- package/esm/Options/Classes/GradientAngleAnimation.js +30 -0
- package/esm/Options/Classes/GradientColorOpacity.js +17 -0
- package/esm/Options/Classes/GradientColorOpacityAnimation.js +31 -0
- package/esm/Options/Interfaces/Gradients.js +1 -0
- package/esm/Options/Interfaces/IAnimatableGradient.js +1 -0
- package/esm/Options/Interfaces/IOptionsGradient.js +1 -0
- package/esm/index.js +4 -0
- package/package.json +92 -0
- package/report.html +39 -0
- package/tsparticles.updater.gradient.js +486 -0
- package/tsparticles.updater.gradient.min.js +2 -0
- package/tsparticles.updater.gradient.min.js.LICENSE.txt +8 -0
- package/types/GradientUpdater.d.ts +32 -0
- package/types/Options/Classes/AnimatableGradient.d.ts +12 -0
- package/types/Options/Classes/AnimatableGradientColor.d.ts +11 -0
- package/types/Options/Classes/GradientAngle.d.ts +11 -0
- package/types/Options/Classes/GradientAngleAnimation.d.ts +10 -0
- package/types/Options/Classes/GradientColorOpacity.d.ts +10 -0
- package/types/Options/Classes/GradientColorOpacityAnimation.d.ts +13 -0
- package/types/Options/Interfaces/Gradients.d.ts +18 -0
- package/types/Options/Interfaces/IAnimatableGradient.d.ts +7 -0
- package/types/Options/Interfaces/IOptionsGradient.d.ts +10 -0
- package/types/index.d.ts +2 -0
- package/umd/GradientUpdater.js +241 -0
- package/umd/Options/Classes/AnimatableGradient.js +39 -0
- package/umd/Options/Classes/AnimatableGradientColor.js +40 -0
- package/umd/Options/Classes/GradientAngle.js +34 -0
- package/umd/Options/Classes/GradientAngleAnimation.js +44 -0
- package/umd/Options/Classes/GradientColorOpacity.js +31 -0
- package/umd/Options/Classes/GradientColorOpacityAnimation.js +45 -0
- package/umd/Options/Interfaces/Gradients.js +12 -0
- package/umd/Options/Interfaces/IAnimatableGradient.js +12 -0
- package/umd/Options/Interfaces/IOptionsGradient.js +12 -0
- package/umd/index.js +18 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AnimatableColor } from "@tsparticles/engine";
|
|
2
|
+
import { GradientColorOpacity } from "./GradientColorOpacity";
|
|
3
|
+
export class AnimatableGradientColor {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.stop = 0;
|
|
6
|
+
this.value = new AnimatableColor();
|
|
7
|
+
}
|
|
8
|
+
load(data) {
|
|
9
|
+
if (!data) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
if (data.stop !== undefined) {
|
|
13
|
+
this.stop = data.stop;
|
|
14
|
+
}
|
|
15
|
+
this.value = AnimatableColor.create(this.value, data.value);
|
|
16
|
+
if (data.opacity !== undefined) {
|
|
17
|
+
this.opacity = new GradientColorOpacity();
|
|
18
|
+
if (typeof data.opacity === "number") {
|
|
19
|
+
this.opacity.value = data.opacity;
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
this.opacity.load(data.opacity);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { GradientAngleAnimation } from "./GradientAngleAnimation";
|
|
2
|
+
export class GradientAngle {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.value = 0;
|
|
5
|
+
this.animation = new GradientAngleAnimation();
|
|
6
|
+
this.direction = "clockwise";
|
|
7
|
+
}
|
|
8
|
+
load(data) {
|
|
9
|
+
if (!data) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
this.animation.load(data.animation);
|
|
13
|
+
if (data.value !== undefined) {
|
|
14
|
+
this.value = data.value;
|
|
15
|
+
}
|
|
16
|
+
if (data.direction !== undefined) {
|
|
17
|
+
this.direction = data.direction;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { setRangeValue } from "@tsparticles/engine";
|
|
2
|
+
export class GradientAngleAnimation {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.count = 0;
|
|
5
|
+
this.enable = false;
|
|
6
|
+
this.speed = 0;
|
|
7
|
+
this.decay = 0;
|
|
8
|
+
this.sync = false;
|
|
9
|
+
}
|
|
10
|
+
load(data) {
|
|
11
|
+
if (!data) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
if (data.count !== undefined) {
|
|
15
|
+
this.count = setRangeValue(data.count);
|
|
16
|
+
}
|
|
17
|
+
if (data.enable !== undefined) {
|
|
18
|
+
this.enable = data.enable;
|
|
19
|
+
}
|
|
20
|
+
if (data.speed !== undefined) {
|
|
21
|
+
this.speed = setRangeValue(data.speed);
|
|
22
|
+
}
|
|
23
|
+
if (data.decay !== undefined) {
|
|
24
|
+
this.decay = setRangeValue(data.decay);
|
|
25
|
+
}
|
|
26
|
+
if (data.sync !== undefined) {
|
|
27
|
+
this.sync = data.sync;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { GradientColorOpacityAnimation } from "./GradientColorOpacityAnimation";
|
|
2
|
+
import { setRangeValue } from "@tsparticles/engine";
|
|
3
|
+
export class GradientColorOpacity {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.value = 0;
|
|
6
|
+
this.animation = new GradientColorOpacityAnimation();
|
|
7
|
+
}
|
|
8
|
+
load(data) {
|
|
9
|
+
if (!data) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
this.animation.load(data.animation);
|
|
13
|
+
if (data.value !== undefined) {
|
|
14
|
+
this.value = setRangeValue(data.value);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { setRangeValue } from "@tsparticles/engine";
|
|
2
|
+
export class GradientColorOpacityAnimation {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.count = 0;
|
|
5
|
+
this.enable = false;
|
|
6
|
+
this.speed = 0;
|
|
7
|
+
this.decay = 0;
|
|
8
|
+
this.sync = false;
|
|
9
|
+
this.startValue = "random";
|
|
10
|
+
}
|
|
11
|
+
load(data) {
|
|
12
|
+
if (!data) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
if (data.count !== undefined) {
|
|
16
|
+
this.count = setRangeValue(data.count);
|
|
17
|
+
}
|
|
18
|
+
if (data.enable !== undefined) {
|
|
19
|
+
this.enable = data.enable;
|
|
20
|
+
}
|
|
21
|
+
if (data.speed !== undefined) {
|
|
22
|
+
this.speed = setRangeValue(data.speed);
|
|
23
|
+
}
|
|
24
|
+
if (data.sync !== undefined) {
|
|
25
|
+
this.sync = data.sync;
|
|
26
|
+
}
|
|
27
|
+
if (data.startValue !== undefined) {
|
|
28
|
+
this.startValue = data.startValue;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/esm/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tsparticles/updater-gradient",
|
|
3
|
+
"version": "3.0.0-alpha.0",
|
|
4
|
+
"description": "tsParticles particles gradient updater",
|
|
5
|
+
"homepage": "https://particles.js.org",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/matteobruni/tsparticles.git",
|
|
9
|
+
"directory": "updaters/gradient"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"front-end",
|
|
13
|
+
"frontend",
|
|
14
|
+
"tsparticles",
|
|
15
|
+
"particles.js",
|
|
16
|
+
"particlesjs",
|
|
17
|
+
"particles",
|
|
18
|
+
"particle",
|
|
19
|
+
"canvas",
|
|
20
|
+
"jsparticles",
|
|
21
|
+
"xparticles",
|
|
22
|
+
"particles-js",
|
|
23
|
+
"particles-bg",
|
|
24
|
+
"particles-bg-vue",
|
|
25
|
+
"particles-ts",
|
|
26
|
+
"particles.ts",
|
|
27
|
+
"react-particles-js",
|
|
28
|
+
"react-particles.js",
|
|
29
|
+
"react-particles",
|
|
30
|
+
"react",
|
|
31
|
+
"reactjs",
|
|
32
|
+
"vue-particles",
|
|
33
|
+
"ngx-particles",
|
|
34
|
+
"angular-particles",
|
|
35
|
+
"particleground",
|
|
36
|
+
"vue",
|
|
37
|
+
"vuejs",
|
|
38
|
+
"preact",
|
|
39
|
+
"preactjs",
|
|
40
|
+
"jquery",
|
|
41
|
+
"angularjs",
|
|
42
|
+
"angular",
|
|
43
|
+
"typescript",
|
|
44
|
+
"javascript",
|
|
45
|
+
"animation",
|
|
46
|
+
"web",
|
|
47
|
+
"html5",
|
|
48
|
+
"web-design",
|
|
49
|
+
"webdesign",
|
|
50
|
+
"css",
|
|
51
|
+
"html",
|
|
52
|
+
"css3",
|
|
53
|
+
"animated",
|
|
54
|
+
"background",
|
|
55
|
+
"confetti",
|
|
56
|
+
"canvas",
|
|
57
|
+
"fireworks",
|
|
58
|
+
"fireworks-js",
|
|
59
|
+
"confetti-js",
|
|
60
|
+
"confettijs",
|
|
61
|
+
"fireworksjs",
|
|
62
|
+
"canvas-confetti",
|
|
63
|
+
"@tsparticles/plugin",
|
|
64
|
+
"@tsparticles/updater"
|
|
65
|
+
],
|
|
66
|
+
"author": "Matteo Bruni <matteo.bruni@me.com>",
|
|
67
|
+
"license": "MIT",
|
|
68
|
+
"bugs": {
|
|
69
|
+
"url": "https://github.com/matteobruni/tsparticles/issues"
|
|
70
|
+
},
|
|
71
|
+
"funding": [
|
|
72
|
+
{
|
|
73
|
+
"type": "github",
|
|
74
|
+
"url": "https://github.com/sponsors/matteobruni"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"type": "buymeacoffee",
|
|
78
|
+
"url": "https://www.buymeacoffee.com/matteobruni"
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"main": "cjs/index.js",
|
|
82
|
+
"jsdelivr": "tsparticles.updater.gradient.min.js",
|
|
83
|
+
"unpkg": "tsparticles.updater.gradient.min.js",
|
|
84
|
+
"module": "esm/index.js",
|
|
85
|
+
"types": "types/index.d.ts",
|
|
86
|
+
"publishConfig": {
|
|
87
|
+
"access": "public"
|
|
88
|
+
},
|
|
89
|
+
"dependencies": {
|
|
90
|
+
"@tsparticles/engine": "^3.0.0-alpha.0"
|
|
91
|
+
}
|
|
92
|
+
}
|