A SwiftUI and Metal package for bautiful animated blob gradients.
Preview.mp4
Install the BlobGradient package using Swift Package Manager:
https://github.com/teodorszeltins/blob-gradient
Place BlobGradientView
in your app:
import SwiftUI
import BlogGradient
struct ContentView: View {
var body: some View {
BlobGradientView(
colors: [.blue, .pink, .yellow, .green],
blur: 100, // optional, defaults to 100
duration: 10.0 // optional, defaults to 10.0
)
.background(.green)
}
}
Who doesn't love a gradient? I use these in my projects. I got the original idea from FluidGradient, but it was made in CoreAnimaiton while this is Metal.