Swiftpack.co - ValentinWalter/LiquidShape as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by ValentinWalter.
ValentinWalter/LiquidShape v1.0.0
An animated liquid shape for SwiftUI.
⭐️ 6
🕓 1 year ago
iOS macOS
.package(url: "https://github.com/ValentinWalter/LiquidShape.git", from: "v1.0.0")

Preview GIF

LiquidShape

An animated liquid shape for SwiftUI.

Preview Xcode Canvas
import SwiftUI
import LiquidShape

struct MyView: View {
  var body: some View {
    Liquid()
      .foregroundColor(.blue)
    
    // or
    Liquid(speed: 0.5)
  }
}

Advanced

For advanced use, check out the Shape itself.

Preview Xcode Canvas
TimelineView(.animation) { ctx in
  Liquid.Shape(
    time: 4 * ctx.date.timeIntervalSince1970,
    scale: 12 * .pi,
    amplitude: 20,
    contentMode: .contain,
    resolution: .pi / 2
  )
}
Preview Xcode Canvas

To experiment with parameters, use the included debug view.

Liquid.debug()

Install

LiquidShape is a Swift Package. Add via Xcode File > Add Packages... or drop this in your Package.swift dependencies:

.package(url: "https://github.com/ValentinWalter/LiquidShape/", from: "1.0.0")

GitHub

link
Stars: 6
Last commit: 1 year ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

🌊 LiquidShape 1.0
1 year ago

This release is dedicated to my good friend Paul.

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