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.1 to 2.0.0-beta.2

4

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

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

"dependencies": {
"tsparticles-engine": "^2.0.0-beta.0"
"tsparticles-engine": "^2.0.0-beta.1"
}
}

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

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

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

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

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

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