Transform::flyTo loses more precision than Transform::easeTo when animating. Example:
Given point A LatLng { -45, -135 } and point B LatLng { 45, 135 }:
Transform::easeTo from point A to B: LatLng { 44.999999999695532, 135.00000000038369 }
45 - 44.999999999695532 = 3.0446756E-10135 - 135.00000000038369 = -3.8369308E-10Transform::flyTo from point B to A: LatLng { -44.999808628745399, -135.00024116863571 }
-45 + 44.999808628745399 = -1.9137125E-4-135 + 135.00024116863571 = 2.4116863E-4The exponent of precision loss from easeTo is -10, while flyTo is -4.
/cc @1ec5
This regression was caused by the additional point-latLng-point round trip added in #3301. I wonder how GL JS gets better precision out of that approach.
From #9199:
Finally, the point interpolation is tweaked so that at the end of the flying (when k === 1) it ends up at the exact end point. I didn't see any bugs related to this, but it seems like a good thing to have explicitly.
This changes the consequences of this bug: instead of ending up at the slightly wrong position at the end of flyTo, it animates to the wrong position, then suddenly snaps to the correct position at the very end.
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.
I guess one way to alleviate this issue would be converting the geographical coordinate all the way into tile coordinates, and keep using that when interpolating.
To be honest, I'd love to see easeTo and flyTo outside of the GL Native core code, and implemented externally as part of a client-side animation interface. /cc @tmpsantos
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.
Most helpful comment
I guess one way to alleviate this issue would be converting the geographical coordinate all the way into tile coordinates, and keep using that when interpolating.
To be honest, I'd love to see
easeToandflyTooutside of the GL Native core code, and implemented externally as part of a client-side animation interface. /cc @tmpsantos