All Projects → chadly → lottie-to-svg

chadly / lottie-to-svg

Licence: MIT license
Convert a lottie animation to an SVG file

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to lottie-to-svg

Compose-ToDo
A fully functional Android TODO app built entirely with Kotlin and Jetpack Compose
Stars: ✭ 130 (+124.14%)
Mutual labels:  lottie
FlightBookingApp
Xamarin.Forms goodlooking UI sample using the new SwipeView.
Stars: ✭ 26 (-55.17%)
Mutual labels:  lottie
ZestX-Frontend
Month-Long Fest Website ZestX with some Awsome UI and Intact Backend. Implemented admin page for user and event management
Stars: ✭ 28 (-51.72%)
Mutual labels:  lottie
svelte-lottie-player
Lottie Player component for Svelte
Stars: ✭ 90 (+55.17%)
Mutual labels:  lottie
space empires
Space Themed Turn-Based Strategy Game developed in Flutter
Stars: ✭ 60 (+3.45%)
Mutual labels:  lottie
Dads
*BA DUM TSSS*
Stars: ✭ 240 (+313.79%)
Mutual labels:  lottie
RavEngine
A fast, easy to use C++20 3D game library for modern computers
Stars: ✭ 122 (+110.34%)
Mutual labels:  lottie
BESTV
Android TV App powered by TMDb. It is a easy way to find the best TV content, the top movies, series... all of that in your TV.
Stars: ✭ 49 (-15.52%)
Mutual labels:  lottie
ionic-lottie
Sample using ng-lottie and ionic 3 to view animations rendered from After Effects
Stars: ✭ 104 (+79.31%)
Mutual labels:  lottie
react-native-lottie-splash-screen
⚡ Lottie splash screen for your react native app!
Stars: ✭ 124 (+113.79%)
Mutual labels:  lottie
Animation
Android各种动画效果合集,项目包含了丰富的动画实例(逐帧动画,补间动画,Lottie动画,GIF动画,SVGA动画),体验动画之美,让Android动起来😄😄😄
Stars: ✭ 268 (+362.07%)
Mutual labels:  lottie
app-intro-lottie-expo
App Intro component with Expo, styled-components and Lottie
Stars: ✭ 46 (-20.69%)
Mutual labels:  lottie
Flutter-Lottie-Animation
Flutter Lottie Animation
Stars: ✭ 13 (-77.59%)
Mutual labels:  lottie
CarLens-iOS
CarLens - Recognize and Collect Cars
Stars: ✭ 124 (+113.79%)
Mutual labels:  lottie
Pokehub
This is a sample project that uses Graphql API's with Rx implementation.
Stars: ✭ 40 (-31.03%)
Mutual labels:  lottie
DailyFeed
iOS client for newsapi.org
Stars: ✭ 128 (+120.69%)
Mutual labels:  lottie
weather-icons
Free to use animated weather icons.
Stars: ✭ 341 (+487.93%)
Mutual labels:  lottie
bitcoin-market-android
Bitcoin Market app shows you the current Bitcoin market price and price chart of different time intervals 💰
Stars: ✭ 284 (+389.66%)
Mutual labels:  lottie
lottie
No description or website provided.
Stars: ✭ 18 (-68.97%)
Mutual labels:  lottie
TravellingApp
Xamarin.Forms goodlooking UI sample using the new CarouselView.
Stars: ✭ 52 (-10.34%)
Mutual labels:  lottie

Lottie to SVG Converter

Convert a frame of a Lottie animation into an SVG. You may also be interested in the Gatsby Remark plugin that uses this project.

Convert this animation to a standard SVG:

Animation Static SVG
animation SVG

This SVG is converted from this animation from Lottie Files.

Note that this README shows the animation as a GIF since I can't load the lottie scripts in a README.

Wait, just one frame?

Yes, just one frame. This can be useful to show a preview of your animation as an SVG before the lottie animation script has fully loaded.

If you found this project because you wanted to convert your full lottie animation to an animated SVG, sorry, I can't help you. I would even go so far as to argue that you shouldn't want to do that. There is debate out there on whether CSS animations (which an animated SVG would use) is better/faster/stronger than JS animations. JS animations win. Keep using lottie. Be happy.

If you still aren't convinced, there are other projects out there to convert your full lottie animation into other file types:

Usage

npm install lottie-to-svg
const fs = require("fs");
const renderSvg = require("lottie-to-svg");

const animationData = JSON.parse(fs.readFileSync(`myanim.json`, "utf8"));

renderSvg(animationData).then(svg => {
  fs.writeFileSync(`myanim.svg`, svg, "utf8");
});

Render Settings

You can pass render settings for lottie-web (which does the actual rendering of the animation) as the second argument to renderSvg. See full list of available options.

Frame Number

You can pass a frame number (to render a specific frame) as the third argument to renderSvg. By default it will render the first frame.

How It Works

lottie-web only supports rendering in a browser environment. This project uses jsdom to fool lottie-web into rendering in a node environment.

It uses lottie's SVG renderer to render one frame of the animation and then pulls the outputted SVG out of jsdom and then gives it to you, dear user, to do what you will with it.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].