Giter Club home page Giter Club logo

Comments (6)

kkaefer avatar kkaefer commented on May 12, 2024

Does the gesture recognizer do this? When I looked at the API, there was something like that in there.

from mapbox-gl-native.

incanus avatar incanus commented on May 12, 2024

No, it does on pan, but not on zoom. There is a bouncing effect on either pan or pinch, but this is just when hitting the limits.

The basic idea of deceleration over in #34 is described here: http://www.odysseyinc.com/blog/rotating-opengl-view-touch-gestures/ The offsets on the scroll view are used to drive a CADisplayLink, which hits the render() call during its own deceleration. I've had good luck with it before e.g. https://dl.dropboxusercontent.com/u/575564/ismapview.mp4 which is a map view I made in raw OpenGL ES which renders raster tiles as textures.

The problem is the zoom pinch gesture does not have any deceleration in UIScrollView.

from mapbox-gl-native.

incanus avatar incanus commented on May 12, 2024

We should use -[UIPinchGestureRecognizer velocity] for this with an easing animation.

from mapbox-gl-native.

incanus avatar incanus commented on May 12, 2024

Making this even lower priority, this sucks hard when you can't cancel other (i.e. pan) animations.

from mapbox-gl-native.

incanus avatar incanus commented on May 12, 2024

Cancel is now in via 28ee596

from mapbox-gl-native.

incanus avatar incanus commented on May 12, 2024

Implememented similarly to decelerated panning. It's hard to trigger since simultaneous pan/rotates can cancel the animation, but it's there in the unlikely event that you merely only pinch. May revisit if this needs tuning up once performance is better.

from mapbox-gl-native.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.