动画一辆汽车在路上像乳房Animating a car on a road like Uber

- 此内容更新于:2015-01-27
主题:

原文:

I'm working on a bus tracking app and I am having a problem figuring out the proper animation duration so the bus will slow down until the network request has come back with its updated location. This is so there is less stop and go, and an overall smoother animation.

So far:

  1. point comes in, animation duration is set to distanceInMetersBetweenOldLocationAndNewLocation * .015
  2. animate!
  3. 5 seconds later, an updated location might come back.

Any ideas how to get it to slow down if the animation duration is less then the time left before the next sync?