diff --git a/README.md b/README.md index 597ab8e..a7b85ec 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ - [x] Streams support (Jellyfin/Plex like servers) - [x] External Metadata providers (TMDB, AniList) - [x] Background playback and Picture-in-Picture (PiP) support -- [x] External media player support (VLC, Infuse, Outplayer, nPlayer, SenPlayer, IINA) +- [x] External media player support (VLC, Infuse, Outplayer, nPlayer, SenPlayer, IINA, TracyPlayer) ## Installation diff --git a/Sora/Utils/SkeletonCells/Shimmer.swift b/Sora/Utils/SkeletonCells/Shimmer.swift index a5598c2..3575963 100644 --- a/Sora/Utils/SkeletonCells/Shimmer.swift +++ b/Sora/Utils/SkeletonCells/Shimmer.swift @@ -8,16 +8,18 @@ import SwiftUI struct Shimmer: ViewModifier { - @State private var phase: CGFloat = 0 + @State private var phase: CGFloat = -1 func body(content: Content) -> some View { content - .modifier(AnimatedMask(phase: phase).animation( - Animation.linear(duration: 1.5) - .repeatForever(autoreverses: false) - )) + .modifier(AnimatedMask(phase: phase) + .animation( + Animation.linear(duration: 1.2) + .repeatForever(autoreverses: false) + ) + ) .onAppear { - phase = 0.8 + phase = 1.5 } } @@ -33,21 +35,26 @@ struct Shimmer: ViewModifier { content .overlay( GeometryReader { geo in + let width = geo.size.width + let shimmerStart = phase - 0.25 + let shimmerEnd = phase + 0.25 Rectangle() .fill( LinearGradient( gradient: Gradient(stops: [ - .init(color: .clear, location: phase - 0.3), - .init(color: .white.opacity(0.5), location: phase), - .init(color: .clear, location: phase + 0.3) + .init(color: Color.white.opacity(0.05), location: shimmerStart - 0.15), + .init(color: Color.white.opacity(0.25), location: shimmerStart), + .init(color: Color.white.opacity(0.85), location: phase), + .init(color: Color.white.opacity(0.25), location: shimmerEnd), + .init(color: Color.white.opacity(0.05), location: shimmerEnd + 0.15) ]), startPoint: .leading, endPoint: .trailing ) ) - .rotationEffect(.degrees(30)) - .offset(x: -geo.size.width) - .offset(x: geo.size.width * 2 * phase) + .blur(radius: 8) + .rotationEffect(.degrees(20)) + .offset(x: -width * 0.7 + width * 2 * phase) } ) .mask(content)