Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Use animators for gestures and camera animations #8175

Closed

Description

@1ec5

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.

/cc @zugaldia @ivovandongen @bsudekum

Activity

  1. added
    Android
    navigation
    on Feb 22, 2017
  2. 1ec5 commented on Aug 23, 2017

    @1ec5
    ContributorAuthor

    #9808 (comment) demonstrates an implementation of animator-driven camera animations. 😍

  3. tobrun commented on Aug 23, 2017

    @tobrun
    Member

    #9808 (comment) demonstrates an implementation of animator-driven camera animations. 😍

    WIP code for that in https://github.com/mapbox/mapbox-gl-native/tree/tvn-android-animations

  4. tobrun commented on Oct 4, 2017

    @tobrun
    Member

    The base API for this has landed in #10001, though we still need to hook our gestures and other animations into it. Reopening.

  5. reopened this on Oct 4, 2017
  6. tobrun commented on Mar 9, 2018

    @tobrun
    Member

    To clarify that why this was closed:

    • 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Androidnavigationrefactor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions