@tsparticles/updater-out-modes
Advanced tools
Comparing version 3.0.0-beta.5 to 3.0.0
@@ -60,3 +60,3 @@ import { Vector, calculateBounds, getDistances, getRandom, isPointInside, randomInRange, } from "@tsparticles/engine"; | ||
case "normal": { | ||
const wrap = particle.options.move.warp, canvasSize = container.canvas.size, newPos = { | ||
const warp = particle.options.move.warp, canvasSize = container.canvas.size, newPos = { | ||
bottom: canvasSize.height + particle.getRadius() + particle.offset.y, | ||
@@ -71,3 +71,3 @@ left: -particle.getRadius() - particle.offset.x, | ||
particle.initialPosition.x = particle.position.x; | ||
if (!wrap) { | ||
if (!warp) { | ||
particle.position.y = getRandom() * canvasSize.height; | ||
@@ -80,3 +80,3 @@ particle.initialPosition.y = particle.position.y; | ||
particle.initialPosition.x = particle.position.x; | ||
if (!wrap) { | ||
if (!warp) { | ||
particle.position.y = getRandom() * canvasSize.height; | ||
@@ -88,3 +88,3 @@ particle.initialPosition.y = particle.position.y; | ||
nextBounds.top > canvasSize.height + particle.offset.y) { | ||
if (!wrap) { | ||
if (!warp) { | ||
particle.position.x = getRandom() * canvasSize.width; | ||
@@ -97,3 +97,3 @@ particle.initialPosition.x = particle.position.x; | ||
else if (direction === "top" && nextBounds.bottom < -particle.offset.y) { | ||
if (!wrap) { | ||
if (!warp) { | ||
particle.position.x = getRandom() * canvasSize.width; | ||
@@ -100,0 +100,0 @@ particle.initialPosition.x = particle.position.x; |
@@ -63,3 +63,3 @@ "use strict"; | ||
case "normal": { | ||
const wrap = particle.options.move.warp, canvasSize = container.canvas.size, newPos = { | ||
const warp = particle.options.move.warp, canvasSize = container.canvas.size, newPos = { | ||
bottom: canvasSize.height + particle.getRadius() + particle.offset.y, | ||
@@ -74,3 +74,3 @@ left: -particle.getRadius() - particle.offset.x, | ||
particle.initialPosition.x = particle.position.x; | ||
if (!wrap) { | ||
if (!warp) { | ||
particle.position.y = (0, engine_1.getRandom)() * canvasSize.height; | ||
@@ -83,3 +83,3 @@ particle.initialPosition.y = particle.position.y; | ||
particle.initialPosition.x = particle.position.x; | ||
if (!wrap) { | ||
if (!warp) { | ||
particle.position.y = (0, engine_1.getRandom)() * canvasSize.height; | ||
@@ -91,3 +91,3 @@ particle.initialPosition.y = particle.position.y; | ||
nextBounds.top > canvasSize.height + particle.offset.y) { | ||
if (!wrap) { | ||
if (!warp) { | ||
particle.position.x = (0, engine_1.getRandom)() * canvasSize.width; | ||
@@ -100,3 +100,3 @@ particle.initialPosition.x = particle.position.x; | ||
else if (direction === "top" && nextBounds.bottom < -particle.offset.y) { | ||
if (!wrap) { | ||
if (!warp) { | ||
particle.position.x = (0, engine_1.getRandom)() * canvasSize.width; | ||
@@ -103,0 +103,0 @@ particle.initialPosition.x = particle.position.x; |
@@ -60,3 +60,3 @@ import { Vector, calculateBounds, getDistances, getRandom, isPointInside, randomInRange, } from "@tsparticles/engine"; | ||
case "normal": { | ||
const wrap = particle.options.move.warp, canvasSize = container.canvas.size, newPos = { | ||
const warp = particle.options.move.warp, canvasSize = container.canvas.size, newPos = { | ||
bottom: canvasSize.height + particle.getRadius() + particle.offset.y, | ||
@@ -71,3 +71,3 @@ left: -particle.getRadius() - particle.offset.x, | ||
particle.initialPosition.x = particle.position.x; | ||
if (!wrap) { | ||
if (!warp) { | ||
particle.position.y = getRandom() * canvasSize.height; | ||
@@ -80,3 +80,3 @@ particle.initialPosition.y = particle.position.y; | ||
particle.initialPosition.x = particle.position.x; | ||
if (!wrap) { | ||
if (!warp) { | ||
particle.position.y = getRandom() * canvasSize.height; | ||
@@ -88,3 +88,3 @@ particle.initialPosition.y = particle.position.y; | ||
nextBounds.top > canvasSize.height + particle.offset.y) { | ||
if (!wrap) { | ||
if (!warp) { | ||
particle.position.x = getRandom() * canvasSize.width; | ||
@@ -97,3 +97,3 @@ particle.initialPosition.x = particle.position.x; | ||
else if (direction === "top" && nextBounds.bottom < -particle.offset.y) { | ||
if (!wrap) { | ||
if (!warp) { | ||
particle.position.x = getRandom() * canvasSize.width; | ||
@@ -100,0 +100,0 @@ particle.initialPosition.x = particle.position.x; |
{ | ||
"name": "@tsparticles/updater-out-modes", | ||
"version": "3.0.0-beta.5", | ||
"version": "3.0.0", | ||
"description": "tsParticles particles out modes updater", | ||
@@ -90,3 +90,3 @@ "homepage": "https://particles.js.org", | ||
"dependencies": { | ||
"@tsparticles/engine": "^3.0.0-beta.5" | ||
"@tsparticles/engine": "^3.0.0" | ||
}, | ||
@@ -93,0 +93,0 @@ "publishConfig": { |
@@ -7,3 +7,3 @@ /*! | ||
* How to use? : Check the GitHub README | ||
* v3.0.0-beta.5 | ||
* v3.0.0 | ||
*/ | ||
@@ -355,3 +355,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
{ | ||
const wrap = particle.options.move.warp, | ||
const warp = particle.options.move.warp, | ||
canvasSize = container.canvas.size, | ||
@@ -369,3 +369,3 @@ newPos = { | ||
particle.initialPosition.x = particle.position.x; | ||
if (!wrap) { | ||
if (!warp) { | ||
particle.position.y = (0,engine_root_window_.getRandom)() * canvasSize.height; | ||
@@ -377,3 +377,3 @@ particle.initialPosition.y = particle.position.y; | ||
particle.initialPosition.x = particle.position.x; | ||
if (!wrap) { | ||
if (!warp) { | ||
particle.position.y = (0,engine_root_window_.getRandom)() * canvasSize.height; | ||
@@ -384,3 +384,3 @@ particle.initialPosition.y = particle.position.y; | ||
if (direction === "bottom" && nextBounds.top > canvasSize.height + particle.offset.y) { | ||
if (!wrap) { | ||
if (!warp) { | ||
particle.position.x = (0,engine_root_window_.getRandom)() * canvasSize.width; | ||
@@ -392,3 +392,3 @@ particle.initialPosition.x = particle.position.x; | ||
} else if (direction === "top" && nextBounds.bottom < -particle.offset.y) { | ||
if (!wrap) { | ||
if (!warp) { | ||
particle.position.x = (0,engine_root_window_.getRandom)() * canvasSize.width; | ||
@@ -395,0 +395,0 @@ particle.initialPosition.x = particle.position.x; |
@@ -1,1 +0,1 @@ | ||
/*! tsParticles Out Modes Updater v3.0.0-beta.5 by Matteo Bruni */ | ||
/*! tsParticles Out Modes Updater v3.0.0 by Matteo Bruni */ |
@@ -72,3 +72,3 @@ (function (factory) { | ||
case "normal": { | ||
const wrap = particle.options.move.warp, canvasSize = container.canvas.size, newPos = { | ||
const warp = particle.options.move.warp, canvasSize = container.canvas.size, newPos = { | ||
bottom: canvasSize.height + particle.getRadius() + particle.offset.y, | ||
@@ -83,3 +83,3 @@ left: -particle.getRadius() - particle.offset.x, | ||
particle.initialPosition.x = particle.position.x; | ||
if (!wrap) { | ||
if (!warp) { | ||
particle.position.y = (0, engine_1.getRandom)() * canvasSize.height; | ||
@@ -92,3 +92,3 @@ particle.initialPosition.y = particle.position.y; | ||
particle.initialPosition.x = particle.position.x; | ||
if (!wrap) { | ||
if (!warp) { | ||
particle.position.y = (0, engine_1.getRandom)() * canvasSize.height; | ||
@@ -100,3 +100,3 @@ particle.initialPosition.y = particle.position.y; | ||
nextBounds.top > canvasSize.height + particle.offset.y) { | ||
if (!wrap) { | ||
if (!warp) { | ||
particle.position.x = (0, engine_1.getRandom)() * canvasSize.width; | ||
@@ -109,3 +109,3 @@ particle.initialPosition.x = particle.position.x; | ||
else if (direction === "top" && nextBounds.bottom < -particle.offset.y) { | ||
if (!wrap) { | ||
if (!warp) { | ||
particle.position.x = (0, engine_1.getRandom)() * canvasSize.width; | ||
@@ -112,0 +112,0 @@ particle.initialPosition.x = particle.position.x; |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
376986
Updated@tsparticles/engine@^3.0.0