Socket
Socket
Sign inDemoInstall

tsparticles-updater-opacity

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-opacity - npm Package Compare versions

Comparing version 2.1.2 to 2.1.3

4

package.json
{
"name": "tsparticles-updater-opacity",
"version": "2.1.2",
"version": "2.1.3",
"description": "tsParticles particles opacity updater",

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

"dependencies": {
"tsparticles-engine": "^2.1.2"
"tsparticles-engine": "^2.1.3"
}
}

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

* How to use? : Check the GitHub README
* v2.1.2
* v2.1.3
*/

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

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

/*! tsParticles Opacity Updater v2.1.2 by Matteo Bruni */
/*! tsParticles Opacity Updater v2.1.3 by Matteo Bruni */
!function(a,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("tsparticles-engine"));else if("function"==typeof define&&define.amd)define(["tsparticles-engine"],t);else{var o="object"==typeof exports?t(require("tsparticles-engine")):t(a.window);for(var e in o)("object"==typeof exports?exports:a)[e]=o[e]}}(this,(a=>(()=>{"use strict";var t={818:t=>{t.exports=a}},o={};function e(a){var i=o[a];if(void 0!==i)return i.exports;var c=o[a]={exports:{}};return t[a](c,c.exports,e),c.exports}e.d=(a,t)=>{for(var o in t)e.o(t,o)&&!e.o(a,o)&&Object.defineProperty(a,o,{enumerable:!0,get:t[o]})},e.o=(a,t)=>Object.prototype.hasOwnProperty.call(a,t),e.r=a=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})};var i={};return(()=>{e.r(i),e.d(i,{loadOpacityUpdater:()=>o});var a=e(818);class t{constructor(a){this.container=a}init(t){const o=t.options.opacity;t.opacity={enable:o.animation.enable,max:(0,a.getRangeMax)(o.value),min:(0,a.getRangeMin)(o.value),value:(0,a.getRangeValue)(o.value),loops:0,maxLoops:(0,a.getRangeValue)(o.animation.count)};const e=o.animation;if(e.enable){t.opacity.decay=1-(0,a.getRangeValue)(e.decay),t.opacity.status=0;const i=o.value;switch(t.opacity.min=(0,a.getRangeMin)(i),t.opacity.max=(0,a.getRangeMax)(i),e.startValue){case"min":t.opacity.value=t.opacity.min,t.opacity.status=0;break;case"random":t.opacity.value=(0,a.randomInRange)(t.opacity),t.opacity.status=Math.random()>=.5?0:1;break;default:t.opacity.value=t.opacity.max,t.opacity.status=1}t.opacity.velocity=(0,a.getRangeValue)(e.speed)/100*this.container.retina.reduceFactor,e.sync||(t.opacity.velocity*=Math.random())}}isEnabled(a){var t,o,e,i;return!a.destroyed&&!a.spawning&&!!a.opacity&&a.opacity.enable&&((null!==(t=a.opacity.maxLoops)&&void 0!==t?t:0)<=0||(null!==(o=a.opacity.maxLoops)&&void 0!==o?o:0)>0&&(null!==(e=a.opacity.loops)&&void 0!==e?e:0)<(null!==(i=a.opacity.maxLoops)&&void 0!==i?i:0))}update(t,o){this.isEnabled(t)&&function(t,o){var e,i,c,n,p,y;if(!t.opacity)return;const s=t.opacity.min,l=t.opacity.max,r=null!==(e=t.opacity.decay)&&void 0!==e?e:1;if(!(t.destroyed||!t.opacity.enable||(null!==(i=t.opacity.maxLoops)&&void 0!==i?i:0)>0&&(null!==(c=t.opacity.loops)&&void 0!==c?c:0)>(null!==(n=t.opacity.maxLoops)&&void 0!==n?n:0))){switch(t.opacity.status){case 0:t.opacity.value>=l?(t.opacity.status=1,t.opacity.loops||(t.opacity.loops=0),t.opacity.loops++):t.opacity.value+=(null!==(p=t.opacity.velocity)&&void 0!==p?p:0)*o.factor;break;case 1:t.opacity.value<=s?(t.opacity.status=0,t.opacity.loops||(t.opacity.loops=0),t.opacity.loops++):t.opacity.value-=(null!==(y=t.opacity.velocity)&&void 0!==y?y:0)*o.factor}t.opacity.velocity&&1!==t.opacity.decay&&(t.opacity.velocity*=r),function(a,t,o,e){switch(a.options.opacity.animation.destroy){case"max":t>=e&&a.destroy();break;case"min":t<=o&&a.destroy()}}(t,t.opacity.value,s,l),t.destroyed||(t.opacity.value=(0,a.clamp)(t.opacity.value,s,l))}}(t,o)}}async function o(a){await a.addParticleUpdater("opacity",(a=>new t(a)))}})(),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