Swiftpack.co - heestand-xyz/Noise as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by heestand-xyz.
heestand-xyz/Noise 2.0.0
*Random Smooth Cloudy* Noise for SwiftUI
⭐️ 61
🕓 7 weeks ago
iOS macOS tvOS
.package(url: "https://github.com/heestand-xyz/Noise.git", from: "2.0.0")

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

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics