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

zero inertia option #10

Open
Fil opened this issue Nov 30, 2017 · 3 comments
Open

zero inertia option #10

Fil opened this issue Nov 30, 2017 · 3 comments

Comments

@Fil
Copy link
Owner

Fil commented Nov 30, 2017

it should be easy to unset inertia

Fil added a commit that referenced this issue Apr 8, 2018
@nirazul
Copy link

nirazul commented Dec 17, 2020

I've just implemented your inertia library, really nice!
What I'm missing, and I think it would be rather easy to implement, is an option to choose how much inertia I'd like to have. So it's like this ticket, but more of an option between zero and full inertia: 0 to 1
I've (shortly) studied your code, but haven't seen a straightforward way to implement a variable. Maybe the magic number 1000?

@Fil
Copy link
Owner Author

Fil commented Dec 17, 2020

1000 is the conversion from ms to seconds :)
If I remember correctly the magic number is A = 5000 (5 seconds) in https://github.com/Fil/d3-inertia/blob/master/src/index.js#L83
Contributions welcome!

@nirazul
Copy link

nirazul commented Dec 18, 2020

@Fil Thanks for your reply! Rather than the time, I'm talking about some sort of "friction" to apply to the inertia, not the amount of time that the projection is easing out, but the distance that the projection is being changed after the cursor stopped dragging it.
Do you have any pointers for that? In any case, I'll have a stab on it and try if I can get to a solution :)

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

No branches or pull requests

2 participants