Skip to content

heestand-xyz/Noise

Repository files navigation

Noise

Generate random smooth cloudy noise.

Swift Package

.package(url: "https://github.com/heestand-xyz/Noise", from: "2.0.0")

Examples

import SwiftUI
import Noise

struct ContentView: View {
    var body: some View {
        Noise(style: .noisy)
            .monochrome()
    }
}

struct ContentView: View {
    var body: some View {
        Noise(style: .smooth)
            .monochrome()
            .brightness(1.5)
    }
}

struct ContentView: View {
    var body: some View {
        Noise(style: .random)
            .monochrome()
    }
}

struct ContentView: View {
    var body: some View {
        Noise(style: .custom(octaves: 4))
            .brightness(1.5)
    }
}

struct ContentView: View {
    var body: some View {
        ZStack {
            Color.black
            Noise(style: .custom(octaves: 5))
                .monochrome()
                .tint(.red)
            Noise(style: .smooth)
                .monochrome()
                .tint(.yellow)
                .seed(2)
                .blendMode(.screen)
        }
    }
}

struct ContentView: View {
    var body: some View {
        Noise(style: .smooth, speed: 1.0)
            .monochrome()
    }
}

Graphics Powered by SwiftUI Metal Shaders

Original Noise by Eliot Eshelman

About

*Random Smooth Cloudy* Noise for SwiftUI

Resources

License

Stars

Watchers

Forks

Packages

No packages published