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:
30
GasTankAR/Views/TankSelectionSection.swift
Normal file
30
GasTankAR/Views/TankSelectionSection.swift
Normal file
@ -0,0 +1,30 @@
|
||||
//
|
||||
// TankSelectionSection.swift
|
||||
// GasTankAR
|
||||
//
|
||||
// Created by Dennis Nemec on 14.09.26.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
/// Gemeinsame „Tankauswahl"-Section mit 3D-Vorschau und Editor. Wird sowohl beim
|
||||
/// Erstellen (`ProjectCreateView`) als auch beim Bearbeiten (`ProjectDetailView`)
|
||||
/// eines Projekts verwendet, damit Änderungen an einer Stelle gepflegt werden.
|
||||
struct TankSelectionSection: View {
|
||||
@Binding var tank: Tank
|
||||
|
||||
var body: some View {
|
||||
Section("Tankauswahl") {
|
||||
TankPreview(tank: tank)
|
||||
|
||||
TankEditor(tank: $tank)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
@Previewable @State var tank = Tank()
|
||||
return Form {
|
||||
TankSelectionSection(tank: $tank)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user