@tsparticles/interaction-external-remove 3.0.0-beta.3 → 3.0.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/Options/Classes/Remove.js +1 -7
- package/browser/Remover.js +2 -1
- package/cjs/Options/Classes/Remove.js +1 -7
- package/cjs/Remover.js +2 -1
- package/esm/Options/Classes/Remove.js +1 -7
- package/esm/Remover.js +2 -1
- package/package.json +3 -3
- package/report.html +4 -22
- package/tsparticles.interaction.external.remove.js +4 -9
- package/tsparticles.interaction.external.remove.min.js +1 -1
- package/tsparticles.interaction.external.remove.min.js.LICENSE.txt +1 -1
- package/types/Options/Classes/Remove.d.ts +0 -2
- package/types/Options/Interfaces/IRemove.d.ts +0 -1
- package/umd/Options/Classes/Remove.js +1 -7
- package/umd/Remover.js +2 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Demo / Generator : https://particles.js.org/
|
|
5
5
|
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
6
|
* How to use? : Check the GitHub README
|
|
7
|
-
* v3.0.0-beta.
|
|
7
|
+
* v3.0.0-beta.5
|
|
8
8
|
*/
|
|
9
9
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
10
10
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
@@ -103,17 +103,11 @@ class Remove {
|
|
|
103
103
|
constructor() {
|
|
104
104
|
this.quantity = 2;
|
|
105
105
|
}
|
|
106
|
-
get particles_nb() {
|
|
107
|
-
return this.quantity;
|
|
108
|
-
}
|
|
109
|
-
set particles_nb(value) {
|
|
110
|
-
this.quantity = (0,engine_root_window_.setRangeValue)(value);
|
|
111
|
-
}
|
|
112
106
|
load(data) {
|
|
113
107
|
if (!data) {
|
|
114
108
|
return;
|
|
115
109
|
}
|
|
116
|
-
const quantity = data.quantity
|
|
110
|
+
const quantity = data.quantity;
|
|
117
111
|
if (quantity !== undefined) {
|
|
118
112
|
this.quantity = (0,engine_root_window_.setRangeValue)(quantity);
|
|
119
113
|
}
|
|
@@ -122,13 +116,14 @@ class Remove {
|
|
|
122
116
|
;// CONCATENATED MODULE: ./dist/browser/Remover.js
|
|
123
117
|
|
|
124
118
|
|
|
119
|
+
const removeMode = "remove";
|
|
125
120
|
class Remover extends engine_root_window_.ExternalInteractorBase {
|
|
126
121
|
constructor(container) {
|
|
127
122
|
super(container);
|
|
128
123
|
this.handleClickMode = mode => {
|
|
129
124
|
const container = this.container,
|
|
130
125
|
options = container.actualOptions;
|
|
131
|
-
if (!options.interactivity.modes.remove || mode !==
|
|
126
|
+
if (!options.interactivity.modes.remove || mode !== removeMode) {
|
|
132
127
|
return;
|
|
133
128
|
}
|
|
134
129
|
const removeNb = (0,engine_root_window_.getRangeValue)(options.interactivity.modes.remove.quantity);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see tsparticles.interaction.external.remove.min.js.LICENSE.txt */
|
|
2
|
-
!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={533: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,{Remove:()=>t,loadExternalRemoveInteraction:()=>i});var e=o(533);class t{constructor(){this.quantity=2}
|
|
2
|
+
!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={533: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,{Remove:()=>t,loadExternalRemoveInteraction:()=>i});var e=o(533);class t{constructor(){this.quantity=2}load(t){if(!t)return;const r=t.quantity;void 0!==r&&(this.quantity=(0,e.setRangeValue)(r))}}class r extends e.ExternalInteractorBase{constructor(t){super(t),this.handleClickMode=t=>{const r=this.container,o=r.actualOptions;if(!o.interactivity.modes.remove||"remove"!==t)return;const n=(0,e.getRangeValue)(o.interactivity.modes.remove.quantity);r.particles.removeQuantity(n)}}clear(){}init(){}async interact(){}isEnabled(){return!0}loadModeOptions(e,...r){e.remove||(e.remove=new t);for(const t of r)e.remove.load(t?.remove)}reset(){}}async function i(e,t=!0){await e.addInteractor("externalRemove",(e=>new r(e)),t)}})(),n})()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! tsParticles Remove External Interaction v3.0.0-beta.
|
|
1
|
+
/*! tsParticles Remove External Interaction v3.0.0-beta.5 by Matteo Bruni */
|
|
@@ -3,7 +3,5 @@ import type { IRemove } from "../Interfaces/IRemove.js";
|
|
|
3
3
|
export declare class Remove implements IRemove, IOptionLoader<IRemove> {
|
|
4
4
|
quantity: RangeValue;
|
|
5
5
|
constructor();
|
|
6
|
-
get particles_nb(): RangeValue;
|
|
7
|
-
set particles_nb(value: RangeValue);
|
|
8
6
|
load(data?: RecursivePartial<IRemove>): void;
|
|
9
7
|
}
|
|
@@ -15,17 +15,11 @@
|
|
|
15
15
|
constructor() {
|
|
16
16
|
this.quantity = 2;
|
|
17
17
|
}
|
|
18
|
-
get particles_nb() {
|
|
19
|
-
return this.quantity;
|
|
20
|
-
}
|
|
21
|
-
set particles_nb(value) {
|
|
22
|
-
this.quantity = (0, engine_1.setRangeValue)(value);
|
|
23
|
-
}
|
|
24
18
|
load(data) {
|
|
25
19
|
if (!data) {
|
|
26
20
|
return;
|
|
27
21
|
}
|
|
28
|
-
const quantity = data.quantity
|
|
22
|
+
const quantity = data.quantity;
|
|
29
23
|
if (quantity !== undefined) {
|
|
30
24
|
this.quantity = (0, engine_1.setRangeValue)(quantity);
|
|
31
25
|
}
|
package/umd/Remover.js
CHANGED
|
@@ -12,12 +12,13 @@
|
|
|
12
12
|
exports.Remover = void 0;
|
|
13
13
|
const engine_1 = require("@tsparticles/engine");
|
|
14
14
|
const Remove_js_1 = require("./Options/Classes/Remove.js");
|
|
15
|
+
const removeMode = "remove";
|
|
15
16
|
class Remover extends engine_1.ExternalInteractorBase {
|
|
16
17
|
constructor(container) {
|
|
17
18
|
super(container);
|
|
18
19
|
this.handleClickMode = (mode) => {
|
|
19
20
|
const container = this.container, options = container.actualOptions;
|
|
20
|
-
if (!options.interactivity.modes.remove || mode !==
|
|
21
|
+
if (!options.interactivity.modes.remove || mode !== removeMode) {
|
|
21
22
|
return;
|
|
22
23
|
}
|
|
23
24
|
const removeNb = (0, engine_1.getRangeValue)(options.interactivity.modes.remove.quantity);
|