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.

expose property transitions to platform SDKs #6779

Closed

Description

@incanus

As in GL JS, we support paint property transitions (i.e animations over time) in core (see here) but not yet in the platform SDKs.

This is an enhancement to runtime styling, but not needed to ship that feature.

/cc @1ec5 @mollymerp @peterqliu

Activity

  1. added
    GL JS parity
    iOS
    macOS
    Android
    on Oct 21, 2016
  2. added this to the ios-future milestone on Oct 21, 2016
  3. 1ec5 commented on Oct 21, 2016

    @1ec5
    Contributor

    mbgl does support paint property transitions baked into the style. However, as far as I can tell, the concrete mbgl::style::Layer classes don’t support transitions as part of runtime styling. (They also doesn’t support setting properties per style class: #5948.)

  4. 1ec5 commented on Oct 21, 2016

    @1ec5
    Contributor

    Also, mbgl does support setting a global paint property duration and delay, via mbgl::Map::setTransitionOptions(). However, in the iOS and macOS SDKs, -[MGLStyle setStyleClasses:transitionDuration:] is currently private; its only caller is -[MGLStyle setStyleClasses:].

  5. incanus commented on Nov 1, 2016

    @incanus
    ContributorAuthor

    I've done some experiments with this using the approach outlined here (under Animating Non-Visual Properties), which leverages CALayer's ability to interpolate various types of values (numbers, colors, etc.) and, within a CABasicAnimation, repeatedly sets them in the runtime styling API through the use of the presentationLayer values.

    pulse

    rotate

    This isn't high priority right now, but I will get back to this in the near future.

  6. incanus commented on Nov 1, 2016

    @incanus
    ContributorAuthor

    Similarly, @cammace was able to do something a lot like this on Android using ValueAnimator in the demo app. We could probably build out similar APIs on both platforms using the built-in animators of each.

  7. self-assigned this
    on Jan 12, 2017
  8. incanus commented on Jan 13, 2017

    @incanus
    ContributorAuthor

    Re: #6779 (comment), I'm going to sidestep anything related to style classes right now due to #5948 (comment).

    Instead, I'm working on global/per-map setters & getters that can be used for broad style URL changes as well as runtime styling. I've confirmed that such things work when set globally (so, you could set a global duration of five seconds, then change a runtime styling property and see it animate in over that duration).

  9. modified the milestones: ios-v3.5.0, ios-future on Jan 13, 2017
  10. added a commit that references this issue on Jan 13, 2017
  11. added a commit that references this issue on Jan 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

AndroidGL JS parityfeatureiOSmacOSruntime styling

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions