Skip to content

teodorszeltins/blob-gradient

Repository files navigation

A SwiftUI and Metal package for bautiful animated blob gradients.

Preview

Preview.mp4

Usage

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)
    }
}

Why?

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.

Credit

About

A SwiftUI and Metal package for bautiful animated blob gradients.

Topics

Resources

License

Stars

Watchers

Forks