Skip to content

Commit

Permalink
fix: 에코 이미지 변경, 위치 가운데로 오도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
CheeseB committed Apr 2, 2024
1 parent 9283917 commit 691a108
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 39 deletions.
Binary file modified public/pngs/landing-echo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 10 additions & 37 deletions src/components/landing/Echo/Echo.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,27 @@
}

.echo {
@include responsive(T) {
right: 60%;
transform: translateX(60%) !important;
}

position: absolute;
right: 0;

aspect-ratio: 1.69 / 1;
height: 100%;
@include pos-center-x;

width: 107%;
height: 107%;
background: url('/pngs/landing-echo.png') no-repeat center/cover;

animation: show-echo 1s ease-in-out forwards;
}

.echo-shadow {
@include responsive(T) {
right: 45%;
transform: translateX(45%) !important;
}

position: absolute;
right: 10%;
left: 40%;
transform: translateX(-50%);

aspect-ratio: 1.69 / 1;
height: 110%;
width: 107%;
height: 107%;

opacity: 0;
background: url('/pngs/landing-echo-shadow.png') no-repeat center/cover;

animation: show-echo-shadow 1s ease-in-out forwards;
animation: show-echo 1s ease-in-out forwards;
animation-delay: 0.5s;
}

.side-scroll {
Expand Down Expand Up @@ -244,23 +234,6 @@
}
}

@keyframes show-echo-shadow {
0% {
bottom: -10%;
opacity: 0;
}

50% {
bottom: -10%;
opacity: 0;
}

100% {
bottom: -5%;
opacity: 1;
}
}

@keyframes text-loop-left {
0% {
transform: translateY(0%);
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/useMouseMoveEffect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ const useMouseMoveEffect = (moveScale: number) => {

mainText.style.transform = `translate(${offsetX * moveScale}px, ${offsetY * moveScale}px)`;
subText.style.transform = `translate(${offsetX * moveScale}px, ${offsetY * moveScale}px)`;
echo.style.transform = `translate(${-offsetX * moveScale}px, ${-offsetY * moveScale}px)`;
echoShadow.style.transform = `translate(${offsetX * 1}px, ${offsetY * 1}px)`;
echo.style.transform = `translate(calc(-50% + ${-offsetX * moveScale}px), ${-offsetY * moveScale}px)`;
echoShadow.style.transform = `translate(calc(-50% + ${offsetX * 1}px), ${offsetY * 1}px)`;
});
};

Expand Down

0 comments on commit 691a108

Please sign in to comment.