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 { ZStack {
// //
HeartShape() HeartShape()
.stroke(lineWidth: size * 0.03) .stroke(lineWidth: size * 0.01)
.foregroundStyle(Color(hex: "ff959a")) .foregroundStyle(Color(hex: "ff959a"))
.opacity(show ? 1 : 0) .opacity(show ? 1 : 0)
@@ -42,7 +42,7 @@ struct WaterHeartView: View {
.animation(.easeInOut(duration: 0.2), value: show) .animation(.easeInOut(duration: 0.2), value: show)
} }
} }
.aspectRatio(4/3, contentMode: .fit) .aspectRatio(1, contentMode: .fit)
} }
} }
@@ -61,22 +61,24 @@ struct HeartShape: Shape {
} }
var p = Path() 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, -0.45))
p.move(to: pt(0, -0.20)) // top notch (shallow)
// right lobe bottom tip // : -> ->
p.addCurve( p.addCurve(
to: pt(0, 1.0), to: pt(0.0, 0.65), // ()
control1: pt(0.80, -0.85), // right lobe top (lowered) control1: pt(0.62, -1.02), // ( /)
control2: pt(1.25, 0.12) // right shoulder (wider) control2: pt(1.22, -0.04) // ( , )
) )
// left lobe back to notch
// :
p.addCurve( p.addCurve(
to: pt(0, -0.20), to: pt(0.0, -0.45), // ( )
control1: pt(-1.25, 0.12), // left shoulder (wider) control1: pt(-1.22, -0.04), //
control2: pt(-0.80, -0.85) // left lobe top (lowered) control2: pt(-0.62, -1.02) //
) )
p.closeSubpath() p.closeSubpath()
return p return p
} }

View File

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