feat: 引入ready状态的lottie动画
This commit is contained in:
parent
c4ed6c1116
commit
b036f3d18e
1
wake/Assets/Lottie/ready.json
Normal file
1
wake/Assets/Lottie/ready.json
Normal file
File diff suppressed because one or more lines are too long
@ -410,7 +410,7 @@ struct BlindBoxView: View {
|
|||||||
VStack(spacing: 20) {
|
VStack(spacing: 20) {
|
||||||
switch animationPhase {
|
switch animationPhase {
|
||||||
case .loading:
|
case .loading:
|
||||||
LottieView(name: "loading", isPlaying: animationPhase == .loading && !showScalingOverlay)
|
LottieView(name: "ready", isPlaying: animationPhase == .loading && !showScalingOverlay)
|
||||||
.frame(width: 300, height: 300)
|
.frame(width: 300, height: 300)
|
||||||
// .onAppear {
|
// .onAppear {
|
||||||
// DispatchQueue.main.asyncAfter(deadline: .now() + 6) {
|
// DispatchQueue.main.asyncAfter(deadline: .now() + 6) {
|
||||||
@ -422,7 +422,7 @@ struct BlindBoxView: View {
|
|||||||
|
|
||||||
case .ready:
|
case .ready:
|
||||||
ZStack {
|
ZStack {
|
||||||
LottieView(name: "data", isPlaying: animationPhase == .ready && !showScalingOverlay)
|
LottieView(name: "ready", isPlaying: animationPhase == .ready && !showScalingOverlay)
|
||||||
.frame(width: 300, height: 300)
|
.frame(width: 300, height: 300)
|
||||||
|
|
||||||
// Add a transparent overlay to capture taps
|
// Add a transparent overlay to capture taps
|
||||||
@ -454,7 +454,7 @@ struct BlindBoxView: View {
|
|||||||
case .opening:
|
case .opening:
|
||||||
ZStack {
|
ZStack {
|
||||||
if !showMedia {
|
if !showMedia {
|
||||||
LottieView(name: "open", loopMode: .playOnce, isPlaying: !showMedia)
|
LottieView(name: "ready", loopMode: .playOnce, isPlaying: !showMedia)
|
||||||
.frame(width: 300, height: 300)
|
.frame(width: 300, height: 300)
|
||||||
.scaleEffect(scale)
|
.scaleEffect(scale)
|
||||||
}
|
}
|
||||||
@ -497,8 +497,11 @@ struct BlindBoxView: View {
|
|||||||
|
|
||||||
case .none:
|
case .none:
|
||||||
// 首帧占位,避免加载时闪烁
|
// 首帧占位,避免加载时闪烁
|
||||||
Color.clear
|
LottieView(name: "ready", loopMode: .loop, isPlaying: true)
|
||||||
.frame(width: 300, height: 300)
|
.frame(width: 300, height: 300)
|
||||||
|
.scaleEffect(scale)
|
||||||
|
// Color.clear
|
||||||
|
// .frame(width: 300, height: 300)
|
||||||
// SVGImage(svgName: "BlindNone")
|
// SVGImage(svgName: "BlindNone")
|
||||||
// .frame(width: 300, height: 300)
|
// .frame(width: 300, height: 300)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user