Skip to content

ExamplesSwift/UI3

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UI3

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)
                }
            }
        }
    }
}

About

3D UI layout lib for SwiftUI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 100.0%