update method

void update(
  1. double delta,
  2. int spd
)

Implementation

void update(double delta, int spd) {
  viewfinder.x += shift.x * delta * spd;
  shift.x -= delta * spd * shift.x;
  final vspd = spd.abs() + (shift.y < 0 ? 50 : 1);
  viewfinder.y += shift.y * delta * vspd;
  shift.y -= delta * vspd;
  if (viewfinder.y < 0) viewfinder.y = 0;
}