Socket
Socket
Sign inDemoInstall

tsparticles-updater-stroke-color

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

Comparing version 2.0.0-alpha.3 to 2.0.0-alpha.4

4

index.d.ts

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

import { loadUpdater } from "./updater";
export { loadUpdater };
import type { Main } from "tsparticles-engine";
export declare function loadStrokeColorUpdater(tsParticles: Main): void;

@@ -1,4 +0,4 @@

import { loadUpdater } from "./updater";
import { tsParticles } from "tsparticles-core";
loadUpdater(tsParticles);
export { loadUpdater };
import { StrokeColorUpdater } from "./StrokeColorUpdater";
export function loadStrokeColorUpdater(tsParticles) {
tsParticles.addParticleUpdater("strokeColor", (container) => new StrokeColorUpdater(container));
}
{
"name": "tsparticles-updater-stroke-color",
"version": "2.0.0-alpha.3",
"version": "2.0.0-alpha.4",
"description": "tsParticles particles stroke color updater",

@@ -41,11 +41,11 @@ "homepage": "https://particles.js.org/",

},
"main": "updater.js",
"main": "index.js",
"jsdelivr": "tsparticles.updater.stroke.color.min.js",
"unpkg": "tsparticles.updater.stroke.color.min.js",
"browser": "updater.js",
"module": "updater.js",
"types": "updater.d.ts",
"browser": "index.js",
"module": "index.js",
"types": "index.d.ts",
"dependencies": {
"tsparticles-core": "^2.0.0-alpha.0"
"tsparticles-engine": "^2.0.0-alpha.4"
}
}

@@ -1,3 +0,3 @@

import type { Container, IDelta, IParticleUpdater, IParticleValueAnimation, Particle } from "tsparticles-core";
import type { IColorAnimation } from "tsparticles-core/Options/Interfaces/IColorAnimation";
import type { Container, IDelta, IParticleUpdater, IParticleValueAnimation, Particle } from "tsparticles-engine";
import type { IColorAnimation } from "tsparticles-engine/Options/Interfaces/IColorAnimation";
export declare class StrokeColorUpdater implements IParticleUpdater {

@@ -4,0 +4,0 @@ private readonly container;

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

import { randomInRange } from "tsparticles-core";
import { randomInRange } from "tsparticles-engine";
export class StrokeColorUpdater {

@@ -3,0 +3,0 @@ constructor(container) {

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

* How to use? : Check the GitHub README
* v2.0.0-alpha.3
* v2.0.0-alpha.4
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("tsparticles-core"));
module.exports = factory(require("tsparticles-engine"));
else if(typeof define === 'function' && define.amd)
define(["tsparticles-core"], factory);
define(["tsparticles-engine"], factory);
else {
var a = typeof exports === 'object' ? factory(require("tsparticles-core")) : factory(root["window"]);
var a = typeof exports === 'object' ? factory(require("tsparticles-engine")) : factory(root["window"]);
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
}
})(this, function(__WEBPACK_EXTERNAL_MODULE__646__) {
})(this, function(__WEBPACK_EXTERNAL_MODULE__414__) {
return /******/ (() => { // webpackBootstrap

@@ -24,3 +24,3 @@ /******/ "use strict";

/***/ 273:
/***/ 971:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

@@ -33,7 +33,7 @@

__webpack_require__.d(__webpack_exports__, {
"loadUpdater": () => /* reexport */ loadUpdater
"loadStrokeColorUpdater": () => /* binding */ loadStrokeColorUpdater
});
// EXTERNAL MODULE: external {"commonjs":"tsparticles-core","commonjs2":"tsparticles-core","amd":"tsparticles-core","root":"window"}
var external_commonjs_tsparticles_core_commonjs2_tsparticles_core_amd_tsparticles_core_root_window_ = __webpack_require__(646);
// EXTERNAL MODULE: external {"commonjs":"tsparticles-engine","commonjs2":"tsparticles-engine","amd":"tsparticles-engine","root":"window"}
var external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_ = __webpack_require__(414);
;// CONCATENATED MODULE: ./dist/StrokeColorUpdater.js

@@ -100,3 +100,3 @@

const offset = (0,external_commonjs_tsparticles_core_commonjs2_tsparticles_core_amd_tsparticles_core_root_window_.randomInRange)(valueAnimation.offset);
const offset = (0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.randomInRange)(valueAnimation.offset);
colorValue.value += ((_a = value.velocity) !== null && _a !== void 0 ? _a : 0) * delta.factor + offset * 3.6;

@@ -110,19 +110,14 @@

}
;// CONCATENATED MODULE: ./dist/updater.js
;// CONCATENATED MODULE: ./dist/index.js
function loadUpdater(tsParticles) {
tsParticles.addParticleUpdater(container => new StrokeColorUpdater(container));
function loadStrokeColorUpdater(tsParticles) {
tsParticles.addParticleUpdater("strokeColor", container => new StrokeColorUpdater(container));
}
;// CONCATENATED MODULE: ./dist/index.js
loadUpdater(external_commonjs_tsparticles_core_commonjs2_tsparticles_core_amd_tsparticles_core_root_window_.tsParticles);
/***/ }),
/***/ 646:
/***/ 414:
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__646__;
module.exports = __WEBPACK_EXTERNAL_MODULE__414__;

@@ -189,5 +184,5 @@ /***/ })

/******/ // Load entry module and return exports
/******/ return __webpack_require__(273);
/******/ return __webpack_require__(971);
/******/ })()
;
});

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

/*! tsParticles Stroke Color Updater v2.0.0-alpha.3 by Matteo Bruni */
!function(o,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("tsparticles-core"));else if("function"==typeof define&&define.amd)define(["tsparticles-core"],e);else{var t="object"==typeof exports?e(require("tsparticles-core")):e(o.window);for(var r in t)("object"==typeof exports?exports:o)[r]=t[r]}}(this,(function(o){return(()=>{"use strict";var e={273:(o,e,t)=>{t.r(e),t.d(e,{loadUpdater:()=>i});var r=t(646);class l{constructor(o){this.container=o}isEnabled(o){var e,t,r;const l=o.stroke.color;return!o.destroyed&&!o.spawning&&void 0!==l&&(void 0!==(null===(e=o.strokeColor)||void 0===e?void 0:e.h.value)&&l.animation.h.enable||void 0!==(null===(t=o.strokeColor)||void 0===t?void 0:t.s.value)&&l.animation.s.enable||void 0!==(null===(r=o.strokeColor)||void 0===r?void 0:r.l.value)&&l.animation.l.enable)}update(o,e){var t,r,l,i,n,d,a,s,u,v,c,p;if(!this.isEnabled(o))return;const f=o.stroke.color.animation,b=f;if(void 0!==b.enable){const i=null!==(r=null===(t=o.strokeColor)||void 0===t?void 0:t.h)&&void 0!==r?r:null===(l=o.color)||void 0===l?void 0:l.h;i&&this.updateValue(o,e,i,b,360)}else{const t=f,r=null!==(n=null===(i=o.strokeColor)||void 0===i?void 0:i.h)&&void 0!==n?n:null===(d=o.color)||void 0===d?void 0:d.h;r&&this.updateValue(o,e,r,t.h,360);const l=null!==(s=null===(a=o.strokeColor)||void 0===a?void 0:a.s)&&void 0!==s?s:null===(u=o.color)||void 0===u?void 0:u.s;l&&this.updateValue(o,e,l,t.s,100);const b=null!==(c=null===(v=o.strokeColor)||void 0===v?void 0:v.l)&&void 0!==c?c:null===(p=o.color)||void 0===p?void 0:p.l;b&&this.updateValue(o,e,b,t.l,100)}}updateValue(o,e,t,l,i){var n;const d=t;if(!d)return;const a=(0,r.randomInRange)(l.offset);d.value+=(null!==(n=t.velocity)&&void 0!==n?n:0)*e.factor+3.6*a,d.value>i&&(d.value%=i)}}function i(o){o.addParticleUpdater((o=>new l(o)))}i(r.tsParticles)},646:e=>{e.exports=o}},t={};function r(o){if(t[o])return t[o].exports;var l=t[o]={exports:{}};return e[o](l,l.exports,r),l.exports}return 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})},r(273)})()}));
/*! tsParticles Stroke Color Updater v2.0.0-alpha.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 r in t)("object"==typeof exports?exports:o)[r]=t[r]}}(this,(function(o){return(()=>{"use strict";var e={971:(o,e,t)=>{t.r(e),t.d(e,{loadStrokeColorUpdater:()=>i});var r=t(414);class l{constructor(o){this.container=o}isEnabled(o){var e,t,r;const l=o.stroke.color;return!o.destroyed&&!o.spawning&&void 0!==l&&(void 0!==(null===(e=o.strokeColor)||void 0===e?void 0:e.h.value)&&l.animation.h.enable||void 0!==(null===(t=o.strokeColor)||void 0===t?void 0:t.s.value)&&l.animation.s.enable||void 0!==(null===(r=o.strokeColor)||void 0===r?void 0:r.l.value)&&l.animation.l.enable)}update(o,e){var t,r,l,i,n,d,a,s,u,v,c,p;if(!this.isEnabled(o))return;const f=o.stroke.color.animation,b=f;if(void 0!==b.enable){const i=null!==(r=null===(t=o.strokeColor)||void 0===t?void 0:t.h)&&void 0!==r?r:null===(l=o.color)||void 0===l?void 0:l.h;i&&this.updateValue(o,e,i,b,360)}else{const t=f,r=null!==(n=null===(i=o.strokeColor)||void 0===i?void 0:i.h)&&void 0!==n?n:null===(d=o.color)||void 0===d?void 0:d.h;r&&this.updateValue(o,e,r,t.h,360);const l=null!==(s=null===(a=o.strokeColor)||void 0===a?void 0:a.s)&&void 0!==s?s:null===(u=o.color)||void 0===u?void 0:u.s;l&&this.updateValue(o,e,l,t.s,100);const b=null!==(c=null===(v=o.strokeColor)||void 0===v?void 0:v.l)&&void 0!==c?c:null===(p=o.color)||void 0===p?void 0:p.l;b&&this.updateValue(o,e,b,t.l,100)}}updateValue(o,e,t,l,i){var n;const d=t;if(!d)return;const a=(0,r.randomInRange)(l.offset);d.value+=(null!==(n=t.velocity)&&void 0!==n?n:0)*e.factor+3.6*a,d.value>i&&(d.value%=i)}}function i(o){o.addParticleUpdater("strokeColor",(o=>new l(o)))}},414:e=>{e.exports=o}},t={};function r(o){if(t[o])return t[o].exports;var l=t[o]={exports:{}};return e[o](l,l.exports,r),l.exports}return 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})},r(971)})()}));

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