fix(live-room-like-heart): 하트 모양 수정

This commit is contained in:
Yu Sung
2025-11-05 22:00:54 +09:00
parent a4c5a790fe
commit 54d8845342
2 changed files with 18 additions and 16 deletions

View File

@@ -18,7 +18,7 @@ struct WaterHeartView: View {
ZStack {
//
HeartShape()
.stroke(lineWidth: size * 0.03)
.stroke(lineWidth: size * 0.01)
.foregroundStyle(Color(hex: "ff959a"))
.opacity(show ? 1 : 0)
@@ -42,7 +42,7 @@ struct WaterHeartView: View {
.animation(.easeInOut(duration: 0.2), value: show)
}
}
.aspectRatio(4/3, contentMode: .fit)
.aspectRatio(1, contentMode: .fit)
}
}
@@ -59,24 +59,26 @@ struct HeartShape: Shape {
func pt(_ nx: CGFloat, _ ny: CGFloat) -> CGPoint {
CGPoint(x: cx + nx * r, y: cy + ny * r)
}
var p = Path()
// - notch: y -0.20
// - shoulder : (±1.20, 0.12) (±1.25, 0.12)
// - lobe top : (±0.80, -0.95) (±0.80, -0.85)
p.move(to: pt(0, -0.20)) // top notch (shallow)
// right lobe bottom tip
//
p.move(to: pt(0.0, -0.45))
// : -> ->
p.addCurve(
to: pt(0, 1.0),
control1: pt(0.80, -0.85), // right lobe top (lowered)
control2: pt(1.25, 0.12) // right shoulder (wider)
to: pt(0.0, 0.65), // ()
control1: pt(0.62, -1.02), // ( /)
control2: pt(1.22, -0.04) // ( , )
)
// left lobe back to notch
// :
p.addCurve(
to: pt(0, -0.20),
control1: pt(-1.25, 0.12), // left shoulder (wider)
control2: pt(-0.80, -0.85) // left lobe top (lowered)
to: pt(0.0, -0.45), // ( )
control1: pt(-1.22, -0.04), //
control2: pt(-0.62, -1.02) //
)
p.closeSubpath()
return p
}

View File

@@ -771,7 +771,7 @@ struct LiveRoomViewV2: View {
WaterHeartView(progress: viewModel.remoteWaterProgress,
show: viewModel.isShowRemoteBigHeart,
phase: viewModel.remoteWavePhase)
.frame(width: 280, height: 210)
.frame(width: 280, height: 280)
.allowsHitTesting(false)
//
.opacity((viewModel.isShowRemoteBigHeart && !showWaterHeart) ? 1 : 0)