Skip to content

Commit

Permalink
feat: Optimize poster wall animation
Browse files Browse the repository at this point in the history
  • Loading branch information
ximu3 committed Nov 29, 2024
1 parent bd6fd85 commit 07e2de5
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function BigGamePoster({
[gameId, gameIndex]

return (
<HoverCard>
<HoverCard openDelay={300} closeDelay={100}>
<HoverCardTrigger className={cn('rounded-none')}>
<ContextMenu>
<ContextMenuTrigger className={cn('rounded-none')}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function GamePoster({
const [gameName] = useDBSyncedState('', `games/${gameId}/metadata.json`, ['name'])

return (
<HoverCard>
<HoverCard openDelay={300} closeDelay={100}>
<HoverCardTrigger>
<ContextMenu>
<ContextMenuTrigger>
Expand Down
6 changes: 3 additions & 3 deletions src/renderer/src/components/animations/HoverBigCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ export function HoverBigCardAnimation({
imageConfig = {
scale: {
initial: 1,
hover: 1.01
hover: 1.03
}
},
animationConfig = {
tension: 600,
friction: 90
tension: 730,
friction: 100
},
...rest
}: HoverBigCardProps): JSX.Element {
Expand Down
6 changes: 3 additions & 3 deletions src/renderer/src/components/animations/HoverCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ export function HoverCardAnimation({
children,
className,
onClick,
liftAmount = 4,
liftAmount = 6,
shadowConfig = {
initial: '0 4px 8px rgba(0, 0, 0, 0.7)',
hover: '0 8px 16px rgba(0, 0, 0, 1)'
},
animationConfig = {
tension: 600,
friction: 90
tension: 730,
friction: 100
},
...rest
}: HoverCardProps): JSX.Element {
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/src/components/animations/HoverSquareCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export function HoverSquareCardAnimation({
}
},
animationConfig = {
tension: 600,
friction: 90
tension: 730,
friction: 100
},
...rest
}: HoverSquareCardProps): JSX.Element {
Expand Down

0 comments on commit 07e2de5

Please sign in to comment.