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