Lottie Windows
v8.1.240821.1
Lottie-Windows是一个库,用于在您的应用程序中呈现Adobe After After Effects动画。该项目将窗口添加到洛蒂(Lottie)的工具家族中,也针对Android,iOS和Web。
Lottie simplifies the design-to-code workflow for bringing engaging, interactive vector animations to your Windows applications, with significant improvements in terms of performance, quality, and engineering efficiency over traditional approaches such as gifs, manually coded animations, etc. Lottie-Windows uses the Windows.UI.Composition APIs to provide smooth 60fps animations and resolution-independent vector graphics.

Lottie-Windows由3种相关产品组成:
此存储库还包含样本的源代码。
将Lottie动画集成到Winui 3或UWP项目中有两种选择。
选项#1,使用动态加载器
CommunityToolkit.WinUI.Lottie nuget软件包,用于winui项目(或UWP项目的CommunityToolkit.Uwp.Lottie )。Microsoft.Graphics.Win2D (1.0.5或以下版本)安装Winui Project(或Win2D.uwp和Microsoft.UI.Xaml )进行UWP项目。.xaml标记文件中添加: ...
xmlns:lottie="using:CommunityToolkit.WinUI.Lottie"
...
< AnimatedVisualPlayer >
< lottie : LottieVisualSource UriSource = " <asset path or web link to a json file> " />
</ AnimatedVisualPlayer > ...
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
xmlns:lottie="using:CommunityToolkit.Uwp.Lottie"
...
< muxc : AnimatedVisualPlayer >
< lottie : LottieVisualSource UriSource = " <asset path or web link to a json file> " />
</ muxc : AnimatedVisualPlayer >选项#2,使用Codegen(推荐)
dotnet tool install lottiegenlottiegen -InputFile MyAnimation.json -Language cs -WinUIVersion 3-WinUIVersion 2.X具体取决于Microsoft.UI.Xaml的版本cppwinrt和cppcx.xaml标记文件中添加: ...
xmlns:animatedvisuals="using:AnimatedVisuals"
...
< AnimatedVisualPlayer >
< animatedvisuals : MyAnimation />
</ AnimatedVisualPlayer > ...
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
xmlns:animatedvisuals="using:AnimatedVisuals"
...
< muxc : AnimatedVisualPlayer >
< animatedvisuals : MyAnimation />
</ muxc : AnimatedVisualPlayer >| 包裹 | 分支 | 地位 | 最新的Nuget版本 |
|---|---|---|---|
| communityToolkit.winui.lottie | 主要的 | ||
| communityToolkit.uwp.lottie | 主要的 | ||
| 洛蒂根 | 主要的 |
请使用GitHub问题进行错误报告和功能请求。
该项目采用了贡献者盟约定义的行为准则,以阐明我们社区的预期行为。有关更多信息,请参见.NET基金会行为守则。
该项目得到了.NET基金会的支持。