CommunityToolkit/Lottie-Windows
소개
Lottie-Windows는 Windows 10 및 Windows 11에서 Lottie 애니메이션을 렌더링하기 위한 라이브러리와 관련 도구입니다.
디자인 및 미디어측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- +1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalLottie-Windows
Lottie-Windows is a library for rendering Adobe After Effects animations natively in your application. This project adds Windows to the Lottie family of tools also targeting Android, iOS, and 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 consists of 3 related products:
- Lottie-Windows library for parsing and translating Bodymovin JSON files
- LottieGen command-line tool for generating C# or C++ code to be used instead of JSON
- Lottie Viewer application for previewing JSON and also generating code
This repo also contains source code for samples.
Quick start
There are two options to integrate Lottie animations into your WinUI 3 or UWP project.
Option #1, using dynamic loader
- Install
CommunityToolkit.WinUI.Lottienuget package for WinUI project (orCommunityToolkit.Uwp.Lottiefor UWP project). - If you are using C# you may also need to install
Microsoft.Graphics.Win2D(version 1.0.5 or below) for WinUI project (orWin2D.uwpandMicrosoft.UI.Xamlfor UWP project). - In your
.xamlmarkup file add:
or for UWP project:... 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.WinUI.Lottie" ... <muxc:AnimatedVisualPlayer> <lottie:LottieVisualSource UriSource="<asset path or web link to a json file>" /> </muxc:AnimatedVisualPlayer>
Option #2, using codegen (recommended)
- Install codegen tool using
dotnet tool install lottiegenin powershell - Run codegen tool
lottiegen -InputFile MyAnimation.json -Language cs -WinUIVersion 3.0- For UWP projects use
-WinUIVersion 2.Xdepending on the version ofMicrosoft.UI.Xaml - Other language options:
cppwinrtandcppcx
- For UWP projects use
- Add generated source files to the project
- Install packages from step 2 of Option #1 if needed.
- In your
.xamlmarkup file add:
or for UWP project:... 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>
Supported SDKs
- May 2019 Update (18362) and later
Documentation
Build Status
| Package | Branch | Status | Latest nuget version |
|---|---|---|---|
| CommunityToolkit.WinUI.Lottie | main | ||
| CommunityToolkit.Uwp.Lottie | main | ||
| LottieGen | main |
Feedback and Requests
Please use GitHub Issues for bug reports and feature requests.
Principles
This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information see the .NET Foundation Code of Conduct.
.NET Foundation
This project is supported by the .NET Foundation.
관련 프로젝트 살펴보기
불러오는 중…