You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Use animators for gestures and camera animations #8175
The Android SDK should use animators to drive camera transitions in response to gestures and calls to methods like animateTo(). We should move off mbgl::AnimationOptions and use the mbgl::Transform methods only for incremental transform changes on each frame of the animation.
A key benefit is that the Android SDK will be able to implement concurrent animations (#3625) without us having to design an API around tweening, spring solving, or the like.
@tobrun started doing this as part of #8031. Perhaps there’s also prior art in the Qt SDK, where we’ve always relied on Qt animation APIs instead of mbgl’s.
gesture animators have landed as part of the gesture rework from @LukasPaczos
camera animators are supported though need to be self written by end users and hooked up to CameraUpdateFactory#moveCamera. We will keep using the core animations mainly to allow prefetching tiles for doing flyTo at some point.
Activity
1ec5 commentedon Aug 23, 2017
#9808 (comment) demonstrates an implementation of animator-driven camera animations. 😍
tobrun commentedon Aug 23, 2017
WIP code for that in https://github.com/mapbox/mapbox-gl-native/tree/tvn-android-animations
tobrun commentedon Oct 4, 2017
The base API for this has landed in #10001, though we still need to hook our gestures and other animations into it. Reopening.
tobrun commentedon Mar 9, 2018
To clarify that why this was closed:
CameraUpdateFactory#moveCamera. We will keep using the core animations mainly to allow prefetching tiles for doing flyTo at some point.