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

2

package.json
{
"name": "tsparticles-updater-opacity",
"version": "2.0.0-beta.0",
"version": "2.0.0-beta.1",
"description": "tsParticles particles opacity updater",

@@ -5,0 +5,0 @@ "homepage": "https://particles.js.org/",

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

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

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

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

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