JavaScript animation engine
New logo animation
Julian Garnier65120268e952
diff --git a/documentation/assets/js/site.js b/documentation/assets/js/site.jsindex 6a98f8c6..85f9cd9a 100644--- a/documentation/assets/js/site.js+++ b/documentation/assets/js/site.js@@ -88,7 +88,7 @@ var logoAnimation = (function() {easing: 'easeOutQuart'},stroke: {- value: ['#FFF', function(el) { return anime.getValue(el.parentNode, 'stroke') } ],+ value: ['#FFF', function(el) { return anime.get(el.parentNode, 'stroke') } ],duration: 500,delay: 500,easing: 'easeInQuad'@@ -145,7 +145,7 @@ var logoAnimation = (function() {easing: 'easeInQuad'},stroke: {- value: ['#FFF', function(el) { return anime.getValue(el, 'stroke') } ],+ value: ['#FFF', function(el) { return anime.get(el, 'stroke') } ],duration: 800,delay: 3400,easing: 'easeInQuad'diff --git a/documentation/examples/anime-logo-2.svg b/documentation/examples/anime-logo-2.svgnew file mode 100644index 00000000..d5a8f3d2--- /dev/null+++ b/documentation/examples/anime-logo-2.svg@@ -0,0 +1,41 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1088 590" style="background:#191924">+ <g id="Page-2" fill="none" fill-rule="evenodd">+ <g id="anime-logo-2">+ <g id="strokes" stroke-width="6" transform="translate(192 228)">+ <g id="aStrokes">+ <path id="stroke" stroke="#61C3FF" d="M0 0h104c13.255 0 24 10.745 24 24v64c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V56c0-13.255 10.745-24 24-24h72"/>+ <path id="stroke" stroke="#1CE2B2" d="M0 8.013L104 8c8.837 0 16 7.164 16 16L119.915 88c-.008 8.831-7.169 15.986-16 15.986l-79.92.014c-8.837 0-16-7.163-16-16V56.009c0-8.837 7.163-16 16-16h71.937"/>+ <path id="stroke" stroke="#FF1461" d="M0 16h104a8 8 0 0 1 8 8l-.068 64.008a8 8 0 0 1-8 7.992H23.99a8 8 0 0 1-8-8V56a8 8 0 0 1 8-8h71.946"/>+ </g>+ <g id="nStrokes" transform="translate(144)">+ <path id="stroke" stroke="#61C3FF" d="M0 112V24C0 10.745 10.745 0 24 0h80c13.255 0 24 10.745 24 24v88"/>+ <path id="stroke" stroke="#1CE2B2" d="M8 112V24c0-8.842 7.163-16 16-16h80c8.832.093 15.986 7.248 16 16v88"/>+ <path id="stroke" stroke="#FF1461" d="M16 112V24c0-4.421 3.582-8 8-8h80c4.423.073 8 3.65 8 8v88"/>+ </g>+ <g id="iStrokes" transform="translate(287)">+ <path id="stroke" stroke="#61C3FF" d="M1 112V0"/>+ <path id="stroke" stroke="#1CE2B2" d="M9 112V0"/>+ <path id="stroke" stroke="#FF1461" d="M17 112V0"/>+ </g>+ <g id="mStrokes" transform="translate(320)">+ <path id="stroke" stroke="#61C3FF" d="M0 112V24C0 10.745 10.745 0 24 0h192c13.255 0 24 10.745 24 24v88"/>+ <path id="stroke" stroke="#1CE2B2" d="M8 112V24c0-8.842 7.163-16 16-16h192c8.831.093 15.986 7.248 16 16v88"/>+ <path id="stroke" stroke="#FF1461" d="M16 112V24c0-4.421 3.582-8 8-8h192c4.423.073 8 3.65 8 8v88"/>+ </g>+ <g id="eStrokes" transform="translate(576)">+ <path id="stroke" stroke="#61C3FF" d="M96 32H24C10.745 32 0 42.745 0 56v32c0 13.255 10.745 24 24 24h80c13.255 0 24-10.745 24-24V24c0-13.255-10.745-24-24-24H0" transform="rotate(-180 64 56)"/>+ <path id="stroke" stroke="#1CE2B2" d="M103.915 40.014h-72c-8.837 0-16 7.164-16 16v32c0 8.837 7.163 16 16 16l80-.014c8.831 0 15.992-7.155 16-15.986l.085-64C128 15.164 120.837 8 112 8L7.915 8.014" transform="rotate(-180 67.958 56.007)"/>+ <path id="stroke" stroke="#FF1461" d="M111.924 48h-72a8 8 0 0 0-8 8v32a8 8 0 0 0 8 8h80.008a8 8 0 0 0 8-7.992l.068-64c0-4.426-3.582-8.008-8-8.008H15.924" transform="rotate(-180 71.962 56)"/>+ </g>+ </g>+ <g id="fills" stroke="#FFFFFF" stroke-width="24" transform="translate(188 224)">+ <path id="aFill" d="M0 12h108c8.837 0 16 7.143 16 16v64c0 8.857-7.163 16-16 16H28c-8.837 0-16-7.143-16-16V60c0-8.991 7.163-16.134 16-16h76"/>+ <path id="nFill" d="M156 120V28c0-8.837 7.185-16 16-16h80c8.815 0 16 7.163 16 16v92"/>+ <path id="iFill" d="M300 120V0"/>+ <path id="mFill" d="M332 120V28c0-8.837 7.174-16 16-16 42.62.067 74.62.1 96 .1 21.286 0 53.286-.033 96-.1 8.826 0 16 7.163 16 16v92"/>+ <path id="eFill" d="M608 76h76c8.837-.18 16-7.323 16-16V28c0-8.857-7.163-16-16-16h-80c-8.837 0-16 7.143-16 16v64c0 8.857 7.163 16 16 16h108"/>+ </g>+ <rect id="dotEl" width="24" height="24" x="476" y="224" fill="#FFFFFF"/>+ </g>+ </g>+</svg>diff --git a/documentation/examples/anime-logo-3.svg b/documentation/examples/anime-logo-3.svgnew file mode 100644index 00000000..bcc68f17--- /dev/null+++ b/documentation/examples/anime-logo-3.svg@@ -0,0 +1,41 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1088 590" style="background:#191924">+ <g id="Page-2" fill="none" fill-rule="evenodd">+ <g id="anime-logo-3">+ <g id="strokes" stroke-width="6" transform="translate(192 228)">+ <g id="aStrokes">+ <path id="stroke" stroke="#61C3FF" d="M0 0h104c13.255 0 24 10.745 24 24v64c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V56c0-13.255 10.745-24 24-24h72"/>+ <path id="stroke" stroke="#1CE2B2" d="M0 8.013L104 8c8.837 0 16 7.164 16 16L119.915 88c-.008 8.831-7.169 15.986-16 15.986l-79.92.014c-8.837 0-16-7.163-16-16V56.009c0-8.837 7.163-16 16-16h71.937"/>+ <path id="stroke" stroke="#FF1461" d="M0 16h104a8 8 0 0 1 8 8l-.068 64.008a8 8 0 0 1-8 7.992H23.99a8 8 0 0 1-8-8V56a8 8 0 0 1 8-8h71.946"/>+ </g>+ <g id="nStrokes" transform="translate(144)">+ <path id="stroke" stroke="#61C3FF" d="M0 112V24C0 10.745 10.745 0 24 0h80c13.255 0 24 10.745 24 24v88"/>+ <path id="stroke" stroke="#1CE2B2" d="M8 112V24c0-8.842 7.163-16 16-16h80c8.832.093 15.986 7.248 16 16v88"/>+ <path id="stroke" stroke="#FF1461" d="M16 112V24c0-4.421 3.582-8 8-8h80c4.423.073 8 3.65 8 8v88"/>+ </g>+ <g id="iStrokes" transform="translate(287)">+ <path id="stroke" stroke="#61C3FF" d="M1 112V0"/>+ <path id="stroke" stroke="#1CE2B2" d="M9 112V0"/>+ <path id="stroke" stroke="#FF1461" d="M17 112V0"/>+ </g>+ <g id="mStrokes" transform="translate(320)">+ <path id="stroke" stroke="#61C3FF" d="M0 112V24C0 10.745 10.745 0 24 0h192c13.255 0 24 10.745 24 24v88"/>+ <path id="stroke" stroke="#1CE2B2" d="M8 112V24c0-8.842 7.163-16 16-16h192c8.831.093 15.986 7.248 16 16v88"/>+ <path id="stroke" stroke="#FF1461" d="M16 112V24c0-4.421 3.582-8 8-8h192c4.423.073 8 3.65 8 8v88"/>+ </g>+ <g id="eStrokes" transform="translate(576)">+ <path id="stroke" stroke="#61C3FF" d="M96 32H24C10.745 32 0 42.745 0 56v32c0 13.255 10.745 24 24 24h80c13.255 0 24-10.745 24-24V24c0-13.255-10.745-24-24-24H0" transform="rotate(-180 64 56)"/>+ <path id="stroke" stroke="#1CE2B2" d="M103.915 40.014h-72c-8.837 0-16 7.164-16 16v32c0 8.837 7.163 16 16 16l80-.014c8.831 0 15.992-7.155 16-15.986l.085-64C128 15.164 120.837 8 112 8L7.915 8.014" transform="rotate(-180 67.958 56.007)"/>+ <path id="stroke" stroke="#FF1461" d="M111.924 48h-72a8 8 0 0 0-8 8v32a8 8 0 0 0 8 8h80.008a8 8 0 0 0 8-7.992l.068-64c0-4.426-3.582-8.008-8-8.008H15.924" transform="rotate(-180 71.962 56)"/>+ </g>+ </g>+ <g id="fills" stroke="#FFFFFF" stroke-width="24" transform="translate(188 224)">+ <path id="aFill" d="M0 12h108c8.837 0 16 7.143 16 16v64c0 8.857-7.163 16-16 16H28c-8.837 0-16-7.143-16-16V60c0-8.991 7.163-16.134 16-16h76"/>+ <path id="nFill" d="M156 120V28c0-8.837 7.185-16 16-16h80c8.815 0 16 7.163 16 16v92"/>+ <path id="iFill" d="M300 120V0"/>+ <path id="mFill" d="M332 120V28c0-8.837 7.174-16 16-16 42.62 13.4 74.62 20.1 96 20.1 21.286 0 53.286-6.7 96-20.1 8.826 0 16 7.163 16 16v92"/>+ <path id="eFill" d="M608 76h76c8.837-.18 16-7.323 16-16V28c0-8.857-7.163-16-16-16h-80c-8.837 0-16 7.143-16 16v64c0 8.857 7.163 16 16 16h108"/>+ </g>+ <rect id="dotEl" width="24" height="24" x="476" y="224" fill="#FFFFFF"/>+ </g>+ </g>+</svg>diff --git a/documentation/examples/anime-logo-animation-v3.html b/documentation/examples/anime-logo-animation-v3.htmlnew file mode 100644index 00000000..8f56e6c5--- /dev/null+++ b/documentation/examples/anime-logo-animation-v3.html@@ -0,0 +1,168 @@+<!DOCTYPE html>+<html>+<head>+ <title>Anime logo animation | anime.js</title>+ <meta charset="utf-8">+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">+ <meta property="og:title" content="anime.js">+ <meta property="og:url" content="http://animejs.com">+ <meta property="og:description" content="Javascript Animation Engine">+ <meta property="og:image" content="http://animejs.com/documentation/assets/img/icons/og.png">+ <meta name="twitter:card" content="summary">+ <meta name="twitter:title" content="anime.js">+ <meta name="twitter:site" content="@juliangarnier">+ <meta name="twitter:description" content="Javascript Animation Engine">+ <meta name="twitter:image" content="http://animejs.com/documentation/assets/img/icons/twitter.png">+ <link rel="apple-touch-icon-precomposed" href="../assets/img/icons/apple-touch-icon.png">+ <link rel="icon" type="image/png" href="../assets/img/icons/favicon.png">+ <link href="../assets/css/anime.css" rel="stylesheet">+ <script src="../../lib/anime.min.js"></script>+ <style>++ </style>+</head>+<body>+ <div class="logo-animation">++<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1088 590" style="background:#191924">+ <g id="Page-2" fill="none" fill-rule="evenodd">+ <g id="anime-logo">+ <g id="strokes" stroke-width="6" transform="translate(248 228)">+ <g id="aStrokes">+ <path id="stroke" stroke="#61C3FF" d="M0 0h104c13.255 0 24 10.745 24 24v64c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V56c0-13.255 10.745-24 24-24h72"/>+ <path id="stroke" stroke="#1CE2B2" d="M0 8.013L104 8c8.837 0 16 7.164 16 16v.014L119.915 88c-.008 8.831-7.169 15.986-16 15.986l-79.92.014c-8.837 0-16-7.163-16-16V56.009c0-8.837 7.163-16 16-16h71.937"/>+ <path id="stroke" stroke="#FF1461" d="M0 16h104a8 8 0 0 1 8 8v.008l-.068 64a8 8 0 0 1-8 7.992H23.99a8 8 0 0 1-8-8V56a8 8 0 0 1 8-8h71.946"/>+ </g>+ <g id="nStrokes" transform="translate(144)">+ <path id="stroke" stroke="#61C3FF" d="M0 112V24C0 10.745 10.745 0 24 0h80c13.255 0 24 10.745 24 24v88"/>+ <path id="stroke" stroke="#1CE2B2" d="M8 112V24c0-8.842 7.163-16 16-16h80c8.832.093 15.986 7.248 16 16v88"/>+ <path id="stroke" stroke="#FF1461" d="M16 112V24c0-4.421 3.582-8 8-8h80c4.423.073 8 3.65 8 8v88"/>+ </g>+ <g id="iStrokes" transform="translate(287)">+ <path id="stroke" stroke="#61C3FF" d="M1 112V0"/>+ <path id="stroke" stroke="#1CE2B2" d="M9 112V0"/>+ <path id="stroke" stroke="#FF1461" d="M17 112V0"/>+ </g>+ <g id="mStrokes" transform="translate(320)">+ <path id="stroke" stroke="#61C3FF" d="M0 112V24C0 10.745 10.745 0 24 0h80c13.255 0 24 10.745 24 24v88"/>+ <path id="stroke" stroke="#1CE2B2" d="M8 112V24c0-8.842 7.163-16 16-16h80c8.831.093 15.986 7.248 16 16v88"/>+ <path id="stroke" stroke="#FF1461" d="M16 112V24c0-4.421 3.582-8 8-8h80c4.423.073 8 3.65 8 8v88"/>+ </g>+ <g id="eStrokes" transform="translate(464)">+ <path id="stroke" stroke="#61C3FF" d="M96 32H24C10.745 32 0 42.745 0 56v32c0 13.255 10.745 24 24 24h80c13.255 0 24-10.745 24-24V24c0-13.255-10.745-24-24-24H0" transform="rotate(-180 64 56)"/>+ <path id="stroke" stroke="#1CE2B2" d="M103.915 40.014h-72c-8.837 0-16 7.164-16 16v32c0 8.837 7.163 16 16 16l80-.014c8.831 0 15.992-7.155 16-15.986l.085-64C128 15.164 120.837 8 112 8L7.915 8.014" transform="rotate(-180 67.958 56.007)"/>+ <path id="stroke" stroke="#FF1461" d="M111.924 48h-72a8 8 0 0 0-8 8v32a8 8 0 0 0 8 8h80.008a8 8 0 0 0 8-7.992l.068-64c0-4.426-3.582-8.008-8-8.008H15.924" transform="rotate(-180 71.962 56)"/>+ </g>+ </g>+ <g id="fills" stroke="#FFFFFF" stroke-width="24" transform="translate(244 224)">+ <path id="aFill" d="M0 12h108c8.837 0 16 7.143 16 16v64c0 8.857-7.163 16-16 16H28c-8.837 0-16-7.143-16-16V60c0-8.991 7.163-16.134 16-16h76"/>+ <path id="nFill" d="M156 120V28c0-8.837 7.185-16 16-16h80c8.815 0 16 7.163 16 16v92"/>+ <path id="iFill" d="M300 120V0"/>+ <path id="mFill" d="M332 120V28c0-8.837 7.174-16 16-16 5.286.067 18.62.1 40 .1 21.286 0 34.62-.033 40-.1 8.826 0 16 7.163 16 16v92"/>+ <path id="eFill" d="M496 76h76c8.837-.18 16-7.323 16-16V28c0-8.857-7.163-16-16-16h-80c-8.837 0-16 7.143-16 16v64c0 8.857 7.163 16 16 16h108"/>+ </g>+ <rect id="dotEl" width="24" height="24" x="476" y="224" fill="#FFFFFF"/>+ </g>+ </g>+</svg>+++++++ </div>+ <script>++ function getPathDuration(el) {+ return anime.setDashoffset(el) * 3;+ }++ var logoAnimation = anime.timeline({+ easing: 'easeOutSine',+ autoplay: false+ });++ logoAnimation+ .add({+ targets: '#strokes path',+ opacity: [1, 1],+ duration: 1+ })+ .add({+ targets: '#strokes path',+ strokeDashoffset: [anime.setDashoffset, 0],+ easing: 'easeInOutQuad',+ duration: getPathDuration,+ delay: function(el, i) {+ return (i * 100)+ }+ })+ .add({+ targets: '#fills path',+ strokeDasharray: [anime.setDashoffset, anime.setDashoffset],+ strokeDashoffset: [anime.setDashoffset, 0],+ easing: 'easeOutQuad',+ delay: function(el, i) {+ return i * 100+ }+ }, '-=1850')+ .add({+ targets: '#strokes path',+ opacity: [0, 0],+ duration: 1,+ }, '-=500')+ .add({+ targets: '#mFill',+ strokeDasharray: [0, 0],+ transform: 'translate(-56)',+ d: 'M332 120V28c0-8.837 7.174-16 16-16 42.62.067 74.62.1 96 .1 21.286 0 53.286-.033 96-.1 8.826 0 16 7.163 16 16v92',+ easing: 'easeOutElastic(1, .6)',+ duration: 500+ }, '-=500')+ .add({+ targets: '#eFill',+ transform: 'translate(56)',+ easing: 'easeOutElastic(1, .6)',+ duration: 500+ }, '-=480')+ .add({+ targets: ['#iFill', '#nFill', '#aFill'],+ transform: 'translate(-56)',+ easing: 'easeOutElastic(1, .6)',+ duration: 500,+ delay: function(el, i) {+ return i * 20+ }+ }, '-=480')+ .add({+ targets: '#dotEl',+ transform: ['translate(140 -300)', 'translate(140 20)'],+ duration: 300+ }, '-=200')+ .add({+ targets: '#mFill',+ d: 'M332 120V28c0-8.837 7.174-16 16-16 42.62 13.4 74.62 20.1 96 20.1 21.286 0 53.286-6.7 96-20.1 8.826 0 16 7.163 16 16v92',+ easing: 'easeOutSine',+ duration: 100,+ }, '-=100')+ .add({+ targets: '#dotEl',+ transform: ['translate(140 20)', 'translate(140 -100)'],+ duration: 300+ }, '-=100')+ .add({+ targets: '#mFill',+ d: 'M332 120V28c0-8.837 7.174-16 16-16 42.62.067 74.62.1 96 .1 21.286 0 53.286-.033 96-.1 8.826 0 16 7.163 16 16v92',+ easing: 'spring(1, 100, 10, 50)',+ duration: 100,+ }, '-=200')++ // anime.speed = .1;+ logoAnimation.seek(0);+ logoAnimation.play();++ </script>+ <script src="../assets/js/vendors/stats.min.js"></script>+</body>+</html>diff --git a/documentation/examples/anime-logo-animation/anime-logo-animation-v3.html b/documentation/examples/anime-logo-animation/anime-logo-animation-v3.htmlnew file mode 100644index 00000000..7b93fc3f--- /dev/null+++ b/documentation/examples/anime-logo-animation/anime-logo-animation-v3.html@@ -0,0 +1,249 @@+<!DOCTYPE html>+<html>+<head>+ <title>Anime logo animation | anime.js</title>+ <meta charset="utf-8">+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">+ <meta property="og:title" content="anime.js">+ <meta property="og:url" content="http://animejs.com">+ <meta property="og:description" content="Javascript Animation Engine">+ <meta property="og:image" content="http://animejs.com/documentation/assets/img/icons/og.png">+ <meta name="twitter:card" content="summary">+ <meta name="twitter:title" content="anime.js">+ <meta name="twitter:site" content="@juliangarnier">+ <meta name="twitter:description" content="Javascript Animation Engine">+ <meta name="twitter:image" content="http://animejs.com/documentation/assets/img/icons/twitter.png">+ <link rel="apple-touch-icon-precomposed" href="../assets/img/icons/apple-touch-icon.png">+ <link rel="icon" type="image/png" href="../assets/img/icons/favicon.png">+ <link href="../../assets/css/anime.css" rel="stylesheet">+ <!-- <script src="../../../lib/anime.min.js"></script> -->+ <style>++ .logo-animation {+ overflow: hidden;+ display: flex;+ justify-content: center;+ align-items: center;+ width: 100%;+ height: 100vh;+ min-height: 600px;+ }++ .anime-logo {+ position: relative;+ display: flex;+ flex-direction: column;+ width: 720px;+ }+ .anime-logo-signs {+ display: flex;+ position: relative;+ width: 100%;+ height: 128px;+ margin-bottom: 16px;+ }++ .anime-logo h2 {+ opacity: 0;+ position: relative;+ width: 100%;+ margin-bottom: 16px;+ text-transform: uppercase;+ font-size: 20px;+ letter-spacing: 15.65px;+ white-space: nowrap;+ text-align: center;+ }++ .logo-nav {+ position: relative;+ z-index: 1;+ display: flex;+ width: 100%;+ }++ .logo-nav a {+ cursor: pointer;+ flex: 1;+ display: block;+ height: 40px;+ margin: 0 4px;+ text-decoration: none;+ text-align: center;+ background-color: #FFF;+ border-radius: 20px;+ transition: border-radius 1s ease-out;+ }++ .logo-nav a span {+ font-size: 16px;+ line-height: 40px;+ letter-spacing: 2px;+ text-transform: uppercase;+ color: #000;++ }++ .logo-nav a:hover {+ border-radius: 0;+ transition: border-radius .25s ease-out;+ }++ .logo-letter {+ overflow: visible;+ }++ .bounce {+ position: absolute;+ left: 0;+ bottom: 64px;+ }++ .filters {+ display: none;+ }++ .line {+ stroke-width: 2;+ stroke: #FFF;+ }++ .letter-a .line:nth-child(1) { stroke: #1CE2B2; }+ .letter-a .line:nth-child(2) { stroke: #5EF3FB; }+ .letter-a .line:nth-child(3) { stroke: #B08CFF; }++ .letter-n .line:nth-child(1) { stroke: #5A87FF; }+ .letter-n .line:nth-child(2) { stroke: #FBF38C; }+ .letter-n .line:nth-child(3) { stroke: #FF7C72; }++ .letter-i .line:nth-child(1) { stroke: #FB89FB; }+ .letter-i .line:nth-child(2) { stroke: #FF1461; }+ .letter-i .line:nth-child(3) { stroke: #FF48AB; }++ .letter-m .line:nth-child(1) { stroke: #FF7C72; }+ .letter-m .line:nth-child(2) { stroke: #B08CFF; }+ .letter-m .line:nth-child(3) { stroke: #1CE2B2; }++ .letter-e .line:nth-child(1) { stroke: #18FF92; }+ .letter-e .line:nth-child(2) { stroke: #5EF3FB; }+ .letter-e .line:nth-child(3) { stroke: #5A87FF; }++/* .dot {+ position: absolute;+ top: -12px;+ left: -12px;+ width: 24px;+ height: 24px;+ background-color: #FFF;+ }*/++ .sphere {+ overflow: visible;+ position: absolute;+ top: 50%;+ left: 50%;+ width: 520px;+ height: 520px;+ margin: -260px 0 0 -260px;+ }++ </style>+</head>+<body>+ <svg class="filters">+ <filter id="blur">+ <feGaussianBlur in="SourceGraphic" stdDeviation="10" result="blur" />+ <feBlend in="SourceGraphic" in2="blur" />+ </filter>+ <filter id="sphereBlur">+ <feGaussianBlur in="SourceGraphic" stdDeviation="10" result="blur" />+ <feBlend in="SourceGraphic" in2="blur" />+ </filter>+ </svg>+ <section class="logo-animation">++ <div class="anime-logo">+ <svg class="sphere" filter="url(#sphereBlur)" viewBox="0 0 1500 1500" fill="none" fill-rule="evenodd" stroke-width="2">+ <path stroke="#FF1461" d="M1257.57 1255.07c-85.914 85.916-179.94 131.188-210.01 101.117-30.07-30.07 15.201-124.095 101.117-210.01 85.915-85.916 179.94-131.187 210.01-101.117 30.07 30.07-15.2 124.096-101.116 210.01z"/>+ <path stroke="#FF7C72" d="M1254.743 1252.243c-128.483 128.482-269.046 196.23-313.956 151.32-44.91-44.91 22.838-185.473 151.321-313.955 128.482-128.483 269.045-196.231 313.955-151.32 44.91 44.91-22.838 185.472-151.32 313.955z"/>+ <path stroke="#FB89FB" d="M1246.61 1243.404c-159.919 159.92-336.097 243.022-393.504 185.615-57.407-57.407 25.696-233.585 185.615-393.505 159.92-159.92 336.098-243.022 393.505-185.615 57.407 57.407-25.696 233.585-185.615 393.505z"/>+ <path stroke="#61C3FF" d="M1223.63 1221.13c-185.89 185.89-391.352 281.814-458.912 214.253-67.561-67.56 28.363-273.023 214.253-458.912 185.89-185.89 391.351-281.814 458.912-214.253 67.56 67.56-28.364 273.022-214.253 458.912z"/>+ <path stroke="#5EF3FB" d="M1196.053 1193.553c-209.712 209.711-441.45 317.982-517.603 241.83-76.152-76.152 32.12-307.89 241.831-517.602 209.712-209.712 441.45-317.983 517.602-241.83 76.152 76.152-32.119 307.89-241.83 517.602z"/>+ <path stroke="#18FF92" d="M1161.05 1157.844c-229.432 229.433-483.015 347.835-566.392 264.458-83.377-83.377 35.025-336.96 264.458-566.393 229.433-229.433 483.016-347.835 566.393-264.458 83.377 83.377-35.025 336.96-264.458 566.393z"/>+ <path stroke="#1CE2B2" d="M1120.392 1117.892c-245.249 245.25-516.877 371.25-606.697 281.429-89.821-89.82 36.179-361.449 281.428-606.698 245.25-245.25 516.877-371.249 606.698-281.428 89.82 89.82-36.18 361.448-281.429 606.697z"/>+ <path stroke="#B08CFF" d="M1072.309 1069.809c-261.26 261.26-550.617 395.492-646.296 299.813-95.678-95.678 38.553-385.035 299.814-646.295 261.26-261.261 550.617-395.492 646.295-299.814 95.679 95.679-38.552 385.035-299.813 646.296z"/>+ <path stroke="#FF7C72" d="M1012.205 1009.705c-269.071 269.071-567.134 407.26-665.741 308.652-98.608-98.607 39.58-396.67 308.652-665.741 269.071-269.071 567.134-407.26 665.741-308.652 98.607 98.607-39.58 396.67-308.652 665.74z"/>+ <path stroke="#FF7C72" d="M940.787 938.287c-271.414 271.414-572.01 410.87-671.398 311.48-99.388-99.388 40.066-399.983 311.48-671.397 271.415-271.415 572.01-410.87 671.399-311.48 99.388 99.388-40.067 399.983-311.48 671.397z"/>+ <path stroke="#FF48AB" d="M864.42 861.92c-269.072 269.07-567.134 407.26-665.741 308.652-98.608-98.608 39.58-396.67 308.652-665.741 269.07-269.072 567.133-407.26 665.74-308.652 98.608 98.607-39.58 396.67-308.651 665.74z"/>+ <path stroke="#FF1461" d="M792.295 789.795c-261.261 261.26-550.617 395.491-646.296 299.813-95.678-95.678 38.553-385.035 299.813-646.296C707.073 182.052 996.43 47.821 1092.108 143.5c95.678 95.679-38.553 385.035-299.813 646.296z"/>+ <path stroke="#A6FF8F" d="M723.705 721.205c-245.249 245.25-516.877 371.25-606.697 281.429-89.82-89.82 36.179-361.449 281.428-606.698 245.25-245.25 516.877-371.249 606.698-281.428 89.82 89.82-36.18 361.448-281.429 606.697z"/>+ <path stroke="#FF7C72" d="M661.126 657.92C431.693 887.351 178.111 1005.753 94.734 922.376 11.357 839 129.759 585.417 359.192 355.985 588.625 126.552 842.207 8.15 925.584 91.527c83.377 83.377-35.025 336.96-264.458 566.392z"/>+ <path stroke="#FBF38C" d="M595.719 593.219c-209.712 209.712-441.45 317.983-517.602 241.83-76.152-76.152 32.119-307.89 241.83-517.602C529.66 107.736 761.397-.535 837.55 75.617c76.152 76.152-32.12 307.89-241.831 517.602z"/>+ <path stroke="#5A87FF" d="M537.03 534.53C351.14 720.418 145.677 816.342 78.116 748.781 10.557 681.222 106.48 475.76 292.37 289.87 478.26 103.98 683.722 8.056 751.282 75.617c67.561 67.56-28.363 273.023-214.253 458.912z"/>+ <path stroke="#B08CFF" d="M477.986 474.779C318.066 634.699 141.888 717.8 84.48 660.394 27.074 602.987 110.177 426.81 270.096 266.89 430.016 106.97 606.194 23.867 663.601 81.274c57.407 57.407-25.696 233.585-185.615 393.505z"/>+ <path stroke="#5EF3FB" d="M423.892 421.392C295.41 549.875 154.847 617.623 109.937 572.712c-44.91-44.91 22.838-185.472 151.32-313.955 128.483-128.482 269.046-196.23 313.956-151.32 44.91 44.91-22.838 185.473-151.321 313.955z"/>+ <path stroke="#1CE2B2" d="M367.324 364.824c-85.916 85.915-179.94 131.186-210.011 101.116-30.07-30.07 15.2-124.096 101.116-210.01 85.915-85.916 179.94-131.188 210.01-101.117 30.071 30.07-15.2 124.095-101.115 210.01z"/>+ </svg>+ <div class="anime-logo-signs">+ <svg class="logo-letter letter-a" filter="url(#blur)" viewBox="0 0 144 124" width="144" height="124" fill="none" fill-rule="evenodd">+ <path class="line" d="M8 8h104c13.255 0 24 10.745 24 24v64c0 13.255-10.745 24-24 24H32c-13.255 0-24-10.745-24-24V64c0-13.255 10.745-24 24-24h72"/>+ <path class="line" d="M103.932 48.009H31.994c-8.836 0-16 7.163-16 16V96c0 8.837 7.164 16 16 16l79.921-.014c8.831 0 15.992-7.155 16-15.986L128 32c0-8.837-7.163-16-16-16L8 16.012"/>+ <path class="line" d="M8 24h104a8 8 0 0 1 8 8l-.068 64.008a8 8 0 0 1-8 7.992H31.99a8 8 0 0 1-8-8V64a8 8 0 0 1 8-8h71.946"/>+ <path class="fill" stroke="#FFFFFF" stroke-width="24" d="M108 48H32c-8.837-.134-16 7.009-16 16v32c0 8.857 7.163 16 16 16h80c8.837 0 16-7.143 16-16V32c0-8.857-7.163-16-16-16H4"/>+ </svg>+ <svg class="logo-letter letter-n" filter="url(#blur)" viewBox="0 0 144 124" width="144" height="124" fill="none" fill-rule="evenodd">+ <path class="line" d="M8 120V32C8 18.745 18.745 8 32 8h80c13.255 0 24 10.745 24 24v88"/>+ <path class="line" d="M128 120V32c-.014-8.752-7.168-15.907-16-16H32c-8.837 0-16 7.158-16 16v88"/>+ <path class="line" d="M24 120V32c0-4.421 3.582-8 8-8h80c4.423.073 8 3.65 8 8v88"/>+ <path class="fill" stroke="#FFFFFF" stroke-width="24" d="M128 124V32c0-8.837-7.185-16-16-16H32c-8.815 0-16 7.163-16 16v92"/>+ </svg>+ <svg class="logo-letter letter-i" filter="url(#blur)" viewBox="0 0 32 124" width="32" height="124" fill="none" fill-rule="evenodd">+ <path class="line" d="M8 120V8"/>+ <path class="line" d="M16 8v112"/>+ <path class="line" d="M24 120V8"/>+ <path class="fill" stroke="#FFFFFF" stroke-width="24" d="M16 36v88"/>+ </svg>+ <svg class="logo-letter letter-m" filter="url(#blur)" viewBox="0 0 256 124" width="256" height="124" fill="none" fill-rule="evenodd">+ <path class="line"+ d="M64 120V32C64 18.745 74.745 8 88 8c24 0 8 .1 40 .1s16-.1 40-.1c13.255 0 24 10.745 24 24v88"+ data-d2="M8 120V32C8 18.745 18.745 8 32 8c24 0 64 40 96 40s72-40 96-40c13.255 0 24 10.745 24 24v88"+ data-d3="M8 120V32C8 18.745 18.745 8 32 8c24 0 64 .1 96 .1s72-.1 96-.1c13.255 0 24 10.745 24 24v88"+ />+ <path class="line"+ d="M72 120V32c0-8.842 7.163-16 16-16 16 0 8 .1 40 .1s24-.1 40-.1c8.832 0 15.986 7.248 16 16v88"+ data-d2="M16 120V32c0-8.842 7.163-16 16-16 16 0 64 38 96 38s80-38 96-38c8.832 0 15.986 7.248 16 16v88"+ data-d3="M16 120V32c0-8.842 7.163-16 16-16 16 0 64 .1 96 .1s80-.1 96-.1c8.832 0 15.986 7.248 16 16v88"+ />+ <path class="line"+ d="M80 120V32c0-4.421 3.582-8 8-8 13.397 0 8 .1 40 .1s26.73-.1 40-.1c4.424 0 8 3.65 8 8v88"+ data-d2="M24 120V32c0-4.421 3.582-8 8-8 13.397 0 64 36 96 36s82.73-36 96-36c4.424 0 8 3.65 8 8v88"+ data-d3="M24 120V32c0-4.421 3.582-8 8-8 13.397 0 64 .1 96 .1s82.73-.1 96-.1c4.424 0 8 3.65 8 8v88"+ />+ <path class="fill" stroke="#FFFFFF" stroke-width="24" d="M16 124V32c0-8.837 7.174-16 16-16 42.62.067 74.62.1 96 .1 21.286 0 53.286-.033 96-.1 8.826 0 16 7.163 16 16v92"/>+ </svg>+ <svg class="logo-letter letter-e" filter="url(#blur)" viewBox="0 0 144 124" width="144" height="124" fill="none" fill-rule="evenodd">+ <path class="line" d="M40 88h72c13.255 0 24-10.745 24-24V32c0-13.255-10.745-24-24-24H32C18.745 8 8 18.745 8 32v64c0 13.255 10.745 24 24 24h104"/>+ <path class="line" d="M136 112l-104.085.014c-8.837 0-16-7.163-16-16.014L16 32c.008-8.831 7.169-15.986 16-15.986L112 16c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16H40"/>+ <path class="line" d="M40 72h72a8 8 0 0 0 8-8V32a8 8 0 0 0-8-8H31.992a8 8 0 0 0-8 7.992l-.068 64c0 4.426 3.581 8.008 8 8.008H136"/>+ <path class="fill" stroke="#FFFFFF" stroke-width="24" d="M36 80h76c8.837-.18 16-7.323 16-16V32c0-8.857-7.163-16-16-16H32c-8.837 0-16 7.143-16 16v64c0 8.857 7.163 16 16 16h108"/>+ </svg>+ <div class="bounce">+ <svg viewBox="0 0 720 288" width="720" height="288" fill="none" filter="url(#blur)">+ <path d="M448 256c0-95.547-15.14-191.447-71.885-191.447C319.371 64.553 304 156.038 304 240"/>+ <rect class="dot" fill="#FFF" x="-12" y="-12" width="24" height="24"></rect>+ </svg>+ </div>+ </div>+ <h2>Javascript Animation Engine</h2>+ <nav class="logo-nav">+ <a href="#"><span>Documentation</span></a>+ <a href="#"><span>CodePen</span></a>+ <a href="#"><span>GitHub</span></a>+ </nav>+ </div>++ </section>++ <script type="module" src="logo-animation.js"></script>+</body>+</html>diff --git a/documentation/examples/anime-logo-animation/bounce.svg b/documentation/examples/anime-logo-animation/bounce.svgnew file mode 100644index 00000000..978dca62--- /dev/null+++ b/documentation/examples/anime-logo-animation/bounce.svg@@ -0,0 +1,5 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 720 288">+ <g id="Page-2" fill="none" fill-rule="evenodd">+ <path id="bounce" stroke="#FF0000" d="M448 256c0-95.547-15.14-191.447-71.885-191.447C319.371 64.553 304 156.038 304 240"/>+ </g>+</svg>diff --git a/documentation/examples/anime-logo-animation/letter-a.svg b/documentation/examples/anime-logo-animation/letter-a.svgnew file mode 100644index 00000000..7f66c082--- /dev/null+++ b/documentation/examples/anime-logo-animation/letter-a.svg@@ -0,0 +1,10 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 144 124">+ <g id="Page-2" fill="none" fill-rule="evenodd">+ <g id="letter-a">+ <path id="line" stroke="#61C3FF" stroke-width="6" d="M8 8h104c13.255 0 24 10.745 24 24v64c0 13.255-10.745 24-24 24H32c-13.255 0-24-10.745-24-24V64c0-13.255 10.745-24 24-24h72"/>+ <path id="line" stroke="#1CE2B2" stroke-width="6" d="M103.932 48.009H31.994c-8.836 0-16 7.163-16 16V96c0 8.837 7.164 16 16 16l79.921-.014c8.831 0 15.992-7.155 16-15.986L128 32c0-8.837-7.163-16-16-16L8 16.012"/>+ <path id="line" stroke="#FF1461" stroke-width="6" d="M8 24h104a8 8 0 0 1 8 8l-.068 64.008a8 8 0 0 1-8 7.992H31.99a8 8 0 0 1-8-8V64a8 8 0 0 1 8-8h71.946"/>+ <path id="fill" stroke="#FFFFFF" stroke-width="24" d="M108 48H32c-8.837-.134-16 7.009-16 16v32c0 8.857 7.163 16 16 16h80c8.837 0 16-7.143 16-16V32c0-8.857-7.163-16-16-16H4"/>+ </g>+ </g>+</svg>diff --git a/documentation/examples/anime-logo-animation/letter-e.svg b/documentation/examples/anime-logo-animation/letter-e.svgnew file mode 100644index 00000000..3e238456--- /dev/null+++ b/documentation/examples/anime-logo-animation/letter-e.svg@@ -0,0 +1,10 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 144 124">+ <g id="Page-2" fill="none" fill-rule="evenodd">+ <g id="letter-e">+ <path id="stroke" stroke="#61C3FF" stroke-width="6" d="M40 88h72c13.255 0 24-10.745 24-24V32c0-13.255-10.745-24-24-24H32C18.745 8 8 18.745 8 32v64c0 13.255 10.745 24 24 24h104"/>+ <path id="stroke" stroke="#1CE2B2" stroke-width="6" d="M136 112l-104.085.014c-8.837 0-16-7.163-16-16.014L16 32c.008-8.831 7.169-15.986 16-15.986L112 16c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16H40"/>+ <path id="stroke" stroke="#FF1461" stroke-width="6" d="M40 72h72a8 8 0 0 0 8-8V32a8 8 0 0 0-8-8H31.992a8 8 0 0 0-8 7.992l-.068 64c0 4.426 3.581 8.008 8 8.008H136"/>+ <path id="eFill" stroke="#FFFFFF" stroke-width="24" d="M36 80h76c8.837-.18 16-7.323 16-16V32c0-8.857-7.163-16-16-16H32c-8.837 0-16 7.143-16 16v64c0 8.857 7.163 16 16 16h108"/>+ </g>+ </g>+</svg>diff --git a/documentation/examples/anime-logo-animation/letter-i.svg b/documentation/examples/anime-logo-animation/letter-i.svgnew file mode 100644index 00000000..91d81eaa--- /dev/null+++ b/documentation/examples/anime-logo-animation/letter-i.svg@@ -0,0 +1,10 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 124">+ <g id="Page-2" fill="none" fill-rule="evenodd">+ <g id="letter-i">+ <path id="line" stroke="#61C3FF" stroke-width="6" d="M8 120V8"/>+ <path id="line" stroke="#1CE2B2" stroke-width="6" d="M16 8v112"/>+ <path id="line" stroke="#FF1461" stroke-width="6" d="M24 120V8"/>+ <path id="fill" stroke="#FFFFFF" stroke-width="24" d="M16 32v92"/>+ </g>+ </g>+</svg>diff --git a/documentation/examples/anime-logo-animation/letter-m-2.svg b/documentation/examples/anime-logo-animation/letter-m-2.svgnew file mode 100644index 00000000..235b9a33--- /dev/null+++ b/documentation/examples/anime-logo-animation/letter-m-2.svg@@ -0,0 +1,9 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 124">+ <g id="Page-2" fill="none" fill-rule="evenodd">+ <g id="letter-m-2" stroke-width="6">+ <path id="line" stroke="#61C3FF" d="M8 120V32C8 18.745 18.745 8 32 8c24 0 64 40 96 40s72-40 96-40c13.255 0 24 10.745 24 24v88"/>+ <path id="line" stroke="#1CE2B2" d="M16 120V32c0-8.842 7.163-16 16-16 16 0 64 38 96 38s80-38 96-38c8.832 0 15.986 7.248 16 16v88"/>+ <path id="line" stroke="#FF1461" d="M24 120V32c0-4.421 3.582-8 8-8 13.397 0 64 36 96 36s82.73-36 96-36c4.424 0 8 3.65 8 8v88"/>+ </g>+ </g>+</svg>diff --git a/documentation/examples/anime-logo-animation/letter-m-3.svg b/documentation/examples/anime-logo-animation/letter-m-3.svgnew file mode 100644index 00000000..ea83e654--- /dev/null+++ b/documentation/examples/anime-logo-animation/letter-m-3.svg@@ -0,0 +1,10 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 124">+ <g id="Page-2" fill="none" fill-rule="evenodd">+ <g id="letter-m-3">+ <path id="line" stroke="#61C3FF" stroke-width="6" d="M8 120V32C8 18.745 18.745 8 32 8c24 0 64 .1 96 .1s72-.1 96-.1c13.255 0 24 10.745 24 24v88"/>+ <path id="line" stroke="#1CE2B2" stroke-width="6" d="M16 120V32c0-8.842 7.163-16 16-16 16 0 64 .1 96 .1s80-.1 96-.1c8.832 0 15.986 7.248 16 16v88"/>+ <path id="line" stroke="#FF1461" stroke-width="6" d="M24 120V32c0-4.421 3.582-8 8-8 13.397 0 64 .1 96 .1s82.73-.1 96-.1c4.424 0 8 3.65 8 8v88"/>+ <path id="fill" stroke="#FFFFFF" stroke-width="24" d="M16 124V32c0-8.837 7.174-16 16-16 42.62.067 74.62.1 96 .1 21.286 0 53.286-.033 96-.1 8.826 0 16 7.163 16 16v92"/>+ </g>+ </g>+</svg>diff --git a/documentation/examples/anime-logo-animation/letter-m.svg b/documentation/examples/anime-logo-animation/letter-m.svgnew file mode 100644index 00000000..d3909d05--- /dev/null+++ b/documentation/examples/anime-logo-animation/letter-m.svg@@ -0,0 +1,9 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 124">+ <g id="Page-2" fill="none" fill-rule="evenodd">+ <g id="letter-m" stroke-width="6">+ <path id="line" stroke="#61C3FF" d="M64 120V32C64 18.745 74.745 8 88 8c24 0 8 .1 40 .1s16-.1 40-.1c13.255 0 24 10.745 24 24v88"/>+ <path id="line" stroke="#1CE2B2" d="M184 120V32c-.014-8.752-7.168-16-16-16-16 0-8 .1-40 .1s-24-.1-40-.1c-8.837 0-16 7.158-16 16v88"/>+ <path id="line" stroke="#FF1461" d="M80 120V32c0-4.421 3.582-8 8-8 13.397 0 8 .1 40 .1s26.73-.1 40-.1c4.424 0 8 3.65 8 8v88"/>+ </g>+ </g>+</svg>diff --git a/documentation/examples/anime-logo-animation/letter-n.svg b/documentation/examples/anime-logo-animation/letter-n.svgnew file mode 100644index 00000000..083763ed--- /dev/null+++ b/documentation/examples/anime-logo-animation/letter-n.svg@@ -0,0 +1,10 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 144 124">+ <g id="Page-2" fill="none" fill-rule="evenodd">+ <g id="letter-n">+ <path id="line" stroke="#61C3FF" stroke-width="6" d="M8 120V32C8 18.745 18.745 8 32 8h80c13.255 0 24 10.745 24 24v88"/>+ <path id="line" stroke="#1CE2B2" stroke-width="6" d="M128 120V32c-.014-8.752-7.168-15.907-16-16H32c-8.837 0-16 7.158-16 16v88"/>+ <path id="line" stroke="#FF1461" stroke-width="6" d="M24 120V32c0-4.421 3.582-8 8-8h80c4.423.073 8 3.65 8 8v88"/>+ <path id="fill" stroke="#FFFFFF" stroke-width="24" d="M128 124V32c0-8.837-7.185-16-16-16H32c-8.815 0-16 7.163-16 16v92"/>+ </g>+ </g>+</svg>diff --git a/documentation/examples/anime-logo-animation/logo-animation.js b/documentation/examples/anime-logo-animation/logo-animation.jsnew file mode 100644index 00000000..8cf5dfea--- /dev/null+++ b/documentation/examples/anime-logo-animation/logo-animation.js@@ -0,0 +1,190 @@+import anime from '../../../src/index.js';++function getPathDuration(el, speed) {+ return anime.setDashoffset(el) * speed;+}++anime.set('.fill', {opacity: 0});+anime.set(['.letter-a', '.letter-n', '.letter-i'], {translateX: 56});+anime.set('.letter-e', {translateX: -56});+anime.set('.dot', {+ translateX: 448,+ translateY: -100+});+anime.set('.sphere path', {opacity: 0});+anime.set('.logo-nav a', {+ transformOrigin: '100% 0%',+ scaleX: 0+});+anime.set('.logo-nav a span', {opacity: 0});++var bouncePath = anime.path('.bounce path');++var spherePathEls = document.querySelectorAll('.sphere path');++function sphereAnimation() {++ anime({+ targets: '.sphere path',+ opacity: 1,+ strokeDashoffset: [anime.setDashoffset, 0],+ duration: 550,+ easing: 'easeInOutCirc',+ delay: function(el, i) {+ return i * 35+ }+ });++ var pathLenght = spherePathEls.length;++ for (var i = 0; i < pathLenght; i++) {+ anime({+ targets: spherePathEls[i],+ strokeWidth: [+ {value: [4, 16]},+ {value: 4, delay: 150 }+ ],+ translateX: [+ {value: 20},+ {value: 0, delay: 150 }+ ],+ translateY: [+ {value: 20},+ {value: 0, delay: 150 }+ ],+ easing: 'easeOutSine',+ duration: 3000,+ loop: true,+ startTime: i * 100+ })+ }++}++var logoAnimation = anime.timeline({+ easing: 'easeOutSine',+ autoplay: false+});++logoAnimation+.add({+ targets: '.line',+ strokeWidth: function() { return [anime.random(1, 12), 4] },+ strokeDashoffset: [anime.setDashoffset, 0],+ easing: 'easeInOutSine',+ duration: function(el) { return getPathDuration(el, 2) },+ delay: function(el, i) { return anime.random(0, 200) }+})+.add({+ targets: '#blur feGaussianBlur',+ stdDeviation: 0,+ easing: 'linear',+ duration: 500,+}, '-=750')+.add({+ targets: ['.logo-letter', '.dot'],+ translateZ: [.1, 0],+ duration: 500+}, '-=500')+.add({+ targets: '.letter-m .line',+ strokeDasharray: 0,+ duration: 1,+}, '-=100')+.add({+ targets: '.dot',+ easing: 'easeOutSine',+ duration: 300,+ translateY: 260,+ translateZ: 0,+ scaleY: [4, 1]+}, '-=100')+.add({+ targets: '.letter-m .line',+ easing: 'easeOutElastic(1, .8)',+ duration: 600,+ d: function(el) { return el.dataset.d2 }+}, '-=120')+.add({+ targets: ['.letter-a', '.letter-n', '.letter-i'],+ translateX: 0,+ easing: 'easeOutElastic(1, .7)',+ duration: 800,+ delay: function(el, i, t) { return (t - i) * 20 }+}, '-=600')+.add({+ targets: '.letter-e',+ translateX: 0,+ easing: 'easeOutElastic(1, .7)',+ duration: 800,+}, '-=840')+.add({+ targets: '.dot',+ translateX: bouncePath('x'),+ translateY: bouncePath('y'),+ translateZ: 0,+ rotate: 360,+ easing: 'cubicBezier(0.000, 0.740, 1.000, 0.255)',+ duration: 600,+ complete: sphereAnimation+}, '-=350')+.add({+ targets: '.dot',+ translateY: [+ {value: 262, duration: 100, easing: 'easeOutSine'},+ {value: 242, duration: 1000, easing: 'easeOutElastic(1, .8)'}+ ]+})+.add({+ targets: '.letter-m .line',+ easing: 'spring(1, 80, 10, 30)',+ d: function(el) { return el.dataset.d3 }+}, '-=1700')+.add({+ targets: ['.letter-i .fill', '.letter-n .fill', '.letter-m .fill', '.letter-a .fill', '.letter-e .fill'],+ opacity: { value: [0, 1], duration: 1},+ strokeDashoffset: [anime.setDashoffset, 0],+ duration: function(el) { return getPathDuration(el, 1.5) },+ easing: 'cubicBezier(0.400, 0.530, 0.070, 1)',+ delay: function(el, i) { return Math.round(i / 2) * 150 }+}, '-=1100')+.add({+ targets: '.letter-i .line',+ strokeDashoffset: anime.setDashoffset,+ duration: 200,+}, '-=1100')+.add({+ targets: ['.letter-i', '.letter-n', '.letter-m', '.letter-a', '.letter-e'],+ translateY: [+ {value: 25, duration: 150},+ {value: 0, duration: 800, easing: 'easeOutElastic(1, .6)'}+ ],+ strokeDashoffset: [anime.setDashoffset, 0],+ delay: function(el, i) { return Math.round(i / 2) * 30 }+}, '-=1100')+.add({+ targets: ['.anime-logo h2'],+ translateY: [-20, 0],+ opacity: 1,+ easing: 'easeOutElastic(1, .6)',+ duration: 1000+}, '-=1000')+.add({+ targets: ['.logo-nav a'],+ skew: [-45, 0],+ scaleX: 1,+ easing: 'easeInOutCirc',+ duration: 500,+ delay: function(el, i, t) { return (t - i) * 100 }+}, '-=250')+.add({+ targets: ['.logo-nav a span'],+ opacity: 1,+ easing: 'linear',+ duration: 500,+ delay: function(el, i, t) { return (t - i) * 100 }+}, '-=250')++// anime.speed = .31;+//logoAnimation.seek(3000);+logoAnimation.play();\ No newline at end of filediff --git a/documentation/examples/anime-logo-animation/sphere.svg b/documentation/examples/anime-logo-animation/sphere.svgnew file mode 100644index 00000000..2d2ff432--- /dev/null+++ b/documentation/examples/anime-logo-animation/sphere.svg@@ -0,0 +1,25 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1500 1500" style="background:#000">+ <g id="Page-2" fill="none" fill-rule="evenodd">+ <g id="sphere" stroke-width="8">+ <path id="elipse" stroke="#FF1461" d="M1257.57 1255.07c-85.914 85.916-179.94 131.188-210.01 101.117-30.07-30.07 15.201-124.095 101.117-210.01 85.915-85.916 179.94-131.187 210.01-101.117 30.07 30.07-15.2 124.096-101.116 210.01z"/>+ <path id="elipse" stroke="#FF7C72" d="M1254.743 1252.243c-128.483 128.482-269.046 196.23-313.956 151.32-44.91-44.91 22.838-185.473 151.321-313.955 128.482-128.483 269.045-196.231 313.955-151.32 44.91 44.91-22.838 185.472-151.32 313.955z"/>+ <path id="elipse" stroke="#FB89FB" d="M1246.61 1243.404c-159.919 159.92-336.097 243.022-393.504 185.615-57.407-57.407 25.696-233.585 185.615-393.505 159.92-159.92 336.098-243.022 393.505-185.615 57.407 57.407-25.696 233.585-185.615 393.505z"/>+ <path id="elipse" stroke="#61C3FF" d="M1223.63 1221.13c-185.89 185.89-391.352 281.814-458.912 214.253-67.561-67.56 28.363-273.023 214.253-458.912 185.89-185.89 391.351-281.814 458.912-214.253 67.56 67.56-28.364 273.022-214.253 458.912z"/>+ <path id="elipse" stroke="#5EF3FB" d="M1196.053 1193.553c-209.712 209.711-441.45 317.982-517.603 241.83-76.152-76.152 32.12-307.89 241.831-517.602 209.712-209.712 441.45-317.983 517.602-241.83 76.152 76.152-32.119 307.89-241.83 517.602z"/>+ <path id="elipse" stroke="#18FF92" d="M1161.05 1157.844c-229.432 229.433-483.015 347.835-566.392 264.458-83.377-83.377 35.025-336.96 264.458-566.393 229.433-229.433 483.016-347.835 566.393-264.458 83.377 83.377-35.025 336.96-264.458 566.393z"/>+ <path id="elipse" stroke="#1CE2B2" d="M1120.392 1117.892c-245.249 245.25-516.877 371.25-606.697 281.429-89.821-89.82 36.179-361.449 281.428-606.698 245.25-245.25 516.877-371.249 606.698-281.428 89.82 89.82-36.18 361.448-281.429 606.697z"/>+ <path id="elipse" stroke="#B08CFF" d="M1072.309 1069.809c-261.26 261.26-550.617 395.492-646.296 299.813-95.678-95.678 38.553-385.035 299.814-646.295 261.26-261.261 550.617-395.492 646.295-299.814 95.679 95.679-38.552 385.035-299.813 646.296z"/>+ <path id="elipse" stroke="#FF7C72" d="M1012.205 1009.705c-269.071 269.071-567.134 407.26-665.741 308.652-98.608-98.607 39.58-396.67 308.652-665.741 269.071-269.071 567.134-407.26 665.741-308.652 98.607 98.607-39.58 396.67-308.652 665.74z"/>+ <path id="elipse" stroke="#FF7C72" d="M940.787 938.287c-271.414 271.414-572.01 410.87-671.398 311.48-99.388-99.388 40.066-399.983 311.48-671.397 271.415-271.415 572.01-410.87 671.399-311.48 99.388 99.388-40.067 399.983-311.48 671.397z"/>+ <path id="elipse" stroke="#FF48AB" d="M864.42 861.92c-269.072 269.07-567.134 407.26-665.741 308.652-98.608-98.608 39.58-396.67 308.652-665.741 269.07-269.072 567.133-407.26 665.74-308.652 98.608 98.607-39.58 396.67-308.651 665.74z"/>+ <path id="elipse" stroke="#FF1461" d="M792.295 789.795c-261.261 261.26-550.617 395.491-646.296 299.813-95.678-95.678 38.553-385.035 299.813-646.296C707.073 182.052 996.43 47.821 1092.108 143.5c95.678 95.679-38.553 385.035-299.813 646.296z"/>+ <path id="elipse" stroke="#A6FF8F" d="M723.705 721.205c-245.249 245.25-516.877 371.25-606.697 281.429-89.82-89.82 36.179-361.449 281.428-606.698 245.25-245.25 516.877-371.249 606.698-281.428 89.82 89.82-36.18 361.448-281.429 606.697z"/>+ <path id="elipse" stroke="#FF7C72" d="M661.126 657.92C431.693 887.351 178.111 1005.753 94.734 922.376 11.357 839 129.759 585.417 359.192 355.985 588.625 126.552 842.207 8.15 925.584 91.527c83.377 83.377-35.025 336.96-264.458 566.392z"/>+ <path id="elipse" stroke="#FBF38C" d="M595.719 593.219c-209.712 209.712-441.45 317.983-517.602 241.83-76.152-76.152 32.119-307.89 241.83-517.602C529.66 107.736 761.397-.535 837.55 75.617c76.152 76.152-32.12 307.89-241.831 517.602z"/>+ <path id="elipse" stroke="#5A87FF" d="M537.03 534.53C351.14 720.418 145.677 816.342 78.116 748.781 10.557 681.222 106.48 475.76 292.37 289.87 478.26 103.98 683.722 8.056 751.282 75.617c67.561 67.56-28.363 273.023-214.253 458.912z"/>+ <path id="elipse" stroke="#B08CFF" d="M477.986 474.779C318.066 634.699 141.888 717.8 84.48 660.394 27.074 602.987 110.177 426.81 270.096 266.89 430.016 106.97 606.194 23.867 663.601 81.274c57.407 57.407-25.696 233.585-185.615 393.505z"/>+ <path id="elipse" stroke="#5EF3FB" d="M423.892 421.392C295.41 549.875 154.847 617.623 109.937 572.712c-44.91-44.91 22.838-185.472 151.32-313.955 128.483-128.482 269.046-196.23 313.956-151.32 44.91 44.91-22.838 185.473-151.321 313.955z"/>+ <path id="elipse" stroke="#1CE2B2" d="M367.324 364.824c-85.916 85.915-179.94 131.186-210.011 101.116-30.07-30.07 15.2-124.096 101.116-210.01 85.915-85.916 179.94-131.188 210.01-101.117 30.071 30.07-15.2 124.095-101.115 210.01z"/>+ </g>+ </g>+</svg>diff --git a/documentation/examples/anime-logo.svg b/documentation/examples/anime-logo.svgnew file mode 100644index 00000000..c8552922--- /dev/null+++ b/documentation/examples/anime-logo.svg@@ -0,0 +1,41 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1088 590" style="background:#191924">+ <g id="Page-2" fill="none" fill-rule="evenodd">+ <g id="anime-logo">+ <g id="strokes" stroke-width="6" transform="translate(248 228)">+ <g id="aStrokes">+ <path id="stroke" stroke="#61C3FF" d="M0 0h104c13.255 0 24 10.745 24 24v64c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V56c0-13.255 10.745-24 24-24h72"/>+ <path id="stroke" stroke="#1CE2B2" d="M0 8.013L104 8c8.837 0 16 7.164 16 16v.014L119.915 88c-.008 8.831-7.169 15.986-16 15.986l-79.92.014c-8.837 0-16-7.163-16-16V56.009c0-8.837 7.163-16 16-16h71.937"/>+ <path id="stroke" stroke="#FF1461" d="M0 16h104a8 8 0 0 1 8 8v.008l-.068 64a8 8 0 0 1-8 7.992H23.99a8 8 0 0 1-8-8V56a8 8 0 0 1 8-8h71.946"/>+ </g>+ <g id="nStrokes" transform="translate(144)">+ <path id="stroke" stroke="#61C3FF" d="M0 112V24C0 10.745 10.745 0 24 0h80c13.255 0 24 10.745 24 24v88"/>+ <path id="stroke" stroke="#1CE2B2" d="M8 112V24c0-8.842 7.163-16 16-16h80c8.832.093 15.986 7.248 16 16v88"/>+ <path id="stroke" stroke="#FF1461" d="M16 112V24c0-4.421 3.582-8 8-8h80c4.423.073 8 3.65 8 8v88"/>+ </g>+ <g id="iStrokes" transform="translate(287)">+ <path id="stroke" stroke="#61C3FF" d="M1 112V0"/>+ <path id="stroke" stroke="#1CE2B2" d="M9 112V0"/>+ <path id="stroke" stroke="#FF1461" d="M17 112V0"/>+ </g>+ <g id="mStrokes" transform="translate(320)">+ <path id="stroke" stroke="#61C3FF" d="M0 112V24C0 10.745 10.745 0 24 0h80c13.255 0 24 10.745 24 24v88"/>+ <path id="stroke" stroke="#1CE2B2" d="M8 112V24c0-8.842 7.163-16 16-16h80c8.831.093 15.986 7.248 16 16v88"/>+ <path id="stroke" stroke="#FF1461" d="M16 112V24c0-4.421 3.582-8 8-8h80c4.423.073 8 3.65 8 8v88"/>+ </g>+ <g id="eStrokes" transform="translate(464)">+ <path id="stroke" stroke="#61C3FF" d="M96 32H24C10.745 32 0 42.745 0 56v32c0 13.255 10.745 24 24 24h80c13.255 0 24-10.745 24-24V24c0-13.255-10.745-24-24-24H0" transform="rotate(-180 64 56)"/>+ <path id="stroke" stroke="#1CE2B2" d="M103.915 40.014h-72c-8.837 0-16 7.164-16 16v32c0 8.837 7.163 16 16 16l80-.014c8.831 0 15.992-7.155 16-15.986l.085-64C128 15.164 120.837 8 112 8L7.915 8.014" transform="rotate(-180 67.958 56.007)"/>+ <path id="stroke" stroke="#FF1461" d="M111.924 48h-72a8 8 0 0 0-8 8v32a8 8 0 0 0 8 8h80.008a8 8 0 0 0 8-7.992l.068-64c0-4.426-3.582-8.008-8-8.008H15.924" transform="rotate(-180 71.962 56)"/>+ </g>+ </g>+ <g id="fills" stroke="#FFFFFF" stroke-width="24" transform="translate(244 224)">+ <path id="aFill" d="M0 12h108c8.837 0 16 7.143 16 16v64c0 8.857-7.163 16-16 16H28c-8.837 0-16-7.143-16-16V60c0-8.991 7.163-16.134 16-16h76"/>+ <path id="nFill" d="M156 120V28c0-8.837 7.185-16 16-16h80c8.815 0 16 7.163 16 16v92"/>+ <path id="iFill" d="M300 120V0"/>+ <path id="mFill" d="M332 120V28c0-8.837 7.174-16 16-16 5.286.067 18.62.1 40 .1 21.286 0 34.62-.033 40-.1 8.826 0 16 7.163 16 16v92"/>+ <path id="eFill" d="M496 76h76c8.837-.18 16-7.323 16-16V28c0-8.857-7.163-16-16-16h-80c-8.837 0-16 7.143-16 16v64c0 8.857 7.163 16 16 16h108"/>+ </g>+ <rect id="dotEl" width="24" height="24" x="476" y="224" fill="#FFFFFF"/>+ </g>+ </g>+</svg>