Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document easing function requirements #4182

Closed
stevage opened this issue Feb 2, 2017 · 3 comments
Closed

Document easing function requirements #4182

stevage opened this issue Feb 2, 2017 · 3 comments

Comments

@stevage
Copy link
Contributor

stevage commented Feb 2, 2017

https://www.mapbox.com/mapbox-gl-js/api/#AnimationOptions says:

easing (Function) : The animation's easing function.

But it doesn't say what arguments will be passed, nor what it should return.

I took a punt that it might be f(t, b, c, d) (from here) but that didn't seem to be right.

@stevage
Copy link
Contributor Author

stevage commented Feb 2, 2017

Ok, it looks like it's just f(t), where t is between 0 and 1, and you return a value between 0 and 1.

It's redundantly referred to at https://www.mapbox.com/mapbox-gl-js/api/#Map#flyTo as well.

@mourner
Copy link
Member

mourner commented Feb 2, 2017

Correct! Want to submit a PR that improves the docs on this?

@stevage
Copy link
Contributor Author

stevage commented Feb 3, 2017

Yeah, seems like something I could do - especially since you have such wonderful meta-documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants