Add tank catalog with USDZ models and tank selection
Introduce TankDefinition/TankCatalog loaded from Tanks.json, bundle the Drachengas USDZ tank models, add tank selection and preview views, and update the AR experience, editor and project views to use the catalog. Includes tests for catalog loading and model selection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@ -10,6 +10,7 @@ import SwiftData
|
||||
|
||||
struct ProjectDetailView: View {
|
||||
@Bindable var project: Project
|
||||
@State private var isARPresented = false
|
||||
|
||||
var body: some View {
|
||||
TabView {
|
||||
@ -37,13 +38,11 @@ struct ProjectDetailView: View {
|
||||
)
|
||||
}
|
||||
|
||||
Section("Tankauswahl") {
|
||||
TankEditor(tank: $project.tank)
|
||||
}
|
||||
TankSelectionSection(tank: $project.tank)
|
||||
}
|
||||
.safeAreaInset(edge: .bottom) {
|
||||
NavigationLink {
|
||||
ARExperienceView(project: project)
|
||||
Button {
|
||||
isARPresented = true
|
||||
} label: {
|
||||
Label("AR-Modus starten", systemImage: "arkit")
|
||||
.font(.headline)
|
||||
@ -53,6 +52,9 @@ struct ProjectDetailView: View {
|
||||
.buttonStyle(.borderedProminent)
|
||||
.padding()
|
||||
}
|
||||
.fullScreenCover(isPresented: $isARPresented) {
|
||||
ARExperienceView(project: project)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user