feat(live-room): 왕하트 애니메이션 수정
- 수신자 가운데 하트 크기 sizeDp 고정에서 0 -> sizeDp까지 서서히 커지도록 수정
This commit is contained in:
@@ -2318,7 +2318,7 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
|||||||
// 메시지로 수신된 경우: Path 드로잉 기반으로 중앙 하트를 잠깐 표시 후 폭발 실행
|
// 메시지로 수신된 경우: Path 드로잉 기반으로 중앙 하트를 잠깐 표시 후 폭발 실행
|
||||||
if (fromMessage) {
|
if (fromMessage) {
|
||||||
val floatView = ensureBigHeartFloatView()
|
val floatView = ensureBigHeartFloatView()
|
||||||
floatView.emitCenterOnce(sizeDp = 200f, showDurationMs = 300L)
|
floatView.emitCenterOnce(sizeDp = 200f, showDurationMs = 500L)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2476,7 +2476,7 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
|||||||
private var explosionCenterY = 0f
|
private var explosionCenterY = 0f
|
||||||
|
|
||||||
// 화면 중앙에 하트를 잠깐 표시 후 자동 폭발
|
// 화면 중앙에 하트를 잠깐 표시 후 자동 폭발
|
||||||
fun emitCenterOnce(sizeDp: Float = 200f, showDurationMs: Long = 300L) {
|
fun emitCenterOnce(sizeDp: Float = 200f, showDurationMs: Long = 500L) {
|
||||||
if (width == 0 || height == 0) {
|
if (width == 0 || height == 0) {
|
||||||
post { emitCenterOnce(sizeDp, showDurationMs) }
|
post { emitCenterOnce(sizeDp, showDurationMs) }
|
||||||
return
|
return
|
||||||
@@ -2518,7 +2518,7 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
|||||||
paint.alpha = drawAlpha
|
paint.alpha = drawAlpha
|
||||||
|
|
||||||
canvas.withTranslation(h.x, h.y) {
|
canvas.withTranslation(h.x, h.y) {
|
||||||
val s = h.scale
|
val s = (h.scale * f)
|
||||||
scale(s, s)
|
scale(s, s)
|
||||||
drawPath(baseHeartPath, paint)
|
drawPath(baseHeartPath, paint)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user