tsparticles-interaction-external-remove
Advanced tools
Comparing version 2.0.6 to 2.1.0
@@ -10,8 +10,6 @@ import { ExternalInteractorBase } from "tsparticles-engine"; | ||
this.handleClickMode = (mode) => { | ||
if (mode !== "remove" /* remove */) { | ||
if (mode !== "remove" /* ClickMode.remove */) { | ||
return; | ||
} | ||
const container = this.container; | ||
const options = container.actualOptions; | ||
const removeNb = options.interactivity.modes.remove.quantity; | ||
const container = this.container, options = container.actualOptions, removeNb = options.interactivity.modes.remove.quantity; | ||
container.particles.removeQuantity(removeNb); | ||
@@ -23,2 +21,5 @@ }; | ||
} | ||
clear() { | ||
// do nothing | ||
} | ||
reset() { | ||
@@ -25,0 +26,0 @@ // do nothing |
@@ -12,5 +12,3 @@ "use strict"; | ||
} | ||
const container = this.container; | ||
const options = container.actualOptions; | ||
const removeNb = options.interactivity.modes.remove.quantity; | ||
const container = this.container, options = container.actualOptions, removeNb = options.interactivity.modes.remove.quantity; | ||
container.particles.removeQuantity(removeNb); | ||
@@ -22,2 +20,4 @@ }; | ||
} | ||
clear() { | ||
} | ||
reset() { | ||
@@ -24,0 +24,0 @@ } |
@@ -9,5 +9,3 @@ import { ExternalInteractorBase } from "tsparticles-engine"; | ||
} | ||
const container = this.container; | ||
const options = container.actualOptions; | ||
const removeNb = options.interactivity.modes.remove.quantity; | ||
const container = this.container, options = container.actualOptions, removeNb = options.interactivity.modes.remove.quantity; | ||
container.particles.removeQuantity(removeNb); | ||
@@ -19,2 +17,4 @@ }; | ||
} | ||
clear() { | ||
} | ||
reset() { | ||
@@ -21,0 +21,0 @@ } |
{ | ||
"name": "tsparticles-interaction-external-remove", | ||
"version": "2.0.6", | ||
"version": "2.1.0", | ||
"description": "tsParticles remove external interaction", | ||
@@ -75,4 +75,4 @@ "homepage": "https://particles.js.org/", | ||
"dependencies": { | ||
"tsparticles-engine": "^2.0.6" | ||
"tsparticles-engine": "^2.1.0" | ||
} | ||
} |
@@ -7,3 +7,3 @@ /*! | ||
* How to use? : Check the GitHub README | ||
* v2.0.6 | ||
* v2.1.0 | ||
*/ | ||
@@ -113,3 +113,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
if (mode !== "remove" | ||
/* remove */ | ||
/* ClickMode.remove */ | ||
) { | ||
@@ -119,5 +119,5 @@ return; | ||
const container = this.container; | ||
const options = container.actualOptions; | ||
const removeNb = options.interactivity.modes.remove.quantity; | ||
const container = this.container, | ||
options = container.actualOptions, | ||
removeNb = options.interactivity.modes.remove.quantity; | ||
container.particles.removeQuantity(removeNb); | ||
@@ -131,2 +131,5 @@ }; | ||
clear() {// do nothing | ||
} | ||
reset() {// do nothing | ||
@@ -133,0 +136,0 @@ } |
@@ -1,2 +0,2 @@ | ||
/*! tsParticles Remove External Interaction v2.0.6 by Matteo Bruni */ | ||
!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 r="object"==typeof exports?t(require("tsparticles-engine")):t(e.window);for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(this,(e=>(()=>{"use strict";var t={818:t=>{t.exports=e}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{o.r(n),o.d(n,{loadExternalRemoveInteraction:()=>r});var e=o(818);class t extends e.ExternalInteractorBase{constructor(e){super(e),this.handleClickMode=e=>{if("remove"!==e)return;const t=this.container,r=t.actualOptions.interactivity.modes.remove.quantity;t.particles.removeQuantity(r)}}isEnabled(){return!0}reset(){}async interact(){}}function r(e){e.addInteractor("externalRemove",(e=>new t(e)))}})(),n})())); | ||
/*! tsParticles Remove External Interaction v2.1.0 by Matteo Bruni */ | ||
!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 r="object"==typeof exports?t(require("tsparticles-engine")):t(e.window);for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(this,(e=>(()=>{"use strict";var t={818:t=>{t.exports=e}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{o.r(n),o.d(n,{loadExternalRemoveInteraction:()=>r});var e=o(818);class t extends e.ExternalInteractorBase{constructor(e){super(e),this.handleClickMode=e=>{if("remove"!==e)return;const t=this.container,r=t.actualOptions.interactivity.modes.remove.quantity;t.particles.removeQuantity(r)}}isEnabled(){return!0}clear(){}reset(){}async interact(){}}function r(e){e.addInteractor("externalRemove",(e=>new t(e)))}})(),n})())); |
@@ -7,4 +7,5 @@ import { ExternalInteractorBase } from "tsparticles-engine"; | ||
isEnabled(): boolean; | ||
clear(): void; | ||
reset(): void; | ||
interact(): Promise<void>; | ||
} |
@@ -21,5 +21,3 @@ (function (factory) { | ||
} | ||
const container = this.container; | ||
const options = container.actualOptions; | ||
const removeNb = options.interactivity.modes.remove.quantity; | ||
const container = this.container, options = container.actualOptions, removeNb = options.interactivity.modes.remove.quantity; | ||
container.particles.removeQuantity(removeNb); | ||
@@ -31,2 +29,4 @@ }; | ||
} | ||
clear() { | ||
} | ||
reset() { | ||
@@ -33,0 +33,0 @@ } |
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
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
292314
290
0
Updatedtsparticles-engine@^2.1.0