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-alpha.5 to 2.0.0-alpha.6

6

OpacityUpdater.js

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

import { AnimationStatus, checkDestroy, clamp } from "tsparticles-engine";
import { AnimationStatus, checkDestroy, clamp, getRangeMin, getRangeMax } from "tsparticles-engine";
export class OpacityUpdater {

@@ -18,4 +18,4 @@ constructor(container) {

const value = opacityOpt.value;
const minValue = typeof value === "number" ? value : value.min;
const maxValue = typeof value === "number" ? value : value.max;
const minValue = getRangeMin(value);
const maxValue = getRangeMax(value);
if (!this.isEnabled(particle)) {

@@ -22,0 +22,0 @@ return;

{
"name": "tsparticles-updater-opacity",
"version": "2.0.0-alpha.5",
"version": "2.0.0-alpha.6",
"description": "tsParticles particles opacity updater",

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

"dependencies": {
"tsparticles-engine": "^2.0.0-alpha.5"
"tsparticles-engine": "^2.0.0-alpha.6"
}
}

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

* How to use? : Check the GitHub README
* v2.0.0-alpha.5
* v2.0.0-alpha.6
*/

@@ -55,4 +55,4 @@ (function webpackUniversalModuleDefinition(root, factory) {

const value = opacityOpt.value;
const minValue = typeof value === "number" ? value : value.min;
const maxValue = typeof value === "number" ? value : value.max;
const minValue = (0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.getRangeMin)(value);
const maxValue = (0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.getRangeMax)(value);

@@ -59,0 +59,0 @@ if (!this.isEnabled(particle)) {

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

/*! tsParticles Opacity Updater v2.0.0-alpha.5 by Matteo Bruni */
!function(e,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(e.window);for(var a in o)("object"==typeof exports?exports:e)[a]=o[a]}}(this,(function(e){return(()=>{"use strict";var t={22:(e,t,o)=>{o.r(t),o.d(t,{loadOpacityUpdater:()=>n});var a=o(414);class i{constructor(e){this.container=e}isEnabled(e){const t=e.options.opacity.anim;return!e.destroyed&&!e.spawning&&t.enable&&(t.count<=0||e.loops.opacity<t.count)}update(e,t){var o,i;const n=e.options.opacity,r=n.anim,c=n.value,s="number"==typeof c?c:c.min,p="number"==typeof c?c:c.max;if(this.isEnabled(e)){switch(e.opacity.status){case a.AnimationStatus.increasing:e.opacity.value>=p?(e.opacity.status=a.AnimationStatus.decreasing,e.loops.opacity++):e.opacity.value+=(null!==(o=e.opacity.velocity)&&void 0!==o?o:0)*t.factor;break;case a.AnimationStatus.decreasing:e.opacity.value<=s?(e.opacity.status=a.AnimationStatus.increasing,e.loops.opacity++):e.opacity.value-=(null!==(i=e.opacity.velocity)&&void 0!==i?i:0)*t.factor}(0,a.checkDestroy)(e,r.destroy,e.opacity.value,s,p),e.destroyed||(e.opacity.value=(0,a.clamp)(e.opacity.value,s,p))}}}function n(e){e.addParticleUpdater("opacity",(e=>new i(e)))}},414:t=>{t.exports=e}},o={};function a(e){if(o[e])return o[e].exports;var i=o[e]={exports:{}};return t[e](i,i.exports,a),i.exports}return a.d=(e,t)=>{for(var o in t)a.o(t,o)&&!a.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a(22)})()}));
/*! tsParticles Opacity Updater v2.0.0-alpha.6 by Matteo Bruni */
!function(e,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(e.window);for(var a in o)("object"==typeof exports?exports:e)[a]=o[a]}}(this,(function(e){return(()=>{"use strict";var t={22:(e,t,o)=>{o.r(t),o.d(t,{loadOpacityUpdater:()=>n});var a=o(414);class i{constructor(e){this.container=e}isEnabled(e){const t=e.options.opacity.anim;return!e.destroyed&&!e.spawning&&t.enable&&(t.count<=0||e.loops.opacity<t.count)}update(e,t){var o,i;const n=e.options.opacity,r=n.anim,c=n.value,s=(0,a.getRangeMin)(c),p=(0,a.getRangeMax)(c);if(this.isEnabled(e)){switch(e.opacity.status){case a.AnimationStatus.increasing:e.opacity.value>=p?(e.opacity.status=a.AnimationStatus.decreasing,e.loops.opacity++):e.opacity.value+=(null!==(o=e.opacity.velocity)&&void 0!==o?o:0)*t.factor;break;case a.AnimationStatus.decreasing:e.opacity.value<=s?(e.opacity.status=a.AnimationStatus.increasing,e.loops.opacity++):e.opacity.value-=(null!==(i=e.opacity.velocity)&&void 0!==i?i:0)*t.factor}(0,a.checkDestroy)(e,r.destroy,e.opacity.value,s,p),e.destroyed||(e.opacity.value=(0,a.clamp)(e.opacity.value,s,p))}}}function n(e){e.addParticleUpdater("opacity",(e=>new i(e)))}},414:t=>{t.exports=e}},o={};function a(e){if(o[e])return o[e].exports;var i=o[e]={exports:{}};return t[e](i,i.exports,a),i.exports}return a.d=(e,t)=>{for(var o in t)a.o(t,o)&&!a.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a(22)})()}));

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