@tsparticles/plugin-background-mask 4.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.
Files changed (53) hide show
  1. package/224.min.js +2 -0
  2. package/224.min.js.LICENSE.txt +1 -0
  3. package/LICENSE +21 -0
  4. package/README.md +74 -0
  5. package/browser/BackgroundMaskInstance.js +75 -0
  6. package/browser/BackgroundMaskPlugin.js +24 -0
  7. package/browser/Options/Classes/BackgroundMask.js +24 -0
  8. package/browser/Options/Classes/BackgroundMaskCover.js +20 -0
  9. package/browser/Options/Interfaces/IBackgroundMask.js +1 -0
  10. package/browser/Options/Interfaces/IBackgroundMaskCover.js +1 -0
  11. package/browser/index.js +7 -0
  12. package/browser/package.json +1 -0
  13. package/browser/types.js +1 -0
  14. package/cjs/BackgroundMaskInstance.js +75 -0
  15. package/cjs/BackgroundMaskPlugin.js +24 -0
  16. package/cjs/Options/Classes/BackgroundMask.js +24 -0
  17. package/cjs/Options/Classes/BackgroundMaskCover.js +20 -0
  18. package/cjs/Options/Interfaces/IBackgroundMask.js +1 -0
  19. package/cjs/Options/Interfaces/IBackgroundMaskCover.js +1 -0
  20. package/cjs/index.js +7 -0
  21. package/cjs/package.json +1 -0
  22. package/cjs/types.js +1 -0
  23. package/dist_browser_BackgroundMaskPlugin_js.js +60 -0
  24. package/esm/BackgroundMaskInstance.js +75 -0
  25. package/esm/BackgroundMaskPlugin.js +24 -0
  26. package/esm/Options/Classes/BackgroundMask.js +24 -0
  27. package/esm/Options/Classes/BackgroundMaskCover.js +20 -0
  28. package/esm/Options/Interfaces/IBackgroundMask.js +1 -0
  29. package/esm/Options/Interfaces/IBackgroundMaskCover.js +1 -0
  30. package/esm/index.js +7 -0
  31. package/esm/package.json +1 -0
  32. package/esm/types.js +1 -0
  33. package/package.json +95 -0
  34. package/report.html +40 -0
  35. package/tsparticles.plugin.background-mask.js +317 -0
  36. package/tsparticles.plugin.background-mask.min.js +2 -0
  37. package/tsparticles.plugin.background-mask.min.js.LICENSE.txt +1 -0
  38. package/types/BackgroundMaskInstance.d.ts +16 -0
  39. package/types/BackgroundMaskPlugin.d.ts +11 -0
  40. package/types/Options/Classes/BackgroundMask.d.ts +10 -0
  41. package/types/Options/Classes/BackgroundMaskCover.d.ts +9 -0
  42. package/types/Options/Interfaces/IBackgroundMask.d.ts +7 -0
  43. package/types/Options/Interfaces/IBackgroundMaskCover.d.ts +6 -0
  44. package/types/index.d.ts +2 -0
  45. package/types/types.d.ts +12 -0
  46. package/umd/BackgroundMaskInstance.js +89 -0
  47. package/umd/BackgroundMaskPlugin.js +38 -0
  48. package/umd/Options/Classes/BackgroundMask.js +38 -0
  49. package/umd/Options/Classes/BackgroundMaskCover.js +34 -0
  50. package/umd/Options/Interfaces/IBackgroundMask.js +12 -0
  51. package/umd/Options/Interfaces/IBackgroundMaskCover.js +12 -0
  52. package/umd/index.js +54 -0
  53. package/umd/types.js +12 -0
@@ -0,0 +1,20 @@
1
+ import { OptionsColor, isNull } from "@tsparticles/engine";
2
+ export class BackgroundMaskCover {
3
+ constructor() {
4
+ this.opacity = 1;
5
+ }
6
+ load(data) {
7
+ if (isNull(data)) {
8
+ return;
9
+ }
10
+ if (data.color !== undefined) {
11
+ this.color = OptionsColor.create(this.color, data.color);
12
+ }
13
+ if (data.image !== undefined) {
14
+ this.image = data.image;
15
+ }
16
+ if (data.opacity !== undefined) {
17
+ this.opacity = data.opacity;
18
+ }
19
+ }
20
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/esm/index.js ADDED
@@ -0,0 +1,7 @@
1
+ export function loadBackgroundMaskPlugin(engine) {
2
+ engine.checkVersion("4.0.0-alpha.0");
3
+ engine.register(async (e) => {
4
+ const { BackgroundMaskPlugin } = await import("./BackgroundMaskPlugin.js");
5
+ e.addPlugin(new BackgroundMaskPlugin(e));
6
+ });
7
+ }
@@ -0,0 +1 @@
1
+ { "type": "module" }
package/esm/types.js ADDED
@@ -0,0 +1 @@
1
+ export {};
package/package.json ADDED
@@ -0,0 +1,95 @@
1
+ {
2
+ "name": "@tsparticles/plugin-background-mask",
3
+ "version": "4.0.0-alpha.0",
4
+ "description": "tsParticles background mask plugin",
5
+ "homepage": "https://particles.js.org",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/tsparticles/tsparticles.git",
9
+ "directory": "plugins/backgroundMask"
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
+ ],
65
+ "author": "Matteo Bruni <matteo.bruni@me.com>",
66
+ "license": "MIT",
67
+ "bugs": {
68
+ "url": "https://github.com/tsparticles/tsparticles/issues"
69
+ },
70
+ "sideEffects": false,
71
+ "jsdelivr": "tsparticles.plugin.background-mask.min.js",
72
+ "unpkg": "tsparticles.plugin.background-mask.min.js",
73
+ "browser": "browser/index.js",
74
+ "main": "cjs/index.js",
75
+ "module": "esm/index.js",
76
+ "types": "types/index.d.ts",
77
+ "exports": {
78
+ ".": {
79
+ "types": "./types/index.d.ts",
80
+ "browser": "./browser/index.js",
81
+ "import": "./esm/index.js",
82
+ "require": "./cjs/index.js",
83
+ "umd": "./umd/index.js",
84
+ "default": "./cjs/index.js"
85
+ },
86
+ "./package.json": "./package.json"
87
+ },
88
+ "dependencies": {
89
+ "@tsparticles/engine": "4.0.0-alpha.0"
90
+ },
91
+ "publishConfig": {
92
+ "access": "public"
93
+ },
94
+ "type": "module"
95
+ }