refactor(live-room-like-heart): 하트 비의 하트와 폭발시 생기는 하트 파편을 동일한 모양으로 리팩토링
This commit is contained in:
@@ -2397,10 +2397,23 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
|||||||
|
|
||||||
private val particles = mutableListOf<Particle>()
|
private val particles = mutableListOf<Particle>()
|
||||||
private val baseHeartPath: Path = Path().apply {
|
private val baseHeartPath: Path = Path().apply {
|
||||||
// 원점 기준 정규화된 하트 경로
|
// 하트 실루엣(정규화 좌표: x,y ∈ [-1,1])
|
||||||
moveTo(0f, -1f)
|
// 상단 중앙 노치가 있고 좌우 로브가 둥글며 하단 포인트가 뾰족한 형태
|
||||||
cubicTo(0.5f, -1.5f, 1.3f, -0.1f, 0f, 1f)
|
// y 범위 [-1, 1] 유지(halfSize 기반 착지/충돌 판정과 정합)
|
||||||
cubicTo(-1.3f, -0.1f, -0.5f, -1.5f, 0f, -1f)
|
reset()
|
||||||
|
moveTo(0f, -0.2f) // top notch
|
||||||
|
// right lobe → bottom tip
|
||||||
|
cubicTo(
|
||||||
|
0.85f, -1.0f, // control1: right lobe top
|
||||||
|
1.35f, 0.2f, // control2: right shoulder
|
||||||
|
0f, 1f // bottom tip
|
||||||
|
)
|
||||||
|
// left lobe → back to notch
|
||||||
|
cubicTo(
|
||||||
|
-1.35f, 0.2f, // control1: left shoulder
|
||||||
|
-0.85f, -1.0f, // control2: left lobe top
|
||||||
|
0f, -0.2f // notch
|
||||||
|
)
|
||||||
close()
|
close()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user