Giter VIP home page Giter VIP logo

michaelsboost / svganimframes Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 1.0 3.25 MB

SVG frame by frame animation with 1 line of Javascript!

Home Page: http://michaelsboost.github.io/SVGAnimFrames/

License: MIT License

HTML 40.45% JavaScript 46.42% CSS 13.13%
html html5 javascript jquery jquery-plugin javascript-plugin javascript-tools svg svg-sprites svg-animations animate animation animations frame-animation filereader drag-and-drop

svganimframes's Introduction

SVGAnimFrames

I created SVGAnimFrames because I wanted to be able to make frame by frame animations within Gravit Designer using 1 line of code.

License

MIT

Version

0.0.2

How To Use:

  1. First you need to design your animation using a vector editor. I recommend Gravit Designer!

  2. Make sure ALL the frames that will be animated are inside a svg group element. ex. <g clip-path="url(#_clipPath_hello)">.
    See index.html as an example.

  3. Export your SVG and then grab it's code (If you don't know how you can load the SVG in your browser you can use WeaveShare to grab it's code as it needs to be embedded in order for SVGAnimFrames to grab it's frames).

  4. Add SVGAnimFrames script!
    ex. <script src="SVGAnimFrames.js"></script>
    before your closing body tag.

  5. Now in a new script before your closing body tag.
    You can run SVGAnimFrames with 1 line of code.
    SVGAnimFrames("#animate svg", "repeat", "40", "1000");.

    If you do not want your animation to repeat replace repeat with no-repeat

    40 tells SVGAnimFrames how many milliseconds to change to the next frame.

    100 tells SVGAnimFrames how many milliseconds the animation waits to start the animation over.

Development

Want to contribute? Great!

As of November 6, 2019 SVGAnimFrames is no longer an active project.
All updates as of that date and on are solely contributor based implementations.

You can submit a pull request or simply share the project :)

Of course SVGAnimFrames is free and open source, so you can always fork the project and have fun :)

ko-fi

If SVGAnimFrames was at all helpful for you. You can show your appreciation by Donating via SquareCash and/or PayPal

PS: Learn how you can do this with GSAP!!

svganimframes's People

Contributors

michaelsboost avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

aleua

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.