@tsparticles/plugin-polygon-mask 4.0.0-beta.0 → 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/423.min.js +1 -0
- package/{319.min.js → 832.min.js} +2 -2
- package/browser/Options/Classes/PolygonMask.js +2 -2
- package/browser/Options/Classes/PolygonMaskDraw.js +2 -2
- package/browser/Options/Classes/PolygonMaskDrawStroke.js +4 -4
- package/browser/PolygonMaskInstance.js +6 -8
- package/browser/PolygonMaskPlugin.js +5 -5
- package/browser/index.js +4 -3
- package/browser/utils.js +4 -4
- package/cjs/Options/Classes/PolygonMask.js +2 -2
- package/cjs/Options/Classes/PolygonMaskDraw.js +2 -2
- package/cjs/Options/Classes/PolygonMaskDrawStroke.js +4 -4
- package/cjs/PolygonMaskInstance.js +6 -8
- package/cjs/PolygonMaskPlugin.js +5 -5
- package/cjs/index.js +4 -3
- package/cjs/utils.js +4 -4
- package/dist_browser_PolygonMaskInstance_js.js +3 -3
- package/dist_browser_PolygonMaskPlugin_js.js +5 -5
- package/esm/Options/Classes/PolygonMask.js +2 -2
- package/esm/Options/Classes/PolygonMaskDraw.js +2 -2
- package/esm/Options/Classes/PolygonMaskDrawStroke.js +4 -4
- package/esm/PolygonMaskInstance.js +6 -8
- package/esm/PolygonMaskPlugin.js +5 -5
- package/esm/index.js +4 -3
- package/esm/utils.js +4 -4
- package/package.json +4 -5
- package/report.html +84 -29
- package/tsparticles.plugin.polygon-mask.js +2 -2
- package/tsparticles.plugin.polygon-mask.min.js +2 -2
- package/types/Options/Classes/PolygonMask.d.ts +2 -2
- package/types/Options/Classes/PolygonMaskDraw.d.ts +2 -2
- package/types/Options/Classes/PolygonMaskDrawStroke.d.ts +3 -3
- package/types/PolygonMaskInstance.d.ts +5 -5
- package/types/PolygonMaskPlugin.d.ts +3 -3
- package/types/utils.d.ts +3 -3
- package/99.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 -425
- 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
|
@@ -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
|
-
!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
|
|
2
|
-
(`+
|
|
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}),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})());
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ICoordinates, type IOptionLoader, type PluginManager, type RecursivePartial } from "@tsparticles/engine";
|
|
2
2
|
import type { IPolygonMask } from "../Interfaces/IPolygonMask.js";
|
|
3
3
|
import { PolygonMaskDraw } from "./PolygonMaskDraw.js";
|
|
4
4
|
import { PolygonMaskInline } from "./PolygonMaskInline.js";
|
|
@@ -15,6 +15,6 @@ export declare class PolygonMask implements IPolygonMask, IOptionLoader<IPolygon
|
|
|
15
15
|
scale: number;
|
|
16
16
|
type: PolygonMaskType;
|
|
17
17
|
url?: string;
|
|
18
|
-
constructor(
|
|
18
|
+
constructor(pluginManager: PluginManager);
|
|
19
19
|
load(data?: RecursivePartial<IPolygonMask>): void;
|
|
20
20
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type IOptionLoader, type PluginManager, type RecursivePartial } from "@tsparticles/engine";
|
|
2
2
|
import type { IPolygonMaskDraw } from "../Interfaces/IPolygonMaskDraw.js";
|
|
3
3
|
import { PolygonMaskDrawStroke } from "./PolygonMaskDrawStroke.js";
|
|
4
4
|
export declare class PolygonMaskDraw implements IPolygonMaskDraw, IOptionLoader<IPolygonMaskDraw> {
|
|
5
5
|
enable: boolean;
|
|
6
6
|
stroke: PolygonMaskDrawStroke;
|
|
7
|
-
constructor(
|
|
7
|
+
constructor(pluginManager: PluginManager);
|
|
8
8
|
load(data?: RecursivePartial<IPolygonMaskDraw>): void;
|
|
9
9
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type IOptionLoader, OptionsColor, type PluginManager, type RecursivePartial } from "@tsparticles/engine";
|
|
2
2
|
import type { IPolygonMaskDrawStroke } from "../Interfaces/IPolygonMaskDrawStroke.js";
|
|
3
3
|
export declare class PolygonMaskDrawStroke implements IPolygonMaskDrawStroke, IOptionLoader<IPolygonMaskDrawStroke> {
|
|
4
4
|
color: OptionsColor;
|
|
5
5
|
opacity: number;
|
|
6
6
|
width: number;
|
|
7
|
-
private readonly
|
|
8
|
-
constructor(
|
|
7
|
+
private readonly _pluginManager;
|
|
8
|
+
constructor(pluginManager: PluginManager);
|
|
9
9
|
load(data?: RecursivePartial<IPolygonMaskDrawStroke>): void;
|
|
10
10
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./pathseg.js";
|
|
2
|
-
import { type
|
|
2
|
+
import { type CanvasContextType, type IContainerPlugin, type ICoordinates, type IDelta, type IDimension, OutModeDirection, type Particle, type PluginManager } from "@tsparticles/engine";
|
|
3
3
|
import type { ISvgPath } from "./Interfaces/ISvgPath.js";
|
|
4
4
|
import type { PolygonMaskContainer } from "./types.js";
|
|
5
5
|
export declare class PolygonMaskInstance implements IContainerPlugin {
|
|
@@ -7,14 +7,14 @@ 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
|
-
private readonly _engine;
|
|
13
12
|
private _moveRadius;
|
|
13
|
+
private readonly _pluginManager;
|
|
14
14
|
private _scale;
|
|
15
|
-
constructor(
|
|
15
|
+
constructor(pluginManager: PluginManager, container: PolygonMaskContainer);
|
|
16
16
|
clickPositionValid(position: ICoordinates): boolean;
|
|
17
|
-
draw(context:
|
|
17
|
+
draw(context: CanvasContextType): void;
|
|
18
18
|
init(): Promise<void>;
|
|
19
19
|
particleBounce(particle: Particle, delta: IDelta, direction: OutModeDirection): boolean;
|
|
20
20
|
particlePosition(position?: ICoordinates): ICoordinates | undefined;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { Container,
|
|
1
|
+
import type { Container, IContainerPlugin, IPlugin, PluginManager, RecursivePartial } from "@tsparticles/engine";
|
|
2
2
|
import type { IPolygonMaskOptions, PolygonMaskOptions } from "./types.js";
|
|
3
3
|
export declare class PolygonMaskPlugin implements IPlugin {
|
|
4
4
|
readonly id = "polygon-mask";
|
|
5
|
-
private readonly
|
|
6
|
-
constructor(
|
|
5
|
+
private readonly _pluginManager;
|
|
6
|
+
constructor(pluginManager: PluginManager);
|
|
7
7
|
getPlugin(container: Container): Promise<IContainerPlugin>;
|
|
8
8
|
loadOptions(_container: Container, options: PolygonMaskOptions, source?: RecursivePartial<IPolygonMaskOptions>): void;
|
|
9
9
|
needsPlugin(options?: RecursivePartial<IPolygonMaskOptions>): boolean;
|
package/types/utils.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type CanvasContextType, type ICoordinates, type PluginManager, Vector } from "@tsparticles/engine";
|
|
2
2
|
import type { IPolygonMaskDrawStroke } from "./Options/Interfaces/IPolygonMaskDrawStroke.js";
|
|
3
3
|
import type { ISvgPath } from "./Interfaces/ISvgPath.js";
|
|
4
|
-
export declare function drawPolygonMask(
|
|
5
|
-
export declare function drawPolygonMaskPath(
|
|
4
|
+
export declare function drawPolygonMask(pluginManager: PluginManager, context: CanvasContextType, rawData: ICoordinates[], stroke: IPolygonMaskDrawStroke, hdr?: boolean): void;
|
|
5
|
+
export declare function drawPolygonMaskPath(pluginManager: PluginManager, context: CanvasContextType, path: Path2D, stroke: IPolygonMaskDrawStroke, position: ICoordinates, hdr?: boolean): void;
|
|
6
6
|
export declare function parsePaths(paths: ISvgPath[], scale: number, offset: ICoordinates): ICoordinates[];
|
|
7
7
|
export declare function calcClosestPointOnSegment(s1: ICoordinates, s2: ICoordinates, pos: ICoordinates): ICoordinates & {
|
|
8
8
|
isOnSegment: boolean;
|
package/99.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(this.webpackChunk_tsparticles_plugin_polygon_mask=this.webpackChunk_tsparticles_plugin_polygon_mask||[]).push([[99],{99(i,t,e){e.d(t,{PolygonMaskPlugin:()=>u});var s=e(303);class o{color;opacity;width;_engine;constructor(i){this._engine=i,this.color=new s.OptionsColor,this.width=.5,this.opacity=1}load(i){(0,s.isNull)(i)||(this.color=s.OptionsColor.create(this.color,i.color),(0,s.isString)(this.color.value)&&(this.opacity=(0,s.stringToAlpha)(this._engine,this.color.value)??this.opacity),void 0!==i.opacity&&(this.opacity=i.opacity),void 0!==i.width&&(this.width=i.width))}}class n{enable;stroke;constructor(i){this.enable=!1,this.stroke=new o(i)}load(i){if((0,s.isNull)(i))return;void 0!==i.enable&&(this.enable=i.enable);let t=i.stroke;this.stroke.load(t)}}var a=e(666);class l{arrangement;constructor(){this.arrangement=a.G.onePerPoint}load(i){(0,s.isNull)(i)||void 0!==i.arrangement&&(this.arrangement=i.arrangement)}}class h{path;size;constructor(){this.path=[],this.size={height:0,width:0}}load(i){(0,s.isNull)(i)||(void 0!==i.path&&(this.path=i.path),void 0!==i.size&&(void 0!==i.size.width&&(this.size.width=i.size.width),void 0!==i.size.height&&(this.size.height=i.size.height)))}}var r=e(248);class d{radius;type;constructor(){this.radius=10,this.type=r.O.path}load(i){(0,s.isNull)(i)||(void 0!==i.radius&&(this.radius=i.radius),void 0!==i.type&&(this.type=i.type))}}var p=e(361);class c{data;draw;enable;inline;move;position;scale;type;url;constructor(i){this.draw=new n(i),this.enable=!1,this.inline=new l,this.move=new d,this.scale=1,this.type=p.T.none}load(i){(0,s.isNull)(i)||(this.draw.load(i.draw),this.inline.load(i.inline),this.move.load(i.move),void 0!==i.scale&&(this.scale=i.scale),void 0!==i.type&&(this.type=i.type),void 0!==i.enable?this.enable=i.enable:this.enable=this.type!==p.T.none,void 0!==i.url&&(this.url=i.url),void 0!==i.data&&((0,s.isString)(i.data)?this.data=i.data:(this.data=new h,this.data.load(i.data))),void 0!==i.position&&(this.position=(0,s.deepExtend)({},i.position)))}}class u{id="polygon-mask";_engine;constructor(i){this._engine=i}async getPlugin(i){let{PolygonMaskInstance:t}=await e.e(319).then(e.bind(e,319));return new t(i,this._engine)}loadOptions(i,t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;let s=t.polygon;s?.load===void 0&&(t.polygon=s=new c(this._engine)),s.load(e?.polygon)}needsPlugin(i){return i?.polygon?.enable??(i?.polygon?.type!==void 0&&i.polygon.type!==p.T.none)}}}}]);
|
|
@@ -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(engine) {
|
|
30
|
-
this.draw = new PolygonMaskDraw_js_1.PolygonMaskDraw(engine);
|
|
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(engine) {
|
|
19
|
-
this.enable = false;
|
|
20
|
-
this.stroke = new PolygonMaskDrawStroke_js_1.PolygonMaskDrawStroke(engine);
|
|
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
|
-
_engine;
|
|
19
|
-
constructor(engine) {
|
|
20
|
-
this._engine = engine;
|
|
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._engine, 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
|
-
});
|