mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-28 07:34:32 +00:00
Messed up some stuff
This commit is contained in:
parent
f8466c2027
commit
56cb69d856
7 changed files with 85 additions and 30 deletions
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
import SwiftUI
|
||||
import Defaults
|
||||
import Lottie
|
||||
|
||||
private let availableDirectories = FileManager
|
||||
.default
|
||||
|
|
@ -54,10 +55,25 @@ struct AnimationTransformConfig: Codable, Hashable, Equatable {
|
|||
var opacity: CGFloat = 1.0
|
||||
var paddingBottom: CGFloat = 0 // Allow adjustment to fill notch from bottom
|
||||
var expandWithAnimation: Bool = false // Whether notch should expand horizontally with animation
|
||||
var loopMode: AnimationLoopMode = .loop // Loop mode for animation
|
||||
|
||||
static let `default` = AnimationTransformConfig()
|
||||
}
|
||||
|
||||
enum AnimationLoopMode: String, Codable, CaseIterable {
|
||||
case loop = "Loop"
|
||||
case playOnce = "Play Once"
|
||||
case autoReverse = "Auto Reverse"
|
||||
|
||||
var lottieLoopMode: LottieLoopMode {
|
||||
switch self {
|
||||
case .loop: return .loop
|
||||
case .playOnce: return .playOnce
|
||||
case .autoReverse: return .autoReverse
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
enum AnimationSource: Codable, Hashable, Equatable {
|
||||
case lottieFile(URL) // Local file (in app support or bundle)
|
||||
case lottieURL(URL) // Remote URL
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue