Skip to content

armgit / anime

Public Imported from GitHub
0

JavaScript animation engine

Cleanup animation

Julian Garnier5425a0011fd3
diff --git a/documentation/examples/anime-logo-animation.html b/documentation/examples/anime-logo-animation.html
index 711abe13..03b93f22 100644
--- a/documentation/examples/anime-logo-animation.html
+++ b/documentation/examples/anime-logo-animation.html
@@ -172,13 +172,13 @@
function setDashoffset(el) {
var l = el.getTotalLength();
- el.setAttribute('stroke-dasharray', l);
+ el.setAttribute('stroke-dasharray', l);
return l;
}
var logoAnimation = anime.timeline({
loop: false,
- autoplay: false
+ autoplay: true
});
document.body.onclick = function() {
@@ -211,14 +211,12 @@
var fillsIn = anime({
targets: '.fill.in',
- strokeDashoffset: [
- {
- value: [setDashoffset, 0],
- duration: 600,
- delay: function(el, i, t) { return 700 + ( i * 100 ); },
- easing: 'easeOutQuart'
- }
- ],
+ strokeDashoffset: {
+ value: [setDashoffset, 0],
+ duration: 600,
+ delay: function(el, i, t) { return 700 + ( i * 100 ); },
+ easing: 'easeOutQuart'
+ },
stroke: {
value: ['#FFF', function(el) { return anime.getValue(el.parentNode, 'stroke') } ],
duration: 1200,
@@ -234,10 +232,8 @@
var fillsOut = anime({
targets: '.fill.out',
strokeDashoffset: [
+ { value: [setDashoffset, setDashoffset], duration: 1890 },
{
- value: [setDashoffset, setDashoffset],
- duration: 1890
- }, {
value: [0, setDashoffset],
duration: 800,
delay: function(el, i) { return (i * 80); },
@@ -248,14 +244,12 @@
var linesOut = anime({
targets: '.line.out',
- strokeDashoffset: [
- {
- value: [0, setDashoffset],
- duration: 1200,
- delay: function(el, i, t) { return 2500 + ( i * 100 ); },
- easing: 'easeInQuart'
- }
- ],
+ strokeDashoffset: {
+ value: [0, setDashoffset],
+ duration: 1200,
+ delay: function(el, i, t) { return 2500 + ( i * 100 ); },
+ easing: 'easeInQuart'
+ },
strokeWidth: {
value: [0, 2],
delay: function(el, i, t) { return 2000 + ( i * 100 ); },
@@ -266,12 +260,7 @@
var icon = anime({
targets: '.icon',
- opacity: {
- value: 1,
- duration: 10,
- delay: 2800,
- easing: 'linear'
- },
+ opacity: { value: 1, duration: 10, delay: 2800, easing: 'linear' },
translateY: { value: 60, duration: 800 },
delay: 4200
});
@@ -279,14 +268,8 @@
var iconLine = anime({
targets: '.icon-line',
strokeDashoffset: [
- {
- value: [setDashoffset, setDashoffset],
- duration: 3000
- }, {
- value: 0,
- duration: 1200,
- easing: 'easeInOutQuart'
- }
+ { value: [setDashoffset, setDashoffset], duration: 3000 },
+ { value: 0, duration: 1200, easing: 'easeInOutQuart' }
],
stroke: {
value: ['#FFF', function(el) { return anime.getValue(el, 'stroke') } ],
@@ -299,11 +282,7 @@
var iconText = anime({
targets: ['.icon-text path', '.icon-text polygon'],
translateY: [50, 0],
- opacity: {
- value: [0, 1],
- duration: 100,
- easing: 'linear'
- },
+ opacity: { value: [0, 1], duration: 100, easing: 'linear' },
delay: function(el, i, t) { return 4200 + ( i * 20 ); },
});