@tsparticles/interaction-external-push 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.
@@ -5,12 +5,6 @@ export class Push {
5
5
  this.groups = [];
6
6
  this.quantity = 4;
7
7
  }
8
- get particles_nb() {
9
- return this.quantity;
10
- }
11
- set particles_nb(value) {
12
- this.quantity = setRangeValue(value);
13
- }
14
8
  load(data) {
15
9
  if (!data) {
16
10
  return;
@@ -24,7 +18,7 @@ export class Push {
24
18
  if (!this.groups.length) {
25
19
  this.default = true;
26
20
  }
27
- const quantity = data.quantity ?? data.particles_nb;
21
+ const quantity = data.quantity;
28
22
  if (quantity !== undefined) {
29
23
  this.quantity = setRangeValue(quantity);
30
24
  }
package/browser/Pusher.js CHANGED
@@ -1,10 +1,11 @@
1
1
  import { ExternalInteractorBase, getRangeValue, itemFromArray, } from "@tsparticles/engine";
2
2
  import { Push } from "./Options/Classes/Push.js";
3
+ const pushMode = "push";
3
4
  export class Pusher extends ExternalInteractorBase {
4
5
  constructor(container) {
5
6
  super(container);
6
7
  this.handleClickMode = (mode) => {
7
- if (mode !== "push") {
8
+ if (mode !== pushMode) {
8
9
  return;
9
10
  }
10
11
  const container = this.container, options = container.actualOptions, pushOptions = options.interactivity.modes.push;
@@ -8,12 +8,6 @@ class Push {
8
8
  this.groups = [];
9
9
  this.quantity = 4;
10
10
  }
11
- get particles_nb() {
12
- return this.quantity;
13
- }
14
- set particles_nb(value) {
15
- this.quantity = (0, engine_1.setRangeValue)(value);
16
- }
17
11
  load(data) {
18
12
  if (!data) {
19
13
  return;
@@ -27,7 +21,7 @@ class Push {
27
21
  if (!this.groups.length) {
28
22
  this.default = true;
29
23
  }
30
- const quantity = data.quantity ?? data.particles_nb;
24
+ const quantity = data.quantity;
31
25
  if (quantity !== undefined) {
32
26
  this.quantity = (0, engine_1.setRangeValue)(quantity);
33
27
  }
package/cjs/Pusher.js CHANGED
@@ -3,11 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Pusher = void 0;
4
4
  const engine_1 = require("@tsparticles/engine");
5
5
  const Push_js_1 = require("./Options/Classes/Push.js");
6
+ const pushMode = "push";
6
7
  class Pusher extends engine_1.ExternalInteractorBase {
7
8
  constructor(container) {
8
9
  super(container);
9
10
  this.handleClickMode = (mode) => {
10
- if (mode !== "push") {
11
+ if (mode !== pushMode) {
11
12
  return;
12
13
  }
13
14
  const container = this.container, options = container.actualOptions, pushOptions = options.interactivity.modes.push;
@@ -5,12 +5,6 @@ export class Push {
5
5
  this.groups = [];
6
6
  this.quantity = 4;
7
7
  }
8
- get particles_nb() {
9
- return this.quantity;
10
- }
11
- set particles_nb(value) {
12
- this.quantity = setRangeValue(value);
13
- }
14
8
  load(data) {
15
9
  if (!data) {
16
10
  return;
@@ -24,7 +18,7 @@ export class Push {
24
18
  if (!this.groups.length) {
25
19
  this.default = true;
26
20
  }
27
- const quantity = data.quantity ?? data.particles_nb;
21
+ const quantity = data.quantity;
28
22
  if (quantity !== undefined) {
29
23
  this.quantity = setRangeValue(quantity);
30
24
  }
package/esm/Pusher.js CHANGED
@@ -1,10 +1,11 @@
1
1
  import { ExternalInteractorBase, getRangeValue, itemFromArray, } from "@tsparticles/engine";
2
2
  import { Push } from "./Options/Classes/Push.js";
3
+ const pushMode = "push";
3
4
  export class Pusher extends ExternalInteractorBase {
4
5
  constructor(container) {
5
6
  super(container);
6
7
  this.handleClickMode = (mode) => {
7
- if (mode !== "push") {
8
+ if (mode !== pushMode) {
8
9
  return;
9
10
  }
10
11
  const container = this.container, options = container.actualOptions, pushOptions = options.interactivity.modes.push;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/interaction-external-push",
3
- "version": "3.0.0-beta.3",
3
+ "version": "3.0.0-beta.5",
4
4
  "description": "tsParticles push 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"