JavaScript animation engine
Add basic animation examples
Julian Garnier5c4c0caccfb6
diff --git a/examples/basic-animations.html b/examples/basic-animations.htmlnew file mode 100644index 00000000..68e93004--- /dev/null+++ b/examples/basic-animations.html@@ -0,0 +1,143 @@+<!DOCTYPE html>+<html>+<head>+ <title>Basic animations | anime.js</title>+ <meta charset="utf-8">+ <link rel="icon" type="image/png" href="img/favicon.png" />+ <link rel="apple-touch-icon" href="img/apple-touch-icon.png" />+ <link href="css/styles.css" rel="stylesheet">+</head>+<style>+++</style>++<body>+ <div class="cells">+ <div class="cell w-02 h-02 color-01">+ <div class="demo">+ <div class="el shadow"></div>+ <div class="el default-settings"></div>+ </div>+ <h3 class="demo-title">Default settings</h3>+ </div>+ <div class="cell w-02 h-02 color-02">+ <div class="demo">+ <div class="el shadow"></div>+ <div class="el direction-alternate"></div>+ </div>+ <h3 class="demo-title">Direction alternate</h3>+ </div>+ <div class="cell w-02 h-02 color-03">+ <div class="demo">+ <div class="el shadow"></div>+ <div class="el direction-reverse"></div>+ </div>+ <h3 class="demo-title">Direction reverse</h3>+ </div>+ <div class="cell w-02 h-02 color-04">+ <div class="demo">+ <div class="el shadow"></div>+ <div class="el loop"></div>+ </div>+ <h3 class="demo-title">Loop (3)</h3>+ </div>+ <div class="cell w-02 h-02 color-05">+ <div class="demo">+ <div class="el shadow"></div>+ <div class="el loop-alternate"></div>+ </div>+ <h3 class="demo-title">Loop alternate Loop (3)</h3>+ </div>+ <div class="cell w-02 h-02 color-06">+ <div class="demo">+ <div class="el shadow"></div>+ <div class="el loop-reverse"></div>+ </div>+ <h3 class="demo-title">Loop reverse(3)</h3>+ </div>+ <div class="cell w-02 h-02 color-07">+ <div class="demo">+ <div class="el shadow"></div>+ <div class="el infinite-loop"></div>+ </div>+ <h3 class="demo-title">Infinite loop</h3>+ </div>+ <div class="cell w-02 h-02 color-08">+ <div class="demo">+ <div class="el shadow"></div>+ <div class="el infinite-loop-alternate"></div>+ </div>+ <h3 class="demo-title">Infinite loop alternate</h3>+ </div>+ <div class="cell w-02 h-02 color-09">+ <div class="demo">+ <div class="el shadow"></div>+ <div class="el infinite-loop-reverse"></div>+ </div>+ <h3 class="demo-title">Infinite loop reverse</h3>+ </div>+ </div>+ <script src="../anime.js"></script>+ <script>++ anime({+ targets: '.default-settings',+ translateX: 250+ });++ anime({+ targets: '.direction-alternate',+ translateX: 250,+ direction: 'alternate'+ });++ anime({+ targets: '.direction-reverse',+ translateX: 250,+ direction: 'reverse'+ });++ anime({+ targets: '.loop',+ translateX: 250,+ loop: 3+ });++ anime({+ targets: '.loop-alternate',+ translateX: 250,+ loop: 3,+ direction: 'alternate'+ });++ anime({+ targets: '.loop-reverse',+ translateX: 250,+ loop: 3,+ direction: 'reverse'+ });++ anime({+ targets: '.infinite-loop',+ translateX: 250,+ loop: true+ });++ anime({+ targets: '.infinite-loop-alternate',+ translateX: 250,+ loop: true,+ direction: 'alternate'+ });++ anime({+ targets: '.infinite-loop-reverse',+ translateX: 250,+ loop: true,+ direction: 'alternate'+ });++ </script>+</body>+</html>diff --git a/examples/css/styles.css b/examples/css/styles.cssindex f65a1dbe..60a8387d 100644--- a/examples/css/styles.css+++ b/examples/css/styles.css@@ -1,17 +1,5 @@html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{border:0;font-size:100%;font:inherit;vertical-align:baseline;margin:0;padding:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:none}table{border-collapse:collapse;border-spacing:0}-@font-face {- font-family: 'Circular';- src: url('../fonts/Circular-Book.woff') format('woff');- font-weight: normal;-}--@font-face {- font-family: 'Circular';- src: url('../fonts/Circular-Bold.woff') format('woff');- font-weight: bold;-}-* {margin: 0;padding: 0;@@ -20,7 +8,7 @@ html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbhtml,body {- background: #18212D;+ background: #17151C;}body {@@ -28,35 +16,103 @@ body {display: flex;align-items: center;justify-content: center;+ flex-wrap: wrap;width: 100%;height: 100%;- flex-wrap: wrap;color: white;- font-family: 'Circular', sans-serif;+ font-family: sans-serif;-webkit-font-smoothing: antialiased;}-section {- min-width: 18rem;+.cells {+ position: absolute;+ display: flex;+ align-items: center;+ justify-content: center;+ flex-wrap: wrap;+ width: 100%;+ height: 100%;+ border-top: 1px solid #09090B;+ border-left: 1px solid #09090B;}-div {- width: 2rem;- height: 2rem;+.cell {+ position: relative;+ display: flex;+ align-items: center;+ justify-content: space-between;+ flex-direction: column;+ flex-wrap: wrap;+ height: auto;+ border-right: 1px solid #09090B;+ border-bottom: 1px solid #09090B;}-.red {- background-color: #FF324A;+.demo {+ display: flex;+ align-items: center;+ justify-content: flex-start;+ flex-direction: row;+ flex-wrap: wrap;+ width: 300px;+ flex: 1;}-.green {- background-color: #31FFA6;+.demo-title {+ position: absolute;+ bottom: 0;+ display: block;+ width: 100%;+ padding: 1rem;+ text-align: center;+ text-transform: uppercase;}-.blue {- background-color: #206EFF;+.el {+ width: 50px;+ height: 50px;}-.yellow {- background-color: #FFFF99;+.el.shadow {+ position: absolute;+ opacity: .2;}++.w-01 { width: 16.666666667%; }+.w-02 { width: 33.333333333%; }+.w-03 { width: 50%; }+.w-04 { width: 66.666666667%; }+.w-05 { width: 83.333333333%; }+.w-06 { width: 100%; }++.h-01 { height: 16.666666667%; }+.h-02 { height: 33.333333333%; }+.h-03 { height: 50%; }+.h-04 { height: 66.666666667%; }+.h-05 { height: 83.333333333%; }+.h-06 { height: 100%; }++.color-01 { color: #FF3478; }+.color-01 .el { background-color: #FF3478; }+.color-02 { color: #F96F82; }+.color-02 .el { background-color: #F96F82; }+.color-03 { color: #FEA388; }+.color-03 .el { background-color: #FEA388; }+.color-04 { color: #FED28B; }+.color-04 .el { background-color: #FED28B; }+.color-05 { color: #FBF88F; }+.color-05 .el { background-color: #FBF88F; }+.color-06 { color: #D1FA9E; }+.color-06 .el { background-color: #D1FA9E; }+.color-07 { color: #8AFBB1; }+.color-07 .el { background-color: #8AFBB1; }+.color-08 { color: #7BE6D6; }+.color-08 .el { background-color: #7BE6D6; }+.color-09 { color: #67AAFB; }+.color-09 .el { background-color: #67AAFB; }+.color-10 { color: #4E7EFC; }+.color-10 .el { background-color: #4E7EFC; }+.color-11 { color: #957FFD; }+.color-11 .el { background-color: #957FFD; }+.color-12 { color: #C987FE; }+.color-12 .el { background-color: #C987FE; }diff --git a/examples/timeline.html b/examples/timeline.htmlindex 80a81791..9ceb5f22 100644--- a/examples/timeline.html+++ b/examples/timeline.html@@ -63,7 +63,7 @@<input class="percents" type="text"></input></fieldset></section>- <script src="../anime.js"></script>+ <script src="../anime.min.js"></script><script>var playButton = document.querySelector('.play');