@tsparticles/updater-twinkle
Advanced tools
Comparing version 3.4.0 to 3.5.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.loadTwinkleUpdater = void 0; | ||
exports.loadTwinkleUpdater = loadTwinkleUpdater; | ||
const TwinkleUpdater_js_1 = require("./TwinkleUpdater.js"); | ||
@@ -10,2 +10,1 @@ async function loadTwinkleUpdater(engine, refresh = true) { | ||
} | ||
exports.loadTwinkleUpdater = loadTwinkleUpdater; |
{ | ||
"name": "@tsparticles/updater-twinkle", | ||
"version": "3.4.0", | ||
"version": "3.5.0", | ||
"description": "tsParticles particles twinkle updater", | ||
@@ -90,3 +90,3 @@ "homepage": "https://particles.js.org", | ||
"dependencies": { | ||
"@tsparticles/engine": "^3.4.0" | ||
"@tsparticles/engine": "^3.5.0" | ||
}, | ||
@@ -93,0 +93,0 @@ "publishConfig": { |
@@ -7,3 +7,3 @@ /*! | ||
* How to use? : Check the GitHub README | ||
* v3.4.0 | ||
* v3.5.0 | ||
*/ | ||
@@ -10,0 +10,0 @@ /* |
/*! For license information please see tsparticles.updater.twinkle.min.js.LICENSE.txt */ | ||
!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 r in o)("object"==typeof exports?exports:e)[r]=o[r]}}(this,(e=>(()=>{var t={303:t=>{t.exports=e}},o={};function r(e){var i=o[e];if(void 0!==i)return i.exports;var n=o[e]={exports:{}};return t[e](n,n.exports,r),n.exports}r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),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,{loadTwinkleUpdater:()=>s});var e=r(303);class t{constructor(){this.enable=!1,this.frequency=.05,this.opacity=1}load(t){t&&(void 0!==t.color&&(this.color=e.OptionsColor.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.frequency&&(this.frequency=t.frequency),void 0!==t.opacity&&(this.opacity=(0,e.setRangeValue)(t.opacity)))}}class o{constructor(){this.lines=new t,this.particles=new t}load(e){e&&(this.lines.load(e.lines),this.particles.load(e.particles))}}class n{getColorStyles(t,o,r,i){const n=t.options.twinkle;if(!n)return{};const s=n.particles,a=s.enable&&(0,e.getRandom)()<s.frequency,l=t.options.zIndex,c=(1-t.zIndexFactor)**l.opacityRate,p=a?(0,e.getRangeValue)(s.opacity)*c:i,d=(0,e.rangeColorToHsl)(s.color),f=d?(0,e.getStyleFromHsl)(d,p):void 0,u={},y=a&&f;return u.fill=y?f:void 0,u.stroke=y?f:void 0,u}async init(){await Promise.resolve()}isEnabled(e){const t=e.options.twinkle;return!!t&&t.particles.enable}loadOptions(e,...t){e.twinkle||(e.twinkle=new o);for(const o of t)e.twinkle.load(o?.twinkle)}async update(){await Promise.resolve()}}async function s(e,t=!0){await e.addParticleUpdater("twinkle",(()=>Promise.resolve(new n)),t)}})(),i})())); | ||
!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 r in o)("object"==typeof exports?exports:e)[r]=o[r]}}(this,(e=>(()=>{var t={303:t=>{t.exports=e}},o={};function r(e){var i=o[e];if(void 0!==i)return i.exports;var n=o[e]={exports:{}};return t[e](n,n.exports,r),n.exports}r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};r.r(i),r.d(i,{loadTwinkleUpdater:()=>c});var n=r(303);class s{constructor(){this.enable=!1,this.frequency=.05,this.opacity=1}load(e){e&&(void 0!==e.color&&(this.color=n.OptionsColor.create(this.color,e.color)),void 0!==e.enable&&(this.enable=e.enable),void 0!==e.frequency&&(this.frequency=e.frequency),void 0!==e.opacity&&(this.opacity=(0,n.setRangeValue)(e.opacity)))}}class a{constructor(){this.lines=new s,this.particles=new s}load(e){e&&(this.lines.load(e.lines),this.particles.load(e.particles))}}class l{getColorStyles(e,t,o,r){const i=e.options.twinkle;if(!i)return{};const s=i.particles,a=s.enable&&(0,n.getRandom)()<s.frequency,l=e.options.zIndex,c=(1-e.zIndexFactor)**l.opacityRate,p=a?(0,n.getRangeValue)(s.opacity)*c:r,d=(0,n.rangeColorToHsl)(s.color),f=d?(0,n.getStyleFromHsl)(d,p):void 0,u={},y=a&&f;return u.fill=y?f:void 0,u.stroke=y?f:void 0,u}async init(){await Promise.resolve()}isEnabled(e){const t=e.options.twinkle;return!!t&&t.particles.enable}loadOptions(e,...t){e.twinkle||(e.twinkle=new a);for(const o of t)e.twinkle.load(o?.twinkle)}async update(){await Promise.resolve()}}async function c(e,t=!0){await e.addParticleUpdater("twinkle",(()=>Promise.resolve(new l)),t)}return i})())); |
@@ -1,1 +0,1 @@ | ||
/*! tsParticles Twinkle Updater v3.4.0 by Matteo Bruni */ | ||
/*! tsParticles Twinkle Updater v3.5.0 by Matteo Bruni */ |
@@ -12,3 +12,3 @@ (function (factory) { | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.loadTwinkleUpdater = void 0; | ||
exports.loadTwinkleUpdater = loadTwinkleUpdater; | ||
const TwinkleUpdater_js_1 = require("./TwinkleUpdater.js"); | ||
@@ -20,3 +20,2 @@ async function loadTwinkleUpdater(engine, refresh = true) { | ||
} | ||
exports.loadTwinkleUpdater = loadTwinkleUpdater; | ||
}); |
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
312789
656
Updated@tsparticles/engine@^3.5.0