Skip to content

Instantly share code, notes, and snippets.

@adg29
Last active August 29, 2015 14:22
Show Gist options
  • Save adg29/1e7460829be46be22035 to your computer and use it in GitHub Desktop.
Save adg29/1e7460829be46be22035 to your computer and use it in GitHub Desktop.
vivus.js SVG animation from file
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!DOCTYPE html>
<meta charset="utf-8">
<title>
vivus.js SVG animation from file
</title>
<style>
body {
color: #eee;
background-color: #2d1b27;
}
#viv-container {
width: 25%;
margin: auto;
}
p {
font-family: "Avenir", "Gill Sans", "Futura", "Helvetica Neue", sans-serif;
font-size: 1.5em;
font-weight: 100;
margin: 0;
padding: 0;
}
blockquote {
text-align: center;
}
</style>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="http://rawgit.com/maxwellito/vivus/a2787d1cf76b36f391ccb1a168878e0e2a835678/dist/vivus.js"></script>
<script>
$(function(){
var viv = new Vivus($('#viv-container')[0],
{
type: 'oneByOne'
, duration: 100
, file: 'bad-trip.svg'
// , file: 'obturateur.svg'
// , file: 'left-hands.svg'
// , file: 'http://rawgit.com/adg29/1e7460829be46be22035/raw/494de785a8083c074971c0ea336cf8b1fb5b7201/left-hands.svg'
// , file: 'http://rawgit.com/adg29/1e7460829be46be22035/raw/688bf2471f000fcef239061266c4ae01776b803b/obturateur.svg'
});
});
</script>
<body>
<div id="viv-container"></div>
</body>
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment