Release.toHalt constructor

Release.toHalt(
  1. ReleaseContext data
)

Decay-only plan: physics-derived friction phases per axis, no settle. The rect ends wherever the physics naturally halts. Useful as a building block for flows that compose decay with a custom finalize step (e.g., dismiss to origin).

Implementation

factory Release.toHalt(ReleaseContext data) {
  final plan = Release.toDisplay(data);
  return Release(
    x: HorizontalRelease(
      direction: plan.x.direction,
      startZone: plan.x.startZone,
      endZone: plan.x.endZone,
      decay: plan.x.decay,
    ),
    y: VerticalRelease(
      direction: plan.y.direction,
      startZone: plan.y.startZone,
      endZone: plan.y.endZone,
      decay: plan.y.decay,
    ),
    scale: ScaleRelease(
      direction: plan.scale.direction,
      startZone: plan.scale.startZone,
      endZone: plan.scale.endZone,
      decay: plan.scale.decay,
    ),
  );
}