-
Notifications
You must be signed in to change notification settings - Fork 102
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
Introduced ability to declare a custom interpolator #68
Introduced ability to declare a custom interpolator #68
Conversation
Any status on this? I want to rewrite my slider library using Animated, but I think I need this functionality so I don't regress on features 😕 |
There was originally push back on this in the beginning, although I forget why. Possibly because with animated moving native there is no ability for this to ship to the native world. |
Appreciate the quick response. Interesting... I'm a little confused on this library. Is this still the Native stuff as well or is that a completely separate repo now? Is there any way to do interpolation now until this PR could be considered? Watched the talk on this and was completely sold so I'd love to start using it in all my animation projects. Edit Sorry, looked around and noticed it's merged into React Native. But then I saw this AnimatedWeb file while poking around so I'm even more confused 😞 can you shed any light? I'm just not sure what to use haha. |
This library supports both
Animated does support interpolation out of the box - this PR is just a different approach to doing interpolation. Check out the docs for how to do interpolation now |
This can't be right - as far as I understand all animation, even those given to the native thread via |
@souporserious This was ripped out of React Native and can technically evolve separate of RN but would like it to match as much as possible. I had a PR where I brought all the latest RN stuff and merged it back into here but still needs work to split stuff out to separate files. @julienvincent With the and here is the SpringAnimation if you want to look at it https://github.com/facebook/react-native/blob/8e81644f64b96ab4726ce37a6a328acbe4a32783/ReactAndroid/src/main/java/com/facebook/react/animated/SpringAnimation.java |
@vjeux is busy but if he gives the blessing then I'm happy to merge this. |
It's not very intuitive but you can pass a function to easing to achieve the same result. Would that solve your usecase? |
@browniefed Ah I see - I was sure it was still calculated by js. If it is happening in to native world then this will probably not be viable, unless people are happy with the JS API differing from the native one, which is probably not a good idea. @vjeux I'll need to give that a try - how does that work with relation to native? Are timing animations with Easing not calculated in the native realm? |
If you have custom js functions, you can't use the native driver unfortunately |
fwiw, I'm not opposed to this PR. |
Even if it means differing web api to native? |
This PR introduces the ability to use custom interpolation with Animatedjs. See #67 for more information.