LottieAnimation
Last updated
Was this helpful?
Last updated
Was this helpful?
LottieAnimation instances can render animations in the Lottie format. Lottie files are animated files, usually with vector art, which serve as an alternative to gifs. Since they are often vector art, Lottie files can be resized without pixelation.
Lottie files can be downloaded from various sites or created in application such as Adobe After Effects. If you are interested in testing out Lottie animations, you may want to check lottiefiles.com for sample Lottie files.
The following shows a Lottie animation playing in Gum. Source file: https://lottiefiles.com/free-animation/city-skyline-HFnJYQZLPP
The Source File variable controls the lottie animation displayed. This value can be set and changed just like source files on other elements such as a .png on a Sprite.
Width and Height values can be set on a Lottie file just like any other Gum element. Unlike rasterized objects such as Sprites, LottieAnimations use Vector art so they can be resized and still retain crisp edges and details.
LottieAnimations are still rasterized in Gum, so they display pixels when the view is zoomed in, especially if the LottieAnimation has a small Width or Height.