tsparticles-updater-color
Advanced tools
Comparing version 2.0.0-beta.3 to 2.0.0-beta.4
{ | ||
"name": "tsparticles-updater-color", | ||
"version": "2.0.0-beta.3", | ||
"version": "2.0.0-beta.4", | ||
"description": "tsParticles particles 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 Color Updater v2.0.0-beta.3 by Matteo Bruni */ | ||
/*! tsParticles 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 i=t[o];if(void 0!==i)return i.exports;var r=t[o]={exports:{}};return e[o](r,r.exports,n),r.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 i={};return(()=>{n.r(i),n.d(i,{loadColorUpdater:()=>a});var o=n(818);function e(e,t,n,i,r){var a;const l=t;if(!l||!n.enable)return;const c=(0,o.randomInRange)(n.offset),s=(null!==(a=t.velocity)&&void 0!==a?a:0)*e.factor+3.6*c;r&&l.status!==o.AnimationStatus.increasing?(l.value-=s,l.value<0&&(l.status=o.AnimationStatus.increasing,l.value+=l.value)):(l.value+=s,r&&l.value>i&&(l.status=o.AnimationStatus.decreasing,l.value-=l.value%i)),l.value>i&&(l.value%=i)}class t{constructor(o){this.container=o}init(e){const t=(0,o.colorToHsl)(e.options.color,e.id,e.options.reduceDuplicates);t&&(e.color=(0,o.getHslAnimationFromHsl)(t,e.options.color.animation,this.container.retina.reduceFactor))}isEnabled(o){var e,t,n;const i=o.options.color.animation;return!o.destroyed&&!o.spawning&&(void 0!==(null===(e=o.color)||void 0===e?void 0:e.h.value)&&i.h.enable||void 0!==(null===(t=o.color)||void 0===t?void 0:t.s.value)&&i.s.enable||void 0!==(null===(n=o.color)||void 0===n?void 0:n.l.value)&&i.l.enable)}update(o,t){!function(o,t){var n,i,r;const a=o.options.color.animation;void 0!==(null===(n=o.color)||void 0===n?void 0:n.h)&&e(t,o.color.h,a.h,360,!1),void 0!==(null===(i=o.color)||void 0===i?void 0:i.s)&&e(t,o.color.s,a.s,100,!0),void 0!==(null===(r=o.color)||void 0===r?void 0:r.l)&&e(t,o.color.l,a.l,100,!0)}(o,t)}}var r=function(o,e,t,n){return new(t||(t=Promise))((function(i,r){function a(o){try{c(n.next(o))}catch(o){r(o)}}function l(o){try{c(n.throw(o))}catch(o){r(o)}}function c(o){var e;o.done?i(o.value):(e=o.value,e instanceof t?e:new t((function(o){o(e)}))).then(a,l)}c((n=n.apply(o,e||[])).next())}))};function a(o){return r(this,void 0,void 0,(function*(){yield o.addParticleUpdater("color",(o=>new t(o)))}))}})(),i})()})); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package