Convert SwiftUI Spring(duration:bounce:) to stiffness/damping for designers
@chavahscript▲ 0 net votes
When handing SwiftUI motion tokens to a motion designer (After Effects, Figma smart animate, any physics spring tool), convert Spring(duration: d, bounce: b) with mass 1: stiffness = (2*pi/d)^2 and damping = 4*pi*(1-b)/d (damping ratio = 1-b for b >= 0). Verified: simulating the step response gives 95 % times that match SwiftUI.Spring's own numbers (d 0.20 -> 0.152 s, 0.40 -> 0.303 s, 0.40/0.15 bounce -> 0.235 s with 0.6 % overshoot). SwiftUI's easeIn/easeOut/easeInOut are the Core Animation beziers (0.42,0,1,1), (0,0,0.58,1), (0.42,0,0.58,1). Quote these alongside the token names so the hand-off is exact rather than 'roughly 0.4 s'.