.package(url: "https://github.com/heestand-xyz/MetalUI", from: "0.0.1")
import SwiftUI
import MetalUI
struct ContentView: View {
var body: some View {
ZStack {
Color.blue
.ignoresSafeArea()
Image("Superman")
.resizable()
.aspectRatio(contentMode: .fit)
.chromaKey(color: Color(red: 0.0,
green: 1.0,
blue: 0.0))
}
}
}
#Preview {
ContentView()
}
MetalUI.Kaleidoscope.mov
import SwiftUI
import MetalUI
struct ContentView: View {
@State var value: CGFloat = 0.0
var body: some View {
VStack {
Color.red
Color.green
Color.blue
}
.frame(width: 200, height: 200)
.kaleidoscope(count: 12, angle: .degrees(180))
}
}
#Preview {
ContentView()
}
import SwiftUI
import MetalUI
struct ContentView: View {
@State var value: CGFloat = 0.0
var body: some View {
VStack {
Text("Hello World")
.padding()
.border(Color.black)
.circleBlur(value * 10)
Slider(value: $value)
}
.padding()
.frame(width: 250)
}
}
#Preview {
ContentView()
}
import SwiftUI
import MetalUI
struct ContentView: View {
var body: some View {
Text("Hello, World!")
.foregroundStyle(.white)
.frame(maxWidth: .infinity,
maxHeight: .infinity)
.feedback { source, loop in
ZStack {
source
.opacity(0.1)
loop
.scaleEffect(1.01)
.opacity(0.99)
}
}
}
}
#Preview {
ContentView()
}
import SwiftUI
import MetalUI
struct ContentView: View {
var content: some View {
}
var body: some View {
HStack {
Image(systemName: "globe")
Text("Hello, World!")
}
.font(.system(size: 50, weight: .bold))
.padding()
.edge()
}
}
#Preview {
ContentView()
}
import SwiftUI
import MetalUI
struct ContentView: View {
var body: some View {
VStack {
Text("Hello, World!")
Text("Hello, World!")
.pixelate()
Text("Hello, World!")
.quickPixelate()
}
.font(.largeTitle)
}
}
#Preview {
ContentView()
}
import SwiftUI
import MetalUI
struct ContentView: View {
var body: some View {
Noise()
}
}
#Preview {
ContentView()
}