morphDragArm function
- double distance
The arm ramp for the commit cue: 0 below morphDragCommitDistance, smoothstepping to 1 over the next 60 px. Past the threshold the card visibly "arms" - extra recede, thinner scrim, a slight lean toward home - so the hand knows a release will close. A pure, reversible function of the displacement: backing off disarms the same way.
Implementation
double morphDragArm(double distance) {
final double t = (distance - morphDragCommitDistance) / 60;
if (t <= 0) {
return 0;
}
if (t >= 1) {
return 1;
}
return t * t * (3 - 2 * t);
}