Socket
Socket
Sign inDemoInstall

tsparticles-updater-stroke-color

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-updater-stroke-color - npm Package Compare versions

Comparing version 2.0.0-beta.3 to 2.0.0-beta.4

4

package.json
{
"name": "tsparticles-updater-stroke-color",
"version": "2.0.0-beta.3",
"version": "2.0.0-beta.4",
"description": "tsParticles particles stroke color updater",

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

"dependencies": {
"tsparticles-engine": "^2.0.0-beta.2"
"tsparticles-engine": "^2.0.0-beta.3"
}
}

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

* How to use? : Check the GitHub README
* v2.0.0-beta.3
* v2.0.0-beta.4
*/

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

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

/*! tsParticles Stroke Color Updater v2.0.0-beta.3 by Matteo Bruni */
/*! tsParticles Stroke Color Updater v2.0.0-beta.4 by Matteo Bruni */
!function(o,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 t="object"==typeof exports?e(require("tsparticles-engine")):e(o.window);for(var n in t)("object"==typeof exports?exports:o)[n]=t[n]}}(this,(function(o){return(()=>{"use strict";var e={818:e=>{e.exports=o}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}n.d=(o,e)=>{for(var t in e)n.o(e,t)&&!n.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:e[t]})},n.o=(o,e)=>Object.prototype.hasOwnProperty.call(o,e),n.r=o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})};var r={};return(()=>{n.r(r),n.d(r,{loadStrokeColorUpdater:()=>l});var o=n(818);function e(e,t,n,r,i){var l;const a=t;if(!a||!a.enable)return;const s=(0,o.randomInRange)(n.offset),u=(null!==(l=t.velocity)&&void 0!==l?l:0)*e.factor+3.6*s;i&&a.status!==o.AnimationStatus.increasing?(a.value-=u,a.value<0&&(a.status=o.AnimationStatus.increasing,a.value+=a.value)):(a.value+=u,i&&a.value>r&&(a.status=o.AnimationStatus.decreasing,a.value-=a.value%r)),a.value>r&&(a.value%=r)}class t{constructor(o){this.container=o}init(e){var t,n;const r=this.container;e.stroke=e.options.stroke instanceof Array?(0,o.itemFromArray)(e.options.stroke,e.id,e.options.reduceDuplicates):e.options.stroke,e.strokeWidth=e.stroke.width*r.retina.pixelRatio;const i=null!==(t=(0,o.colorToHsl)(e.stroke.color))&&void 0!==t?t:e.getFillColor();i&&(e.strokeColor=(0,o.getHslAnimationFromHsl)(i,null===(n=e.stroke.color)||void 0===n?void 0:n.animation,r.retina.reduceFactor))}isEnabled(o){var e,t,n,r;const i=null===(e=o.stroke)||void 0===e?void 0:e.color;return!o.destroyed&&!o.spawning&&!!i&&(void 0!==(null===(t=o.strokeColor)||void 0===t?void 0:t.h.value)&&i.animation.h.enable||void 0!==(null===(n=o.strokeColor)||void 0===n?void 0:n.s.value)&&i.animation.s.enable||void 0!==(null===(r=o.strokeColor)||void 0===r?void 0:r.l.value)&&i.animation.l.enable)}update(o,t){this.isEnabled(o)&&function(o,t){var n,r,i,l,a,s,u,d,v,c;if(!(null===(n=o.stroke)||void 0===n?void 0:n.color))return;const f=o.stroke.color.animation,p=null!==(i=null===(r=o.strokeColor)||void 0===r?void 0:r.h)&&void 0!==i?i:null===(l=o.color)||void 0===l?void 0:l.h;p&&e(t,p,f.h,360,!1);const y=null!==(s=null===(a=o.strokeColor)||void 0===a?void 0:a.s)&&void 0!==s?s:null===(u=o.color)||void 0===u?void 0:u.s;y&&e(t,y,f.s,100,!0);const m=null!==(v=null===(d=o.strokeColor)||void 0===d?void 0:d.l)&&void 0!==v?v:null===(c=o.color)||void 0===c?void 0:c.l;m&&e(t,m,f.l,100,!0)}(o,t)}}var i=function(o,e,t,n){return new(t||(t=Promise))((function(r,i){function l(o){try{s(n.next(o))}catch(o){i(o)}}function a(o){try{s(n.throw(o))}catch(o){i(o)}}function s(o){var e;o.done?r(o.value):(e=o.value,e instanceof t?e:new t((function(o){o(e)}))).then(l,a)}s((n=n.apply(o,e||[])).next())}))};function l(o){return i(this,void 0,void 0,(function*(){yield o.addParticleUpdater("strokeColor",(o=>new t(o)))}))}})(),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