phase property

MorphPhase get phase

The semantic phase derived from progress; consumers react to this instead of comparing raw values against magic numbers.

Implementation

MorphPhase get phase {
  if (!isAnimating && !_scrubbing) {
    return _target >= 1 ? .settled : .idle;
  }
  return switch (progress) {
    < 0.4 => .detaching,
    < 0.8 => .travelling,
    _ => .arriving,
  };
}