From f3b3724078e202e0f0cebe3a75e1f9a9a65ab5e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=E2=80=A6?= Date: Thu, 26 Sep 2024 18:22:41 +0100 Subject: [PATCH] adjust position of the x and y axis for the animation --- src/pages/portfolio/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/portfolio/index.tsx b/src/pages/portfolio/index.tsx index f3038ad..7bb841b 100644 --- a/src/pages/portfolio/index.tsx +++ b/src/pages/portfolio/index.tsx @@ -11,8 +11,8 @@ const useMouseMoveAnimation = () => { const mouseXSpring = useSpring(x); const mouseYSpring = useSpring(y); - const rotateX = useTransform(mouseYSpring, [-0.5, 0.5], ["11.5deg", "-11.5deg"]); - const rotateY = useTransform(mouseXSpring, [-0.5, 0.5], ["-11.5deg", "11.5deg"]); + const rotateX = useTransform(mouseYSpring, [-0.5, 0.5], ["14.5deg", "-14.5deg"]); + const rotateY = useTransform(mouseXSpring, [-0.5, 0.5], ["-14.5deg", "14.5deg"]); const handleMouseMove = (e: React.MouseEvent) => { const rect = e.currentTarget.getBoundingClientRect();