Skip to content

armgit / anime

Public Imported from GitHub
0

JavaScript animation engine

New logo

Julian Garnier1dd039c9a427
diff --git a/documentation/assets/css/styles.css b/documentation/assets/css/styles.css
index 645d8ed7..839e5cb0 100644
--- a/documentation/assets/css/styles.css
+++ b/documentation/assets/css/styles.css
@@ -49,28 +49,15 @@ header {
border-bottom: 1px solid #09090B;
}
-.logo {
- display: block;
- width: 156px;
- height: 26px;
- color: transparent;
- background-image: url(../img/anime-js-v2-logo-white.png);
- background-size: 156px 26px;
-}
-
-h2 {
+h1, h2 {
+ opacity: .6;
font-size: 22px;
letter-spacing: 2px;
text-transform: uppercase;
font-weight: 200;
}
-h2,
-.logo {
- opacity: .6;
-}
-
-.logo:hover {
+h1:hover {
opacity: 1;
}
@@ -94,16 +81,31 @@ h2,
.sidebar-header {
position: absolute;
- width: 100%;
z-index: 1;
top: 0;
+ width: 100%;
+ padding: 0;
+}
+
+.logo {
+ display: flex;
+ align-items: center;
+ width: 240px;
+ height: 60px;
+ padding: 10px 0 10px 55px;
+ color: white;
+ text-decoration: none;
+ background-image: url(../img/anime-js-v2-logo-white.png);
+ background-size: 32px;
+ background-position: 10px;
+ background-repeat: no-repeat;
}
.navigation {
overflow-y: scroll;
width: 100%;
height: 100%;
- padding: 20px 0 20px 20px;
+ padding: 10px 0 20px 20px;
}
.navigation ul {
diff --git a/documentation/assets/img/anime-js-v2-logo-white.png b/documentation/assets/img/anime-js-v2-logo-white.png
index 59e0e012..ae5025a0 100644
Binary files a/documentation/assets/img/anime-js-v2-logo-white.png and b/documentation/assets/img/anime-js-v2-logo-white.png differ
diff --git a/documentation/template.html b/documentation/template.html
index 2ac4ddbc..07531adf 100644
--- a/documentation/template.html
+++ b/documentation/template.html
@@ -15,7 +15,7 @@
<section class="pane sidebar">
<header class="sidebar-header">
- <a class="logo" href="#">anime.js v2</a>
+ <h1><a class="logo" href="#">Anime.js</a></h1>
</header>
<nav class="navigation"></nav>
</section>
diff --git a/examples/anime-logo-v2.html b/examples/anime-logo-v2.html
new file mode 100644
index 00000000..b343a1d0
--- /dev/null
+++ b/examples/anime-logo-v2.html
@@ -0,0 +1,203 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>logo animation v2</title>
+ <meta charset="utf-8">
+ <link href="../documentation/assets/css/styles.css" rel="stylesheet">
+</head>
+<style>
+ .logo-animation {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 100%;
+ height: 100%;
+ }
+ .letters {
+ position: relative;
+ display: flex;
+ width: 682px;
+ height: 162px;
+ }
+ .letter {
+ position: relative;
+ width: 162px;
+ height: 162px;
+ /*mix-blend-mode: lighten;*/
+ }
+ .letter:not(:first-child) {
+ margin-left: -42px;
+ }
+ .letter-i {
+ z-index: 1;
+ width: 82px;
+ transform-origin: 100% 50%;
+ }
+ .dot {
+ position: absolute;
+ width: 42px;
+ height: 42px;
+ }
+ .dot-i {
+ top: 0;
+ left: 240px;
+ }
+ .dot-e {
+ bottom: 0;
+ left: 0;
+ }
+ .path-fill {
+ opacity: 1;
+ }
+</style>
+<body>
+ <div class="logo-animation">
+ <div class="letters">
+ <div class="letter letter-a">
+ <svg viewBox="0 0 162 162">
+ <g fill="none" fill-rule="evenodd" stroke="#5E89FB">
+ <path class="path-line" stroke-width="40" d="M101 141H81a60 60 0 1 1 0-120c33.14 0 59 26.86 60 60v80"/>
+ <path class="path-fill" stroke-width="2" d="M121 161V81.33C120.18 58.59 102.7 41 81 41a40 40 0 1 0 0 80h20v40H81A80 80 0 1 1 81 1c43.8 0 78.66 35.27 80 79.7V161h-40z"/>
+ </g>
+ </svg>
+ </div>
+ <div class="letter letter-n">
+ <svg viewBox="0 0 162 162">
+ <g fill="none" fill-rule="evenodd" stroke="#FB155A">
+ <path class="path-line" stroke-width="40" d="M21 161V81c1-33.14 26.86-60 60-60a60 60 0 0 1 60 60v80"/>
+ <path class="path-fill" stroke-width="2" d="M121 161V81a40 40 0 0 0-40-40c-21.7 0-39.18 17.59-40 40.33V161H1V80.4C2.35 36.27 37.2 1 81 1a80 80 0 0 1 80 80v80h-40z"/>
+ </g>
+ </svg>
+ </div>
+ <div class="letter letter-i">
+ <svg viewBox="0 0 82 162">
+ <g fill="none" fill-rule="evenodd" stroke="#18F38C">
+ <path class="path-line" stroke-width="40" d="M21 61v20a60 60 0 0 0 60 60"/>
+ <path class="path-fill" stroke-width="2" d="M1 61v20a80 80 0 0 0 80 80v-40a40 40 0 0 1-40-40V61H1z"/>
+ </g>
+ </svg>
+ </div>
+ <div class="letter letter-m-1">
+ <svg viewBox="0 0 162 162">
+ <g fill="none" fill-rule="evenodd" stroke="#5E89FB">
+ <path class="path-line" stroke-width="40" d="M21 161V81c1-33.14 26.86-60 60-60a60 60 0 0 1 60 60v80"/>
+ <path class="path-fill" stroke-width="2" d="M121 161V81a40 40 0 0 0-40-40c-21.7 0-39.18 17.59-40 40.33V161H1V80.4C2.35 36.27 37.2 1 81 1a80 80 0 0 1 80 80v80h-40z"/>
+ </g>
+ </svg>
+ </div>
+ <div class="letter letter-m-2">
+ <svg viewBox="0 0 162 162">
+ <g fill="none" fill-rule="evenodd" stroke="#FB155A">
+ <path class="path-line" stroke-width="40" d="M21 161V81c1-33.14 26.86-60 60-60a60 60 0 0 1 60 60v80"/>
+ <path class="path-fill" stroke-width="2" d="M121 161V81a40 40 0 0 0-40-40c-21.7 0-39.18 17.59-40 40.33V161H1V80.4C2.35 36.27 37.2 1 81 1a80 80 0 0 1 80 80v80h-40z"/>
+ </g>
+ </svg>
+ </div>
+ <div class="letter letter-e">
+ <svg viewBox="0 0 162 162">
+ <g fill="none" fill-rule="evenodd">
+ <path class="path-line" stroke="#18F38C" stroke-width="40" d="M81 101h60V81c-1-33.14-26.86-60-60-60a60 60 0 1 0 0 120"/>
+ <path class="path-fill" stroke="#17F28C" stroke-width="2" d="M81 81v40h80V80.7C159.66 36.27 124.8 1 81 1a80 80 0 1 0 0 160v-40a40 40 0 1 1 0-80c21.6 0 39.01 17.42 39.99 40H81z"/>
+ </g>
+ </svg>
+ </div>
+ <div class="dot dot-i">
+ <svg viewBox="0 0 42 42">
+ <g fill="none" fill-rule="evenodd">
+ <circle class="dot-fill" cx="21" cy="21" r="20" fill="#17F28C" stroke-width="2"/>
+ <circle class="dot-line" cx="21" cy="21" r="20" stroke="#17F28C" stroke-width="2"/>
+ </g>
+ </svg>
+ </div>
+ <div class="dot dot-e">
+ <svg viewBox="0 0 42 42">
+ <g fill="none" fill-rule="evenodd">
+ <circle class="dot-fill" cx="21" cy="21" r="20" fill="#FFFFFF" stroke-width="2"/>
+ <circle class="dot-line" cx="21" cy="21" r="20" stroke="#FFFFFF" stroke-width="2"/>
+ </g>
+ </svg>
+ </div>
+ </div>
+ </div>
+ <script src="../anime.js"></script>
+ <script>
+
+ var setDashoffset = function(el) {
+ var l = el.getTotalLength();
+ el.setAttribute('stroke-dasharray', l);
+ return l;
+ }
+
+ var logoAnimation = anime.timeline();
+
+ logoAnimation.add([
+ anime({
+ targets: '.dot-e',
+ translateX: { value: 640, duration: 800, delay: 600, elasticity: 200 },
+ translateY: { value: [-200, 0], duration: 800 },
+ }),
+ anime({
+ targets: '.letter',
+ translateY: [150, 0],
+ duration: 700,
+ elasticity: 400,
+ delay: function(el, i) {
+ return 100 + i * 100;
+ }
+ }),
+ anime({
+ targets: ['.path-line'],
+ strokeDashoffset: {
+ value: [setDashoffset, 0],
+ duration: 700,
+ easing: 'easeOutQuad',
+ delay: function(el, i) {
+ return 200 + (i * 100);
+ }
+ }
+ }),
+ anime({
+ targets: '.path-fill',
+ strokeDashoffset: {
+ value: [setDashoffset, 0],
+ duration: 700,
+ easing: 'easeOutQuad',
+ delay: function(el, i) {
+ return 100 + (i * 100);
+ }
+ }
+ }),
+ anime({
+ targets: '.letter-i',
+ rotate: -360,
+ opacity: {
+ value: [0, 1],
+ duration: 10
+ },
+ delay: 650,
+ duration: 1400,
+ elasticity: 450
+ }),
+ anime({
+ targets: '.dot-i',
+ translateY: { value: [-400, 0], duration: 600, elasticity: 300 },
+ delay: 1420
+ }),
+ anime({
+ targets: ['.path-line', '.dot-fill'],
+ opacity: {
+ value: 0,
+ duration: 700,
+ easing: 'easeOutQuad',
+ delay: function(el, i) {
+ return 1100 + (i * 50);
+ }
+ }
+ }),
+ ]);
+
+ anime.speed = 1;
+
+ </script>
+</body>
+</html>