@tsparticles/updater-out-modes 3.0.0-beta.2 → 3.0.0-beta.4

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/Utils.js CHANGED
@@ -1,4 +1,4 @@
1
- import { getValue } from "@tsparticles/engine";
1
+ import { getRangeValue } from "@tsparticles/engine";
2
2
  export function bounceHorizontal(data) {
3
3
  if ((data.outMode !== "bounce" &&
4
4
  data.outMode !== "bounce-horizontal" &&
@@ -17,7 +17,7 @@ export function bounceHorizontal(data) {
17
17
  let bounced = false;
18
18
  if ((data.direction === "right" && data.bounds.right >= data.canvasSize.width && velocity > 0) ||
19
19
  (data.direction === "left" && data.bounds.left <= 0 && velocity < 0)) {
20
- const newVelocity = getValue(data.particle.options.bounce.horizontal);
20
+ const newVelocity = getRangeValue(data.particle.options.bounce.horizontal.value);
21
21
  data.particle.velocity.x *= -newVelocity;
22
22
  bounced = true;
23
23
  }
@@ -53,7 +53,7 @@ export function bounceVertical(data) {
53
53
  let bounced = false;
54
54
  if ((data.direction === "bottom" && data.bounds.bottom >= data.canvasSize.height && velocity > 0) ||
55
55
  (data.direction === "top" && data.bounds.top <= 0 && velocity < 0)) {
56
- const newVelocity = getValue(data.particle.options.bounce.vertical);
56
+ const newVelocity = getRangeValue(data.particle.options.bounce.vertical.value);
57
57
  data.particle.velocity.y *= -newVelocity;
58
58
  bounced = true;
59
59
  }
package/cjs/Utils.js CHANGED
@@ -20,7 +20,7 @@ function bounceHorizontal(data) {
20
20
  let bounced = false;
21
21
  if ((data.direction === "right" && data.bounds.right >= data.canvasSize.width && velocity > 0) ||
22
22
  (data.direction === "left" && data.bounds.left <= 0 && velocity < 0)) {
23
- const newVelocity = (0, engine_1.getValue)(data.particle.options.bounce.horizontal);
23
+ const newVelocity = (0, engine_1.getRangeValue)(data.particle.options.bounce.horizontal.value);
24
24
  data.particle.velocity.x *= -newVelocity;
25
25
  bounced = true;
26
26
  }
@@ -57,7 +57,7 @@ function bounceVertical(data) {
57
57
  let bounced = false;
58
58
  if ((data.direction === "bottom" && data.bounds.bottom >= data.canvasSize.height && velocity > 0) ||
59
59
  (data.direction === "top" && data.bounds.top <= 0 && velocity < 0)) {
60
- const newVelocity = (0, engine_1.getValue)(data.particle.options.bounce.vertical);
60
+ const newVelocity = (0, engine_1.getRangeValue)(data.particle.options.bounce.vertical.value);
61
61
  data.particle.velocity.y *= -newVelocity;
62
62
  bounced = true;
63
63
  }
package/esm/Utils.js CHANGED
@@ -1,4 +1,4 @@
1
- import { getValue } from "@tsparticles/engine";
1
+ import { getRangeValue } from "@tsparticles/engine";
2
2
  export function bounceHorizontal(data) {
3
3
  if ((data.outMode !== "bounce" &&
4
4
  data.outMode !== "bounce-horizontal" &&
@@ -17,7 +17,7 @@ export function bounceHorizontal(data) {
17
17
  let bounced = false;
18
18
  if ((data.direction === "right" && data.bounds.right >= data.canvasSize.width && velocity > 0) ||
19
19
  (data.direction === "left" && data.bounds.left <= 0 && velocity < 0)) {
20
- const newVelocity = getValue(data.particle.options.bounce.horizontal);
20
+ const newVelocity = getRangeValue(data.particle.options.bounce.horizontal.value);
21
21
  data.particle.velocity.x *= -newVelocity;
22
22
  bounced = true;
23
23
  }
@@ -53,7 +53,7 @@ export function bounceVertical(data) {
53
53
  let bounced = false;
54
54
  if ((data.direction === "bottom" && data.bounds.bottom >= data.canvasSize.height && velocity > 0) ||
55
55
  (data.direction === "top" && data.bounds.top <= 0 && velocity < 0)) {
56
- const newVelocity = getValue(data.particle.options.bounce.vertical);
56
+ const newVelocity = getRangeValue(data.particle.options.bounce.vertical.value);
57
57
  data.particle.velocity.y *= -newVelocity;
58
58
  bounced = true;
59
59
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/updater-out-modes",
3
- "version": "3.0.0-beta.2",
3
+ "version": "3.0.0-beta.4",
4
4
  "description": "tsParticles particles out modes updater",
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/updater"
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.2"
90
+ "@tsparticles/engine": "^3.0.0-beta.4"
91
91
  },
92
92
  "publishConfig": {
93
93
  "access": "public"