File tree Expand file tree Collapse file tree
frontend/docs/features/game Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # GamePage 레이아웃 및 DotTextEffect 인터랙션 개선
2+
3+ ## 레이아웃 구조
4+
5+ ` TopRow ` 를 3-column grid(` 1fr auto 1fr ` )로 구성하여 타이틀을 절대 중앙에 고정하고 순위표를 오른쪽 끝에 배치.
6+ DotTextEffect는 전체 너비 가운데, 클릭 버튼은 하단(` marginTop: 40px ` )에 위치.
7+
8+ ```
9+ ┌─────────────────────────────────────────────┐
10+ │ [빈 공간] 동아리 클릭 배틀 [실시간 순위] │
11+ │ │
12+ │ [ 개 발 팀 (DotText) ] │
13+ │ │
14+ │ [클릭! 버튼] │
15+ └─────────────────────────────────────────────┘
16+ ```
17+
18+ ## DotTextEffect 색상 Ripple
19+
20+ 마우스 커서 주변 ` colorRadius(= hoverRadius * 1.8) ` 범위 내 dot들이 거리 비례로 색상이 물드는 효과.
21+
22+ - 파워 커브 ` Math.pow(dist / colorRadius, 2.5) ` 적용 → 중심만 진하고 바깥은 급격히 회색으로
23+ - 각 dot에 ` charColors ` 중 랜덤 색상 미리 배정 (글자 단위 → dot 단위 랜덤)
24+ - ` hoverRadius: 18 ` , ` dotR: 1.8 ` (겹침 방지)
25+
26+ ## 관련 코드
27+
28+ - ` src/pages/GamePage/GamePage.tsx ` — 레이아웃 구조 (TopRow, DotTextEffect 중앙, 버튼 하단)
29+ - ` src/pages/GamePage/GamePage.styles.ts ` — TopRow grid 스타일
30+ - ` src/pages/GamePage/components/DotTextEffect/DotTextEffect.tsx ` — 색상 ripple 및 랜덤 색상 로직
31+ - ` src/pages/GamePage/components/RankingBoard/RankingBoard.styles.ts ` — Header column 방향 변경
32+ - ` src/pages/GamePage/components/ClickButton/ClickButton.styles.ts ` — ClubLabel 말줄임 처리
You can’t perform that action at this time.
0 commit comments