Skip to content

samgermain/create-animation-from-svgs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

Turns three files like this (or any svgs) Into this

How to use

In create-svg-animation.py, near the bottom, replace the filenames with the filenames of your svgs. The number to the right is how many miliseconds the animations lasts while transitioning to that image

svgs = [
    ["./trombone.svg", 1000],
    ["./trombone2.svg", 1000],
    ["./trombone3.svg", 1000],
    ["./trombone4.svg", 1000],
]

Replace the value stored in output with the filename you want for the svg animation

output="trombone-anim.svg"

Run the following in the command line

python -m pip install bs4 lxml
python main.py

You may need to remove these lines from your svgs

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

Limitations

  • Currently this only produces looping animations
  • Isn't perfect, is a bit buggy with some animations

About

Creates a looping svg from variations of the same svg in different files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages