mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-28 23:54:32 +00:00
Restored files from old Mac, force pushing
This commit is contained in:
parent
5dd95228b8
commit
5040381840
126 changed files with 10431 additions and 67 deletions
33
DynamicIsland/components/Music/LottieAnimationView.swift
Normal file
33
DynamicIsland/components/Music/LottieAnimationView.swift
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
//
|
||||
// LottieAnimationView.swift
|
||||
// boringNotch
|
||||
//
|
||||
// Created by Richard Kunkli on 2024. 10. 29..
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import Lottie
|
||||
import LottieUI
|
||||
import Defaults
|
||||
|
||||
struct LottieAnimationView: View {
|
||||
let state1 = LUStateData(type: .loadedFrom(URL(string: "https://assets9.lottiefiles.com/packages/lf20_mniampqn.json")!), speed: 1.0, loopMode: .loop)
|
||||
@Default(.selectedVisualizer) var selectedVisualizer
|
||||
var body: some View {
|
||||
if selectedVisualizer == nil {
|
||||
LottieView(state: state1)
|
||||
} else {
|
||||
LottieView(
|
||||
state: LUStateData(
|
||||
type: .loadedFrom(selectedVisualizer!.url),
|
||||
speed: selectedVisualizer!.speed,
|
||||
loopMode: .loop
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
LottieAnimationView()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue