@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.
@@ -3,17 +3,11 @@ export class Remove {
3
3
  constructor() {
4
4
  this.quantity = 2;
5
5
  }
6
- get particles_nb() {
7
- return this.quantity;
8
- }
9
- set particles_nb(value) {
10
- this.quantity = setRangeValue(value);
11
- }
12
6
  load(data) {
13
7
  if (!data) {
14
8
  return;
15
9
  }
16
- const quantity = data.quantity ?? data.particles_nb;
10
+ const quantity = data.quantity;
17
11
  if (quantity !== undefined) {
18
12
  this.quantity = setRangeValue(quantity);
19
13
  }
@@ -1,11 +1,12 @@
1
1
  import { ExternalInteractorBase, getRangeValue, } from "@tsparticles/engine";
2
2
  import { Remove } from "./Options/Classes/Remove.js";
3
+ const removeMode = "remove";
3
4
  export class Remover extends ExternalInteractorBase {
4
5
  constructor(container) {
5
6
  super(container);
6
7
  this.handleClickMode = (mode) => {
7
8
  const container = this.container, options = container.actualOptions;
8
- if (!options.interactivity.modes.remove || mode !== "remove") {
9
+ if (!options.interactivity.modes.remove || mode !== removeMode) {
9
10
  return;
10
11
  }
11
12
  const removeNb = getRangeValue(options.interactivity.modes.remove.quantity);
@@ -6,17 +6,11 @@ class Remove {
6
6
  constructor() {
7
7
  this.quantity = 2;
8
8
  }
9
- get particles_nb() {
10
- return this.quantity;
11
- }
12
- set particles_nb(value) {
13
- this.quantity = (0, engine_1.setRangeValue)(value);
14
- }
15
9
  load(data) {
16
10
  if (!data) {
17
11
  return;
18
12
  }
19
- const quantity = data.quantity ?? data.particles_nb;
13
+ const quantity = data.quantity;
20
14
  if (quantity !== undefined) {
21
15
  this.quantity = (0, engine_1.setRangeValue)(quantity);
22
16
  }
package/cjs/Remover.js CHANGED
@@ -3,12 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Remover = void 0;
4
4
  const engine_1 = require("@tsparticles/engine");
5
5
  const Remove_js_1 = require("./Options/Classes/Remove.js");
6
+ const removeMode = "remove";
6
7
  class Remover extends engine_1.ExternalInteractorBase {
7
8
  constructor(container) {
8
9
  super(container);
9
10
  this.handleClickMode = (mode) => {
10
11
  const container = this.container, options = container.actualOptions;
11
- if (!options.interactivity.modes.remove || mode !== "remove") {
12
+ if (!options.interactivity.modes.remove || mode !== removeMode) {
12
13
  return;
13
14
  }
14
15
  const removeNb = (0, engine_1.getRangeValue)(options.interactivity.modes.remove.quantity);
@@ -3,17 +3,11 @@ export class Remove {
3
3
  constructor() {
4
4
  this.quantity = 2;
5
5
  }
6
- get particles_nb() {
7
- return this.quantity;
8
- }
9
- set particles_nb(value) {
10
- this.quantity = setRangeValue(value);
11
- }
12
6
  load(data) {
13
7
  if (!data) {
14
8
  return;
15
9
  }
16
- const quantity = data.quantity ?? data.particles_nb;
10
+ const quantity = data.quantity;
17
11
  if (quantity !== undefined) {
18
12
  this.quantity = setRangeValue(quantity);
19
13
  }
package/esm/Remover.js CHANGED
@@ -1,11 +1,12 @@
1
1
  import { ExternalInteractorBase, getRangeValue, } from "@tsparticles/engine";
2
2
  import { Remove } from "./Options/Classes/Remove.js";
3
+ const removeMode = "remove";
3
4
  export class Remover extends ExternalInteractorBase {
4
5
  constructor(container) {
5
6
  super(container);
6
7
  this.handleClickMode = (mode) => {
7
8
  const container = this.container, options = container.actualOptions;
8
- if (!options.interactivity.modes.remove || mode !== "remove") {
9
+ if (!options.interactivity.modes.remove || mode !== removeMode) {
9
10
  return;
10
11
  }
11
12
  const removeNb = getRangeValue(options.interactivity.modes.remove.quantity);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/interaction-external-remove",
3
- "version": "3.0.0-beta.3",
3
+ "version": "3.0.0-beta.5",
4
4
  "description": "tsParticles remove external interaction",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -60,7 +60,7 @@
60
60
  "confettijs",
61
61
  "fireworksjs",
62
62
  "canvas-confetti",
63
- "@tsparticles/plugin",
63
+ "tsparticles-plugin",
64
64
  "@tsparticles/interaction"
65
65
  ],
66
66
  "author": "Matteo Bruni <matteo.bruni@me.com>",
@@ -87,7 +87,7 @@
87
87
  "./package.json": "./package.json"
88
88
  },
89
89
  "dependencies": {
90
- "@tsparticles/engine": "^3.0.0-beta.3"
90
+ "@tsparticles/engine": "^3.0.0-beta.5"
91
91
  },
92
92
  "publishConfig": {
93
93
  "access": "public"