mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
Update README.md
This commit is contained in:
parent
6a4a4bba98
commit
7d642a1da3
1 changed files with 20 additions and 1 deletions
21
README.md
21
README.md
|
@ -281,9 +281,28 @@ The result is:
|
||||||
<br />
|
<br />
|
||||||
## Lottie
|
## Lottie
|
||||||
|
|
||||||
ThorVG supports the most powerful Lottie Animation [features](https://lottiefiles.com/supported-features). Lottie is a JSON-based vector animation file format that enables seamless distribution of animations on any platform, akin to shipping static assets. These files are compact and compatible with various devices, scaling up or down without pixelation. With Lottie, you can easily create, edit, test, collaborate, and distribute animations in a user-friendly manner. For more information, please visit [Lottie Animation Community](https://lottie.github.io/)' website. <br />
|
ThorVG supports the most powerful Lottie Animation [features](https://lottiefiles.com/supported-features). Lottie is an industry standard, JSON-based vector animation file format that enables seamless distribution of animations on any platform, akin to shipping static assets. These files are compact and compatible with various devices, scaling up or down without pixelation. With Lottie, you can easily create, edit, test, collaborate, and distribute animations in a user-friendly manner. For more information, please visit [Lottie Animation Community](https://lottie.github.io/)' website. <br />
|
||||||
|
<br />
|
||||||
|
ThorVG offers great flexibility in building its binary. Besides serving as a general graphics engine, it can be configured as a compact Lottie animation playback library with specific build options:
|
||||||
|
|
||||||
|
```
|
||||||
|
$meson setup builddir -Dloaders="lottie"
|
||||||
|
```
|
||||||
|
|
||||||
|
Alternatively, to support additional bitmap image formats:
|
||||||
|
|
||||||
|
```
|
||||||
|
$meson setup builddir -Dloaders="lottie, png, jpg, webp"
|
||||||
|
```
|
||||||
|
|
||||||
|
Please note that ThorVG supports Lottie Expressions by default. Lottie Expressions are small JavaScript code snippets that can be applied to animated properties in your Lottie animations, evaluating to a single value. This is an advanced feature in the Lottie specification and may impact binary size and performance, especially when targeting small devices such as MCUs. If this feature is not essential for your requirements, you can disable it using the `extra` build option in ThorVG:
|
||||||
|
|
||||||
|
```
|
||||||
|
$meson setup builddir -Dloaders="lottie" -Dextra=""
|
||||||
|
```
|
||||||
|
|
||||||
The following code snippet demonstrates how to use ThorVG to play a Lottie animation.
|
The following code snippet demonstrates how to use ThorVG to play a Lottie animation.
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
auto animation = tvg::Animation::gen(); //generate an animation
|
auto animation = tvg::Animation::gen(); //generate an animation
|
||||||
auto picture = animation->picture() //acquire a picture which associated with the animation.
|
auto picture = animation->picture() //acquire a picture which associated with the animation.
|
||||||
|
|
Loading…
Add table
Reference in a new issue