-
Notifications
You must be signed in to change notification settings - Fork 110
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
Question: why d3-interpolate instead of Animated.interpolate? #8
Comments
Thank for the question. I have 2 reasons for using d3-interpolate:
And, relate to the issue #1 , that bug in Android could be fixed easily because we control interpolate's values. It would be great if someone can use Animated.interpolate can solve above problems, so we can remove d3-interpolate. |
I'm new to react-native and Animated + Svgs in particular. I haven't been able to get the content-loaing to work myself, but in response to your answer, this is as far as I understand it: For For The mapping function you defined:
is basically a
To prevent the offset output exceeding out of the [0,1] range for the offset, you could use the clamp mapping function:
Also on the docs:
Not sure if this is a special case because we're interacting with SVGs, but was a little skeptical because of this.
|
Isn't there a way to get a similar result using Animated.interpolate?
Is there a need to import d3-interpolate as well? Animated is already included within react-native.
The text was updated successfully, but these errors were encountered: