Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tsparticles-updater-stroke-color

Package Overview
Dependencies
Maintainers
2
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.10.1 to 2.11.0

4

browser/index.js
import { StrokeColorUpdater } from "./StrokeColorUpdater";
export async function loadStrokeColorUpdater(engine) {
await engine.addParticleUpdater("strokeColor", (container) => new StrokeColorUpdater(container));
export async function loadStrokeColorUpdater(engine, refresh = true) {
await engine.addParticleUpdater("strokeColor", (container) => new StrokeColorUpdater(container), refresh);
}

@@ -5,5 +5,5 @@ "use strict";

const StrokeColorUpdater_1 = require("./StrokeColorUpdater");
async function loadStrokeColorUpdater(engine) {
await engine.addParticleUpdater("strokeColor", (container) => new StrokeColorUpdater_1.StrokeColorUpdater(container));
async function loadStrokeColorUpdater(engine, refresh = true) {
await engine.addParticleUpdater("strokeColor", (container) => new StrokeColorUpdater_1.StrokeColorUpdater(container), refresh);
}
exports.loadStrokeColorUpdater = loadStrokeColorUpdater;
import { StrokeColorUpdater } from "./StrokeColorUpdater";
export async function loadStrokeColorUpdater(engine) {
await engine.addParticleUpdater("strokeColor", (container) => new StrokeColorUpdater(container));
export async function loadStrokeColorUpdater(engine, refresh = true) {
await engine.addParticleUpdater("strokeColor", (container) => new StrokeColorUpdater(container), refresh);
}
{
"name": "tsparticles-updater-stroke-color",
"version": "2.10.1",
"version": "2.11.0",
"description": "tsParticles particles stroke color updater",

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

"types": "types/index.d.ts",
"sideEffects": false,
"dependencies": {
"tsparticles-engine": "^2.10.1"
"tsparticles-engine": "^2.11.0"
}
}

@@ -28,7 +28,12 @@ [![banner](https://particles.js.org/images/banner2.png)](https://particles.js.org)

```javascript
loadStrokeColorUpdater(tsParticles);
(async () => {
await loadStrokeColorUpdater(tsParticles);
tsParticles.load("tsparticles", {
/* options */
});
await tsParticles.load({
id: "tsparticles",
options: {
/* options */
},
});
})();
```

@@ -56,3 +61,5 @@

loadStrokeColorUpdater(tsParticles);
(async () => {
await loadStrokeColorUpdater(tsParticles);
})();
```

@@ -66,3 +73,5 @@

loadStrokeColorUpdater(tsParticles);
(async () => {
await loadStrokeColorUpdater(tsParticles);
})();
```

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

* How to use? : Check the GitHub README
* v2.10.1
* v2.11.0
*/

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

async function loadStrokeColorUpdater(engine) {
await engine.addParticleUpdater("strokeColor", container => new StrokeColorUpdater(container));
async function loadStrokeColorUpdater(engine, refresh = true) {
await engine.addParticleUpdater("strokeColor", container => new StrokeColorUpdater(container), refresh);
}

@@ -211,0 +211,0 @@ })();

/*! For license information please see tsparticles.updater.stroke-color.min.js.LICENSE.txt */
!function(e,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o(require("tsparticles-engine"));else if("function"==typeof define&&define.amd)define(["tsparticles-engine"],o);else{var t="object"==typeof exports?o(require("tsparticles-engine")):o(e.window);for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}}(this,(e=>(()=>{"use strict";var o={961:o=>{o.exports=e}},t={};function r(e){var i=t[e];if(void 0!==i)return i.exports;var n=t[e]={exports:{}};return o[e](n,n.exports,r),n.exports}r.d=(e,o)=>{for(var t in o)r.o(o,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},r.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{r.r(i),r.d(i,{loadStrokeColorUpdater:()=>n});var e=r(961);function o(o,t,r,i,n){if(!t||!r.enable||(t.maxLoops??0)>0&&(t.loops??0)>(t.maxLoops??0))return;if(t.time||(t.time=0),(t.delayTime??0)>0&&t.time<(t.delayTime??0)&&(t.time+=o.value),(t.delayTime??0)>0&&t.time<(t.delayTime??0))return;const a=(0,e.randomInRange)(r.offset),l=(t.velocity??0)*o.factor+3.6*a,s=t.decay??1;n&&"increasing"!==t.status?(t.value-=l,t.value<0&&(t.loops||(t.loops=0),t.loops++,t.status="increasing",t.value+=t.value)):(t.value+=l,t.value>i&&(t.loops||(t.loops=0),t.loops++,n&&(t.status="decreasing",t.value-=t.value%i))),t.velocity&&1!==s&&(t.velocity*=s),t.value>i&&(t.value%=i)}class t{constructor(e){this.container=e}init(o){const t=this.container,r=o.options,i=(0,e.itemFromSingleOrMultiple)(r.stroke,o.id,r.reduceDuplicates);o.strokeWidth=(0,e.getRangeValue)(i.width)*t.retina.pixelRatio,o.strokeOpacity=(0,e.getRangeValue)(i.opacity??1),o.strokeAnimation=i.color?.animation;const n=(0,e.rangeColorToHsl)(i.color)??o.getFillColor();n&&(o.strokeColor=(0,e.getHslAnimationFromHsl)(n,o.strokeAnimation,t.retina.reduceFactor))}isEnabled(e){const o=e.strokeAnimation,{strokeColor:t}=e;return!e.destroyed&&!e.spawning&&!!o&&(void 0!==t?.h.value&&t.h.enable||void 0!==t?.s.value&&t.s.enable||void 0!==t?.l.value&&t.l.enable)}update(e,t){this.isEnabled(e)&&function(e,t){if(!e.strokeColor||!e.strokeAnimation)return;const{h:r,s:i,l:n}=e.strokeColor,{h:a,s:l,l:s}=e.strokeAnimation;r&&o(t,r,a,360,!1),i&&o(t,i,l,100,!0),n&&o(t,n,s,100,!0)}(e,t)}}async function n(e){await e.addParticleUpdater("strokeColor",(e=>new t(e)))}})(),i})()));
!function(e,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o(require("tsparticles-engine"));else if("function"==typeof define&&define.amd)define(["tsparticles-engine"],o);else{var t="object"==typeof exports?o(require("tsparticles-engine")):o(e.window);for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}}(this,(e=>(()=>{"use strict";var o={961:o=>{o.exports=e}},t={};function r(e){var i=t[e];if(void 0!==i)return i.exports;var n=t[e]={exports:{}};return o[e](n,n.exports,r),n.exports}r.d=(e,o)=>{for(var t in o)r.o(o,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},r.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{r.r(i),r.d(i,{loadStrokeColorUpdater:()=>n});var e=r(961);function o(o,t,r,i,n){if(!t||!r.enable||(t.maxLoops??0)>0&&(t.loops??0)>(t.maxLoops??0))return;if(t.time||(t.time=0),(t.delayTime??0)>0&&t.time<(t.delayTime??0)&&(t.time+=o.value),(t.delayTime??0)>0&&t.time<(t.delayTime??0))return;const a=(0,e.randomInRange)(r.offset),l=(t.velocity??0)*o.factor+3.6*a,s=t.decay??1;n&&"increasing"!==t.status?(t.value-=l,t.value<0&&(t.loops||(t.loops=0),t.loops++,t.status="increasing",t.value+=t.value)):(t.value+=l,t.value>i&&(t.loops||(t.loops=0),t.loops++,n&&(t.status="decreasing",t.value-=t.value%i))),t.velocity&&1!==s&&(t.velocity*=s),t.value>i&&(t.value%=i)}class t{constructor(e){this.container=e}init(o){const t=this.container,r=o.options,i=(0,e.itemFromSingleOrMultiple)(r.stroke,o.id,r.reduceDuplicates);o.strokeWidth=(0,e.getRangeValue)(i.width)*t.retina.pixelRatio,o.strokeOpacity=(0,e.getRangeValue)(i.opacity??1),o.strokeAnimation=i.color?.animation;const n=(0,e.rangeColorToHsl)(i.color)??o.getFillColor();n&&(o.strokeColor=(0,e.getHslAnimationFromHsl)(n,o.strokeAnimation,t.retina.reduceFactor))}isEnabled(e){const o=e.strokeAnimation,{strokeColor:t}=e;return!e.destroyed&&!e.spawning&&!!o&&(void 0!==t?.h.value&&t.h.enable||void 0!==t?.s.value&&t.s.enable||void 0!==t?.l.value&&t.l.enable)}update(e,t){this.isEnabled(e)&&function(e,t){if(!e.strokeColor||!e.strokeAnimation)return;const{h:r,s:i,l:n}=e.strokeColor,{h:a,s:l,l:s}=e.strokeAnimation;r&&o(t,r,a,360,!1),i&&o(t,i,l,100,!0),n&&o(t,n,s,100,!0)}(e,t)}}async function n(e,o=!0){await e.addParticleUpdater("strokeColor",(e=>new t(e)),o)}})(),i})()));

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

/*! tsParticles Stroke Color Updater v2.10.1 by Matteo Bruni */
/*! tsParticles Stroke Color Updater v2.11.0 by Matteo Bruni */
import type { Engine } from "tsparticles-engine";
export declare function loadStrokeColorUpdater(engine: Engine): Promise<void>;
export declare function loadStrokeColorUpdater(engine: Engine, refresh?: boolean): Promise<void>;

@@ -14,6 +14,6 @@ (function (factory) {

const StrokeColorUpdater_1 = require("./StrokeColorUpdater");
async function loadStrokeColorUpdater(engine) {
await engine.addParticleUpdater("strokeColor", (container) => new StrokeColorUpdater_1.StrokeColorUpdater(container));
async function loadStrokeColorUpdater(engine, refresh = true) {
await engine.addParticleUpdater("strokeColor", (container) => new StrokeColorUpdater_1.StrokeColorUpdater(container), refresh);
}
exports.loadStrokeColorUpdater = loadStrokeColorUpdater;
});

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