-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Support lottie-react-native for RNW vNext #3278
Comments
This would be a great thing to do after we have our view managers story up and running (after M3). |
Everything in there seems to be for C# .NET and I don't really see a C++/WinRT way of using that. |
Accidental close |
Partner is currently unblocked with their existing lottie implementation. We will need to wait for some improvements from Composition before lottie support can be added without either codegen or the overhead of .NET. Moving to M5 as we no longer need this to exist M4. |
PR started here: lottie-react-native/lottie-react-native#692 |
I don't think it should matter. Frames are floating point numbers so they're already subject to rounding elsewhere in the system. Do you have any repros where it's definitely displaying the wrong thing so that I can investigate? |
You should be able to pass a stream to LottieVisualSource. That API was hidden due to a missing attribute, but that has been fixed and will be available in V7.0 (preview expected this week). |
Looking at the 7.0.0-preview4 now. The UI threading issues has nothing to do with LottieWindows and were just how I wrote my prototype - explicitly dispatching everything on the UI thread to avoid thread mismatch issues and just prove I could get their example app up and running. I have since then gone through and redone the threading properly. |
@jonthysell I took a stab at a C++/WinRT implementation. |
@aschultz I'm glad to see another implementation, I'll take a look at it. I think, unfortunately, there's no solution that meets everyone's needs:
Until there's a full C++ implementation of lottie, with loading json at runtime, I think we'll need both solutions, and let app developers pick which version works best for them. For some customers, requiring them to publish a native app update to change assets is a deal-breaker. For other customers, introducing managed code (especially having to switch to a managed app) is a deal-breaker. |
@jonthysell I was thinking that the C++/WinRT version might work for both scenarios. It defers the loading of the IAnimatedVisualSource back to the app (via
A C++ app could elect to only implement GetSourceFromName for now, and then add support for JSON once a better dynamic loader is available to them. This also allows use of both modes in the same app -- codegen for built-in animations, JSON for remotely fetched content -- based on whether the React code passes in a string or JSON for a source. |
@jonthysell @aschultz Do we think that we'll be able to have a canonical C++/WinRT version that works for both scenarios? If not, how can we guide people looking for lottie to an option that works for them? Do we need a fork? Does one get merged with a readme presenting the other as an option? How do we get this more discoverable than 2 in progress PRs? (#714 and #700) |
hey guys, lottie-react-native 4.0.0 has been finally released. Sorry for the delay, it has been very painful to test and still I think there may be some issues so I would appreciate if you could give it a try. BTW, react-native-safe-modules 1.0.1 has also been released including @jonthysell changes |
I've signed off on lottie-react-native/lottie-react-native#714, hopefully this will make it easier for people to take the dependency on it. |
https://github.com/react-native-community/lottie-react-native
Used by 62k repos and about 12k stars.
The text was updated successfully, but these errors were encountered: