-
-
Save sturdysturge/048e0a0203c230a9f8cb76ef58b84c24 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import RealityKit | |
import SwiftUI | |
struct ContentView : View { | |
static let arView = ARView(frame: UIScreen.main.bounds) | |
static let boxAnchor = try! Experience.loadBox() | |
static let steelBox = boxAnchor.steelBox! | |
static let waypoint = ModelEntity(mesh: .generatePlane(width: 0.1, depth: 0.1)) | |
static let speed = Float(0.2) | |
var body: some View { | |
GeometryReader { geometry in | |
ZStack { | |
ARViewContainer(boxAnchor: Self.boxAnchor, arView: Self.arView, waypoint: Self.waypoint) | |
Text("⚀") | |
.font(.largeTitle) | |
.frame(maxWidth: .infinity, maxHeight: .infinity) | |
MoveButton { | |
// Self.setWaypoint(centre: geometry.frame(in: .global).centre) | |
} | |
} | |
} | |
.edgesIgnoringSafeArea(.all) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment