tsparticles-updater-color
Advanced tools
Comparing version 2.0.5 to 2.0.6
{ | ||
"name": "tsparticles-updater-color", | ||
"version": "2.0.5", | ||
"version": "2.0.6", | ||
"description": "tsParticles particles color updater", | ||
@@ -13,2 +13,4 @@ "homepage": "https://particles.js.org/", | ||
"tsparticles", | ||
"particles.js", | ||
"particlesjs", | ||
"particles", | ||
@@ -20,5 +22,22 @@ "particle", | ||
"particles-js", | ||
"particles.js", | ||
"particles-bg", | ||
"particles-bg-vue", | ||
"particles-ts", | ||
"particles.ts", | ||
"react-particles-js", | ||
"react-particles.js", | ||
"react-particles", | ||
"react", | ||
"reactjs", | ||
"vue-particles", | ||
"ngx-particles", | ||
"angular-particles", | ||
"particleground", | ||
"vue", | ||
"vuejs", | ||
"preact", | ||
"preactjs", | ||
"jquery", | ||
"angularjs", | ||
"angular", | ||
"typescript", | ||
@@ -36,3 +55,12 @@ "javascript", | ||
"background", | ||
"tsparticles-shape" | ||
"confetti", | ||
"canvas", | ||
"fireworks", | ||
"fireworks-js", | ||
"confetti-js", | ||
"confettijs", | ||
"fireworksjs", | ||
"canvas-confetti", | ||
"tsparticles-plugin", | ||
"tsparticles-updater" | ||
], | ||
@@ -44,11 +72,10 @@ "author": "Matteo Bruni", | ||
}, | ||
"main": "index.js", | ||
"main": "cjs/index.js", | ||
"jsdelivr": "tsparticles.updater.color.min.js", | ||
"unpkg": "tsparticles.updater.color.min.js", | ||
"browser": "index.js", | ||
"module": "index.js", | ||
"types": "index.d.ts", | ||
"module": "esm/index.js", | ||
"types": "types/index.d.ts", | ||
"dependencies": { | ||
"tsparticles-engine": "^2.0.5" | ||
"tsparticles-engine": "^2.0.6" | ||
} | ||
} |
@@ -7,3 +7,3 @@ /*! | ||
* How to use? : Check the GitHub README | ||
* v2.0.5 | ||
* v2.0.6 | ||
*/ | ||
@@ -19,3 +19,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
} | ||
})(this, function(__WEBPACK_EXTERNAL_MODULE__818__) { | ||
})(this, (__WEBPACK_EXTERNAL_MODULE__818__) => { | ||
return /******/ (() => { // webpackBootstrap | ||
@@ -101,3 +101,3 @@ /******/ "use strict"; | ||
var external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_ = __webpack_require__(818); | ||
;// CONCATENATED MODULE: ./dist/ColorUpdater.js | ||
;// CONCATENATED MODULE: ./dist/browser/ColorUpdater.js | ||
@@ -117,7 +117,11 @@ | ||
if (!decrease || colorValue.status === 0) { | ||
if (!decrease || colorValue.status === 0 | ||
/* increasing */ | ||
) { | ||
colorValue.value += velocity; | ||
if (decrease && colorValue.value > max) { | ||
colorValue.status = 1; | ||
colorValue.status = 1 | ||
/* decreasing */ | ||
; | ||
colorValue.value -= colorValue.value % max; | ||
@@ -129,3 +133,5 @@ } | ||
if (colorValue.value < 0) { | ||
colorValue.status = 0; | ||
colorValue.status = 0 | ||
/* increasing */ | ||
; | ||
colorValue.value += colorValue.value; | ||
@@ -164,2 +170,3 @@ } | ||
init(particle) { | ||
/* color */ | ||
const hslColor = (0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.colorToHsl)(particle.options.color, particle.id, particle.options.reduceDuplicates); | ||
@@ -184,40 +191,6 @@ | ||
} | ||
;// CONCATENATED MODULE: ./dist/index.js | ||
var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { | ||
return value instanceof P ? value : new P(function (resolve) { | ||
resolve(value); | ||
}); | ||
} | ||
;// CONCATENATED MODULE: ./dist/browser/index.js | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { | ||
try { | ||
step(generator.next(value)); | ||
} catch (e) { | ||
reject(e); | ||
} | ||
} | ||
function rejected(value) { | ||
try { | ||
step(generator["throw"](value)); | ||
} catch (e) { | ||
reject(e); | ||
} | ||
} | ||
function step(result) { | ||
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); | ||
} | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
function loadColorUpdater(engine) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
yield engine.addParticleUpdater("color", container => new ColorUpdater(container)); | ||
}); | ||
async function loadColorUpdater(engine) { | ||
await engine.addParticleUpdater("color", container => new ColorUpdater(container)); | ||
} | ||
@@ -224,0 +197,0 @@ })(); |
@@ -1,2 +0,2 @@ | ||
/*! tsParticles Color Updater v2.0.5 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 r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.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 r={};return(()=>{n.r(r),n.d(r,{loadColorUpdater:()=>l});var o=n(818);function e(e,t,n,r,i){var l;const a=t;if(!a||!n.enable)return;const c=(0,o.randomInRange)(n.offset),u=(null!==(l=t.velocity)&&void 0!==l?l:0)*e.factor+3.6*c;i&&0!==a.status?(a.value-=u,a.value<0&&(a.status=0,a.value+=a.value)):(a.value+=u,i&&a.value>r&&(a.status=1,a.value-=a.value%r)),a.value>r&&(a.value%=r)}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 r=o.options.color.animation;return!o.destroyed&&!o.spawning&&(void 0!==(null===(e=o.color)||void 0===e?void 0:e.h.value)&&r.h.enable||void 0!==(null===(t=o.color)||void 0===t?void 0:t.s.value)&&r.s.enable||void 0!==(null===(n=o.color)||void 0===n?void 0:n.l.value)&&r.l.enable)}update(o,t){!function(o,t){var n,r,i;const l=o.options.color.animation;void 0!==(null===(n=o.color)||void 0===n?void 0:n.h)&&e(t,o.color.h,l.h,360,!1),void 0!==(null===(r=o.color)||void 0===r?void 0:r.s)&&e(t,o.color.s,l.s,100,!0),void 0!==(null===(i=o.color)||void 0===i?void 0:i.l)&&e(t,o.color.l,l.l,100,!0)}(o,t)}}var i=function(o,e,t,n){return new(t||(t=Promise))((function(r,i){function l(o){try{c(n.next(o))}catch(o){i(o)}}function a(o){try{c(n.throw(o))}catch(o){i(o)}}function c(o){var e;o.done?r(o.value):(e=o.value,e instanceof t?e:new t((function(o){o(e)}))).then(l,a)}c((n=n.apply(o,e||[])).next())}))};function l(o){return i(this,void 0,void 0,(function*(){yield o.addParticleUpdater("color",(o=>new t(o)))}))}})(),r})()})); | ||
/*! tsParticles Color Updater v2.0.6 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,(o=>(()=>{"use strict";var e={818:e=>{e.exports=o}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,r),i.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 n={};return(()=>{r.r(n),r.d(n,{loadColorUpdater:()=>i});var o=r(818);function e(e,t,r,n,i){var l;const a=t;if(!a||!r.enable)return;const s=(0,o.randomInRange)(r.offset),c=(null!==(l=t.velocity)&&void 0!==l?l:0)*e.factor+3.6*s;i&&0!==a.status?(a.value-=c,a.value<0&&(a.status=0,a.value+=a.value)):(a.value+=c,i&&a.value>n&&(a.status=1,a.value-=a.value%n)),a.value>n&&(a.value%=n)}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,r;const n=o.options.color.animation;return!o.destroyed&&!o.spawning&&(void 0!==(null===(e=o.color)||void 0===e?void 0:e.h.value)&&n.h.enable||void 0!==(null===(t=o.color)||void 0===t?void 0:t.s.value)&&n.s.enable||void 0!==(null===(r=o.color)||void 0===r?void 0:r.l.value)&&n.l.enable)}update(o,t){!function(o,t){var r,n,i;const l=o.options.color.animation;void 0!==(null===(r=o.color)||void 0===r?void 0:r.h)&&e(t,o.color.h,l.h,360,!1),void 0!==(null===(n=o.color)||void 0===n?void 0:n.s)&&e(t,o.color.s,l.s,100,!0),void 0!==(null===(i=o.color)||void 0===i?void 0:i.l)&&e(t,o.color.l,l.l,100,!0)}(o,t)}}async function i(o){await o.addParticleUpdater("color",(o=>new t(o)))}})(),n})())); |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
303284
482
1
Updatedtsparticles-engine@^2.0.6