JSON versus Codegen
Whether you choose to use a Bodymovin JSON file with a LottieVisualSource or a codegen’ed C# or C++ class depends on your application’s requirements. Both types of sources are ultimately consumed by the AnimatedVisualPlayer element, but with slightly different workflows. Here’s an overview of how the pieces fit in:
The tradeoffs between using JSON and Codegen are as follows:
JSON | Codegen |
---|---|
Can be loaded from a URI at run-time — this enables Lottie animations to be updated over the network, without updating the application. | Better performance: there is no need to parse and translate JSON at run-time on the application’s UI thread, and, since the resulting Windows.UI.Composition tree is generated ahead of time, it can be better optimized. |
Allows dynamic modification of Lottie animations by editing the generated Windows.UI.Composition Visual tree. This is useful for theming, branding, accessibility, etc. (see related scenario sample). |
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기