Socket
Socket
Sign inDemoInstall

tsparticles-shape-text

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tsparticles-shape-text - npm Package Compare versions

Comparing version 2.0.4 to 2.0.5

4

package.json
{
"name": "tsparticles-shape-text",
"version": "2.0.4",
"version": "2.0.5",
"description": "tsParticles text shape",

@@ -48,4 +48,4 @@ "homepage": "https://particles.js.org/",

"dependencies": {
"tsparticles-engine": "^2.0.4"
"tsparticles-engine": "^2.0.5"
}
}

@@ -7,3 +7,3 @@ /*!

* How to use? : Check the GitHub README
* v2.0.4
* v2.0.5
*/

@@ -10,0 +10,0 @@ (function webpackUniversalModuleDefinition(root, factory) {

@@ -1,2 +0,2 @@

/*! tsParticles Text Shape v2.0.4 by Matteo Bruni */
/*! tsParticles Text Shape v2.0.5 by Matteo Bruni */
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("tsparticles-engine"));else if("function"==typeof define&&define.amd)define(["tsparticles-engine"],e);else{var n="object"==typeof exports?e(require("tsparticles-engine")):e(t.window);for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(this,(function(t){return(()=>{"use strict";var e={818:e=>{e.exports=t}},n={};function o(t){var r=n[t];if(void 0!==r)return r.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,o),i.exports}o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{o.r(r),o.d(r,{loadTextShape:()=>c});var t=o(818),e=function(t,e,n,o){return new(n||(n=Promise))((function(r,i){function a(t){try{s(o.next(t))}catch(t){i(t)}}function c(t){try{s(o.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}s((o=o.apply(t,e||[])).next())}))};const n=["text","character","char"];class i{getSidesCount(){return 12}init(o){return e(this,void 0,void 0,(function*(){const e=o.actualOptions;if(n.find((n=>(0,t.isInArray)(n,e.particles.shape.type)))){const o=n.map((t=>e.particles.shape.options[t])).find((t=>!!t));if(o instanceof Array){const e=[];for(const n of o){const o=n;e.push((0,t.loadFont)(o.font,o.weight))}yield Promise.allSettled(e)}else if(void 0!==o){const e=o;yield(0,t.loadFont)(e.font,e.weight)}}}))}draw(e,n,o,r){var i,a,c;const s=n.shapeData;if(void 0===s)return;const f=s.value;if(void 0===f)return;const l=n;void 0===l.text&&(l.text=f instanceof Array?(0,t.itemFromArray)(f,n.randomIndexData):f);const u=l.text,d=null!==(i=s.style)&&void 0!==i?i:"",p=null!==(a=s.weight)&&void 0!==a?a:"400",y=2*Math.round(o),v=null!==(c=s.font)&&void 0!==c?c:"Verdana",h=n.fill,x=u.length*o/2;e.font=`${d} ${p} ${y}px "${v}"`;const g={x:-x,y:o/2};e.globalAlpha=r,h?e.fillText(u,g.x,g.y):e.strokeText(u,g.x,g.y),e.globalAlpha=1}}var a=function(t,e,n,o){return new(n||(n=Promise))((function(r,i){function a(t){try{s(o.next(t))}catch(t){i(t)}}function c(t){try{s(o.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}s((o=o.apply(t,e||[])).next())}))};function c(t){return a(this,void 0,void 0,(function*(){const e=new i;for(const o of n)yield t.addShape(o,e)}))}})(),r})()}));

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc