@tsparticles/plugin-polygon-mask 4.0.0-beta.1 → 4.0.0-beta.11
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/{832.min.js → 225.min.js} +2 -2
- package/780.min.js +1 -0
- package/README.md +27 -0
- package/browser/index.js +1 -1
- package/cjs/index.js +1 -1
- package/dist_browser_PolygonMaskInstance_js.js +1 -1
- package/dist_browser_PolygonMaskPlugin_js.js +1 -1
- package/esm/index.js +1 -1
- package/package.json +4 -5
- package/report.html +1 -1
- package/tsparticles.plugin.polygon-mask.js +2 -2
- package/tsparticles.plugin.polygon-mask.min.js +2 -2
- package/types/PolygonMaskInstance.d.ts +1 -1
- package/423.min.js +0 -1
- package/umd/Enums/PolygonMaskInlineArrangement.js +0 -21
- package/umd/Enums/PolygonMaskMoveType.js +0 -18
- package/umd/Enums/PolygonMaskType.js +0 -20
- package/umd/Interfaces/ISvgPath.js +0 -12
- package/umd/Options/Classes/PolygonMask.js +0 -74
- package/umd/Options/Classes/PolygonMaskDraw.js +0 -34
- package/umd/Options/Classes/PolygonMaskDrawStroke.js +0 -42
- package/umd/Options/Classes/PolygonMaskInline.js +0 -30
- package/umd/Options/Classes/PolygonMaskLocalSvg.js +0 -42
- package/umd/Options/Classes/PolygonMaskMove.js +0 -35
- package/umd/Options/Interfaces/IPolygonMask.js +0 -12
- package/umd/Options/Interfaces/IPolygonMaskDraw.js +0 -12
- package/umd/Options/Interfaces/IPolygonMaskDrawStroke.js +0 -12
- package/umd/Options/Interfaces/IPolygonMaskInline.js +0 -12
- package/umd/Options/Interfaces/IPolygonMaskLocalSvg.js +0 -12
- package/umd/Options/Interfaces/IPolygonMaskMove.js +0 -12
- package/umd/PolygonMaskInstance.js +0 -423
- package/umd/PolygonMaskPlugin.js +0 -75
- package/umd/index.js +0 -60
- package/umd/pathseg.js +0 -1486
- package/umd/types.js +0 -12
- package/umd/utils.js +0 -139
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
(function (factory) {
|
|
2
|
-
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
-
var v = factory(require, exports);
|
|
4
|
-
if (v !== undefined) module.exports = v;
|
|
5
|
-
}
|
|
6
|
-
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "@tsparticles/engine", "./PolygonMaskDrawStroke.js"], factory);
|
|
8
|
-
}
|
|
9
|
-
})(function (require, exports) {
|
|
10
|
-
"use strict";
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.PolygonMaskDraw = void 0;
|
|
13
|
-
const engine_1 = require("@tsparticles/engine");
|
|
14
|
-
const PolygonMaskDrawStroke_js_1 = require("./PolygonMaskDrawStroke.js");
|
|
15
|
-
class PolygonMaskDraw {
|
|
16
|
-
enable;
|
|
17
|
-
stroke;
|
|
18
|
-
constructor(pluginManager) {
|
|
19
|
-
this.enable = false;
|
|
20
|
-
this.stroke = new PolygonMaskDrawStroke_js_1.PolygonMaskDrawStroke(pluginManager);
|
|
21
|
-
}
|
|
22
|
-
load(data) {
|
|
23
|
-
if ((0, engine_1.isNull)(data)) {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
if (data.enable !== undefined) {
|
|
27
|
-
this.enable = data.enable;
|
|
28
|
-
}
|
|
29
|
-
const stroke = data.stroke;
|
|
30
|
-
this.stroke.load(stroke);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.PolygonMaskDraw = PolygonMaskDraw;
|
|
34
|
-
});
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
(function (factory) {
|
|
2
|
-
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
-
var v = factory(require, exports);
|
|
4
|
-
if (v !== undefined) module.exports = v;
|
|
5
|
-
}
|
|
6
|
-
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "@tsparticles/engine"], factory);
|
|
8
|
-
}
|
|
9
|
-
})(function (require, exports) {
|
|
10
|
-
"use strict";
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.PolygonMaskDrawStroke = void 0;
|
|
13
|
-
const engine_1 = require("@tsparticles/engine");
|
|
14
|
-
class PolygonMaskDrawStroke {
|
|
15
|
-
color;
|
|
16
|
-
opacity;
|
|
17
|
-
width;
|
|
18
|
-
_pluginManager;
|
|
19
|
-
constructor(pluginManager) {
|
|
20
|
-
this._pluginManager = pluginManager;
|
|
21
|
-
this.color = new engine_1.OptionsColor();
|
|
22
|
-
this.width = 0.5;
|
|
23
|
-
this.opacity = 1;
|
|
24
|
-
}
|
|
25
|
-
load(data) {
|
|
26
|
-
if ((0, engine_1.isNull)(data)) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
this.color = engine_1.OptionsColor.create(this.color, data.color);
|
|
30
|
-
if ((0, engine_1.isString)(this.color.value)) {
|
|
31
|
-
this.opacity = (0, engine_1.stringToAlpha)(this._pluginManager, this.color.value) ?? this.opacity;
|
|
32
|
-
}
|
|
33
|
-
if (data.opacity !== undefined) {
|
|
34
|
-
this.opacity = data.opacity;
|
|
35
|
-
}
|
|
36
|
-
if (data.width !== undefined) {
|
|
37
|
-
this.width = data.width;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
exports.PolygonMaskDrawStroke = PolygonMaskDrawStroke;
|
|
42
|
-
});
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
(function (factory) {
|
|
2
|
-
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
-
var v = factory(require, exports);
|
|
4
|
-
if (v !== undefined) module.exports = v;
|
|
5
|
-
}
|
|
6
|
-
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "@tsparticles/engine", "../../Enums/PolygonMaskInlineArrangement.js"], factory);
|
|
8
|
-
}
|
|
9
|
-
})(function (require, exports) {
|
|
10
|
-
"use strict";
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.PolygonMaskInline = void 0;
|
|
13
|
-
const engine_1 = require("@tsparticles/engine");
|
|
14
|
-
const PolygonMaskInlineArrangement_js_1 = require("../../Enums/PolygonMaskInlineArrangement.js");
|
|
15
|
-
class PolygonMaskInline {
|
|
16
|
-
arrangement;
|
|
17
|
-
constructor() {
|
|
18
|
-
this.arrangement = PolygonMaskInlineArrangement_js_1.PolygonMaskInlineArrangement.onePerPoint;
|
|
19
|
-
}
|
|
20
|
-
load(data) {
|
|
21
|
-
if ((0, engine_1.isNull)(data)) {
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
if (data.arrangement !== undefined) {
|
|
25
|
-
this.arrangement = data.arrangement;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
exports.PolygonMaskInline = PolygonMaskInline;
|
|
30
|
-
});
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
(function (factory) {
|
|
2
|
-
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
-
var v = factory(require, exports);
|
|
4
|
-
if (v !== undefined) module.exports = v;
|
|
5
|
-
}
|
|
6
|
-
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "@tsparticles/engine"], factory);
|
|
8
|
-
}
|
|
9
|
-
})(function (require, exports) {
|
|
10
|
-
"use strict";
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.PolygonMaskLocalSvg = void 0;
|
|
13
|
-
const engine_1 = require("@tsparticles/engine");
|
|
14
|
-
class PolygonMaskLocalSvg {
|
|
15
|
-
path;
|
|
16
|
-
size;
|
|
17
|
-
constructor() {
|
|
18
|
-
this.path = [];
|
|
19
|
-
this.size = {
|
|
20
|
-
height: 0,
|
|
21
|
-
width: 0,
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
load(data) {
|
|
25
|
-
if ((0, engine_1.isNull)(data)) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
if (data.path !== undefined) {
|
|
29
|
-
this.path = data.path;
|
|
30
|
-
}
|
|
31
|
-
if (data.size !== undefined) {
|
|
32
|
-
if (data.size.width !== undefined) {
|
|
33
|
-
this.size.width = data.size.width;
|
|
34
|
-
}
|
|
35
|
-
if (data.size.height !== undefined) {
|
|
36
|
-
this.size.height = data.size.height;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
exports.PolygonMaskLocalSvg = PolygonMaskLocalSvg;
|
|
42
|
-
});
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
(function (factory) {
|
|
2
|
-
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
-
var v = factory(require, exports);
|
|
4
|
-
if (v !== undefined) module.exports = v;
|
|
5
|
-
}
|
|
6
|
-
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "@tsparticles/engine", "../../Enums/PolygonMaskMoveType.js"], factory);
|
|
8
|
-
}
|
|
9
|
-
})(function (require, exports) {
|
|
10
|
-
"use strict";
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.PolygonMaskMove = void 0;
|
|
13
|
-
const engine_1 = require("@tsparticles/engine");
|
|
14
|
-
const PolygonMaskMoveType_js_1 = require("../../Enums/PolygonMaskMoveType.js");
|
|
15
|
-
class PolygonMaskMove {
|
|
16
|
-
radius;
|
|
17
|
-
type;
|
|
18
|
-
constructor() {
|
|
19
|
-
this.radius = 10;
|
|
20
|
-
this.type = PolygonMaskMoveType_js_1.PolygonMaskMoveType.path;
|
|
21
|
-
}
|
|
22
|
-
load(data) {
|
|
23
|
-
if ((0, engine_1.isNull)(data)) {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
if (data.radius !== undefined) {
|
|
27
|
-
this.radius = data.radius;
|
|
28
|
-
}
|
|
29
|
-
if (data.type !== undefined) {
|
|
30
|
-
this.type = data.type;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
exports.PolygonMaskMove = PolygonMaskMove;
|
|
35
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
(function (factory) {
|
|
2
|
-
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
-
var v = factory(require, exports);
|
|
4
|
-
if (v !== undefined) module.exports = v;
|
|
5
|
-
}
|
|
6
|
-
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports"], factory);
|
|
8
|
-
}
|
|
9
|
-
})(function (require, exports) {
|
|
10
|
-
"use strict";
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
(function (factory) {
|
|
2
|
-
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
-
var v = factory(require, exports);
|
|
4
|
-
if (v !== undefined) module.exports = v;
|
|
5
|
-
}
|
|
6
|
-
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports"], factory);
|
|
8
|
-
}
|
|
9
|
-
})(function (require, exports) {
|
|
10
|
-
"use strict";
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
(function (factory) {
|
|
2
|
-
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
-
var v = factory(require, exports);
|
|
4
|
-
if (v !== undefined) module.exports = v;
|
|
5
|
-
}
|
|
6
|
-
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports"], factory);
|
|
8
|
-
}
|
|
9
|
-
})(function (require, exports) {
|
|
10
|
-
"use strict";
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
(function (factory) {
|
|
2
|
-
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
-
var v = factory(require, exports);
|
|
4
|
-
if (v !== undefined) module.exports = v;
|
|
5
|
-
}
|
|
6
|
-
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports"], factory);
|
|
8
|
-
}
|
|
9
|
-
})(function (require, exports) {
|
|
10
|
-
"use strict";
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
(function (factory) {
|
|
2
|
-
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
-
var v = factory(require, exports);
|
|
4
|
-
if (v !== undefined) module.exports = v;
|
|
5
|
-
}
|
|
6
|
-
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports"], factory);
|
|
8
|
-
}
|
|
9
|
-
})(function (require, exports) {
|
|
10
|
-
"use strict";
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
(function (factory) {
|
|
2
|
-
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
-
var v = factory(require, exports);
|
|
4
|
-
if (v !== undefined) module.exports = v;
|
|
5
|
-
}
|
|
6
|
-
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports"], factory);
|
|
8
|
-
}
|
|
9
|
-
})(function (require, exports) {
|
|
10
|
-
"use strict";
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
});
|