@tsparticles/move-parallax
Advanced tools
Comparing version 3.0.3 to 3.1.0
import { isSsr } from "@tsparticles/engine"; | ||
const half = 0.5; | ||
export class ParallaxMover { | ||
@@ -20,4 +21,4 @@ init() { | ||
const canvasSize = container.canvas.size, canvasCenter = { | ||
x: canvasSize.width * 0.5, | ||
y: canvasSize.height * 0.5, | ||
x: canvasSize.width * half, | ||
y: canvasSize.height * half, | ||
}, parallaxSmooth = parallaxOptions.smooth, factor = particle.getRadius() / parallaxForce, centerDistance = { | ||
@@ -24,0 +25,0 @@ x: (mousePos.x - canvasCenter.x) * factor, |
@@ -5,2 +5,3 @@ "use strict"; | ||
const engine_1 = require("@tsparticles/engine"); | ||
const half = 0.5; | ||
class ParallaxMover { | ||
@@ -24,4 +25,4 @@ init() { | ||
const canvasSize = container.canvas.size, canvasCenter = { | ||
x: canvasSize.width * 0.5, | ||
y: canvasSize.height * 0.5, | ||
x: canvasSize.width * half, | ||
y: canvasSize.height * half, | ||
}, parallaxSmooth = parallaxOptions.smooth, factor = particle.getRadius() / parallaxForce, centerDistance = { | ||
@@ -28,0 +29,0 @@ x: (mousePos.x - canvasCenter.x) * factor, |
import { isSsr } from "@tsparticles/engine"; | ||
const half = 0.5; | ||
export class ParallaxMover { | ||
@@ -20,4 +21,4 @@ init() { | ||
const canvasSize = container.canvas.size, canvasCenter = { | ||
x: canvasSize.width * 0.5, | ||
y: canvasSize.height * 0.5, | ||
x: canvasSize.width * half, | ||
y: canvasSize.height * half, | ||
}, parallaxSmooth = parallaxOptions.smooth, factor = particle.getRadius() / parallaxForce, centerDistance = { | ||
@@ -24,0 +25,0 @@ x: (mousePos.x - canvasCenter.x) * factor, |
{ | ||
"name": "@tsparticles/move-parallax", | ||
"version": "3.0.3", | ||
"version": "3.1.0", | ||
"description": "tsParticles Parallax movement", | ||
@@ -62,3 +62,3 @@ "homepage": "https://particles.js.org", | ||
"dependencies": { | ||
"@tsparticles/engine": "^3.0.3" | ||
"@tsparticles/engine": "^3.1.0" | ||
}, | ||
@@ -65,0 +65,0 @@ "publishConfig": { |
@@ -7,3 +7,3 @@ /*! | ||
* How to use? : Check the GitHub README | ||
* v3.0.3 | ||
* v3.1.0 | ||
*/ | ||
@@ -102,2 +102,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
const half = 0.5; | ||
class ParallaxMover { | ||
@@ -122,4 +123,4 @@ init() {} | ||
canvasCenter = { | ||
x: canvasSize.width * 0.5, | ||
y: canvasSize.height * 0.5 | ||
x: canvasSize.width * half, | ||
y: canvasSize.height * half | ||
}, | ||
@@ -126,0 +127,0 @@ parallaxSmooth = parallaxOptions.smooth, |
@@ -1,1 +0,1 @@ | ||
/*! tsParticles Parallax Move v3.0.3 by Matteo Bruni */ | ||
/*! tsParticles Parallax Move v3.1.0 by Matteo Bruni */ |
@@ -14,2 +14,3 @@ (function (factory) { | ||
const engine_1 = require("@tsparticles/engine"); | ||
const half = 0.5; | ||
class ParallaxMover { | ||
@@ -33,4 +34,4 @@ init() { | ||
const canvasSize = container.canvas.size, canvasCenter = { | ||
x: canvasSize.width * 0.5, | ||
y: canvasSize.height * 0.5, | ||
x: canvasSize.width * half, | ||
y: canvasSize.height * half, | ||
}, parallaxSmooth = parallaxOptions.smooth, factor = particle.getRadius() / parallaxForce, centerDistance = { | ||
@@ -37,0 +38,0 @@ x: (mousePos.x - canvasCenter.x) * factor, |
Sorry, the diff of this file is not supported yet
295630
318
Updated@tsparticles/engine@^3.1.0