-
Notifications
You must be signed in to change notification settings - Fork 5
Extract gesture and physics configuration (Resolves #60) #62
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
base: main
Are you sure you want to change the base?
Extract gesture and physics configuration (Resolves #60) #62
Conversation
@dodgog do you wanna take a look at the changes made in this PR to the gesture widgets and see if it provides enough control for you? |
Matt, thank you so much for this PR. I think that there's still a couple of things we want for ultimate control. I'm wondering if we can just finish with all the constants being bundled into parameters. For example, the sigmoid tuning mentioned in the issue to be applied here:
Additionally, I think the goal of the refactor is to allow quick iteration of the physics in the consuming application. That means an ability to dependency inject the config into the page list viewport is really needed, unless I'm not understanding something about the design which you're proposing here. So, as an example, in our PDF reader, which uses the viewport, we want to be able to adjust a parameter like, for example, a multiplier for panning axis simulation initial velocity: |
@dodgog I piped ballistics into the Now Do you see any other property configurations that I added in this PR that need to be piped to Re: "sigmoid configuration" - I don't see the term "sigmoid" anywhere in the source code. I see that you copied a method into your last response, but since I don't know what you mean by sigmoid, and nothing is called a sigmoid, I'm not sure what exactly you're asking me to bundle and expose. |
Matt, this looks really great. Thank you. I think we are approaching perfection. I opened a pr in which I isolated the last few coefficients and defined a sigmoid. Could you have a look? #63 |
@dodgog after the initial velocity change, the scrolling tests broke. This breakage is not completely unexpected - changing velocity calculations are expected to impact our locked down ballistic motion. However, it would be good if you could confirm that you've used this package with the changes to the velocity multiplication, and that you really do want the new behavior. We can update the test to expect the newly reported values. Looking at the test failures, we're seeing things like |
Okay, this looks good. If we set the multipliers to 1 in tests, they shouldn't break. Would that be right? |
Extract gesture and physics configuration (Resolves #60)
Move hard-coded static values into properties and configuration objects.
I think I also must have regenerated the Android example project because there are a bunch of those files that changed in this PR, too.