React Architecture Concept • Core Motion Model
SwiftUI Motion Runtime: Native Apple Hardware Springs
The ExodeUI SwiftUI runtime compiles visual motion canvas models into pure, native Apple SwiftUI components. By taking full advantage of Apple CoreAnimation and the SwiftUI .animation(.spring(...)) modifier, exported components achieve native 120 FPS performance on iPhone ProMotion displays with zero bundle overhead.
Apple SwiftUI utilizes response and dampingFraction rather than raw stiffness. ExodeUI automatically calculates the mathematical conversion: response = 2π / √(stiffness/mass) and dampingFraction = damping / (2 · √(stiffness · mass)).
Runnable ExodeUI React Implementation
Production ReadyMount the ExodeUICanvas component and bind parameters declaratively without imperative lifecycle hooks:
import SwiftUI
import ExodeRuntime
struct LivingCardView: View {
@State private var isExpanded = false
var body: some View {
VStack {
Text("Native SwiftUI Component")
.font(.headline)
if isExpanded {
Text("Expanded with Apple native spring physics.")
.font(.subheadline)
.foregroundColor(.secondary)
}
}
.padding()
.background(Color(.systemBackground))
.cornerRadius(16)
.shadow(radius: isExpanded ? 16 : 4)
.scaleEffect(isExpanded ? 1.04 : 1.0)
.animation(.spring(response: 0.38, dampingFraction: 0.72), value: isExpanded)
.onTapGesture {
isExpanded.toggle()
}
}
}Frequently Asked Questions about swiftui motion runtime
Does ExodeUI require CocoaPods or Swift Package Manager?
You can export pure SwiftUI code with zero dependencies, or include the ExodeRuntime Swift Package for advanced finite state machines.