Skip to content

Commit

Permalink
adjust position of the x and y axis for the animation
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel264 committed Sep 26, 2024
1 parent 350e993 commit f3b3724
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/portfolio/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<HTMLDivElement>) => {
const rect = e.currentTarget.getBoundingClientRect();
Expand Down

0 comments on commit f3b3724

Please sign in to comment.