Initial commit for first version of project

This commit is contained in:
Dennis Nemec
2026-09-02 20:54:36 +02:00
parent 3d9f1ab6bc
commit 992bb32025
56 changed files with 5139 additions and 31 deletions

View File

@ -0,0 +1,29 @@
//
// ARViewContainer.swift
// GasTankAR
//
// Created by Dennis Nemec on 26.08.26.
//
import SwiftUI
import RealityKit
/// Dünner UIKit-Adapter: hostet nur die `ARView` und übergibt sie an den Controller.
/// Enthält bewusst keine Logik.
struct ARViewContainer: UIViewRepresentable {
let controller: ARSessionController
func makeCoordinator() -> ARSessionController { controller }
func makeUIView(context: Context) -> ARView {
let view = ARView(frame: .zero)
context.coordinator.attach(to: view)
return view
}
func updateUIView(_ uiView: ARView, context: Context) {}
static func dismantleUIView(_ uiView: ARView, coordinator: ARSessionController) {
MainActor.assumeIsolated { coordinator.detach() }
}
}