@tsparticles/plugin-polygon-mask 4.0.0-beta.1 → 4.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/browser/index.js +2 -1
- package/cjs/index.js +2 -1
- package/dist_browser_PolygonMaskInstance_js.js +1 -1
- package/dist_browser_PolygonMaskPlugin_js.js +1 -1
- package/esm/index.js +2 -1
- package/package.json +3 -4
- package/report.html +1 -1
- package/tsparticles.plugin.polygon-mask.js +2 -2
- package/tsparticles.plugin.polygon-mask.min.js +1 -1
- package/types/PolygonMaskInstance.d.ts +1 -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
package/browser/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import {} from "@tsparticles/engine";
|
|
1
2
|
export async function loadPolygonMaskPlugin(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-beta.
|
|
3
|
+
engine.checkVersion("4.0.0-beta.2");
|
|
3
4
|
await engine.pluginManager.register(async (e) => {
|
|
4
5
|
const { PolygonMaskPlugin } = await import("./PolygonMaskPlugin.js");
|
|
5
6
|
e.pluginManager.addPlugin(new PolygonMaskPlugin(e.pluginManager));
|
package/cjs/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import {} from "@tsparticles/engine";
|
|
1
2
|
export async function loadPolygonMaskPlugin(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-beta.
|
|
3
|
+
engine.checkVersion("4.0.0-beta.2");
|
|
3
4
|
await engine.pluginManager.register(async (e) => {
|
|
4
5
|
const { PolygonMaskPlugin } = await import("./PolygonMaskPlugin.js");
|
|
5
6
|
e.pluginManager.addPlugin(new PolygonMaskPlugin(e.pluginManager));
|
package/esm/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import {} from "@tsparticles/engine";
|
|
1
2
|
export async function loadPolygonMaskPlugin(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-beta.
|
|
3
|
+
engine.checkVersion("4.0.0-beta.2");
|
|
3
4
|
await engine.pluginManager.register(async (e) => {
|
|
4
5
|
const { PolygonMaskPlugin } = await import("./PolygonMaskPlugin.js");
|
|
5
6
|
e.pluginManager.addPlugin(new PolygonMaskPlugin(e.pluginManager));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/plugin-polygon-mask",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.2",
|
|
4
4
|
"description": "tsParticles polygon mask plugin",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -82,12 +82,11 @@
|
|
|
82
82
|
"browser": "./browser/index.js",
|
|
83
83
|
"import": "./esm/index.js",
|
|
84
84
|
"require": "./cjs/index.js",
|
|
85
|
-
"
|
|
86
|
-
"default": "./cjs/index.js"
|
|
85
|
+
"default": "./esm/index.js"
|
|
87
86
|
},
|
|
88
87
|
"./package.json": "./package.json"
|
|
89
88
|
},
|
|
90
|
-
"
|
|
89
|
+
"peerDependencies": {
|
|
91
90
|
"@tsparticles/engine": "4.0.0-beta.1"
|
|
92
91
|
},
|
|
93
92
|
"publishConfig": {
|
package/report.html
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
-
<title>@tsparticles/plugin-polygon-mask [
|
|
6
|
+
<title>@tsparticles/plugin-polygon-mask [2 Apr 2026 at 07:40]</title>
|
|
7
7
|
<link
|
|
8
8
|
rel="shortcut icon"
|
|
9
9
|
href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAABrVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+O1foceMD///+J0/qK1Pr7/v8Xdr/9///W8P4UdL7L7P0Scr2r4Pyj3vwad8D5/f/2/f+55f3E6f34+/2H0/ojfMKpzOd0rNgQcb3F3O/j9f7c8v6g3Pz0/P/w+v/q+P7n9v6T1/uQ1vuE0vqLut/y+v+Z2fvt+f+15Pzv9fuc2/vR7v2V2Pvd6/bg9P7I6/285/2y4/yp3/zp8vk8i8kqgMT7/P31+fyv4vxGkcz6/P6/6P3j7vfS5PNnpNUxhcbO7f7F6v3O4vHK3/DA2u631Ouy0eqXweKJud5wqthfoNMMbLvY8f73+v2dxeR8sNtTmdDx9/zX6PSjyeaCtd1YnNGX2PuQveCGt95Nls42h8dLlM3F4vBtAAAAM3RSTlMAAyOx0/sKBvik8opWGBMOAe3l1snDm2E9LSb06eHcu5JpHbarfHZCN9CBb08zzkdNS0kYaptYAAAFV0lEQVRYw92X51/aYBDHHS2O2qqttVbrqNq9m+TJIAYIShBkWwqIiCgoWvfeq7Z2/s29hyQNyUcR7LveGwVyXy6XH8/9rqxglLfUPLxVduUor3h0rfp2TYvpivk37929TkG037hffoX0+peVtZQc1589rigVUdXS/ABSAyEmGIO/1XfvldSK8vs3OqB6u3m0nxmIrvgB0dj7rr7Y9IbuF68hnfFaiHA/sxqm0wciIG43P60qKv9WXWc1RXGh/mFESFABTSBi0sNAKzqet17eCtOb3kZIDwxEEU0oAIJGYxNBDhBND29e0rtXXbcpuPmED9IhEAAQ/AXEaF8EPmnrrKsv0LvWR3fg5sWDNAFZOgAgaKvZDogHNU9MFwnnYROkc56RD5CjAbQX9Ow4g7upCsvYu55aSI/Nj0H1akgKQEUM94dwK65hYRmFU9MIcH/fqJYOZYcnuJSU/waKDgTOEVaVKhwrTRP5XzgSpAITYzom7UvkhFX5VutmxeNnWDjjswTKTyfgluNDGbUpWissXhF3s7mlSml+czWkg3D0l1nNjGNjz3myOQOa1KM/jOS6ebdbAVTCi4gljHSFrviza7tOgRWcS0MOUX9zdNgag5w7rRqA44Lzw0hr1WqES36dFliSJFlh2rXIae3FFcDDgKdxrUIDePr8jGcSClV1u7A9xeN0ModY/pHMxmR1EzRh8TJiwqsHmKW0l4FCEZI+jHio+JdPPE9qwQtTRxku2D8sIeRL2LnxWSllANCQGOIiqVHAz2ye2JR0DcH+HoxDkaADLjgxjKQ+AwCX/g0+DNgdG0ukYCONAe+dbc2IAc6fwt1ARoDSezNHxV2Cmzwv3O6lDMV55edBGwGK9n1+x2F8EDfAGCxug8MhpsMEcTEAWf3rx2vZhe/LAmtIn/6apE6PN0ULKgywD9mmdxbmFl3OvD5AS5fW5zLbv/YHmcsBTjf/afDz3MaZTVCfAP9z6/Bw6ycv8EUBWJIn9zYcoAWWlW9+OzO3vkTy8H+RANLmdrpOuYWdZYEXpo+TlCJrW5EARb7fF+bWdqf3hhyZI1nWJQHgznErZhbjoEsWqi8dQNoE294aldzFurwSABL2XXMf9+H1VQGke9exw5P/AnA5Pv5ngMul7LOvO922iwACu8WkCwLCafvM4CeWPxfA8lNHcWZSoi8EwMAIciKX2Z4SWCMAa3snCZ/G4EA8D6CMLNFsGQhkkz/gQNEBbPCbWsxGUpYVu3z8IyNAknwJkfPMEhLyrdi5RTyUVACkw4GSFRNWJNEW+fgPGwHD8/JxnRuLabN4CGNRkAE23na2+VmEAUmrYymSGjMAYqH84YUIyzgzs3XC7gNgH36Vcc4zKY9o9fgPBXUAiHHwVboBHGLiX6Zcjp1f2wu4tvzZKo0ecPnDtQYDQvJXaBeNzce45Fp28ZQLrEZVuFqgBwOalArKXnW1UzlnSusQKJqKYNuz4tOnI6sZG4zanpemv+7ySU2jbA9h6uhcgpfy6G2PahirDZ6zvq6zDduMVFTKvzw8wgyEdelwY9in3XkEPs3osJuwRQ4qTkfzifndg9Gfc4pdsu82+tTnHZTBa2EAMrqr2t43pguc8tNm7JQVQ2S0ukj2d22dhXYP0/veWtwKrCkNoNimAN5+Xr/oLrxswKbVJjteWrX7eR63o4j9q0GxnaBdWgGA5VStpanIjQmEhV0/nVt5VOFUvix6awJhPcAaTEShgrG+iGyvb5a0Ndb1YGHFPEwoqAinoaykaID1o1pdPNu7XsnCKQ3R+hwWIIhGvORcJUBYXe3Xa3vq/mF/N9V13ugufMkfXn+KHsRD0B8AAAAASUVORK5CYII="
|
|
@@ -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
|
-
* v4.0.0-beta.
|
|
7
|
+
* v4.0.0-beta.2
|
|
8
8
|
*/
|
|
9
9
|
/*
|
|
10
10
|
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
@@ -74,7 +74,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
74
74
|
\*******************************/
|
|
75
75
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
76
76
|
|
|
77
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PolygonMaskInlineArrangement: () => (/* reexport safe */
|
|
77
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PolygonMaskInlineArrangement: () => (/* reexport safe */ _Enums_PolygonMaskInlineArrangement_js__WEBPACK_IMPORTED_MODULE_1__.PolygonMaskInlineArrangement),\n/* harmony export */ PolygonMaskMoveType: () => (/* reexport safe */ _Enums_PolygonMaskMoveType_js__WEBPACK_IMPORTED_MODULE_2__.PolygonMaskMoveType),\n/* harmony export */ PolygonMaskType: () => (/* reexport safe */ _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_3__.PolygonMaskType),\n/* harmony export */ loadPolygonMaskPlugin: () => (/* binding */ loadPolygonMaskPlugin)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _Enums_PolygonMaskInlineArrangement_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Enums/PolygonMaskInlineArrangement.js */ \"./dist/browser/Enums/PolygonMaskInlineArrangement.js\");\n/* harmony import */ var _Enums_PolygonMaskMoveType_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Enums/PolygonMaskMoveType.js */ \"./dist/browser/Enums/PolygonMaskMoveType.js\");\n/* harmony import */ var _Enums_PolygonMaskType_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Enums/PolygonMaskType.js */ \"./dist/browser/Enums/PolygonMaskType.js\");\n\nasync function loadPolygonMaskPlugin(engine) {\n engine.checkVersion(\"4.0.0-beta.2\");\n await engine.pluginManager.register(async (e)=>{\n const { PolygonMaskPlugin } = await __webpack_require__.e(/*! import() */ \"dist_browser_PolygonMaskPlugin_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./PolygonMaskPlugin.js */ \"./dist/browser/PolygonMaskPlugin.js\"));\n e.pluginManager.addPlugin(new PolygonMaskPlugin(e.pluginManager));\n });\n}\n\n\n\n\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/index.js?\n}");
|
|
78
78
|
|
|
79
79
|
/***/ }
|
|
80
80
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],t);else{var r="object"==typeof exports?t(require("@tsparticles/engine")):t(e.window);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(this,e=>(()=>{"use strict";var t,r,n,o={303(t){t.exports=e},478(e,t,r){var n,o;r.d(t,{G:()=>n}),(o=n||(n={})).equidistant="equidistant",o.onePerPoint="one-per-point",o.perPoint="per-point",o.randomLength="random-length",o.randomPoint="random-point"},476(e,t,r){var n,o;r.d(t,{O:()=>n}),(o=n||(n={})).path="path",o.radius="radius"},45(e,t,r){var n,o;r.d(t,{T:()=>n}),(o=n||(n={})).inline="inline",o.inside="inside",o.outside="outside",o.none="none"}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return o[e](r,r.exports,a),r.exports}a.m=o,a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce((t,r)=>(a.f[r](e,t),t),[])),a.u=e=>""+e+".min.js",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s={},a.l=(e,t,r,n)=>{if(s[e])return void s[e].push(t);if(void 0!==r)for(var o,i,p=document.getElementsByTagName("script"),l=0;l<p.length;l++){var u=p[l];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")=="@tsparticles/plugin-polygon-mask:"+r){o=u;break}}o||(i=!0,(o=document.createElement("script")).charset="utf-8",a.nc&&o.setAttribute("nonce",a.nc),o.setAttribute("data-webpack","@tsparticles/plugin-polygon-mask:"+r),o.src=e),s[e]=[t];var c=(t,r)=>{o.onerror=o.onload=null,clearTimeout(d);var n=s[e];if(delete s[e],o.parentNode&&o.parentNode.removeChild(o),n&&n.forEach(e=>e(r)),t)return t(r)},d=setTimeout(c.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=c.bind(null,o.onerror),o.onload=c.bind(null,o.onload),i&&document.head.appendChild(o)},a.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.g.importScripts&&(p=a.g.location+"");var s,p,l=a.g.document;if(!p&&l&&(l.currentScript&&"SCRIPT"===l.currentScript.tagName.toUpperCase()&&(p=l.currentScript.src),!p)){var u=l.getElementsByTagName("script");if(u.length)for(var c=u.length-1;c>-1&&(!p||!/^http(s?):/.test(p));)p=u[c--].src}if(!p)throw Error("Automatic publicPath is not supported in this browser");a.p=p=p.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),t={131:0},a.f.j=(e,r)=>{var n=a.o(t,e)?t[e]:void 0;if(0!==n)if(n)r.push(n[2]);else{var o=new Promise((r,o)=>n=t[e]=[r,o]);r.push(n[2]=o);var i=a.p+a.u(e),s=Error();a.l(i,r=>{if(a.o(t,e)&&(0!==(n=t[e])&&(t[e]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;s.message="Loading chunk "+e+` failed.
|
|
2
|
-
(`+o+": "+i+")",s.name="ChunkLoadError",s.type=o,s.request=i,n[1](s)}},"chunk-"+e,e)}},r=(e,r)=>{var n,o,[i,s,p]=r,l=0;if(i.some(e=>0!==t[e])){for(n in s)a.o(s,n)&&(a.m[n]=s[n]);p&&p(a)}for(e&&e(r);l<i.length;l++)o=i[l],a.o(t,o)&&t[o]&&t[o][0](),t[o]=0},(n=this.webpackChunk_tsparticles_plugin_polygon_mask=this.webpackChunk_tsparticles_plugin_polygon_mask||[]).forEach(r.bind(null,0)),n.push=r.bind(null,n.push.bind(n));var d={};a.r(d),a.d(d,{PolygonMaskInlineArrangement:()=>g.G,PolygonMaskMoveType:()=>f.O,PolygonMaskType:()=>m.T,loadPolygonMaskPlugin:()=>h});var g=a(478),f=a(476),m=a(45);async function h(e){e.checkVersion("4.0.0-beta.
|
|
2
|
+
(`+o+": "+i+")",s.name="ChunkLoadError",s.type=o,s.request=i,n[1](s)}},"chunk-"+e,e)}},r=(e,r)=>{var n,o,[i,s,p]=r,l=0;if(i.some(e=>0!==t[e])){for(n in s)a.o(s,n)&&(a.m[n]=s[n]);p&&p(a)}for(e&&e(r);l<i.length;l++)o=i[l],a.o(t,o)&&t[o]&&t[o][0](),t[o]=0},(n=this.webpackChunk_tsparticles_plugin_polygon_mask=this.webpackChunk_tsparticles_plugin_polygon_mask||[]).forEach(r.bind(null,0)),n.push=r.bind(null,n.push.bind(n));var d={};a.r(d),a.d(d,{PolygonMaskInlineArrangement:()=>g.G,PolygonMaskMoveType:()=>f.O,PolygonMaskType:()=>m.T,loadPolygonMaskPlugin:()=>h}),a(303);var g=a(478),f=a(476),m=a(45);async function h(e){e.checkVersion("4.0.0-beta.2"),await e.pluginManager.register(async e=>{let{PolygonMaskPlugin:t}=await a.e(423).then(a.bind(a,423));e.pluginManager.addPlugin(new t(e.pluginManager))})}return d})());
|
|
@@ -7,7 +7,7 @@ export declare class PolygonMaskInstance implements IContainerPlugin {
|
|
|
7
7
|
offset?: ICoordinates;
|
|
8
8
|
paths?: ISvgPath[];
|
|
9
9
|
raw?: ICoordinates[];
|
|
10
|
-
redrawTimeout?: number
|
|
10
|
+
redrawTimeout?: number;
|
|
11
11
|
private readonly _container;
|
|
12
12
|
private _moveRadius;
|
|
13
13
|
private readonly _pluginManager;
|
|
@@ -1,21 +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
|
-
exports.PolygonMaskInlineArrangement = void 0;
|
|
13
|
-
var PolygonMaskInlineArrangement;
|
|
14
|
-
(function (PolygonMaskInlineArrangement) {
|
|
15
|
-
PolygonMaskInlineArrangement["equidistant"] = "equidistant";
|
|
16
|
-
PolygonMaskInlineArrangement["onePerPoint"] = "one-per-point";
|
|
17
|
-
PolygonMaskInlineArrangement["perPoint"] = "per-point";
|
|
18
|
-
PolygonMaskInlineArrangement["randomLength"] = "random-length";
|
|
19
|
-
PolygonMaskInlineArrangement["randomPoint"] = "random-point";
|
|
20
|
-
})(PolygonMaskInlineArrangement || (exports.PolygonMaskInlineArrangement = PolygonMaskInlineArrangement = {}));
|
|
21
|
-
});
|
|
@@ -1,18 +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
|
-
exports.PolygonMaskMoveType = void 0;
|
|
13
|
-
var PolygonMaskMoveType;
|
|
14
|
-
(function (PolygonMaskMoveType) {
|
|
15
|
-
PolygonMaskMoveType["path"] = "path";
|
|
16
|
-
PolygonMaskMoveType["radius"] = "radius";
|
|
17
|
-
})(PolygonMaskMoveType || (exports.PolygonMaskMoveType = PolygonMaskMoveType = {}));
|
|
18
|
-
});
|
|
@@ -1,20 +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
|
-
exports.PolygonMaskType = void 0;
|
|
13
|
-
var PolygonMaskType;
|
|
14
|
-
(function (PolygonMaskType) {
|
|
15
|
-
PolygonMaskType["inline"] = "inline";
|
|
16
|
-
PolygonMaskType["inside"] = "inside";
|
|
17
|
-
PolygonMaskType["outside"] = "outside";
|
|
18
|
-
PolygonMaskType["none"] = "none";
|
|
19
|
-
})(PolygonMaskType || (exports.PolygonMaskType = PolygonMaskType = {}));
|
|
20
|
-
});
|
|
@@ -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,74 +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", "./PolygonMaskDraw.js", "./PolygonMaskInline.js", "./PolygonMaskLocalSvg.js", "./PolygonMaskMove.js", "../../Enums/PolygonMaskType.js"], factory);
|
|
8
|
-
}
|
|
9
|
-
})(function (require, exports) {
|
|
10
|
-
"use strict";
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.PolygonMask = void 0;
|
|
13
|
-
const engine_1 = require("@tsparticles/engine");
|
|
14
|
-
const PolygonMaskDraw_js_1 = require("./PolygonMaskDraw.js");
|
|
15
|
-
const PolygonMaskInline_js_1 = require("./PolygonMaskInline.js");
|
|
16
|
-
const PolygonMaskLocalSvg_js_1 = require("./PolygonMaskLocalSvg.js");
|
|
17
|
-
const PolygonMaskMove_js_1 = require("./PolygonMaskMove.js");
|
|
18
|
-
const PolygonMaskType_js_1 = require("../../Enums/PolygonMaskType.js");
|
|
19
|
-
class PolygonMask {
|
|
20
|
-
data;
|
|
21
|
-
draw;
|
|
22
|
-
enable;
|
|
23
|
-
inline;
|
|
24
|
-
move;
|
|
25
|
-
position;
|
|
26
|
-
scale;
|
|
27
|
-
type;
|
|
28
|
-
url;
|
|
29
|
-
constructor(pluginManager) {
|
|
30
|
-
this.draw = new PolygonMaskDraw_js_1.PolygonMaskDraw(pluginManager);
|
|
31
|
-
this.enable = false;
|
|
32
|
-
this.inline = new PolygonMaskInline_js_1.PolygonMaskInline();
|
|
33
|
-
this.move = new PolygonMaskMove_js_1.PolygonMaskMove();
|
|
34
|
-
this.scale = 1;
|
|
35
|
-
this.type = PolygonMaskType_js_1.PolygonMaskType.none;
|
|
36
|
-
}
|
|
37
|
-
load(data) {
|
|
38
|
-
if ((0, engine_1.isNull)(data)) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
this.draw.load(data.draw);
|
|
42
|
-
this.inline.load(data.inline);
|
|
43
|
-
this.move.load(data.move);
|
|
44
|
-
if (data.scale !== undefined) {
|
|
45
|
-
this.scale = data.scale;
|
|
46
|
-
}
|
|
47
|
-
if (data.type !== undefined) {
|
|
48
|
-
this.type = data.type;
|
|
49
|
-
}
|
|
50
|
-
if (data.enable !== undefined) {
|
|
51
|
-
this.enable = data.enable;
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
this.enable = this.type !== PolygonMaskType_js_1.PolygonMaskType.none;
|
|
55
|
-
}
|
|
56
|
-
if (data.url !== undefined) {
|
|
57
|
-
this.url = data.url;
|
|
58
|
-
}
|
|
59
|
-
if (data.data !== undefined) {
|
|
60
|
-
if ((0, engine_1.isString)(data.data)) {
|
|
61
|
-
this.data = data.data;
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
this.data = new PolygonMaskLocalSvg_js_1.PolygonMaskLocalSvg();
|
|
65
|
-
this.data.load(data.data);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
if (data.position !== undefined) {
|
|
69
|
-
this.position = (0, engine_1.deepExtend)({}, data.position);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
exports.PolygonMask = PolygonMask;
|
|
74
|
-
});
|
|
@@ -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
|
-
});
|