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:
@ -31,9 +31,18 @@ enum PipeRouteEntityFactory {
|
||||
static func makeSegment(from start: SIMD3<Float>, to end: SIMD3<Float>) -> ModelEntity {
|
||||
let segment = makeSegmentBase()
|
||||
configureSegment(segment, from: start, to: end)
|
||||
segment.collision = CollisionComponent(shapes: [
|
||||
ShapeResource.generateBox(size: SIMD3(0.08, 0.08, 1))
|
||||
])
|
||||
segment.components.set(InputTargetComponent())
|
||||
return segment
|
||||
}
|
||||
|
||||
static func setSegmentColor(_ segment: Entity, color: UIColor) {
|
||||
guard let model = segment as? ModelEntity else { return }
|
||||
model.model?.materials = [UnlitMaterial(color: color)]
|
||||
}
|
||||
|
||||
/// Basis-Segment der Länge 1 m (entlang +Z) – für die Live-Vorschau wiederverwendbar.
|
||||
static func makeSegmentBase() -> ModelEntity {
|
||||
ModelEntity(
|
||||
|
||||
Reference in New Issue
Block a user