@tsparticles/shape-text 4.0.0-alpha.2 → 4.0.0-alpha.20
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/13.min.js +1 -0
- package/browser/TextDrawer.js +5 -7
- package/browser/Utils.js +7 -7
- package/browser/index.js +8 -5
- package/cjs/TextDrawer.js +5 -7
- package/cjs/Utils.js +7 -7
- package/cjs/index.js +8 -5
- package/dist_browser_TextDrawer_js.js +2 -12
- package/esm/TextDrawer.js +5 -7
- package/esm/Utils.js +7 -7
- package/esm/index.js +8 -5
- package/package.json +3 -2
- package/report.html +3 -3
- package/tsparticles.shape.text.js +31 -11
- package/tsparticles.shape.text.min.js +3 -2
- package/types/TextDrawer.d.ts +0 -1
- package/types/Utils.d.ts +1 -0
- package/types/index.d.ts +1 -1
- package/umd/TextDrawer.js +7 -9
- package/umd/Utils.js +10 -9
- package/umd/index.js +9 -6
- package/90.min.js +0 -2
- package/90.min.js.LICENSE.txt +0 -1
- package/tsparticles.shape.text.min.js.LICENSE.txt +0 -1
|
@@ -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-alpha.
|
|
7
|
+
* v4.0.0-alpha.20
|
|
8
8
|
*/
|
|
9
9
|
/*
|
|
10
10
|
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
@@ -16,25 +16,25 @@
|
|
|
16
16
|
*/
|
|
17
17
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
18
18
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
19
|
-
module.exports = factory(require("@tsparticles/engine"));
|
|
19
|
+
module.exports = factory(require("@tsparticles/engine"), require("@tsparticles/canvas-utils"));
|
|
20
20
|
else if(typeof define === 'function' && define.amd)
|
|
21
|
-
define(["@tsparticles/engine"], factory);
|
|
21
|
+
define(["@tsparticles/engine", "@tsparticles/canvas-utils"], factory);
|
|
22
22
|
else {
|
|
23
|
-
var a = typeof exports === 'object' ? factory(require("@tsparticles/engine")) : factory(root["window"]);
|
|
23
|
+
var a = typeof exports === 'object' ? factory(require("@tsparticles/engine"), require("@tsparticles/canvas-utils")) : factory(root["window"], root["window"]);
|
|
24
24
|
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
|
25
25
|
}
|
|
26
|
-
})(this, (__WEBPACK_EXTERNAL_MODULE__tsparticles_engine__) => {
|
|
26
|
+
})(this, (__WEBPACK_EXTERNAL_MODULE__tsparticles_engine__, __WEBPACK_EXTERNAL_MODULE__tsparticles_canvas_utils__) => {
|
|
27
27
|
return /******/ (() => { // webpackBootstrap
|
|
28
28
|
/******/ "use strict";
|
|
29
29
|
/******/ var __webpack_modules__ = ({
|
|
30
30
|
|
|
31
|
-
/***/ "
|
|
32
|
-
|
|
33
|
-
!***
|
|
34
|
-
|
|
35
|
-
(
|
|
31
|
+
/***/ "@tsparticles/canvas-utils"
|
|
32
|
+
/*!***************************************************************************************************************************************************!*\
|
|
33
|
+
!*** external {"commonjs":"@tsparticles/canvas-utils","commonjs2":"@tsparticles/canvas-utils","amd":"@tsparticles/canvas-utils","root":"window"} ***!
|
|
34
|
+
\***************************************************************************************************************************************************/
|
|
35
|
+
(module) {
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_canvas_utils__;
|
|
38
38
|
|
|
39
39
|
/***/ },
|
|
40
40
|
|
|
@@ -46,6 +46,26 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
46
46
|
|
|
47
47
|
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
|
|
48
48
|
|
|
49
|
+
/***/ },
|
|
50
|
+
|
|
51
|
+
/***/ "./dist/browser/Utils.js"
|
|
52
|
+
/*!*******************************!*\
|
|
53
|
+
!*** ./dist/browser/Utils.js ***!
|
|
54
|
+
\*******************************/
|
|
55
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
56
|
+
|
|
57
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ drawText: () => (/* binding */ drawText),\n/* harmony export */ validTypes: () => (/* binding */ validTypes)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n\nconst validTypes = [\n \"text\",\n \"character\",\n \"char\",\n \"multiline-text\"\n];\nfunction drawText(data) {\n const { context, particle, fill, stroke, radius, opacity } = data, character = particle.shapeData;\n if (!character) {\n return;\n }\n const textData = character.value;\n particle.text ??= (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.itemFromSingleOrMultiple)(textData, particle.randomIndexData);\n const text = particle.text, style = character.style, weight = character.weight, size = Math.round(radius) * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.double, font = character.font, lines = text?.split(\"\\n\") ?? [];\n context.font = `${style} ${weight} ${size.toString()}px \"${font}\"`;\n const originalGlobalAlpha = context.globalAlpha;\n context.globalAlpha = opacity;\n for(let i = 0; i < lines.length; i++){\n const currentLine = lines[i];\n if (!currentLine) {\n continue;\n }\n drawTextLine(context, currentLine, radius, i, fill, stroke);\n }\n context.globalAlpha = originalGlobalAlpha;\n}\nfunction drawTextLine(context, line, radius, index, fill, stroke) {\n const offsetX = line.length * radius * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.half, pos = {\n x: -offsetX,\n y: radius * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.half\n }, diameter = radius * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.double;\n if (fill) {\n context.fillText(line, pos.x, pos.y + diameter * index);\n }\n if (stroke) {\n context.strokeText(line, pos.x, pos.y + diameter * index);\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/shape-text/./dist/browser/Utils.js?\n}");
|
|
58
|
+
|
|
59
|
+
/***/ },
|
|
60
|
+
|
|
61
|
+
/***/ "./dist/browser/index.js"
|
|
62
|
+
/*!*******************************!*\
|
|
63
|
+
!*** ./dist/browser/index.js ***!
|
|
64
|
+
\*******************************/
|
|
65
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
66
|
+
|
|
67
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadTextShape: () => (/* binding */ loadTextShape)\n/* harmony export */ });\n/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Utils.js */ \"./dist/browser/Utils.js\");\n\nasync function loadTextShape(engine) {\n engine.checkVersion(\"4.0.0-alpha.20\");\n await engine.register((e)=>{\n e.addShape(_Utils_js__WEBPACK_IMPORTED_MODULE_0__.validTypes, async ()=>{\n const { TextDrawer } = await __webpack_require__.e(/*! import() */ \"dist_browser_TextDrawer_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./TextDrawer.js */ \"./dist/browser/TextDrawer.js\"));\n return new TextDrawer();\n });\n });\n}\n\n\n//# sourceURL=webpack://@tsparticles/shape-text/./dist/browser/index.js?\n}");
|
|
68
|
+
|
|
49
69
|
/***/ }
|
|
50
70
|
|
|
51
71
|
/******/ });
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"),require("@tsparticles/canvas-utils"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine","@tsparticles/canvas-utils"],t);else{var r="object"==typeof exports?t(require("@tsparticles/engine"),require("@tsparticles/canvas-utils")):t(e.window,e.window);for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(this,(e,t)=>(()=>{"use strict";var r,o,a,i={425(e){e.exports=t},303(t){t.exports=e},962(e,t,r){r.d(t,{m:()=>i,u:()=>a});var o=r(303);let a=["text","character","char","multiline-text"];function i(e){let{context:t,particle:r,fill:a,stroke:i,radius:n,opacity:l}=e,s=r.shapeData;if(!s)return;let p=s.value;r.text??=(0,o.itemFromSingleOrMultiple)(p,r.randomIndexData);let c=r.text,u=s.style,d=s.weight,f=Math.round(n)*o.double,h=s.font,b=c?.split(`
|
|
2
|
+
`)??[];t.font=`${u} ${d} ${f.toString()}px "${h}"`;let g=t.globalAlpha;t.globalAlpha=l;for(let e=0;e<b.length;e++){let r=b[e];r&&function(e,t,r,a,i,n){let l={x:-(t.length*r*o.half),y:r*o.half},s=r*o.double;i&&e.fillText(t,l.x,l.y+s*a),n&&e.strokeText(t,l.x,l.y+s*a)}(t,r,n,e,a,i)}t.globalAlpha=g}}},n={};function l(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={exports:{}};return i[e](r,r.exports,l),r.exports}l.m=i,l.d=(e,t)=>{for(var r in t)l.o(t,r)&&!l.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},l.f={},l.e=e=>Promise.all(Object.keys(l.f).reduce((t,r)=>(l.f[r](e,t),t),[])),l.u=e=>""+e+".min.js",l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s={},l.l=(e,t,r,o)=>{if(s[e])return void s[e].push(t);if(void 0!==r)for(var a,i,n=document.getElementsByTagName("script"),p=0;p<n.length;p++){var c=n[p];if(c.getAttribute("src")==e||c.getAttribute("data-webpack")=="@tsparticles/shape-text:"+r){a=c;break}}a||(i=!0,(a=document.createElement("script")).charset="utf-8",l.nc&&a.setAttribute("nonce",l.nc),a.setAttribute("data-webpack","@tsparticles/shape-text:"+r),a.src=e),s[e]=[t];var u=(t,r)=>{a.onerror=a.onload=null,clearTimeout(d);var o=s[e];if(delete s[e],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach(e=>e(r)),t)return t(r)},d=setTimeout(u.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=u.bind(null,a.onerror),a.onload=u.bind(null,a.onload),i&&document.head.appendChild(a)},l.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.g.importScripts&&(p=l.g.location+"");var s,p,c=l.g.document;if(!p&&c&&(c.currentScript&&"SCRIPT"===c.currentScript.tagName.toUpperCase()&&(p=c.currentScript.src),!p)){var u=c.getElementsByTagName("script");if(u.length)for(var d=u.length-1;d>-1&&(!p||!/^http(s?):/.test(p));)p=u[d--].src}if(!p)throw Error("Automatic publicPath is not supported in this browser");l.p=p=p.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r={973:0},l.f.j=(e,t)=>{var o=l.o(r,e)?r[e]:void 0;if(0!==o)if(o)t.push(o[2]);else{var a=new Promise((t,a)=>o=r[e]=[t,a]);t.push(o[2]=a);var i=l.p+l.u(e),n=Error();l.l(i,t=>{if(l.o(r,e)&&(0!==(o=r[e])&&(r[e]=void 0),o)){var a=t&&("load"===t.type?"missing":t.type),i=t&&t.target&&t.target.src;n.message="Loading chunk "+e+` failed.
|
|
3
|
+
(`+a+": "+i+")",n.name="ChunkLoadError",n.type=a,n.request=i,o[1](n)}},"chunk-"+e,e)}},o=(e,t)=>{var o,a,[i,n,s]=t,p=0;if(i.some(e=>0!==r[e])){for(o in n)l.o(n,o)&&(l.m[o]=n[o]);s&&s(l)}for(e&&e(t);p<i.length;p++)a=i[p],l.o(r,a)&&r[a]&&r[a][0](),r[a]=0},(a=this.webpackChunk_tsparticles_shape_text=this.webpackChunk_tsparticles_shape_text||[]).forEach(o.bind(null,0)),a.push=o.bind(null,a.push.bind(a));var f={};l.r(f),l.d(f,{loadTextShape:()=>b});var h=l(962);async function b(e){e.checkVersion("4.0.0-alpha.20"),await e.register(e=>{e.addShape(h.u,async()=>{let{TextDrawer:e}=await l.e(13).then(l.bind(l,13));return new e})})}return f})());
|
package/types/TextDrawer.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type Container, type IShapeDrawData, type IShapeDrawer } from "@tsparticles/engine";
|
|
2
2
|
import type { TextParticle } from "./TextParticle.js";
|
|
3
3
|
export declare class TextDrawer implements IShapeDrawer<TextParticle> {
|
|
4
|
-
readonly validTypes: readonly ["text", "character", "char", "multiline-text"];
|
|
5
4
|
draw(data: IShapeDrawData<TextParticle>): void;
|
|
6
5
|
init(container: Container): Promise<void>;
|
|
7
6
|
particleInit(_container: Container, particle: TextParticle): void;
|
package/types/Utils.d.ts
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type Engine } from "@tsparticles/engine";
|
|
2
|
-
export declare function loadTextShape(engine: Engine): void
|
|
2
|
+
export declare function loadTextShape(engine: Engine): Promise<void>;
|
package/umd/TextDrawer.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
if (v !== undefined) module.exports = v;
|
|
5
5
|
}
|
|
6
6
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "@tsparticles/engine", "./Utils.js"], factory);
|
|
7
|
+
define(["require", "exports", "@tsparticles/engine", "./Utils.js", "@tsparticles/canvas-utils"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
@@ -12,26 +12,24 @@
|
|
|
12
12
|
exports.TextDrawer = void 0;
|
|
13
13
|
const engine_1 = require("@tsparticles/engine");
|
|
14
14
|
const Utils_js_1 = require("./Utils.js");
|
|
15
|
+
const canvas_utils_1 = require("@tsparticles/canvas-utils");
|
|
15
16
|
const firstItem = 0;
|
|
16
17
|
class TextDrawer {
|
|
17
|
-
constructor() {
|
|
18
|
-
this.validTypes = ["text", "character", "char", "multiline-text"];
|
|
19
|
-
}
|
|
20
18
|
draw(data) {
|
|
21
19
|
(0, Utils_js_1.drawText)(data);
|
|
22
20
|
}
|
|
23
21
|
async init(container) {
|
|
24
|
-
const options = container.actualOptions
|
|
25
|
-
if (validTypes.find(t => (0, engine_1.isInArray)(t, options.particles.shape.type))) {
|
|
26
|
-
const shapeOptions = validTypes.map(t => options.particles.shape.options[t])[firstItem], promises = [];
|
|
22
|
+
const options = container.actualOptions;
|
|
23
|
+
if (Utils_js_1.validTypes.find(t => (0, engine_1.isInArray)(t, options.particles.shape.type))) {
|
|
24
|
+
const shapeOptions = Utils_js_1.validTypes.map(t => options.particles.shape.options[t])[firstItem], promises = [];
|
|
27
25
|
(0, engine_1.executeOnSingleOrMultiple)(shapeOptions, shape => {
|
|
28
|
-
promises.push((0,
|
|
26
|
+
promises.push((0, canvas_utils_1.loadFont)(shape.font, shape.weight));
|
|
29
27
|
});
|
|
30
28
|
await Promise.all(promises);
|
|
31
29
|
}
|
|
32
30
|
}
|
|
33
31
|
particleInit(_container, particle) {
|
|
34
|
-
if (!particle.shape || !
|
|
32
|
+
if (!particle.shape || !Utils_js_1.validTypes.includes(particle.shape)) {
|
|
35
33
|
return;
|
|
36
34
|
}
|
|
37
35
|
const character = particle.shapeData;
|
package/umd/Utils.js
CHANGED
|
@@ -9,9 +9,10 @@
|
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.validTypes = void 0;
|
|
12
13
|
exports.drawText = drawText;
|
|
13
14
|
const engine_1 = require("@tsparticles/engine");
|
|
14
|
-
|
|
15
|
+
exports.validTypes = ["text", "character", "char", "multiline-text"];
|
|
15
16
|
function drawText(data) {
|
|
16
17
|
const { context, particle, fill, stroke, radius, opacity } = data, character = particle.shapeData;
|
|
17
18
|
if (!character) {
|
|
@@ -19,24 +20,24 @@
|
|
|
19
20
|
}
|
|
20
21
|
const textData = character.value;
|
|
21
22
|
particle.text ??= (0, engine_1.itemFromSingleOrMultiple)(textData, particle.randomIndexData);
|
|
22
|
-
const text = particle.text, style = character.style, weight = character.weight, size = Math.round(radius) * double, font = character.font;
|
|
23
|
-
const lines = text?.split("\n") ?? [];
|
|
23
|
+
const text = particle.text, style = character.style, weight = character.weight, size = Math.round(radius) * engine_1.double, font = character.font, lines = text?.split("\n") ?? [];
|
|
24
24
|
context.font = `${style} ${weight} ${size.toString()}px "${font}"`;
|
|
25
|
+
const originalGlobalAlpha = context.globalAlpha;
|
|
25
26
|
context.globalAlpha = opacity;
|
|
26
27
|
for (let i = 0; i < lines.length; i++) {
|
|
27
28
|
const currentLine = lines[i];
|
|
28
29
|
if (!currentLine) {
|
|
29
30
|
continue;
|
|
30
31
|
}
|
|
31
|
-
|
|
32
|
+
drawTextLine(context, currentLine, radius, i, fill, stroke);
|
|
32
33
|
}
|
|
33
|
-
context.globalAlpha =
|
|
34
|
+
context.globalAlpha = originalGlobalAlpha;
|
|
34
35
|
}
|
|
35
|
-
function
|
|
36
|
-
const offsetX = line.length * radius * half, pos = {
|
|
36
|
+
function drawTextLine(context, line, radius, index, fill, stroke) {
|
|
37
|
+
const offsetX = line.length * radius * engine_1.half, pos = {
|
|
37
38
|
x: -offsetX,
|
|
38
|
-
y: radius * half,
|
|
39
|
-
}, diameter = radius * double;
|
|
39
|
+
y: radius * engine_1.half,
|
|
40
|
+
}, diameter = radius * engine_1.double;
|
|
40
41
|
if (fill) {
|
|
41
42
|
context.fillText(line, pos.x, pos.y + diameter * index);
|
|
42
43
|
}
|
package/umd/index.js
CHANGED
|
@@ -37,18 +37,21 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
37
37
|
if (v !== undefined) module.exports = v;
|
|
38
38
|
}
|
|
39
39
|
else if (typeof define === "function" && define.amd) {
|
|
40
|
-
define(["require", "exports"], factory);
|
|
40
|
+
define(["require", "exports", "./Utils.js"], factory);
|
|
41
41
|
}
|
|
42
42
|
})(function (require, exports) {
|
|
43
43
|
"use strict";
|
|
44
44
|
var __syncRequire = typeof module === "object" && typeof module.exports === "object";
|
|
45
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
46
|
exports.loadTextShape = loadTextShape;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
engine.
|
|
50
|
-
|
|
51
|
-
e.addShape(
|
|
47
|
+
const Utils_js_1 = require("./Utils.js");
|
|
48
|
+
async function loadTextShape(engine) {
|
|
49
|
+
engine.checkVersion("4.0.0-alpha.20");
|
|
50
|
+
await engine.register(e => {
|
|
51
|
+
e.addShape(Utils_js_1.validTypes, async () => {
|
|
52
|
+
const { TextDrawer } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./TextDrawer.js"))) : new Promise((resolve_1, reject_1) => { require(["./TextDrawer.js"], resolve_1, reject_1); }).then(__importStar));
|
|
53
|
+
return new TextDrawer();
|
|
54
|
+
});
|
|
52
55
|
});
|
|
53
56
|
}
|
|
54
57
|
});
|
package/90.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 90.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_shape_text=this.webpackChunk_tsparticles_shape_text||[]).push([[90],{90(t,e,a){a.d(e,{TextDrawer:()=>n});var i=a(303);function s(t,e,a,i,s,n,l){const r={x:-(e.length*a*.5),y:.5*a},o=2*a;n&&t.fillText(e,r.x,r.y+o*s),l&&t.strokeText(e,r.x,r.y+o*s)}class n{constructor(){this.validTypes=["text","character","char","multiline-text"]}draw(t){!function(t){const{context:e,particle:a,fill:n,stroke:l,radius:r,opacity:o}=t,p=a.shapeData;if(!p)return;const c=p.value;a.text??=(0,i.itemFromSingleOrMultiple)(c,a.randomIndexData);const h=a.text,u=p.style,x=p.weight,d=2*Math.round(r),f=p.font,y=h?.split("\n")??[];e.font=`${u} ${x} ${d.toString()}px "${f}"`,e.globalAlpha=o;for(let t=0;t<y.length;t++){const a=y[t];a&&s(e,a,r,0,t,n,l)}e.globalAlpha=1}(t)}async init(t){const e=t.actualOptions,{validTypes:a}=this;if(a.find((t=>(0,i.isInArray)(t,e.particles.shape.type)))){const t=a.map((t=>e.particles.shape.options[t]))[0],s=[];(0,i.executeOnSingleOrMultiple)(t,(t=>{s.push((0,i.loadFont)(t.font,t.weight))})),await Promise.all(s)}}particleInit(t,e){if(!e.shape||!this.validTypes.includes(e.shape))return;const a=e.shapeData;if(void 0===a)return;const s=a.value;e.text=(0,i.itemFromSingleOrMultiple)(s,e.randomIndexData)}}}}]);
|
package/90.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Text Shape v4.0.0-alpha.2 by Matteo Bruni */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Text Shape v4.0.0-alpha.2 by Matteo Bruni */
|