3D UI layout lib for SwiftUI
import SwiftUI
import UI3
struct ContentView: View {
var body: some View {
UI3 {
HStack {
Box()
Box().frame(width: 0.25)
VStack {
Box()
Box().frame(height: 0.25)
ZStack {
Box()
Box().frame(length: 0.25)
Box()
}
}
}
}
}
}
import SwiftUI
import UI3
struct ContentView: View {
var body: some View {
UI3 {
WStack {
Sphere()
.padding(edges: .all, length: 0.15)
Grid(x: 0..<3, y: 0..<3, z: 0..<3) {
Box()
.cornerRadius(0.025)
.padding(edges: .all, length: 0.1)
}
}
}
}
}
import SwiftUI
import UI3
struct ContentView: View {
var body: some View {
UI3 {
HStack {
Box().cornerRadius(0.1)
VStack {
ZStack {
Box().cornerRadius(0.1)
Model("suzanne.obj")
}
Box().cornerRadius(0.1)
}
}
}
}
}