@tsparticles/plugin-emitters-shape-canvas 4.0.0-beta.12 → 4.0.0-beta.16

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.
@@ -1,2 +1 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/plugin-emitters"),require("@tsparticles/engine"),require("@tsparticles/canvas-utils"));else if("function"==typeof define&&define.amd)define(["@tsparticles/plugin-emitters","@tsparticles/engine","@tsparticles/canvas-utils"],t);else{var r="object"==typeof exports?t(require("@tsparticles/plugin-emitters"),require("@tsparticles/engine"),require("@tsparticles/canvas-utils")):t(e.window,e.window,e.window);for(var i in r)("object"==typeof exports?exports:e)[i]=r[i]}}(this,(e,t,r)=>(()=>{"use strict";var i,o,n,a={425(e){e.exports=r},303(e){e.exports=t},526(t){t.exports=e}},s={};function p(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={exports:{}};return a[e](r,r.exports,p),r.exports}p.m=a,l=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,p.t=function(e,t){if(1&t&&(e=this(e)),8&t||"object"==typeof e&&e&&(4&t&&e.__esModule||16&t&&"function"==typeof e.then))return e;var r=Object.create(null);p.r(r);var i={};c=c||[null,l({}),l([]),l(l)];for(var o=2&t&&e;("object"==typeof o||"function"==typeof o)&&!~c.indexOf(o);o=l(o))Object.getOwnPropertyNames(o).forEach(t=>i[t]=()=>e[t]);return i.default=()=>e,p.d(r,i),r},p.d=(e,t)=>{for(var r in t)p.o(t,r)&&!p.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},p.f={},p.e=e=>Promise.all(Object.keys(p.f).reduce((t,r)=>(p.f[r](e,t),t),[])),p.u=e=>""+e+".min.js",p.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),p.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u={},p.l=(e,t,r,i)=>{if(u[e])return void u[e].push(t);if(void 0!==r)for(var o,n,a=document.getElementsByTagName("script"),s=0;s<a.length;s++){var c=a[s];if(c.getAttribute("src")==e||c.getAttribute("data-webpack")=="@tsparticles/plugin-emitters-shape-canvas:"+r){o=c;break}}o||(n=!0,(o=document.createElement("script")).charset="utf-8",p.nc&&o.setAttribute("nonce",p.nc),o.setAttribute("data-webpack","@tsparticles/plugin-emitters-shape-canvas:"+r),o.src=e),u[e]=[t];var l=(t,r)=>{o.onerror=o.onload=null,clearTimeout(f);var i=u[e];if(delete u[e],o.parentNode&&o.parentNode.removeChild(o),i&&i.forEach(e=>e(r)),t)return t(r)},f=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),n&&document.head.appendChild(o)},p.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},p.g.importScripts&&(f=p.g.location+"");var c,l,u,f,d=p.g.document;if(!f&&d&&(d.currentScript&&"SCRIPT"===d.currentScript.tagName.toUpperCase()&&(f=d.currentScript.src),!f)){var g=d.getElementsByTagName("script");if(g.length)for(var b=g.length-1;b>-1&&(!f||!/^http(s?):/.test(f));)f=g[b--].src}if(!f)throw Error("Automatic publicPath is not supported in this browser");p.p=f=f.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i={346:0},p.f.j=(e,t)=>{var r=p.o(i,e)?i[e]:void 0;if(0!==r)if(r)t.push(r[2]);else{var o=new Promise((t,o)=>r=i[e]=[t,o]);t.push(r[2]=o);var n=p.p+p.u(e),a=Error();p.l(n,t=>{if(p.o(i,e)&&(0!==(r=i[e])&&(i[e]=void 0),r)){var o=t&&("load"===t.type?"missing":t.type),n=t&&t.target&&t.target.src;a.message="Loading chunk "+e+` failed.
2
- (`+o+": "+n+")",a.name="ChunkLoadError",a.type=o,a.request=n,r[1](a)}},"chunk-"+e,e)}},o=(e,t)=>{var r,o,[n,a,s]=t,c=0;if(n.some(e=>0!==i[e])){for(r in a)p.o(a,r)&&(p.m[r]=a[r]);s&&s(p)}for(e&&e(t);c<n.length;c++)o=n[c],p.o(i,o)&&i[o]&&i[o][0](),i[o]=0},(n=this.webpackChunk_tsparticles_plugin_emitters_shape_canvas=this.webpackChunk_tsparticles_plugin_emitters_shape_canvas||[]).forEach(o.bind(null,0)),n.push=o.bind(null,n.push.bind(n));var h={};async function m(e){e.checkVersion("4.0.0-beta.12"),await e.pluginManager.register(async e=>{let{ensureEmittersPluginLoaded:t}=await Promise.resolve().then(p.t.bind(p,526,19));t(e);let{EmittersCanvasShapeGenerator:r}=await p.e(703).then(p.bind(p,703));e.pluginManager.addEmitterShapeGenerator?.("canvas",new r)})}return p.r(h),p.d(h,{loadEmittersShapeCanvas:()=>m}),h})());
1
+ !function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var s="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,s){return s in t||(t[s]={}),t[s]}})}:function(t){return t};t.__tsParticlesInternals.bundles=s(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=s(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=s(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=s(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=s(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=s(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=s(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=s(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=s(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=s(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=s(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=s(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=s(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,s){"object"==typeof exports&&"undefined"!=typeof module?s(exports,require("@tsparticles/plugin-emitters"),require("@tsparticles/engine"),require("@tsparticles/canvas-utils")):"function"==typeof define&&define.amd?define(["exports","@tsparticles/plugin-emitters","@tsparticles/engine","@tsparticles/canvas-utils"],s):s(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.plugins.emittersShapes.canvas=t.__tsParticlesInternals.plugins.emittersShapes.canvas||{}),t.__tsParticlesInternals.plugins.emitters,t.__tsParticlesInternals.engine,t.__tsParticlesInternals.canvas.utils)}(this,function(t,s,e,a){"use strict";class n extends s.EmitterShapeBase{filter;pixelData;scale;_container;constructor(t,s,a,n,i){super(s,a,n,i),this._container=t;const l=i.filter;let r=t=>t.a>0;if(e.isString(l)){if(l in globalThis){const t=globalThis[l];e.isFunction(t)&&(r=t)}}else r=l;this.filter=r,this.scale=i.scale,this.pixelData={pixels:[],height:0,width:0}}async init(){let t;const s=this.options,n=s.selector,i=s.pixels,l=s.image,r=s.element,c=s.text,_=i.offset;if(l){const s=l.src;if(!s)return;t=await a.getImageData(s,_,this._container.canvas.render.settings)}else if(r??n){const s=r??(n&&e.safeDocument().querySelector(n));if(!s)return;const i=s.getContext("2d",this._container.canvas.render.settings);if(!i)return;t=a.getCanvasImageData(i,s,_)}else{const s=a.getTextData(c,_,this.fill,this._container.canvas.render.settings);if(e.isNull(s))return;t=s}this.pixelData=t}randomPosition(){const{height:t,width:s}=this.pixelData,a=this.pixelData,n=this.position,i=this.scale,l=n.x-s*i*e.half,r=n.y-t*i*e.half;for(let n=0;n<100;n++){const n=Math.floor(e.getRandom()*s*t),c={x:n%s,y:Math.floor(n/s)},_=a.pixels[c.y];if(!_)continue;const o=_[c.x];if(!o)continue;if(this.filter(o))return{position:{x:c.x*i+l,y:c.y*i+r},color:{...o},opacity:o.a}}return null}resize(t,s){super.resize(t,s)}}class i{offset;constructor(){this.offset=4}load(t){e.isNull(t)||void 0!==t.offset&&(this.offset=t.offset)}}class l{family;size;style;variant;weight;constructor(){this.family="Verdana",this.size=32,this.style="",this.variant="",this.weight=""}load(t){e.isNull(t)||(void 0!==t.family&&(this.family=t.family),void 0!==t.size&&(this.size=t.size),void 0!==t.style&&(this.style=t.style),void 0!==t.variant&&(this.variant=t.variant),void 0!==t.weight&&(this.weight=t.weight))}}class r{separator;spacing;constructor(){this.separator="\n",this.spacing=0}load(t){e.isNull(t)||(void 0!==t.separator&&(this.separator=t.separator),void 0!==t.spacing&&(this.spacing=t.spacing))}}class c{color;font;lines;text;constructor(){this.color="#000000",this.font=new l,this.lines=new r,this.text=""}load(t){e.isNull(t)||(void 0!==t.color&&(this.color=t.color),this.font.load(t.font),this.lines.load(t.lines),void 0!==t.text&&(this.text=t.text))}}class _{element;filter;image;pixels;scale;selector;text;constructor(){this.filter=t=>t.a>0,this.pixels=new i,this.scale=1,this.selector="",this.text=new c}load(t){e.isNull(t)||(void 0!==t.element&&(this.element=t.element),void 0!==t.filter&&(this.filter=t.filter),this.pixels.load(t.pixels),void 0!==t.scale&&(this.scale=t.scale),void 0!==t.selector&&(this.selector=t.selector),void 0!==t.image&&(this.image=t.image),this.text.load(t.text))}}class o{generate(t,s,e,a,i){const l=new _;return l.load(i),new n(t,s,e,a,l)}}async function p(t){t.checkVersion("4.0.0-beta.16"),await t.pluginManager.register(t=>{s.ensureEmittersPluginLoaded(t),t.pluginManager.addEmitterShapeGenerator?.("canvas",new o)})}const h=globalThis;h.__tsParticlesInternals=h.__tsParticlesInternals??{},h.loadEmittersShapeCanvas=p,t.loadEmittersShapeCanvas=p}),Object.assign(globalThis.window||globalThis,{loadEmittersShapeCanvas:(globalThis.__tsParticlesInternals.plugins.emittersShapes.canvas||{}).loadEmittersShapeCanvas}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
@@ -0,0 +1 @@
1
+ export * from "./index.js";
@@ -0,0 +1,2 @@
1
+ import type { Engine } from "@tsparticles/engine/lazy";
2
+ export declare function loadEmittersShapeCanvas(engine: Engine): Promise<void>;
package/703.min.js DELETED
@@ -1,2 +0,0 @@
1
- "use strict";(this.webpackChunk_tsparticles_plugin_emitters_shape_canvas=this.webpackChunk_tsparticles_plugin_emitters_shape_canvas||[]).push([[703],{703(t,e,i){i.d(e,{EmittersCanvasShapeGenerator:()=>p});var s=i(303),a=i(526),l=i(425);class o extends a.EmitterShapeBase{filter;pixelData;scale;_container;constructor(t,e,i,a,l){super(e,i,a,l),this._container=t;const o=l.filter;let r=t=>t.a>0;if((0,s.isString)(o)){if(o in globalThis){const t=globalThis[o];(0,s.isFunction)(t)&&(r=t)}}else r=o;this.filter=r,this.scale=l.scale,this.pixelData={pixels:[],height:0,width:0}}async init(){let t,e=this.options,i=e.selector,a=e.pixels,o=e.image,r=e.element,n=e.text,h=a.offset;if(o){let e=o.src;if(!e)return;t=await (0,l.getImageData)(e,h,this._container.canvas.render.settings)}else if(r??i){let e=r??(i&&(0,s.safeDocument)().querySelector(i));if(!e)return;let a=e.getContext("2d",this._container.canvas.render.settings);if(!a)return;t=(0,l.getCanvasImageData)(a,e,h)}else{let e=(0,l.getTextData)(n,h,this.fill,this._container.canvas.render.settings);if((0,s.isNull)(e))return;t=e}this.pixelData=t}randomPosition(){let{height:t,width:e}=this.pixelData,i=this.pixelData,a=this.position,l=this.scale,o={x:a.x-e*l*s.half,y:a.y-t*l*s.half};for(let a=0;a<100;a++){let a=Math.floor((0,s.getRandom)()*e*t),r={x:a%e,y:Math.floor(a/e)},n=i.pixels[r.y];if(!n)continue;let h=n[r.x];if(h&&this.filter(h))return{position:{x:r.x*l+o.x,y:r.y*l+o.y},color:{...h},opacity:h.a}}return null}resize(t,e){super.resize(t,e)}}class r{offset;constructor(){this.offset=4}load(t){(0,s.isNull)(t)||void 0!==t.offset&&(this.offset=t.offset)}}class n{family;size;style;variant;weight;constructor(){this.family="Verdana",this.size=32,this.style="",this.variant="",this.weight=""}load(t){(0,s.isNull)(t)||(void 0!==t.family&&(this.family=t.family),void 0!==t.size&&(this.size=t.size),void 0!==t.style&&(this.style=t.style),void 0!==t.variant&&(this.variant=t.variant),void 0!==t.weight&&(this.weight=t.weight))}}class h{separator;spacing;constructor(){this.separator=`
2
- `,this.spacing=0}load(t){(0,s.isNull)(t)||(void 0!==t.separator&&(this.separator=t.separator),void 0!==t.spacing&&(this.spacing=t.spacing))}}class c{color;font;lines;text;constructor(){this.color="#000000",this.font=new n,this.lines=new h,this.text=""}load(t){(0,s.isNull)(t)||(void 0!==t.color&&(this.color=t.color),this.font.load(t.font),this.lines.load(t.lines),void 0!==t.text&&(this.text=t.text))}}class f{element;filter;image;pixels;scale;selector;text;constructor(){this.filter=t=>t.a>0,this.pixels=new r,this.scale=1,this.selector="",this.text=new c}load(t){(0,s.isNull)(t)||(void 0!==t.element&&(this.element=t.element),void 0!==t.filter&&(this.filter=t.filter),this.pixels.load(t.pixels),void 0!==t.scale&&(this.scale=t.scale),void 0!==t.selector&&(this.selector=t.selector),void 0!==t.image&&(this.image=t.image),this.text.load(t.text))}}class p{generate(t,e,i,s,a){let l=new f;return l.load(a),new o(t,e,i,s,l)}}}}]);
@@ -1,90 +0,0 @@
1
- /*!
2
- * Author : Matteo Bruni
3
- * MIT license: https://opensource.org/licenses/MIT
4
- * Demo / Generator : https://particles.js.org/
5
- * GitHub : https://www.github.com/matteobruni/tsparticles
6
- * How to use? : Check the GitHub README
7
- * v4.0.0-beta.12
8
- */
9
- "use strict";
10
- /*
11
- * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
12
- * This devtool is neither made for production nor for readable output files.
13
- * It uses "eval()" calls to create a separate source file in the browser devtools.
14
- * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
15
- * or disable the default devtool with "devtool: false".
16
- * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
17
- */
18
- (this["webpackChunk_tsparticles_plugin_emitters_shape_canvas"] = this["webpackChunk_tsparticles_plugin_emitters_shape_canvas"] || []).push([["dist_browser_EmittersCanvasShapeGenerator_js"],{
19
-
20
- /***/ "./dist/browser/EmittersCanvasShape.js"
21
- /*!*********************************************!*\
22
- !*** ./dist/browser/EmittersCanvasShape.js ***!
23
- \*********************************************/
24
- (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
25
-
26
- eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ EmittersCanvasShape: () => (/* binding */ EmittersCanvasShape)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_plugin_emitters__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tsparticles/plugin-emitters */ \"@tsparticles/plugin-emitters\");\n/* harmony import */ var _tsparticles_canvas_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @tsparticles/canvas-utils */ \"@tsparticles/canvas-utils\");\n\n\n\nconst maxRetries = 100;\nclass EmittersCanvasShape extends _tsparticles_plugin_emitters__WEBPACK_IMPORTED_MODULE_1__.EmitterShapeBase {\n filter;\n pixelData;\n scale;\n _container;\n constructor(container, position, size, fill, options){\n super(position, size, fill, options);\n this._container = container;\n const filter = options.filter, minAlpha = 0;\n let filterFunc = (pixel)=>pixel.a > minAlpha;\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isString)(filter)) {\n if (filter in globalThis) {\n const wndFilter = globalThis[filter];\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isFunction)(wndFilter)) {\n filterFunc = wndFilter;\n }\n }\n } else {\n filterFunc = filter;\n }\n this.filter = filterFunc;\n this.scale = options.scale;\n this.pixelData = {\n pixels: [],\n height: 0,\n width: 0\n };\n }\n async init() {\n let pixelData;\n const options = this.options, selector = options.selector, pixels = options.pixels, image = options.image, element = options.element, text = options.text, offset = pixels.offset;\n if (image) {\n const url = image.src;\n if (!url) {\n return;\n }\n pixelData = await (0,_tsparticles_canvas_utils__WEBPACK_IMPORTED_MODULE_2__.getImageData)(url, offset, this._container.canvas.render.settings);\n } else if (element ?? selector) {\n const canvas = element ?? (selector && (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.safeDocument)().querySelector(selector));\n if (!canvas) {\n return;\n }\n const context = canvas.getContext(\"2d\", this._container.canvas.render.settings);\n if (!context) {\n return;\n }\n pixelData = (0,_tsparticles_canvas_utils__WEBPACK_IMPORTED_MODULE_2__.getCanvasImageData)(context, canvas, offset);\n } else {\n const data = (0,_tsparticles_canvas_utils__WEBPACK_IMPORTED_MODULE_2__.getTextData)(text, offset, this.fill, this._container.canvas.render.settings);\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n pixelData = data;\n }\n this.pixelData = pixelData;\n }\n randomPosition() {\n const { height, width } = this.pixelData, data = this.pixelData, position = this.position, scale = this.scale, positionOffset = {\n x: position.x - width * scale * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.half,\n y: position.y - height * scale * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.half\n };\n for(let i = 0; i < maxRetries; i++){\n const nextIndex = Math.floor((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() * width * height), pixelPos = {\n x: nextIndex % width,\n y: Math.floor(nextIndex / width)\n }, row = data.pixels[pixelPos.y];\n if (!row) {\n continue;\n }\n const pixel = row[pixelPos.x];\n if (!pixel) {\n continue;\n }\n const shouldCreateParticle = this.filter(pixel);\n if (!shouldCreateParticle) {\n continue;\n }\n return {\n position: {\n x: pixelPos.x * scale + positionOffset.x,\n y: pixelPos.y * scale + positionOffset.y\n },\n color: {\n ...pixel\n },\n opacity: pixel.a\n };\n }\n return null;\n }\n resize(position, size) {\n super.resize(position, size);\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/plugin-emitters-shape-canvas/./dist/browser/EmittersCanvasShape.js?\n}");
27
-
28
- /***/ },
29
-
30
- /***/ "./dist/browser/EmittersCanvasShapeGenerator.js"
31
- /*!******************************************************!*\
32
- !*** ./dist/browser/EmittersCanvasShapeGenerator.js ***!
33
- \******************************************************/
34
- (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
35
-
36
- eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ EmittersCanvasShapeGenerator: () => (/* binding */ EmittersCanvasShapeGenerator)\n/* harmony export */ });\n/* harmony import */ var _EmittersCanvasShape_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./EmittersCanvasShape.js */ \"./dist/browser/EmittersCanvasShape.js\");\n/* harmony import */ var _Options_Classes_EmittersCanvasShapeOptions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Options/Classes/EmittersCanvasShapeOptions.js */ \"./dist/browser/Options/Classes/EmittersCanvasShapeOptions.js\");\n\n\nclass EmittersCanvasShapeGenerator {\n generate(container, position, size, fill, options) {\n const shapeOptions = new _Options_Classes_EmittersCanvasShapeOptions_js__WEBPACK_IMPORTED_MODULE_1__.EmittersCanvasShapeOptions();\n shapeOptions.load(options);\n return new _EmittersCanvasShape_js__WEBPACK_IMPORTED_MODULE_0__.EmittersCanvasShape(container, position, size, fill, shapeOptions);\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/plugin-emitters-shape-canvas/./dist/browser/EmittersCanvasShapeGenerator.js?\n}");
37
-
38
- /***/ },
39
-
40
- /***/ "./dist/browser/Options/Classes/EmittersCanvasShapeOptions.js"
41
- /*!********************************************************************!*\
42
- !*** ./dist/browser/Options/Classes/EmittersCanvasShapeOptions.js ***!
43
- \********************************************************************/
44
- (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
45
-
46
- eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ EmittersCanvasShapeOptions: () => (/* binding */ EmittersCanvasShapeOptions)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _PixelsOptions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PixelsOptions.js */ \"./dist/browser/Options/Classes/PixelsOptions.js\");\n/* harmony import */ var _TextOptions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TextOptions.js */ \"./dist/browser/Options/Classes/TextOptions.js\");\n\n\n\nconst minAlpha = 0;\nclass EmittersCanvasShapeOptions {\n element;\n filter;\n image;\n pixels;\n scale;\n selector;\n text;\n constructor(){\n this.filter = (pixel)=>pixel.a > minAlpha;\n this.pixels = new _PixelsOptions_js__WEBPACK_IMPORTED_MODULE_1__.PixelsOptions();\n this.scale = 1;\n this.selector = \"\";\n this.text = new _TextOptions_js__WEBPACK_IMPORTED_MODULE_2__.TextOptions();\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.element !== undefined) {\n this.element = data.element;\n }\n if (data.filter !== undefined) {\n this.filter = data.filter;\n }\n this.pixels.load(data.pixels);\n if (data.scale !== undefined) {\n this.scale = data.scale;\n }\n if (data.selector !== undefined) {\n this.selector = data.selector;\n }\n if (data.image !== undefined) {\n this.image = data.image;\n }\n this.text.load(data.text);\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/plugin-emitters-shape-canvas/./dist/browser/Options/Classes/EmittersCanvasShapeOptions.js?\n}");
47
-
48
- /***/ },
49
-
50
- /***/ "./dist/browser/Options/Classes/PixelsOptions.js"
51
- /*!*******************************************************!*\
52
- !*** ./dist/browser/Options/Classes/PixelsOptions.js ***!
53
- \*******************************************************/
54
- (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
55
-
56
- eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PixelsOptions: () => (/* binding */ PixelsOptions)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n\nclass PixelsOptions {\n offset;\n constructor(){\n this.offset = 4;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.offset !== undefined) {\n this.offset = data.offset;\n }\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/plugin-emitters-shape-canvas/./dist/browser/Options/Classes/PixelsOptions.js?\n}");
57
-
58
- /***/ },
59
-
60
- /***/ "./dist/browser/Options/Classes/TextFontOptions.js"
61
- /*!*********************************************************!*\
62
- !*** ./dist/browser/Options/Classes/TextFontOptions.js ***!
63
- \*********************************************************/
64
- (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
65
-
66
- eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ TextFontOptions: () => (/* binding */ TextFontOptions)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n\nclass TextFontOptions {\n family;\n size;\n style;\n variant;\n weight;\n constructor(){\n this.family = \"Verdana\";\n this.size = 32;\n this.style = \"\";\n this.variant = \"\";\n this.weight = \"\";\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.family !== undefined) {\n this.family = data.family;\n }\n if (data.size !== undefined) {\n this.size = data.size;\n }\n if (data.style !== undefined) {\n this.style = data.style;\n }\n if (data.variant !== undefined) {\n this.variant = data.variant;\n }\n if (data.weight !== undefined) {\n this.weight = data.weight;\n }\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/plugin-emitters-shape-canvas/./dist/browser/Options/Classes/TextFontOptions.js?\n}");
67
-
68
- /***/ },
69
-
70
- /***/ "./dist/browser/Options/Classes/TextLinesOptions.js"
71
- /*!**********************************************************!*\
72
- !*** ./dist/browser/Options/Classes/TextLinesOptions.js ***!
73
- \**********************************************************/
74
- (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
75
-
76
- eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ TextLinesOptions: () => (/* binding */ TextLinesOptions)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n\nclass TextLinesOptions {\n separator;\n spacing;\n constructor(){\n this.separator = \"\\n\";\n this.spacing = 0;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.separator !== undefined) {\n this.separator = data.separator;\n }\n if (data.spacing !== undefined) {\n this.spacing = data.spacing;\n }\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/plugin-emitters-shape-canvas/./dist/browser/Options/Classes/TextLinesOptions.js?\n}");
77
-
78
- /***/ },
79
-
80
- /***/ "./dist/browser/Options/Classes/TextOptions.js"
81
- /*!*****************************************************!*\
82
- !*** ./dist/browser/Options/Classes/TextOptions.js ***!
83
- \*****************************************************/
84
- (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
85
-
86
- eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ TextOptions: () => (/* binding */ TextOptions)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _TextFontOptions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./TextFontOptions.js */ \"./dist/browser/Options/Classes/TextFontOptions.js\");\n/* harmony import */ var _TextLinesOptions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TextLinesOptions.js */ \"./dist/browser/Options/Classes/TextLinesOptions.js\");\n\n\n\nclass TextOptions {\n color;\n font;\n lines;\n text;\n constructor(){\n this.color = \"#000000\";\n this.font = new _TextFontOptions_js__WEBPACK_IMPORTED_MODULE_1__.TextFontOptions();\n this.lines = new _TextLinesOptions_js__WEBPACK_IMPORTED_MODULE_2__.TextLinesOptions();\n this.text = \"\";\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.color !== undefined) {\n this.color = data.color;\n }\n this.font.load(data.font);\n this.lines.load(data.lines);\n if (data.text !== undefined) {\n this.text = data.text;\n }\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/plugin-emitters-shape-canvas/./dist/browser/Options/Classes/TextOptions.js?\n}");
87
-
88
- /***/ }
89
-
90
- }]);