JavaScript animation engine
Update docs and readme
Julian Garnier00fc93c4e7ce
diff --git a/LICENSE.md b/LICENSE.mdindex 9a367c85..78b6ebfe 100644--- a/LICENSE.md+++ b/LICENSE.md@@ -1,6 +1,6 @@The MIT License-Copyright (c) 2017 Julian Garnier+Copyright (c) 2019 Julian GarnierPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:diff --git a/README.md b/README.mdindex 85ceb728..addeb311 100644--- a/README.md+++ b/README.md@@ -1,65 +1,109 @@-# [anime.js](http://animejs.com) +<h1 align="center">+ <a href="https://animejs.com"><img src="/documentation/assets/img/animejs-v3-header-animation.gif" width="250"/></a>+ <br>+ anime.js+</h1>-<img src="http://animejs.com/documentation/assets/img/readme/animejs-logo.gif" width="100%" />+<h4 align="center">JavaScript animation engine | <a href="https://animejs.com" target="_blank">animejs.com</a></h4>->*Anime* `(/ˈæn.ə.meɪ/)` is a lightweight JavaScript animation library. It works with any CSS Properties, individual CSS transforms, SVG or any DOM attributes, and JavaScript Objects.+<p align="center">+ <a href="https://www.npmjs.com/package/animejs" rel="nofollow"><img src="https://camo.githubusercontent.com/011820ee25bf1d3ddaf635d869903b98eccaeae7/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f616e696d656a732e7376673f7374796c653d666c61742d737175617265" alt="npm version" data-canonical-src="https://img.shields.io/npm/v/animejs.svg?style=flat-square" style="max-width:100%;"></a>+ <a href="https://www.npmjs.com/package/animejs" rel="nofollow"><img src="https://camo.githubusercontent.com/3e9b69d51aee25fad784a3097676696096621d47/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f646d2f616e696d656a732e7376673f7374796c653d666c61742d737175617265" alt="npm downloads" data-canonical-src="https://img.shields.io/npm/dm/animejs.svg?style=flat-square" style="max-width:100%;"></a>+</p>-⚠️ **Migrating from v1.x ? Make sure to read the [changelog](https://github.com/juliangarnier/anime/releases/tag/v2.0.0)** ⚠️+<blockquote align="center">+ <em>Anime.js</em> (<code>/ˈæn.ə.meɪ/</code>) is a lightweight JavaScript animation library with a simple, yet powerful API.<br>+ It works with CSS properties, SVG, DOM attributes and JavaScript Objects.+</blockquote>-### Main features+<p align="center">+ <a href="#getting-started">Getting started</a> | <a href="#documentation">Documentation</a> | <a href="#demos-and-examples">Demos and examples</a> | <a href="#browser-support">Browser support</a>+</p>-* [Keyframes](#keyframes): Chain multiple animation properties.-* [Timeline](#timeline): Synchronize multiple instances together.-* [Playback controls](#playback-controls): Play, pause, restart, seek animations or timelines.-* [CSS transforms](#individual-CSS-transforms): Animate CSS transforms individually.-* [Function based values](#function-based-values): Multiple animated targets can have individual value.-* [SVG Animations](#svg): Motion path, line drawing and morphing animations.-* [Easing functions](#easing-functions): Use the built in functions or create your own Cubic Bézier curve easing.+## Getting started-### Demos and examples+### Download-* [CodePen demos and examples](http://codepen.io/collection/b392d3a52d6abf5b8d9fda4e4cab61ab/)-* [juliangarnier.com](http://juliangarnier.com)-* [animejs.com](http://animejs.com)-* [kenzo.com/en/thejunglebook](https://kenzo.com/en/thejunglebook)-* [Stress test](http://codepen.io/juliangarnier/pen/9aea7f045d7db301eab41bc09dcfc04d?editors=0010)+Via npm-### Browser support+```bash+$ npm install animejs --save+```-| Chrome | Safari | IE / Edge | Firefox | Opera |-| --- | --- | --- | --- | --- |-| 24+ | 6+ | 10+ | 32+ | 15+ |+or manual [download](https://github.com/juliangarnier/anime/archive/master.zip).-## Usage+### Usage-```bash-$ npm install animejs-# OR-$ bower install animejs+#### ES6 modules++```javascript+import anime from 'lib/anime.es.js';```+#### CommonJS+```javascript-import anime from 'animejs'+import anime from 'lib/anime.js';```-Or manually [download](https://github.com/juliangarnier/anime/archive/master.zip) and link `anime.min.js` in your HTML:+#### File include++Link `anime.min.js` in your HTML :```html<script src="anime.min.js"></script>```-Then start animating:+### Hello world```javascriptanime({targets: 'div',- translateX: [- { value: 100, duration: 1200 },- { value: 0, duration: 800 }- ],+ translateX: 250,rotate: '1turn',backgroundColor: '#FFF',- duration: 2000,- loop: true+ duration: 800});-```\ No newline at end of file+```++## [Documentation](https://animejs.com/documentation/)++* [Targets](https://animejs.com/documentation/#cssSelector)+* [Properties](https://animejs.com/documentation/#cssProperties)+* [Property parameters](https://animejs.com/documentation/#duration)+* [Animation parameters](https://animejs.com/documentation/#direction)+* [Values](https://animejs.com/documentation/#unitlessValue)+* [Keyframes](https://animejs.com/documentation/#animationKeyframes)+* [Stagering](https://animejs.com/documentation/#staggeringBasics)+* [Timeline](https://animejs.com/documentation/#timelineBasics)+* [Controls](https://animejs.com/documentation/#playPause)+* [Callbacks and promises](https://animejs.com/documentation/#update)+* [SVG Animations](https://animejs.com/documentation/#motionPath)+* [Easing functions](https://animejs.com/documentation/#linearEasing)+* [Helpers](https://animejs.com/documentation/#remove)++## [Demos and examples](http://codepen.io/collection/b392d3a52d6abf5b8d9fda4e4cab61ab/)++* [CodePen demos and examples](http://codepen.io/collection/b392d3a52d6abf5b8d9fda4e4cab61ab/)+* [juliangarnier.com](http://juliangarnier.com)+* [animejs.com](https://animejs.com)+* [Moving letters](http://tobiasahlin.com/moving-letters/) by [@tobiasahlin](https://twitter.com/tobiasahlin)+* [Gradient topography animation](https://tympanus.net/Development/GradientTopographyAnimation/) by [@crnacura](https://twitter.com/crnacura)+* [Organic shape animations](https://tympanus.net/Development/OrganicShapeAnimations/) by [@crnacura](https://twitter.com/crnacura)+* [Pieces slider](https://tympanus.net/Tutorials/PiecesSlider/) by [@lmgonzalves](https://twitter.com/lmgonzalves)+* [Staggering animations](https://codepen.io/juliangarnier/pen/4fe31bbe8579a256e828cd4d48c86182?editors=0100)+* [Easings animations](https://codepen.io/juliangarnier/pen/444ed909fd5de38e3a77cc6e95fc1884)+* [Sphere animation](https://codepen.io/juliangarnier/pen/b3bb8ca599ad0f9d00dd044e56cbdea5?editors=0010)+* [Layered animations](https://codepen.io/juliangarnier/pen/6ca836535cbea42157d1b8d56d00be84?editors=0010)+* [anime.js logo animation](https://codepen.io/juliangarnier/pen/d43e8ec355c30871cbe775193255d6f6?editors=0010)+++## Browser support++| Chrome | Safari | IE / Edge | Firefox | Opera |+| --- | --- | --- | --- | --- |+| 24+ | 8+ | 11+ | 32+ | 15+ |++## <a href="https://animejs.com"><img src="/documentation/assets/img/animejs-v3-logo-animation.gif" width="150" alt="anime-js-v3-logo"/></a>++[Website](https://animejs.com/) | [Documentation](https://animejs.com/documentation/) | [Demos and examples](http://codepen.io/collection/b392d3a52d6abf5b8d9fda4e4cab61ab/) | [MIT License](LICENSE.md) | © 2019 [Julian Garnier](http://juliangarnier.com).\ No newline at end of filediff --git a/documentation/assets/css/anime-theme.css b/documentation/assets/css/anime-theme.cssindex 18397af0..92d039e1 100644--- a/documentation/assets/css/anime-theme.css+++ b/documentation/assets/css/anime-theme.css@@ -1,11 +1,11 @@.hljs {display: block;- color: #C5C2CB;+ color: #F6F4F2;}.hljs-comment,.hljs-quote {- color: #5c6370;+ color: #A2A09F;font-style: italic;}@@ -31,6 +31,7 @@.hljs-regexp,.hljs-addition,.hljs-attribute,+.hljs-attr,.hljs-meta-string {color: #A6FF8F;}diff --git a/documentation/assets/css/animejs.css b/documentation/assets/css/animejs.cssindex ca04041f..337af6d9 100644--- a/documentation/assets/css/animejs.css+++ b/documentation/assets/css/animejs.css@@ -1,15 +1,63 @@@font-face {- font-family: "Roobert SemiBold";+ font-family: "Roobert";+ font-weight: 400;+ font-style: normal;+ src: url("../fonts/Roobert-Regular.woff2") format("woff2");+}++@font-face {+ font-family: "Roobert";+ font-weight: 400;+ font-style: italic;+ src: url("../fonts/Roobert-Regular.woff2") format("woff2");+}++@font-face {+ font-family: "Roobert";+ font-weight: 600;font-style: normal;src: url("../fonts/Roobert-SemiBold.woff2") format("woff2");}@font-face {- font-family: "Roobert SemiBold";+ font-family: "Roobert";+ font-weight: 600;font-style: italic;src: url("../fonts/Roobert-SemiBoldItalic.woff2") format("woff2");}+@font-face {+ font-family: "InputMono";+ src: url("../fonts/InputMono-Regular.woff2") format("woff2"),+ url("../fonts/InputMono-Regular.woff") format("woff");+ font-weight: normal;+ font-style: normal;+}++@font-face {+ font-family: "InputMono";+ src: url("../fonts/InputMono-Bold.woff2") format("woff2"),+ url("../fonts/InputMono-Bold.woff") format("woff");+ font-weight: bold;+ font-style: normal;+}++@font-face {+ font-family: "InputMono";+ src: url("../fonts/InputMono-BoldItalic.woff2") format("woff2"),+ url("../fonts/InputMono-BoldItalic.woff") format("woff");+ font-weight: bold;+ font-style: italic;+}++@font-face {+ font-family: "InputMono";+ src: url("../fonts/InputMono-Italic.woff2") format("woff2"),+ url("../fonts/InputMono-Italic.woff") format("woff");+ font-weight: normal;+ font-style: italic;+}+*, *:before, *:after {box-sizing: border-box;margin: 0;@@ -22,33 +70,53 @@html,body {- background-color: #F6F4F2;- color: #373535;+ background-color: #252423;+ color: #F6F4F2;}body {- font-family: Roobert SemiBold, Helvetica Neue, Helvetica, Arial, sans-serif;- font-variant-numeric: tabular-nums;+ font-family: Roobert, Helvetica Neue, Helvetica, Arial, sans-serif;+ font-weight: 400;+ font-feature-settings:"tnum" 1, "ss03" 1;-webkit-font-smoothing: antialiased;- overflow-x: hidden;+}++h1, h2 {+ font-weight: 600;}input {- font-family: Roobert SemiBold, Helvetica Neue, Helvetica, Arial, sans-serif;+ font-family: Roobert, Helvetica Neue, Helvetica, Arial, sans-serif;font-variant-numeric: tabular-nums;}+sup {+ vertical-align: super;+ font-size: .625em;+}++strong {+ font-weight: 600;+}+.color-white { color: #F6F4F2; } /* White */-.color-black { color: #373535; } /* Black */-.color-red, .color-targets { color: #F64E4D; } /* Red */-.color-orange, .color-properties { color: #F6984E; } /* Orange */-.color-yellow, .color-prop-params { color: #C8CB48; } /* Yellow */-.color-citrus, .color-anim-params { color: #EECD4F; } /* Citrus */-.color-green, .color-values { color: #98C762; } /* Green */-.color-darkgreen, .color-tl { color: #56BD9C; } /* Darkgreen */-.color-turquoise, .color-controls { color: #53D3D3; } /* Turquoise */-.color-skyblue, .color-states { color: #6AAAE1; } /* Skyblue */-.color-kingblue, .color-callbacks { color: #6A7BE0; } /* Kingblue */-.color-lavender, .color-svg { color: #86589E; } /* Lavender */-.color-purple, .color-easings { color: #D758A0; } /* Purple */-.color-pink, .color-helpers { color: #F07B8E; } /* Pink */\ No newline at end of file+.color-black { color: #2E2C2C; } /* Black */+.color-red, .color-targets { color: #FF4B4B; }/* red: */+.color-orange, .color-properties { color: #FF8F42; }/* orange: */+.color-lightorange, .color-prop-params { color: #FFC730; }/* lightorange: */+.color-yellow, .color-anim-params { color: #F6FF56; }/* yellow: */+.color-citrus, .color-values { color: #A4FF4F; }/* citrus: */+.color-green, .color-keyframes { color: #18FF74; }/* green: */+.color-darkgreen, .color-staggering { color: #00D672; }/* darkgreen: */+.color-turquoise, .color-tl { color: #3CFFEC; }/* turquoise: */+.color-skyblue, .color-controls { color: #61C3FF; }/* skyblue: */+.color-kingblue, .color-callbacks { color: #5A87FF; }/* kingblue: */+.color-lavender, .color-svg { color: #8453E3; }/* lavender: */+.color-purple, .color-easings { color: #C26EFF; }/* purple: */+.color-pink, .color-helpers { color: #FB89FB; }/* pink: */++.anime-mini-logo {+ width: 100px;+ height: 24px;+ transform: scaleY(.5);+}\ No newline at end of filediff --git a/documentation/assets/css/documentation.css b/documentation/assets/css/documentation.cssindex dbc1d898..e36df003 100644--- a/documentation/assets/css/documentation.css+++ b/documentation/assets/css/documentation.css@@ -1,13 +1,7 @@-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}--* {- box-sizing: border-box;-}-html,body,header {- background-color: #1A1C1E; /* Black */+ background-color: #252423;}body {@@ -15,31 +9,11 @@ body {width: 100%;height: 100%;color: white;- font-family: RoobertTRIAL-Regular;font-variant-numeric: tabular-nums;-webkit-font-smoothing: antialiased;overflow-x: hidden;}-input {- font-family: Helvetica Neue, Helvetica, Arial, sans-serif;- font-variant-numeric: tabular-nums;-}--.color-01, .color-targets { color: #FF1461; } /* Red */-.color-02, .color-properties { color: #FF7C72; } /* Orange */-.color-03, .color-prop-params { color: #FBF38C; } /* Yellow */-.color-04, .color-anim-params { color: #A6FF8F; } /* Citrus */-.color-05, .color-values { color: #18FF92; } /* Green */-.color-06, .color-tl { color: #1CE2B2; } /* Darkgreen */-.color-07, .color-controls { color: #5EF3FB; } /* Turquoise */-.color-08, .color-states { color: #61C3FF; } /* Lightblue */-.color-09, .color-callbacks { color: #5A87FF; } /* Blue */-.color-10, .color-svg { color: #8453E3; } /* Purple */-.color-11, .color-easings { color: #C26EFF; } /* Lavender */-.color-12, .color-helpers { color: #FB89FB; } /* Pink */--.content {overflow: hidden;opacity: 0;@@ -60,18 +34,21 @@ input {position: absolute;z-index: 1;top: 0;- width: 239px;- padding: 0;+ width: 100%;}.logo {- opacity: .6;display: flex;- align-items: center;- width: 240px;- height: 60px;- color: white;+ justify-content: space-between;+ opacity: .8;+ width: 100%;+ height: 20px;text-decoration: none;+ color: currentColor;+}++.logo:visited {+ color: currentColor;}.logo svg {@@ -83,6 +60,11 @@ input {opacity: 1;}+.version-number {+ opacity: .6;+ color: currentColor;+}+header {position: sticky;top: 0;@@ -101,8 +83,7 @@ h2 {font-size: 16px;letter-spacing: 1px;text-transform: uppercase;- /*font-weight: 200;*/- font-family: RoobertTRIAL-SemiBold;+ font-weight: 200;}/* Panes */@@ -164,7 +145,7 @@ h2 {.navigation a {display: block;padding-left: 10px;- color: #FFF;+ color: white;text-decoration: none;font-size: 14px;line-height: 20px;@@ -217,10 +198,8 @@ h2 {.demo-info {flex-direction: column;- width: 50%;font-size: 16px;line-height: 22px;- /*border-left: 1px solid rgba(0,0,0,.65);*/}.info-output {@@ -239,7 +218,7 @@ h2 {}.demo-info code {- font-family: "Input Mono Reg", "Space Mono", monospace;+ font-family: "Input Mono Reg", monospace;font-size: 14px;line-height: 22px;white-space: pre-wrap;@@ -251,7 +230,7 @@ h2 {.demo-info p,.demo-info td {- color: rgba(255,255,255,.7);+ color: #F6F4F2;}.demo-info i {@@ -271,7 +250,7 @@ h2 {.demo-info a[href^="http"],.demo-info a[href^="http"]:visited {- color: rgba(255,255,255,.9);+ color: #F6F4F2;}.demo-info p.bubble {@@ -317,7 +296,7 @@ h2 {width: 100%;padding: 8px 12px;background-color: rgba(0,0,0,.2);- border: 1px solid rgba(0,0,0,.4);+ border: 1px solid rgba(0,0,0,.2);border-radius: 3px;}@@ -374,23 +353,6 @@ h2 {min-width: 330px;}-.demos::-webkit-scrollbar {- width: 1px;- background-color: transparent;-}--.demos::-webkit-scrollbar-track {- background-color: rgba(0,0,0,.65);-}--.demos::-webkit-scrollbar-thumb {- background-color: rgba(255,255,255,.3);-}--.demos::-webkit-scrollbar-thumb:hover {- background-color: rgba(255,255,255,.6);-}-article {width: 100%;display: flex;@@ -462,8 +424,8 @@ article {font-size: 14px;letter-spacing: 2px;text-transform: uppercase;- color: #FFF;- opacity: .7;+ color: #F6F4F2;+ opacity: .9;}.active .demo-title {@@ -481,6 +443,11 @@ article {justify-content: center;}+.grid {+ display: flex;+ flex-wrap: wrap;+}+.controls {opacity: .4;display: flex;@@ -584,7 +551,7 @@ input.progress {input.progress[value] {position: relative;- width: auto;+ width: 100%;height: 27px;-webkit-appearance: none;background-color: transparent;@@ -675,7 +642,7 @@ input.progress[value]::-webkit-slider-thumb {justify-content: center;text-align: left;width: 100%;- height: 28px;+ height: auto;padding-left: 38px;transition: opacity .5s ease;}@@ -720,12 +687,8 @@ input.progress[value]::-webkit-slider-thumb {/* Responsive */-.header {- width: 100%;-}-.sidebar,-.code-examples {+.demo-info {display: none;}@@ -737,25 +700,45 @@ input.progress[value]::-webkit-slider-thumb {-webkit-overflow-scrolling: touch;}-@media (min-width: 600px) {+@media (min-width: 800px) {.header {width: 239px;}- .sidebar {+ .demo-info {display: inherit;+ width: calc(100% - 380px);}.demos {top: 0;- width: calc(100% - 240px);+ width: 380px;height: 100%;}+ .demos::-webkit-scrollbar {+ width: 1px;+ background-color: transparent;+ }++ .demos::-webkit-scrollbar-track {+ background-color: rgba(0,0,0,.65);+ }++ .demos::-webkit-scrollbar-thumb {+ background-color: rgba(255,255,255,.3);+ }++ .demos::-webkit-scrollbar-thumb:hover {+ background-color: rgba(255,255,255,.6);+ }}@media (min-width: 1100px) {- .code-examples {+ .sidebar {display: inherit;}.demos {width: calc(50% - 240px);}+ .demo-info {+ width: 50%;+ }}diff --git a/documentation/assets/css/website.css b/documentation/assets/css/website.cssindex 71abc7ad..856fb844 100644--- a/documentation/assets/css/website.css+++ b/documentation/assets/css/website.css@@ -1,3 +1,1062 @@-:root {+/* Typography */++body {+ line-height: 1.333333333;+}++body {+ font-size: 17px;+ line-height: 1.3;+}++@media (min-width: 740px) {+ body {+ font-size: 18px;+ }+}++a {+ color: inherit;+ text-decoration: none;+}++a:hover {+ text-decoration: underline;+}++a:visited {+ color: inherit;+}++.primary,+a.primary {+ color: #F64E4D;+}++.arrow {+ position: relative;+ display: inline-block;+ transition: transform .25s ease;+}++.arrow:before {+ pointer-events: none;+ content: "→";+ opacity: 0;+ position: absolute;+ top: 0;+ left: 0;+ display: block;+ transform: translateX(-1.5em) translateZ(0);+ transition: transform .25s ease, opacity .25s ease;+}++a:hover .arrow,+.arrow:hover {+ transform: translateX(1em) translateZ(0);+}++a:hover .arrow:before,+.arrow:hover:before {+ transform: translateX(-1em) translateZ(0);+ opacity: 1;+}++/* Layout */++.section {+ display: flex;+ width: 100%;+}++.inverted-section {+ background-color: #F6F4F2;+ color: #2E2C2C;+}++.grid-container {+ display: flex;+ flex-direction: column;+ grid-column-gap: 16px;+ grid-row-gap: 0px;+ width: 100%;+ max-width: 1198px;+ margin-left: auto;+ margin-right: auto;+ padding-left: 24px;+ padding-right: 24px;+}++@media (min-width: 500px) {+ .grid-container {+ grid-column-gap: 24px;+ padding-left: 24px;+ padding-right: 24px;+ }+}++@media (min-width: 740px) {+ .grid-container {+ display: grid;+ grid-template-columns: repeat(12, 1fr);+ grid-column-gap: 48px;+ padding-left: 48px;+ padding-right: 48px;+ }+}++/* Header */++.header {+ margin-top: 16px;+}++.nav-bar-content {+ display: flex;+ flex-shrink: 0;+ flex-direction: row;+ grid-column: 1/13;+ justify-content: space-between;+ flex-direction: row;+ align-items: center;+}++.header .nav-bar-content {+ height: 48px;+}++.nav-bar {+ display: flex;+ justify-content: flex-end;+}++.nav-bar a {+ display: inline-flex;+ align-items: center;+ font-size: 16px;+ font-weight: 600;+ line-height: 1;+}++a.main-cta {+ color: #2E2C2C;+ display: inline-flex;+ align-items: baseline;+ height: 32px;+ padding-left: 12px;+ padding-right: 12px;+ border-radius: 16px;+ line-height: 2;+ background-color: #F64E4D;+ transition: transform .25s ease;+}++.nav-bar a:not(:first-child) {+ margin-left: 12px;+}++.nav-bar .nav-link {+ display: none;+}++@media (min-width: 600px) {+ .nav-bar .nav-link {+ display: inline-flex;+ }+}++a.main-cta:hover {+ transform: scale(1.08);+ text-decoration: none;+}++/* Logo */++.main-logo {+ position: relative;+ display: flex;+ flex-direction: column;+ width: 100px;+ height: 12px;+}++.logo-animation-wrapper {+ position: relative;+ width: 100%;+ padding-bottom: 13%;+}++.logo-animation {+ pointer-events: none;+ overflow: visible;+ display: flex;+ flex-shrink: 0;+ flex-direction: column;+ justify-content: center;+ align-items: center;+ position: absolute;+ top: 50%;+ left: 50%;+ width: 1000px;+ height: 240px;+ margin: -120px 0 0 -500px;+ transform: scale(.633333);+}++.anime-logo {+ overflow: visible;+ position: relative;+ display: flex;+ flex-direction: column;+ width: 1000px;+ height: 120px;+}++.anime-logo-signs {+ overflow: visible;+ display: flex;+ align-items: flex-end;+ position: relative;+ width: 100%;+ height: 512px;+ margin-top: -352px;+}++.logo-letter {+ display: flex;+ align-items: flex-end;+ overflow: hidden;+ height: 100%;+}++.bounced {+ transform-origin: 50% 100% 0px;+ transform: translateY(200px) scaleX(.55) scaleY(.8);+}++.logo-animation .bounce {+ overflow: visible;+ position: absolute;+ left: 0;+ bottom: 70px;+ /*stroke: red;*/+}++.logo-animation .dot {+ opacity: 0.001;+ position: absolute;+ z-index: 10;+ top: 0;+ left: 0;+ width: 40px;+ height: 40px;+ margin: -20px 0 0 -20px;+ background-color: currentColor;+ transform: translate3d(0,0,0);+}++.logo-animation .logo-letter svg {+ overflow: visible;+ fill: none;+ fill-rule: evenodd;+}++.logo-animation .line {+ fill: none;+ fill-rule: evenodd;+ stroke-linecap: square;+ stroke-width: 40;+ stroke: currentColor;+}++.logo-animation .fill {+ opacity: .001;+ stroke: currentColor;+ stroke-width: 40px;+}++.logo-text {+ opacity: .001;+ margin-top: .25em;+ font-weight: 400;+ font-size: 11px;+ line-height: 1;+ letter-spacing: .125em;+ text-align: justify;+ word-break: keep-all;+}++.logo-text:after {+ content: "";+ display: inline-block;+ width: 100%;+ height: 0;+ font-size: 0;+ line-height: 0;+}++/* Features */++.feature-section {+ overflow: hidden;+ display: flex;+ flex-direction: column;+ align-items: center;+ padding-top: 96px;+ padding-bottom: 96px;+ transition: opacity .25s ease;+}++@media (min-width: 740px) {+ .feature-section {+ padding-top: 112px;+ padding-bottom: 112px;+ }+}++.feature-description {+ grid-column: 1/13;+ z-index: 1;+}++.feature-description:not(:last-child) {+ margin-bottom: 48px;+}++.feature-description-icons {+ margin-bottom: 32px;+ width: 100%;+ max-width: 350px;+}++@media (min-width: 740px) {+ .feature-description-grid {+ position: relative;+ display: flex;+ flex-direction: row;+ flex-wrap: wrap;+ justify-content: space-between;+ }+ .feature-description-icons {+ width: 50%;+ margin-bottom: 0;+ padding-right: 48px;+ }+ .feature-description-text {+ display: flex;+ flex-direction: column;+ justify-content: space-between;+ position: relative;+ width: 50%;+ padding-left: 48px;+ }+ .feature-description-text:before {+ content: "";+ opacity: .5;+ position: absolute;+ top: 4px;+ left: 0;+ bottom: 2px;+ display: block;+ border-left: 1px solid currentColor;+ }+}++.feature-title {+ font-size: 40px;+ line-height: 1;+ letter-spacing: -.025em;+}++.feature-subtitle {+ opacity: .7;font-size: 24px;+ line-height: 1;+ letter-spacing: -.025em;+}++.feature-title:not(:last-child) {+ margin-bottom: 8px;+}++.feature-paragraph:not(:last-child) {+ margin-bottom: 24px;+}++@media (min-width: 740px) {+ .feature-description-grid .feature-description {+ width: calc(50% - 16px);+ }+ .feature-description:not(:last-child) {+ margin-bottom: 96px;+ }+ .feature-title {+ font-size: 64px;+ }+ .feature-subtitle {+ font-size: 32px;+ }+ .feature-title:not(:last-child) {+ margin-bottom: 8px;+ }+ .feature-paragraph:not(:last-child) {+ margin-bottom: 24px;+ }+}++@media (min-width: 1024px) {+ .feature-description {+ grid-column: 3/11;+ }+}++.feature-animation {+ grid-column: 1/13;+ position: relative;+ width: 100%;+ margin-left: auto;+ margin-right: auto;+ margin-bottom: 48px;+ padding-bottom: 50%;+}++.square-animation {+ margin-top: -20px;+ margin-bottom: 20px;+ padding-bottom: 100%;+}++@media (min-width: 740px) {+ .feature-animation {+ padding-bottom: 50%;+ margin-bottom: 96px;+ }+ .square-animation {+ margin-top: -70px;+ margin-bottom: 20px;+ padding-bottom: 100%;+ }+}++@media (min-width: 1024px) {+ .feature-animation {+ grid-column: 2/12;+ }+ .large-grid .feature-animation {+ grid-column: 1/13;+ }+}++.feature-icons-container {+ display: flex;+ flex-wrap: wrap;+}++.feature-icon img {+ width: 48px;+ height: 48px;+ transition: transform .65s ease;+}++a.feature-icon:hover img {+ transform: translateY(-8px);+ transition: transform .225s ease;+}++.feature-caption {+ font-family: "InputMono", "Courier New", Courier, monospace;+ font-weight: bold;+ font-size: 12px;+}++.vertical-icons .feature-icon {+ display: flex;+ align-items: center;+ width: 50%;+ margin-left: -6px;+}++.horizontal-icons {+ justify-content: space-between;+}++.horizontal-icons .feature-icon {+ display: flex;+ flex-direction: column;+ justify-content: center;+ align-items: center;+}++.horizontal-icons .feature-icon:not(:first-child) {+ margin-left: 16px;+}++.horizontal-icons figcaption {+ text-align: center;+}++/** Intro **/++.top-header a,+.secondary-menu a,+.section-intro .feature-description-text {+ opacity: .001;+}++.section-intro {+ padding-top: 48px;+}++@media (min-width: 500px) {+ .section-intro {+ padding-top: 80px;+ }+}++.easing-visualizer {+ position: absolute;+ top: 50%;+ left: 50%;+ display: flex;+ align-items: center;+ justify-content: space-between;+ width: 910px;+ height: 455px;+ margin: -227px 0 0 -455px;+}++.easing-visualizer .wrapper {+ position: absolute;+ bottom: 0;+ display: flex;+ align-items: center;+ /*justify-content: space-between;*/+ width: 100%;+ height: 100%;+}++.bars-wrapper,+.dots-wrapper {+ transform: translateZ(0);+}++.easing-visualizer .bar {+ width: 10px;+ height: 10px;+ margin: 0;+ background-image: linear-gradient(180deg, #373734 0%, #242423 52%, #0D0D0C 100%);+ transform: scale(0);+ transform-origin: 50% 50%;+}++.easing-visualizer .dot {+ position: relative;+ width: 10px;+ height: 10px;+ margin: 0;+ background-color: currentColor;+ transform: scale(0);+ border-radius: 50%;+}++/** Staggering **/++.section-feature-staggering .feature-animation {+ margin-top: -16px;+ padding-bottom: calc(50% - 16px);+}++@media (min-width: 740px) {+ .section-feature-staggering .feature-animation {+ margin-top: -32px;+ padding-bottom: calc(50% - 16px);+ }+}++.stagger-visualizer {+ position: absolute;+ width: 1100px;+ height: 550px;+ transform-origin: left top;+}++.stagger-visualizer .dots-wrapper {+ transform: translateZ(0);+ position: absolute;+ top: 0;+ left: 0;+ width: 100%;+ height: 100%;+ display: flex;+ flex-wrap: wrap;+ justify-content: center;+ align-items: center;+}++.stagger-visualizer .dot {+ position: relative;+ z-index: 1;+ width: 23px;+ height: 23px;+ margin: 16px;+ background-color: currentColor;+ border-radius: 50%;+}++@media (min-width: 740px) {+ .stagger-visualizer .dot {+ background-color: transparent;+ background-image: linear-gradient(180deg, #FFFFFF 8%, #D3CDC6 100%);+ }+}++.stagger-visualizer .cursor {+ position: absolute;+ top: 0px;+ left: 0px;+ width: 37px;+ height: 37px;+ margin: 9px;+ background-color: currentColor;+ border-radius: 50%;+}++/** Time control **/++.section-feature-control {+ overflow-x: hidden;+}++.section-feature-control .feature-animation {+ height: 410px;+ margin-bottom: 16px;+ padding: 0px;+}++.time-control {+ position: absolute;+ left: 50%;+ top: 50%;+ display: flex;+ flex-wrap: wrap;+ justify-content: flex-end;+ align-items: center;+ width: 1082px;+ height: 342px;+ margin-left: -541px;+ margin-top: -171px;+ font-size: 18px;+}++.time-control .ruller {+ position: absolute;+ width: 100%;+ top: 0;+ display: flex;+ justify-content: space-between;+ padding: 0 1px;+}++.time-control .line {+ width: 1px;+ height: 12px;+ background-color: currentColor;+}++.time-control .line:nth-child(9n+2) {+ height: 20px;+}++.time-control .line:nth-child(90n+2) {+ height: 32px;+}++.time-control .line:not(:last-child) {+ margin-right: 3px;+}++.time-cursor {+ position: absolute;+ z-index: 2;+ top: -29px;+ left: -22px;+ width: 48px;+ height: 48px;+ background-image: linear-gradient(-180deg, #FFFFFF 3%, #DBD6D0 100%);+ border-radius: 50%;+ cursor: grab;+}++.time-cursor:active {+ cursor: grabbing;+}++.time-cursor input {+ pointer-events: none;+ position: relative;+ z-index: 1;+ width: 48px;+ height: 48px;+ color: currentColor;+ font-weight: 600;+ background-color: transparent;+ border-radius: 50%;+ text-align: center;+ font-size: 15px;+ transform: translateZ(0);+}++.time-cursor:before {+ content: "";+ position: absolute;+ top: 53px;+ left: 23px;+ display: block;+ width: 1px;+ height: 250px;+ background-color: #F64E4D;+}++.timeline {+ position: relative;+ width: 1082px;+ z-index: 1;+ overflow: visible;+ display: flex;+ justify-content: space-between;+ height: 8px;+}++.animation {+ position: relative;+ overflow: visible;+ display: flex;+}++.animation-band {+ position: relative;+ height: 16px;+ margin: 0 1px;+ border-radius: 8px;+}++.timeline-icon {+ display: flex;+ flex-direction: row;+ align-items: center;+ margin-bottom: 16px;+}++.section-feature-control .vertical-icons .timeline-icon {+ margin-left: 0;+ margin-right: 16px;+ width: auto;+}++@media (min-width: 740px) {+ .section-feature-control .vertical-icons {+ display: flex;+ flex-direction: column;+ }+ .section-feature-control .vertical-icons .timeline-icon {+ margin-left: 0;+ width: 100%;+ }+}++.timeline-icon .animation-band {+ width: 24px;+ height: 24px;+ border-radius: 12px;+ margin-right: 8px;+}++.animation-delay {+ background-color: currentColor;+ width: 66px;+}+.animation-change {+ background-image: linear-gradient(-180deg, #FFFFFF 3%, #DBD6D0 100%);+ width: 207px;+}+.animation-end-delay {+ background-color: #F64E4D;+ width: 66px;+}++.info {+ position: relative;+ display: flex;+ flex-direction: column;+ width: 1px;+ height: 48px;+}++.info:not(:first-child) {+ margin-left: 2px;+}++.info:not(:last-child) {+ margin-right: 2px;+}++.info + .info { margin-left: -3px; }++.info-large { height: 96px; }++.info-top {+ bottom: 0;+ justify-content: flex-start;+ align-items: flex-end;+ align-self: flex-end;+}++.info-bottom {+ top: 8px;+ justify-content: flex-end;+}++.info-bar {+ position: absolute;+ width: 1px;+ height: 100%;+ background-color: currentColor;+ transform-origin: 50% 100%;+}++.info-top .info-bar { bottom: 0; }+.info-bottom .info-bar { top: 0; transform-origin: 50% 0%; }+.info-left .info-bar { left: 0; }+.info-right .info-bar { right: 0; }++.info .feature-caption {+ opacity: .001;+ white-space: nowrap;+ height: 18px;+ padding-left: 8px;+ padding-right: 8px;+ line-height: 18px;+}++.info-top .feature-caption {+ margin: -4px 0 0;+}++.info-bottom .feature-caption {+ margin: 0 0 -4px 0;+}++/** Layered Animation **/++.layered-animations {+ position: absolute;+ top: 50%;+ left: 50%;+ display: flex;+ align-items: center;+ justify-content: center;+ width: 1100px;+ height: 550px;+ margin: -275px 0 0 -550px;+}++.layered-animations .shape {+ position: absolute;+ top: 50%;+ overflow: visible;+ width: 280px;+ height: 280px;+ margin-top: -140px;+ stroke: transparent;+ stroke-width: 1px;+ fill: url(#shapesGradient);+}++@media (min-width: 740px) {+ .layered-animations .shape {+ stroke-width: .5px;+ }+}++.layered-animations .small.shape {+ width: 64px;+ height: 64px;+ margin-top: -32px;+ stroke: currentColor;+ fill: currentColor;+}++.layered-animations .x-small.shape {+ width: 32px;+ height: 32px;+ margin-top: -16px;+ stroke: currentColor;+ fill: currentColor;+}++.transform-anim {+ width: 100%;+ height: 22px;+}++.transform-anim:not(:last-child) {+ margin-bottom: 11px;+}++.transform-timeline {+ width: 100%;+ height: 2px;+ margin-top: 7px;+ background-color: rgba(255,255,255,.2);+}++.transform-progress {+ width: 100%;+ height: 2px;+ background-color: currentColor;+}++/** Sphere **/++.sphere-animation {+ position: absolute;+ opacity: .001;+ top: 50%;+ left: 50%;+ width: 580px;+ height: 580px;+ margin: -290px 0 0 -290px;+}++.sphere path {+ /*opacity: .001;*/+ fill: rgba(37,36,35,.5);+ /*fill: linear-gradient(-180deg, #FFFFFF 0%, #F6F4F2 35%, #F6F4F2 69%, #DDDAD7 100%);*/+ fill: url(#sphereGradient);+ stroke-width: 1px;+ stroke: #FF4847;+ backface-visibility: hidden;+}++@media (min-width: 500px) {+ .sphere path {+ stroke-width: .4px;+ }+}++/** Getting started **/++.getting-started-blocks {+ flex-wrap: wrap;+ grid-column: 1/13;+ display: flex;+ flex-direction: row;+ justify-content: space-between;+ width: 100%;+}++.getting-started-block {+ width: calc(50% - 16px);+ margin-bottom: 48px;+}++.getting-started-block:last-child {+ display: none;+}++.getting-statred-main-link {+ display: flex;+ flex-direction: column;+ font-weight: 600;+ font-size: 18px;+}++.getting-statred-main-link span {+ display: block;+ margin-bottom: 24px;+}++.getting-started-image {+ width: 100%;+ height: auto;+ margin-bottom: 24px;+}++@media (min-width: 400px) {+ .getting-statred-main-link {+ font-size: 24px;+ }+}++@media (min-width: 600px) {+ .getting-started-block {+ width: calc(33.33% - 24px);+ }+ .getting-started-block:last-child {+ display: block;+ }+}++@media (min-width: 1024px) {+ .getting-started-blocks {+ grid-column: 2/12;+ }+ .getting-started-block {+ width: calc(33.33% - 48px);+ }+}++.getting-statred-main-link:hover .getting-started-image {+ color: #F64E4D;+}++.getting-statred-main-link:hover,+.getting-statred-main-link:hover span.primary {+ text-decoration: none;+}++.getting-statred-links li {+ list-style: none;+ line-height: 1.5;+}++/* Footer */++.footer {+ padding-top: 16px;+ margin-bottom: 32px;+}++.footer-block {+ display: flex;+ justify-content: space-between;+ align-items: flex-start;+ width: 100%;+ margin-top: 16px;+ margin-bottom: 4px;+}++.footer-text,+.footer-text a {+ font-size: 12px;+ font-weight: 400;+}++.footer-separator {+ display: inline-block;+ margin-left: 4px;+ margin-right: 4px;+}++@media (min-width: 500px) {+ .footer-block {+ justify-content: flex-start;+ margin-top: 4px;+ margin-bottom: 16px;+ }++ .footer-text,+ .footer-text a {+ font-size: 14px;+ }}\ No newline at end of filediff --git a/documentation/assets/fonts/InputMono-Bold.woff b/documentation/assets/fonts/InputMono-Bold.woffnew file mode 100644index 00000000..6a71a6f7Binary files /dev/null and b/documentation/assets/fonts/InputMono-Bold.woff differdiff --git a/documentation/assets/fonts/InputMono-Bold.woff2 b/documentation/assets/fonts/InputMono-Bold.woff2new file mode 100644index 00000000..3d9a43e1Binary files /dev/null and b/documentation/assets/fonts/InputMono-Bold.woff2 differdiff --git a/documentation/assets/fonts/InputMono-BoldItalic.woff b/documentation/assets/fonts/InputMono-BoldItalic.woffnew file mode 100644index 00000000..1e74128aBinary files /dev/null and b/documentation/assets/fonts/InputMono-BoldItalic.woff differdiff --git a/documentation/assets/fonts/InputMono-BoldItalic.woff2 b/documentation/assets/fonts/InputMono-BoldItalic.woff2new file mode 100644index 00000000..df2aaaa9Binary files /dev/null and b/documentation/assets/fonts/InputMono-BoldItalic.woff2 differdiff --git a/documentation/assets/fonts/InputMono-Italic.woff b/documentation/assets/fonts/InputMono-Italic.woffnew file mode 100644index 00000000..72aafb74Binary files /dev/null and b/documentation/assets/fonts/InputMono-Italic.woff differdiff --git a/documentation/assets/fonts/InputMono-Italic.woff2 b/documentation/assets/fonts/InputMono-Italic.woff2new file mode 100644index 00000000..fb1d217aBinary files /dev/null and b/documentation/assets/fonts/InputMono-Italic.woff2 differdiff --git a/documentation/assets/fonts/InputMono-Regular.woff b/documentation/assets/fonts/InputMono-Regular.woffnew file mode 100644index 00000000..80406e72Binary files /dev/null and b/documentation/assets/fonts/InputMono-Regular.woff differdiff --git a/documentation/assets/fonts/InputMono-Regular.woff2 b/documentation/assets/fonts/InputMono-Regular.woff2new file mode 100644index 00000000..29e9a636Binary files /dev/null and b/documentation/assets/fonts/InputMono-Regular.woff2 differdiff --git a/documentation/assets/fonts/Roobert-Regular.woff b/documentation/assets/fonts/Roobert-Regular.woffnew file mode 100644index 00000000..a6643235Binary files /dev/null and b/documentation/assets/fonts/Roobert-Regular.woff differdiff --git a/documentation/assets/fonts/Roobert-Regular.woff2 b/documentation/assets/fonts/Roobert-Regular.woff2new file mode 100644index 00000000..4e54f12cBinary files /dev/null and b/documentation/assets/fonts/Roobert-Regular.woff2 differdiff --git a/documentation/assets/fonts/Roobert-SemiBold.woff b/documentation/assets/fonts/Roobert-SemiBold.woffnew file mode 100644index 00000000..997bf8d9Binary files /dev/null and b/documentation/assets/fonts/Roobert-SemiBold.woff differdiff --git a/documentation/assets/fonts/Roobert-SemiBoldItalic.woff b/documentation/assets/fonts/Roobert-SemiBoldItalic.woffnew file mode 100644index 00000000..cd214a4dBinary files /dev/null and b/documentation/assets/fonts/Roobert-SemiBoldItalic.woff differdiff --git a/documentation/assets/img/anime-mini-logo.svg b/documentation/assets/img/anime-mini-logo.svgnew file mode 100644index 00000000..eb5e0425--- /dev/null+++ b/documentation/assets/img/anime-mini-logo.svg@@ -0,0 +1,10 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 240">+ <g id="anime-mini-logo" fill="none" fill-rule="evenodd" stroke-linecap="square">+ <path id="Path-18-Copy-66" stroke="#F6F4F2" stroke-width="40" d="M30 20h130c9.996 0 10 40 10 60v140H41c-11.004 0-11-40-11-60s-.004-60 10-60h110"/>+ <path id="Path-18-Copy-67" stroke="#F6F4F2" stroke-width="40" d="M850 140h110c10 0 10-40 10-60s0-60-10-60H840c-10 0-10 40-10 60v80c0 20 0 60 10 60h130"/>+ <path id="Path-18-Copy-68" stroke="#F6F4F2" stroke-width="40" d="M430 100v120"/>+ <path id="Path-18-Copy-69" stroke="#F6F4F2" stroke-width="40" d="M430 20.2v.6"/>+ <path id="Path-18-Copy-71" stroke="#F6F4F2" stroke-width="40" d="M370 220V80c0-20 0-60-10-60H240c-10 0-10 40-10 60v140"/>+ <path id="Path-18-Copy-74" stroke="#F6F4F2" stroke-width="40" d="M770 220V80c0-20 0-60-10-60H500c-10 0-10 40-10 60v140"/>+ </g>+</svg>diff --git a/documentation/assets/img/animejs-v3-header-animation.gif b/documentation/assets/img/animejs-v3-header-animation.gifnew file mode 100644index 00000000..f1eaafa2Binary files /dev/null and b/documentation/assets/img/animejs-v3-header-animation.gif differdiff --git a/documentation/assets/img/animejs-v3-logo-animation.gif b/documentation/assets/img/animejs-v3-logo-animation.gifnew file mode 100644index 00000000..4d790587Binary files /dev/null and b/documentation/assets/img/animejs-v3-logo-animation.gif differdiff --git a/documentation/assets/img/apple-touch-icon.png b/documentation/assets/img/apple-touch-icon.pngnew file mode 100644index 00000000..eb78ebf4Binary files /dev/null and b/documentation/assets/img/apple-touch-icon.png differdiff --git a/documentation/assets/img/favicon.png b/documentation/assets/img/favicon.pngnew file mode 100644index 00000000..c33a3a12Binary files /dev/null and b/documentation/assets/img/favicon.png differdiff --git a/documentation/assets/img/icons/apple-touch-icon.png b/documentation/assets/img/icons/apple-touch-icon.pngdeleted file mode 100644index 4dd45678..00000000Binary files a/documentation/assets/img/icons/apple-touch-icon.png and /dev/null differdiff --git a/documentation/assets/img/icons/favicon.png b/documentation/assets/img/icons/favicon.pngdeleted file mode 100644index 168ec7f8..00000000Binary files a/documentation/assets/img/icons/favicon.png and /dev/null differdiff --git a/documentation/assets/img/icons/icon-codepen.svg b/documentation/assets/img/icons/icon-codepen.svgnew file mode 100644index 00000000..49ab05d2--- /dev/null+++ b/documentation/assets/img/icons/icon-codepen.svg@@ -0,0 +1,8 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">+ <g id="icon-codepen" fill="none" fill-rule="evenodd">+ <g id="Group-4" fill="#F6F4F2" transform="translate(8 8)">+ <path id="Fill-1" d="M16 29.372C8.627 29.372 2.628 23.373 2.628 16S8.627 2.628 16 2.628 29.372 8.627 29.372 16 23.373 29.372 16 29.372M16 0C7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16S24.837 0 16 0"/>+ <path id="Fill-3" d="M24.112 17.409l-2.106-1.41 2.106-1.408v2.818zm-7.27 5.972v-3.927l3.65-2.441 2.946 1.97-6.596 4.398zM16 17.99L13.022 16 16 14.008 18.978 16 16 17.992zm-.842 5.39l-6.596-4.398 2.946-1.97 3.65 2.441v3.927zm-7.27-8.79L9.994 16l-2.106 1.409V14.59zm7.27-5.972v3.927l-3.65 2.441-2.946-1.97 6.596-4.398zm1.684 0l6.596 4.397-2.946 1.971-3.65-2.441V8.619zm8.946 4.286c-.001-.012-.005-.024-.007-.036a.824.824 0 0 0-.014-.07l-.013-.041-.022-.062a.815.815 0 0 0-.047-.097l-.024-.039a.75.75 0 0 0-.107-.133l-.033-.033a.962.962 0 0 0-.048-.04l-.038-.029-.014-.01-8.954-5.97a.842.842 0 0 0-.934 0l-8.954 5.97-.014.01-.038.029a.763.763 0 0 0-.047.04c-.012.01-.023.022-.034.033a.73.73 0 0 0-.13.172.784.784 0 0 0-.03.056l-.018.041-.022.062-.013.04c-.006.023-.01.047-.015.07l-.006.037a.81.81 0 0 0-.008.11v5.97c0 .037.003.073.008.11l.006.036c.005.024.009.047.015.07l.013.041.022.062.019.04a.997.997 0 0 0 .053.096.77.77 0 0 0 .106.133l.034.032a.72.72 0 0 0 .085.07l.014.01 8.954 5.97a.842.842 0 0 0 .934 0l8.954-5.97.014-.01a.939.939 0 0 0 .086-.07l.033-.032a.807.807 0 0 0 .042-.046l.029-.036a.75.75 0 0 0 .036-.051l.024-.04a.757.757 0 0 0 .028-.055l.019-.041.022-.062c.004-.013.01-.027.013-.04a.83.83 0 0 0 .014-.071c.002-.012.006-.024.007-.036a.871.871 0 0 0 .008-.11v-5.97a.856.856 0 0 0-.008-.11z"/>+ </g>+ </g>+</svg>diff --git a/documentation/assets/img/icons/icon-css.svg b/documentation/assets/img/icons/icon-css.svgnew file mode 100644index 00000000..bcbca4a5--- /dev/null+++ b/documentation/assets/img/icons/icon-css.svg@@ -0,0 +1,10 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">+ <g id="icon-css" fill="none" fill-rule="evenodd" stroke-linecap="square">+ <g id="Group" stroke="#F6F4F2" transform="translate(8 12)">+ <path id="Oval-Copy-7" stroke-width="3" d="M8 0a4 4 0 0 0-4 4v4a4 4 0 0 1-4 4 4 4 0 0 1 4 4v4a4 4 0 0 0 4 4"/>+ <path id="Oval-Copy-4" stroke-width="3" d="M25 0a4 4 0 0 1 4 4v4a4 4 0 0 0 4 4 4 4 0 0 0-4 4v4a4 4 0 0 1-4 4"/>+ <rect id="Rectangle-41" width="6" height="6" x="9" y="5" stroke-width="1.5"/>+ <circle id="Oval-18" cx="21.5" cy="16.5" r="3.5" stroke-width="1.5"/>+ </g>+ </g>+</svg>diff --git a/documentation/assets/img/icons/icon-doc.png b/documentation/assets/img/icons/icon-doc.pngdeleted file mode 100644index 01901778..00000000Binary files a/documentation/assets/img/icons/icon-doc.png and /dev/null differdiff --git a/documentation/assets/img/icons/icon-docs.svg b/documentation/assets/img/icons/icon-docs.svgnew file mode 100644index 00000000..85498f5a--- /dev/null+++ b/documentation/assets/img/icons/icon-docs.svg@@ -0,0 +1,10 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">+ <g id="icon-docs" fill="none" fill-rule="evenodd" stroke-linecap="square">+ <g id="Group" stroke="#F6F4F2" transform="translate(10 12)">+ <path id="Oval" stroke-width="1.5" d="M13.5 0a4 4 0 0 0-4 4v4a4 4 0 0 1-4 4 4 4 0 0 1 4 4v4a4 4 0 0 0 4 4"/>+ <path id="Oval-Copy" stroke-width="1.5" d="M16 0a4 4 0 0 1 4 4v4a4 4 0 0 0 4 4 4 4 0 0 0-4 4v4a4 4 0 0 1-4 4"/>+ <path id="Path-10" stroke-width="3" d="M5 0a5 5 0 0 0-5 5v14a5 5 0 0 0 5 5"/>+ <path id="Path-10-Copy" stroke-width="3" d="M24 0a5 5 0 0 1 5 5v14a5 5 0 0 1-5 5"/>+ </g>+ </g>+</svg>diff --git a/documentation/assets/img/icons/icon-documentation.svg b/documentation/assets/img/icons/icon-documentation.svgnew file mode 100644index 00000000..1430db56--- /dev/null+++ b/documentation/assets/img/icons/icon-documentation.svg@@ -0,0 +1,12 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 136">+ <g id="icon-documentation" fill="none" fill-rule="evenodd">+ <polygon stroke="currentColor" stroke-width="2" points="1 1 239 1 239 135 1 135"/>+ <polygon stroke="currentColor" points="56 16 128 16 128 40 56 40"/>+ <polygon stroke="currentColor" points="56 1 128 1 128 16 56 16"/>+ <path stroke="currentColor" d="M0 16h240"/>+ <polygon stroke="currentColor" points="56 40 128 40 128 64 56 64"/>+ <polygon stroke="currentColor" points="56 64 128 64 128 88 56 88"/>+ <polygon stroke="currentColor" points="56 88 128 88 128 112 56 112"/>+ <polygon stroke="currentColor" points="56 112 128 112 128 136 56 136"/>+ </g>+</svg>diff --git a/documentation/assets/img/icons/icon-download.svg b/documentation/assets/img/icons/icon-download.svgnew file mode 100644index 00000000..3d74d4c8--- /dev/null+++ b/documentation/assets/img/icons/icon-download.svg@@ -0,0 +1,13 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 136">+ <g id="icon-download" fill="none" fill-rule="evenodd">+ <polygon stroke="currentColor" stroke-width="2" points="1 1 239 1 239 135 1 135"/>+ <polygon stroke="currentColor" points="48 32 192 32 192 40 48 40"/>+ <polygon stroke="currentColor" points="48 56 192 56 192 64 48 64"/>+ <path stroke="currentColor" d="M0 16h240"/>+ <polygon stroke="currentColor" points="48 40 192 40 192 48 48 48"/>+ <polygon stroke="currentColor" points="48 64 192 64 192 72 48 72"/>+ <polygon stroke="currentColor" points="48 48 192 48 192 56 48 56"/>+ <polygon stroke="currentColor" points="48 72 192 72 192 80 48 80"/>+ <polygon stroke="currentColor" points="48 96 192 96 192 135 48 135"/>+ </g>+</svg>diff --git a/documentation/assets/img/icons/icon-easing-cubic.svg b/documentation/assets/img/icons/icon-easing-cubic.svgnew file mode 100644index 00000000..b0781058--- /dev/null+++ b/documentation/assets/img/icons/icon-easing-cubic.svg@@ -0,0 +1,8 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">+ <g id="icon-easing-cubic" fill="none" fill-rule="evenodd">+ <g id="Group-11" stroke="#F6F4F2" transform="translate(8 8)">+ <polyline id="Rectangle-41-Copy" points="32 0 32 32 0 32" opacity=".4"/>+ <polyline id="Shape" fill-rule="nonzero" stroke-width="3" points=".516 31.484 .826 31.484 1.135 31.484 1.445 31.484 1.755 31.484 2.065 31.484 2.374 31.484 2.684 31.484 2.994 31.484 3.303 31.484 3.613 31.484 3.923 31.432 4.232 31.432 4.542 31.432 4.852 31.381 5.161 31.381 5.471 31.329 5.781 31.277 6.09 31.226 6.4 31.174 6.71 31.071 7.019 31.019 7.329 30.916 7.639 30.813 7.948 30.658 8.258 30.503 8.568 30.348 8.877 30.142 9.187 29.935 9.497 29.729 9.806 29.471 10.116 29.213 10.426 28.903 10.735 28.542 11.045 28.181 11.355 27.768 11.665 27.303 11.974 26.839 12.284 26.323 12.594 25.755 12.903 25.135 13.213 24.465 13.523 23.794 13.832 23.019 14.142 22.194 14.452 21.316 14.761 20.387 15.071 19.406 15.381 18.323 15.69 17.187 16 16 16.31 14.813 16.619 13.677 16.929 12.594 17.239 11.613 17.548 10.684 17.858 9.806 18.168 8.981 18.477 8.206 18.787 7.535 19.097 6.865 19.406 6.245 19.716 5.677 20.026 5.161 20.335 4.697 20.645 4.232 20.955 3.819 21.265 3.458 21.574 3.097 21.884 2.787 22.194 2.529 22.503 2.271 22.813 2.065 23.123 1.858 23.432 1.652 23.742 1.497 24.052 1.342 24.361 1.187 24.671 1.084 24.981 .981 25.29 .929 25.6 .826 25.91 .774 26.219 .723 26.529 .671 26.839 .619 27.148 .619 27.458 .568 27.768 .568 28.077 .568 28.387 .516 28.697 .516 29.006 .516 29.316 .516 29.626 .516 29.935 .516 30.245 .516 30.555 .516 30.865 .516 31.174 .516 31.484 .516"/>+ </g>+ </g>+</svg>diff --git a/documentation/assets/img/icons/icon-easing-elastic.svg b/documentation/assets/img/icons/icon-easing-elastic.svgnew file mode 100644index 00000000..6ff9a803--- /dev/null+++ b/documentation/assets/img/icons/icon-easing-elastic.svg@@ -0,0 +1,8 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">+ <g id="icon-easing-elastic" fill="none" fill-rule="evenodd">+ <g id="Group-13" stroke="#F6F4F2" transform="translate(8 1)">+ <polyline id="Rectangle-41-Copy-2" points="32 7 32 39 0 39" opacity=".4"/>+ <path id="Shape-Copy-3" fill="#FFFFFF" fill-opacity="0" fill-rule="nonzero" stroke-width="3" d="M1 39C2.825 15.474 4.169 2.62 5.03.44c1.292-3.27 3.554 12.707 4.96 14.15 1.406 1.443 2.028-7.163 4.03-7.92 2.002-.756 3.392 1.64 4.65 1.64 1.258 0 2.422-.422 3.637-.422H32"/>+ </g>+ </g>+</svg>diff --git a/documentation/assets/img/icons/icon-easing-spring.svg b/documentation/assets/img/icons/icon-easing-spring.svgnew file mode 100644index 00000000..5054f355--- /dev/null+++ b/documentation/assets/img/icons/icon-easing-spring.svg@@ -0,0 +1,8 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">+ <g id="icon-easing-spring" fill="none" fill-rule="evenodd">+ <g id="Group-12" stroke="#F6F4F2" transform="translate(8 1)">+ <polyline id="Rectangle-41-Copy-3" points="32 7 32 39 0 39" opacity=".4"/>+ <path id="Shape-Copy-4" fill="#FFFFFF" fill-opacity="0" fill-rule="nonzero" stroke-width="3" d="M1.028 38.715C.588 13.238 1.078.5 2.5.5c2.132 0 1.963 18.468 4.186 18.468 2.222 0 1.3-16.514 2.864-16.514 1.563 0 .925 11.234 2.633 11.234 1.707 0 1.143-8.883 3.066-8.883 1.923 0 1.077 5.314 2.73 5.314 1.654 0 .955-3.791 2.599-3.791 1.644 0 1.49 1.332 3.913 1.332h7.537"/>+ </g>+ </g>+</svg>diff --git a/documentation/assets/img/icons/icon-easing-steps.svg b/documentation/assets/img/icons/icon-easing-steps.svgnew file mode 100644index 00000000..20e55411--- /dev/null+++ b/documentation/assets/img/icons/icon-easing-steps.svg@@ -0,0 +1,8 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">+ <g id="icon-easing-steps" fill="none" fill-rule="evenodd">+ <g id="Group-12-Copy" stroke="#F6F4F2" transform="translate(8 8)">+ <polyline id="Rectangle-41-Copy-3" points="32 0 32 32 0 32" opacity=".4"/>+ <polyline id="Rectangle" fill-rule="nonzero" stroke-width="3" points="1 32 1 27 6 27 6 22 11 22 11 17 17 17 17 11 22 11 22 6 27 6 27 1 32 1"/>+ </g>+ </g>+</svg>diff --git a/documentation/assets/img/icons/icon-examples.svg b/documentation/assets/img/icons/icon-examples.svgnew file mode 100644index 00000000..7bd1b3f9--- /dev/null+++ b/documentation/assets/img/icons/icon-examples.svg@@ -0,0 +1,15 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 136">+ <g id="icon-examples" fill="none" fill-rule="evenodd">+ <polygon stroke="currentColor" stroke-width="2" points="1 1 239 1 239 135 1 135"/>+ <polygon stroke="currentColor" points="0 16 80 16 80 56 0 56"/>+ <polygon stroke="currentColor" points="80 16 160 16 160 56 80 56"/>+ <polygon stroke="currentColor" points="160 16 240 16 240 56 160 56"/>+ <polygon stroke="currentColor" points="0 56 80 56 80 96 0 96"/>+ <polygon stroke="currentColor" points="80 56 160 56 160 96 80 96"/>+ <polygon stroke="currentColor" points="160 56 240 56 240 96 160 96"/>+ <polygon stroke="currentColor" points="0 96 80 96 80 136 0 136"/>+ <polygon stroke="currentColor" points="80 96 160 96 160 136 80 136"/>+ <polygon stroke="currentColor" points="160 96 240 96 240 136 160 136"/>+ <path stroke="currentColor" d="M0 16h240"/>+ </g>+</svg>diff --git a/documentation/assets/img/icons/icon-github.svg b/documentation/assets/img/icons/icon-github.svgnew file mode 100644index 00000000..acaf4752--- /dev/null+++ b/documentation/assets/img/icons/icon-github.svg@@ -0,0 +1,5 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">+ <g id="icon-github" fill="none" fill-rule="evenodd">+ <path id="Fill-51" fill="#F6F4F2" d="M24.288 8C15.294 8 8 15.293 8 24.29c0 7.197 4.667 13.302 11.14 15.456.815.15 1.112-.353 1.112-.785 0-.387-.014-1.411-.022-2.77-4.531.984-5.487-2.184-5.487-2.184-.741-1.882-1.809-2.383-1.809-2.383-1.479-1.01.112-.99.112-.99 1.635.115 2.495 1.679 2.495 1.679 1.453 2.489 3.813 1.77 4.741 1.353.148-1.052.569-1.77 1.034-2.177-3.617-.411-7.42-1.809-7.42-8.051 0-1.778.635-3.233 1.677-4.371-.168-.412-.727-2.069.16-4.311 0 0 1.367-.438 4.479 1.67a15.602 15.602 0 0 1 4.078-.549 15.62 15.62 0 0 1 4.078.549c3.11-2.108 4.475-1.67 4.475-1.67.889 2.242.33 3.899.163 4.311 1.044 1.138 1.674 2.593 1.674 4.371 0 6.258-3.809 7.635-7.437 8.038.584.503 1.105 1.497 1.105 3.016 0 2.178-.02 3.935-.02 4.469 0 .436.294.943 1.12.784 6.468-2.159 11.131-8.26 11.131-15.455C40.579 15.293 33.285 8 24.288 8"/>+ </g>+</svg>diff --git a/documentation/assets/img/icons/icon-html.svg b/documentation/assets/img/icons/icon-html.svgnew file mode 100644index 00000000..e8de1253--- /dev/null+++ b/documentation/assets/img/icons/icon-html.svg@@ -0,0 +1,9 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">+ <g id="icon-html" fill="none" fill-rule="evenodd" stroke-linecap="square">+ <g id="Group" stroke="#F6F4F2" transform="translate(8 12)">+ <polyline id="Path-8" stroke-width="3" points="12 0 0 12 12 24"/>+ <polyline id="Path-8-Copy" stroke-width="3" points="20 0 32 12 20 24"/>+ <path id="Path-9" stroke-width="1.5" d="M20 8l-8 8"/>+ </g>+ </g>+</svg>diff --git a/documentation/assets/img/icons/icon-js.svg b/documentation/assets/img/icons/icon-js.svgnew file mode 100644index 00000000..8cc5c440--- /dev/null+++ b/documentation/assets/img/icons/icon-js.svg@@ -0,0 +1,10 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">+ <g id="icon-js" fill="none" fill-rule="evenodd" stroke-linecap="square">+ <g id="Group" stroke="#F6F4F2" transform="translate(10 12)">+ <path id="Oval" stroke-width="1.5" d="M12.5 0a4 4 0 0 0-4 4v4a4 4 0 0 1-4 4 4 4 0 0 1 4 4v4a4 4 0 0 0 4 4"/>+ <path id="Oval-Copy" stroke-width="1.5" d="M16 0a4 4 0 0 1 4 4v4a4 4 0 0 0 4 4 4 4 0 0 0-4 4v4a4 4 0 0 1-4 4"/>+ <path id="Path-10" stroke-width="3" d="M5 0a5 5 0 0 0-5 5v14a5 5 0 0 0 5 5"/>+ <path id="Path-10-Copy" stroke-width="3" d="M23 0a5 5 0 0 1 5 5v14a5 5 0 0 1-5 5"/>+ </g>+ </g>+</svg>diff --git a/documentation/assets/img/icons/icon-staggering-center.svg b/documentation/assets/img/icons/icon-staggering-center.svgnew file mode 100644index 00000000..033de882--- /dev/null+++ b/documentation/assets/img/icons/icon-staggering-center.svg@@ -0,0 +1,10 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">+ <g id="icon-staggering-center" fill="none" fill-rule="evenodd">+ <rect id="Rectangle-40-Copy-9" width="33" height="33" x="7.5" y="7.5" stroke="#242423" opacity=".3"/>+ <path id="Path-13-Copy-46" stroke="#242423" stroke-width="2" d="M24 25v-2"/>+ <path id="Path-13-Copy-45" stroke="#242423" stroke-width="2" d="M20 27v-6"/>+ <path id="Path-13-Copy-47" stroke="#242423" stroke-width="2" d="M28 27v-6"/>+ <path id="Path-13-Copy-44" stroke="#242423" stroke-width="2" d="M16 29V19"/>+ <path id="Path-13-Copy-48" stroke="#242423" stroke-width="2" d="M32 29V19"/>+ </g>+</svg>diff --git a/documentation/assets/img/icons/icon-staggering-easing.svg b/documentation/assets/img/icons/icon-staggering-easing.svgnew file mode 100644index 00000000..bbc6084d--- /dev/null+++ b/documentation/assets/img/icons/icon-staggering-easing.svg@@ -0,0 +1,10 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">+ <g id="icon-staggering-easing" fill="none" fill-rule="evenodd">+ <rect id="Rectangle-40-Copy-10" width="33" height="33" x="7.5" y="7.5" stroke="#242423" opacity=".3"/>+ <path id="Path-13-Copy-53" stroke="#242423" stroke-width="2" d="M28 33V22"/>+ <path id="Path-13-Copy-52" stroke="#242423" stroke-width="2" d="M32 33V15"/>+ <path id="Path-13-Copy-51" stroke="#242423" stroke-width="2" d="M24 33v-6"/>+ <path id="Path-13-Copy-50" stroke="#242423" stroke-width="2" d="M16 33v-2"/>+ <path id="Path-13-Copy-49" stroke="#242423" stroke-width="2" d="M20 33v-3"/>+ </g>+</svg>diff --git a/documentation/assets/img/icons/icon-staggering-forward.svg b/documentation/assets/img/icons/icon-staggering-forward.svgnew file mode 100644index 00000000..07f739eb--- /dev/null+++ b/documentation/assets/img/icons/icon-staggering-forward.svg@@ -0,0 +1,10 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">+ <g id="icon-staggering-forward" fill="none" fill-rule="evenodd">+ <rect id="Rectangle-40-Copy-7" width="33" height="33" x="7.5" y="7.5" stroke="#242423" opacity=".3"/>+ <path id="Path-13-Copy-41" stroke="#242423" stroke-width="2" d="M32 25v-2"/>+ <path id="Path-13-Copy-40" stroke="#242423" stroke-width="2" d="M28 27v-6"/>+ <path id="Path-13-Copy-39" stroke="#242423" stroke-width="2" d="M24 29V19"/>+ <path id="Path-13-Copy-38" stroke="#242423" stroke-width="2" d="M20 31V17"/>+ <path id="Path-13-Copy-37" stroke="#242423" stroke-width="2" d="M16 33V15"/>+ </g>+</svg>diff --git a/documentation/assets/img/icons/icon-staggering-grid.svg b/documentation/assets/img/icons/icon-staggering-grid.svgnew file mode 100644index 00000000..fe271ca8--- /dev/null+++ b/documentation/assets/img/icons/icon-staggering-grid.svg@@ -0,0 +1,8 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">+ <g id="icon-staggering-grid" fill="none" fill-rule="evenodd">+ <rect id="Mask" width="33" height="33" x="7.5" y="7.5" stroke="#242423" opacity=".3"/>+ <circle id="Oval" cx="24" cy="24" r="1" fill="#242423"/>+ <circle id="Oval-Copy" cx="24" cy="24" r="4" stroke="#242423" stroke-width="2"/>+ <circle id="Oval-Copy-2" cx="24" cy="24" r="8" stroke="#242423" stroke-width="2"/>+ </g>+</svg>diff --git a/documentation/assets/img/icons/icon-staggering-index.svg b/documentation/assets/img/icons/icon-staggering-index.svgnew file mode 100644index 00000000..b9bec8a0--- /dev/null+++ b/documentation/assets/img/icons/icon-staggering-index.svg@@ -0,0 +1,10 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">+ <g id="icon-staggering-index" fill="none" fill-rule="evenodd">+ <rect id="Rectangle-40-Copy-10" width="33" height="33" x="7.5" y="7.5" stroke="#242423" opacity=".3"/>+ <path id="Path-13-Copy-53" stroke="#242423" stroke-width="2" d="M20 25v-2"/>+ <path id="Path-13-Copy-52" stroke="#242423" stroke-width="2" d="M16 27v-6"/>+ <path id="Path-13-Copy-51" stroke="#242423" stroke-width="2" d="M24 27v-6"/>+ <path id="Path-13-Copy-50" stroke="#242423" stroke-width="2" d="M32 31V17"/>+ <path id="Path-13-Copy-49" stroke="#242423" stroke-width="2" d="M28 29V19"/>+ </g>+</svg>diff --git a/documentation/assets/img/icons/icon-staggering-reverse.svg b/documentation/assets/img/icons/icon-staggering-reverse.svgnew file mode 100644index 00000000..db946923--- /dev/null+++ b/documentation/assets/img/icons/icon-staggering-reverse.svg@@ -0,0 +1,11 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">+ <g id="icon-staggering-reverse" fill="none" fill-rule="evenodd">+ <rect id="Rectangle-40-Copy-8" width="33" height="33" x="7.5" y="7.5" stroke="#242423" opacity=".3"/>+ <path id="Path-13-Copy-35" stroke="#242423" stroke-width="2" d="M16 25v-2"/>+ <path id="Path-13-Copy-34" stroke="#242423" stroke-width="2" d="M20 27v-6"/>+ <path id="Path-13-Copy-33" stroke="#242423" stroke-width="2" d="M24 29V19"/>+ <path id="Path-13-Copy-32" stroke="#242423" stroke-width="2" d="M28 31V17"/>+ <path id="Path-13-Copy-31" stroke="#242423" stroke-width="2" d="M32 33V15"/>+ <path id="Path-13-Copy-35" stroke="#242423" stroke-width="2"/>+ </g>+</svg>diff --git a/documentation/assets/img/icons/icon-svg.svg b/documentation/assets/img/icons/icon-svg.svgnew file mode 100644index 00000000..63847b20--- /dev/null+++ b/documentation/assets/img/icons/icon-svg.svg@@ -0,0 +1,9 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">+ <g id="icon-svg" fill="none" fill-rule="evenodd" stroke-linecap="square">+ <g id="Group" stroke="#F6F4F2" transform="translate(12 12)">+ <polyline id="Oval-16" stroke-width="3" points="0 20 0 0 14 0"/>+ <polyline id="Oval-16-Copy" stroke-width="3" points="10 24 10 4 24 4" transform="rotate(-180 17 14)"/>+ <path id="Path-11" stroke-width="1.5" d="M0 24C12.072 24 12.072 0 24 0"/>+ </g>+ </g>+</svg>diff --git a/documentation/assets/img/icons/icon-twitter.svg b/documentation/assets/img/icons/icon-twitter.svgnew file mode 100644index 00000000..d28f5dd4--- /dev/null+++ b/documentation/assets/img/icons/icon-twitter.svg@@ -0,0 +1,5 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">+ <g id="icon-twitter" fill="none" fill-rule="evenodd">+ <path id="Shape" fill="#F6F4F2" fill-rule="nonzero" d="M18.063 37.002c12.076 0 18.68-10.005 18.68-18.68 0-.285 0-.567-.019-.85A13.358 13.358 0 0 0 40 14.076c-1.198.53-2.47.879-3.77 1.032a6.588 6.588 0 0 0 2.886-3.63 13.157 13.157 0 0 1-4.17 1.593 6.572 6.572 0 0 0-11.188 5.988 18.64 18.64 0 0 1-13.53-6.86 6.57 6.57 0 0 0 2.032 8.764 6.516 6.516 0 0 1-2.98-.822v.084a6.568 6.568 0 0 0 5.267 6.435 6.555 6.555 0 0 1-2.964.113 6.573 6.573 0 0 0 6.133 4.56A13.174 13.174 0 0 1 8 34.051a18.587 18.587 0 0 0 10.063 2.945"/>+ </g>+</svg>diff --git a/documentation/assets/img/icons/og.png b/documentation/assets/img/icons/og.pngdeleted file mode 100644index 6e73d10f..00000000Binary files a/documentation/assets/img/icons/og.png and /dev/null differdiff --git a/documentation/assets/img/icons/twitter.png b/documentation/assets/img/icons/twitter.pngdeleted file mode 100644index 4721d2bd..00000000Binary files a/documentation/assets/img/icons/twitter.png and /dev/null differdiff --git a/documentation/assets/img/social-media-image.png b/documentation/assets/img/social-media-image.pngnew file mode 100644index 00000000..2f7ee740Binary files /dev/null and b/documentation/assets/img/social-media-image.png differdiff --git a/documentation/assets/js/anime/anime.1.0.js b/documentation/assets/js/anime/anime.1.0.jsindex 67873f5f..7ff59973 100644--- a/documentation/assets/js/anime/anime.1.0.js+++ b/documentation/assets/js/anime/anime.1.0.js@@ -1,6 +1,6 @@/** Anime v1.0.0- * http://animejs.com+ * https://animejs.com* JavaScript animation engine* Copyright (c) 2016 Julian Garnier* http://juliangarnier.comdiff --git a/documentation/assets/js/anime/anime.1.3.js b/documentation/assets/js/anime/anime.1.3.jsindex 3065511b..bf1d91f3 100644--- a/documentation/assets/js/anime/anime.1.3.js+++ b/documentation/assets/js/anime/anime.1.3.js@@ -1,6 +1,6 @@/** Anime v1.1.3- * http://animejs.com+ * https://animejs.com* JavaScript animation engine* Copyright (c) 2016 Julian Garnier* http://juliangarnier.comdiff --git a/documentation/assets/js/anime/anime.2.0.1.js b/documentation/assets/js/anime/anime.2.0.1.jsindex 1b475ebd..5294577d 100644--- a/documentation/assets/js/anime/anime.2.0.1.js+++ b/documentation/assets/js/anime/anime.2.0.1.js@@ -1,5 +1,5 @@/**- * http://animejs.com+ * https://animejs.com* JavaScript animation engine* @version v2.0.1* @author Julian Garnierdiff --git a/documentation/assets/js/anime/anime.2.1.0.js b/documentation/assets/js/anime/anime.2.1.0.jsindex affd65ec..57c348f1 100644--- a/documentation/assets/js/anime/anime.2.1.0.js+++ b/documentation/assets/js/anime/anime.2.1.0.js@@ -1,5 +1,5 @@/**- * http://animejs.com+ * https://animejs.com* JavaScript animation engine* @version v2.1.0* @author Julian Garnierdiff --git a/documentation/assets/js/anime/anime.2.2.0.js b/documentation/assets/js/anime/anime.2.2.0.jsindex a603e114..70168b04 100644--- a/documentation/assets/js/anime/anime.2.2.0.js+++ b/documentation/assets/js/anime/anime.2.2.0.js@@ -1,5 +1,5 @@/**- * http://animejs.com+ * https://animejs.com* JavaScript animation engine* @version v2.2.0* @author Julian Garnierdiff --git a/documentation/assets/js/anime/anime.3.0.0-alpha.js b/documentation/assets/js/anime/anime.3.0.0-alpha.jsindex 1dbb7070..ffcf1947 100644--- a/documentation/assets/js/anime/anime.3.0.0-alpha.js+++ b/documentation/assets/js/anime/anime.3.0.0-alpha.js@@ -1,5 +1,5 @@/**- * http://animejs.com+ * https://animejs.com* JavaScript animation engine* @version v3.0.0-alpha* @author Julian Garnierdiff --git a/documentation/assets/js/documentation.js b/documentation/assets/js/documentation.jsindex 93e3e65f..3085b5d4 100644--- a/documentation/assets/js/documentation.js+++ b/documentation/assets/js/documentation.js@@ -23,26 +23,6 @@ function scrollTo(selector, offset, cb) {});}-function parseHTML(el, parentId) {- var parentEl = document.createElement('div');- var clone = el.cloneNode(true);- var shadowEls = clone.querySelectorAll('.shadow');- var els = clone.querySelectorAll('.el');- for (var i = 0; i < shadowEls.length; i++ ) {- var shadowEl = shadowEls[i];- shadowEl.parentNode.removeChild(shadowEl);- }- for (var i = 0; i < els.length; i++ ) {- els[i].removeAttribute('style');- }- parentEl.id = parentId;- parentEl.innerHTML = clone.innerHTML;- return html_beautify(parentEl.outerHTML, {- preserve_newlines: false,- indent_size: 2- });-}-function parseJS(demoCode) {var split = demoCode.split('/*DEMO*/\n');return split[1] || '';@@ -271,6 +251,18 @@ function keyboardNavigation(e) {}}+// Update date and version number++var versionNumerEls = document.querySelectorAll('.version-number');+var dateEl = document.querySelector('.date');+var date = new Date();++for (var i = 0; i < versionNumerEls.length; i++) {+ versionNumerEls[i].innerHTML = anime.version;+}++// Init+updateDemos();window.onhashchange = updateDemos;document.onkeydown = keyboardNavigation;diff --git a/documentation/assets/js/website.js b/documentation/assets/js/website.jsnew file mode 100644index 00000000..bcd0ad8d--- /dev/null+++ b/documentation/assets/js/website.js@@ -0,0 +1,886 @@+// import anime from '../../../lib/anime.es.js';++/* Ontersection observer */++!function(t,e){"use strict";function n(t){this.time=t.time,this.target=t.target,this.rootBounds=t.rootBounds,this.boundingClientRect=t.boundingClientRect,this.intersectionRect=t.intersectionRect||a(),this.isIntersecting=!!t.intersectionRect;var e=this.boundingClientRect,n=e.width*e.height,i=this.intersectionRect,o=i.width*i.height;n?this.intersectionRatio=o/n:this.intersectionRatio=this.isIntersecting?1:0}function i(t,e){var n=e||{};if("function"!=typeof t)throw new Error("callback must be a function");if(n.root&&1!=n.root.nodeType)throw new Error("root must be an Element");this._checkForIntersections=r(this._checkForIntersections.bind(this),this.THROTTLE_TIMEOUT),this._callback=t,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(n.rootMargin),this.thresholds=this._initThresholds(n.threshold),this.root=n.root||null,this.rootMargin=this._rootMarginValues.map(function(t){return t.value+t.unit}).join(" ")}function o(){return t.performance&&performance.now&&performance.now()}function r(t,e){var n=null;return function(){n||(n=setTimeout(function(){t(),n=null},e))}}function s(t,e,n,i){"function"==typeof t.addEventListener?t.addEventListener(e,n,i||!1):"function"==typeof t.attachEvent&&t.attachEvent("on"+e,n)}function h(t,e,n,i){"function"==typeof t.removeEventListener?t.removeEventListener(e,n,i||!1):"function"==typeof t.detatchEvent&&t.detatchEvent("on"+e,n)}function c(t,e){var n=Math.max(t.top,e.top),i=Math.min(t.bottom,e.bottom),o=Math.max(t.left,e.left),r=Math.min(t.right,e.right),s=r-o,h=i-n;return s>=0&&h>=0&&{top:n,bottom:i,left:o,right:r,width:s,height:h}}function u(t){var e;try{e=t.getBoundingClientRect()}catch(n){}return e?(e.width&&e.height||(e={top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.right-e.left,height:e.bottom-e.top}),e):a()}function a(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function l(t,e){for(var n=e;n;){if(n==t)return!0;n=p(n)}return!1}function p(t){var e=t.parentNode;return e&&11==e.nodeType&&e.host?e.host:e}if("IntersectionObserver"in t&&"IntersectionObserverEntry"in t&&"intersectionRatio"in t.IntersectionObserverEntry.prototype)return void("isIntersecting"in t.IntersectionObserverEntry.prototype||Object.defineProperty(t.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}}));var f=[];i.prototype.THROTTLE_TIMEOUT=100,i.prototype.POLL_INTERVAL=null,i.prototype.observe=function(t){var e=this._observationTargets.some(function(e){return e.element==t});if(!e){if(!t||1!=t.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:t,entry:null}),this._monitorIntersections(),this._checkForIntersections()}},i.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter(function(e){return e.element!=t}),this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())},i.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorIntersections(),this._unregisterInstance()},i.prototype.takeRecords=function(){var t=this._queuedEntries.slice();return this._queuedEntries=[],t},i.prototype._initThresholds=function(t){var e=t||[0];return Array.isArray(e)||(e=[e]),e.sort().filter(function(t,e,n){if("number"!=typeof t||isNaN(t)||0>t||t>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return t!==n[e-1]})},i.prototype._parseRootMargin=function(t){var e=t||"0px",n=e.split(/\s+/).map(function(t){var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!e)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(e[1]),unit:e[2]}});return n[1]=n[1]||n[0],n[2]=n[2]||n[0],n[3]=n[3]||n[1],n},i.prototype._monitorIntersections=function(){this._monitoringIntersections||(this._monitoringIntersections=!0,this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(s(t,"resize",this._checkForIntersections,!0),s(e,"scroll",this._checkForIntersections,!0),"MutationObserver"in t&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))},i.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,h(t,"resize",this._checkForIntersections,!0),h(e,"scroll",this._checkForIntersections,!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))},i.prototype._checkForIntersections=function(){var t=this._rootIsInDom(),e=t?this._getRootRect():a();this._observationTargets.forEach(function(i){var r=i.element,s=u(r),h=this._rootContainsTarget(r),c=i.entry,a=t&&h&&this._computeTargetAndRootIntersection(r,e),l=i.entry=new n({time:o(),target:r,boundingClientRect:s,rootBounds:e,intersectionRect:a});c?t&&h?this._hasCrossedThreshold(c,l)&&this._queuedEntries.push(l):c&&c.isIntersecting&&this._queuedEntries.push(l):this._queuedEntries.push(l)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)},i.prototype._computeTargetAndRootIntersection=function(n,i){if("none"!=t.getComputedStyle(n).display){for(var o=u(n),r=o,s=p(n),h=!1;!h;){var a=null,l=1==s.nodeType?t.getComputedStyle(s):{};if("none"==l.display)return;if(s==this.root||s==e?(h=!0,a=i):s!=e.body&&s!=e.documentElement&&"visible"!=l.overflow&&(a=u(s)),a&&(r=c(a,r),!r))break;s=p(s)}return r}},i.prototype._getRootRect=function(){var t;if(this.root)t=u(this.root);else{var n=e.documentElement,i=e.body;t={top:0,left:0,right:n.clientWidth||i.clientWidth,width:n.clientWidth||i.clientWidth,bottom:n.clientHeight||i.clientHeight,height:n.clientHeight||i.clientHeight}}return this._expandRectByRootMargin(t)},i.prototype._expandRectByRootMargin=function(t){var e=this._rootMarginValues.map(function(e,n){return"px"==e.unit?e.value:e.value*(n%2?t.width:t.height)/100}),n={top:t.top-e[0],right:t.right+e[1],bottom:t.bottom+e[2],left:t.left-e[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},i.prototype._hasCrossedThreshold=function(t,e){var n=t&&t.isIntersecting?t.intersectionRatio||0:-1,i=e.isIntersecting?e.intersectionRatio||0:-1;if(n!==i)for(var o=0;o<this.thresholds.length;o++){var r=this.thresholds[o];if(r==n||r==i||n>r!=i>r)return!0}},i.prototype._rootIsInDom=function(){return!this.root||l(e,this.root)},i.prototype._rootContainsTarget=function(t){return l(this.root||e,t)},i.prototype._registerInstance=function(){f.indexOf(this)<0&&f.push(this)},i.prototype._unregisterInstance=function(){var t=f.indexOf(this);-1!=t&&f.splice(t,1)},t.IntersectionObserver=i,t.IntersectionObserverEntry=n}(window,document);++/* Helpers */++function dragElement(el, events) {++ function getPointer(e) {+ var x = 'clientX';+ var y = 'clientY';+ var evt = e.touches ? e.touches[0] : e;+ return { x: evt[x], y: evt[y] };+ }++ var drag = { x: 0, y: 0, deltaX: 0, deltaY: 0, active: true, events: events || {} };+ var originalX = 0;+ var originalY = 0;+ var pointerX = 0;+ var pointerY = 0;++ function move(e) {+ if (drag.active) return;+ drag.deltaX = pointerX - getPointer(e).x;+ drag.deltaY = pointerY - getPointer(e).y;+ drag.x = originalX - drag.deltaX;+ drag.y = originalY - drag.deltaY;+ if (drag.events.move) drag.events.move(drag);+ }++ function release(e) {+ drag.active = true;+ if (drag.events.release) drag.events.release(drag);+ document.removeEventListener('mousemove', move, false);+ document.removeEventListener('mouseup', release, false);+ document.removeEventListener('touchmove', move, false);+ document.removeEventListener('touchend', release, false);+ }++ function start(e) {+ if (!drag.active) return;+ e.preventDefault();+ drag.active = false;+ pointerX = getPointer(e).x;+ pointerY = getPointer(e).y;+ originalX = drag.x;+ originalY = drag.y;+ if (drag.events.begin) drag.events.begin(drag);+ document.addEventListener('mousemove', move, false);+ document.addEventListener('mouseup', release, false);+ document.addEventListener('touchmove', move, false);+ document.addEventListener('touchend', release, false);+ }++ el.addEventListener('mousedown', start, false);+ el.addEventListener('touchstart', start, false);++ return drag;++}++// Better scroll events++function onScroll(cb) {+ var isTicking = false;+ var scrollY = 0;+ var body = document.body;+ var html = document.documentElement;+ var scrollHeight = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);+ function scroll() {+ scrollY = window.scrollY;+ if (cb) cb(scrollY, scrollHeight);+ requestTick();+ }+ function requestTick() {+ if (!isTicking) requestAnimationFrame(updateScroll);+ isTicking = true;+ }+ function updateScroll() {+ isTicking = false;+ var currentScrollY = scrollY;+ }+ scroll();+ window.onscroll = scroll;+}++// Scroll to element++function scrollToElement(el, offset) {+ var off = offset || 0;+ var rect = el.getBoundingClientRect();+ var top = rect.top + off;+ var animation = anime({+ targets: [document.body, document.documentElement],+ scrollTop: '+='+top,+ easing: 'easeInOutSine',+ duration: 1500+ });+ // onScroll(animation.pause);+}++// Check if element is in viewport++function isElementInViewport(el, inCB, outCB, rootMargin) {+ var margin = rootMargin || '-10%';+ function handleIntersect(entries, observer) {+ var entry = entries[0];+ if (entry.isIntersecting) {+ if (inCB && typeof inCB === 'function') inCB(el, entry);+ } else {+ if (outCB && typeof outCB === 'function') outCB(el, entry);+ }+ }+ var observer = new IntersectionObserver(handleIntersect, {rootMargin: margin});+ observer.observe(el);+}++function fitElementToParent(el, padding) {+ var timeout = null;+ function resize() {+ if (timeout) clearTimeout(timeout);+ anime.set(el, {scale: 1});+ var pad = padding || 0;+ var parentEl = el.parentNode;+ var elOffsetWidth = el.offsetWidth - pad;+ var parentOffsetWidth = parentEl.offsetWidth;+ var ratio = parentOffsetWidth / elOffsetWidth;+ timeout = setTimeout(anime.set(el, {scale: ratio}), 100);+ }+ resize();+ window.addEventListener('resize', resize);+}++// Update date and version number++var versionNumerEls = document.querySelectorAll('.version-number');++for (var i = 0; i < versionNumerEls.length; i++) {+ versionNumerEls[i].innerHTML = anime.version;+}++var dateEl = document.querySelector('.date');+var date = new Date();++dateEl.innerHTML = date.getFullYear();++// main logo animation++var logoAnimation = (function() {++ var logoAnimationEl = document.querySelector('.logo-animation');+ var bouncePath = anime.path('.bounce path');++ fitElementToParent(logoAnimationEl, 0);++ anime.set(['.letter-a', '.letter-n', '.letter-i'], {translateX: 70});+ anime.set('.letter-e', {translateX: -70});+ anime.set('.dot', { translateX: 630, translateY: -200 });++ var logoAnimationTL = anime.timeline({+ autoplay: false,+ easing: 'easeOutSine'+ })+ .add({+ targets: '.letter-i .line',+ duration: 0,+ begin: function(a) { a.animatables[0].target.removeAttribute('stroke-dasharray'); }+ }, 0)+ .add({+ targets: '.bounced',+ transformOrigin: ['50% 100% 0px', '50% 100% 0px'],+ translateY: [+ {value: [150, -160], duration: 190, endDelay: 20, easing: 'cubicBezier(0.225, 1, 0.915, 0.980)'},+ {value: 4, duration: 120, easing: 'easeInQuad'},+ {value: 0, duration: 120, easing: 'easeOutQuad'}+ ],+ scaleX: [+ {value: [.25, .85], duration: 190, easing: 'easeOutQuad'},+ {value: 1.08, duration: 120, delay: 85, easing: 'easeInOutSine'},+ {value: 1, duration: 260, delay: 25, easing: 'easeOutQuad'}+ ],+ scaleY: [+ {value: [.3, .8], duration: 120, easing: 'easeOutSine'},+ {value: .35, duration: 120, delay: 180, easing: 'easeInOutSine'},+ {value: .57, duration: 180, delay: 25, easing: 'easeOutQuad'},+ {value: .5, duration: 190, delay: 15, easing: 'easeOutQuad'}+ ],+ delay: anime.stagger(80)+ })+ .add({+ targets: '.dot',+ opacity: { value: 1, duration: 100 },+ translateY: 250,+ scaleY: [4, .7],+ scaleX: { value: 1.3, delay: 100, duration: 200},+ duration: 280,+ easing: 'cubicBezier(0.350, 0.560, 0.305, 1)'+ }, '-=290')+ .add({+ targets: '.letter-m .line',+ easing: 'easeOutElastic(1, .8)',+ duration: 600,+ d: function(el) { return el.dataset.d2 },+ begin: function(a) { a.animatables[0].target.removeAttribute('stroke-dasharray'); }+ }, '-=140')+ .add({+ targets: ['.letter-a', '.letter-n', '.letter-i', '.letter-e'],+ translateX: 0,+ easing: 'easeOutElastic(1, .6)',+ duration: 800,+ delay: anime.stagger(40, {from: 2.5}),+ change: function(a) { a.animatables[2].target.removeAttribute('stroke-dasharray'); }+ }, '-=600')+ .add({+ targets: '.letter-m .line',+ d: function(el) { return el.dataset.d3 },+ easing: 'spring(.2, 200, 3, 60)',+ }, '-=680')+ .add({+ targets: '.dot',+ translateX: bouncePath('x'),+ translateY: bouncePath('y'),+ rotate: {value: '1turn', duration: 790},+ scaleX: { value: 1, duration: 50, easing: 'easeOutSine' },+ scaleY: [+ { value: [1, 1.5], duration: 50, easing: 'easeInSine' },+ { value: 1, duration: 50, easing: 'easeOutExpo' }+ ],+ easing: 'cubicBezier(0, .74, 1, .255)',+ duration: 800+ }, '-=1273')+ .add({+ targets: '.dot',+ scale: 1,+ rotate: '1turn',+ scaleY: {value: .5, delay: 0, duration: 150, delay: 230},+ translateX: 430,+ translateY: [+ {value: 244, duration: 100},+ {value: 204, duration: 200, delay: 130},+ {value: 224, duration: 225, easing: 'easeOutQuad', delay: 25}+ ],+ duration: 200,+ easing: 'easeOutSine'+ }, '-=474')+ .add({+ targets: '.letter-i .line',+ transformOrigin: ['50% 100% 0', '50% 100% 0'],+ d: function(el) { return el.dataset.d2 },+ easing: 'cubicBezier(0.400, 0.530, 0.070, 1)',+ duration: 80+ }, '-=670')+ .add({+ targets: '.logo-letter',+ translateY: [+ {value: 40, duration: 150, easing: 'easeOutQuart'},+ {value: 0, duration: 800, easing: 'easeOutElastic(1, .5)'}+ ],+ strokeDashoffset: [anime.setDashoffset, 0],+ delay: anime.stagger(60, {from: 'center'})+ }, '-=670')+ .add({+ targets: '.bounced',+ scaleY: [+ {value: .4, duration: 150, easing: 'easeOutQuart'},+ {value: .5, duration: 800, easing: 'easeOutElastic(1, .5)'}+ ],+ delay: anime.stagger(60, {from: 'center'})+ }, '-=1090')++ return logoAnimationTL;++})();++var headerIntroAnimation = anime.timeline({+ easing: 'easeOutSine',+ autoplay: false+})+.add({+ targets: ['.header a', '.secondary-menu a', '.section-intro .feature-description-text'],+ opacity: {value: [0.001, 1], easing: 'linear', duration: 300},+ translateY: [40, 0],+ translateZ: 0,+ duration: 500,+ delay: anime.stagger(40, {start: 400, from: 'last'}),+ begin: function(anim) {+ anim.animatables.forEach(function(a) {+ anime.set(a.target, {+ transition: 'transform 0s ease'+ });+ });+ },+ complete: function(anim) {+ logoAnimation.play();+ anim.animatables.forEach(function(a) {+ a.target.style = '';+ anime.set(a.target, {+ opacity: 1,+ transition: 'transform .225s ease'+ });+ });+ }+}, 0);++var introEasingsAnimation = (function() {++ var easingVisualizerEl = document.querySelector('.easing-visualizer');+ var barsWrapperEl = easingVisualizerEl.querySelector('.bars-wrapper');+ var dotsWrapperEl = easingVisualizerEl.querySelector('.dots-wrapper');+ var barsFragment = document.createDocumentFragment();+ var dotsFragment = document.createDocumentFragment();+ var numberOfBars = 91;+ var duration = 450;+ var animation;+ var paused = true;++ fitElementToParent(easingVisualizerEl);++ for (var i = 0; i < numberOfBars; i++) {+ var barEl = document.createElement('div');+ var dotEl = document.createElement('div');+ barEl.classList.add('bar');+ dotEl.classList.add('dot');+ dotEl.classList.add('color-red');+ barsFragment.appendChild(barEl);+ dotsFragment.appendChild(dotEl);+ }++ barsWrapperEl.appendChild(barsFragment);+ dotsWrapperEl.appendChild(dotsFragment);++ var defaultEase = 'easeOutElastic';++ function play() {++ paused = false;++ if (animation) animation.pause();++ var easings = [];+ for (let ease in anime.penner) easings.push(ease);+ easings.push('steps('+anime.random(5, 20)+')');+ easings.push('steps('+anime.random(5, 20)+')');+ easings.push('cubicBezier(0.545, 0.475, 0.145, 1)');+ var ease = easings[anime.random(0, easings.length - 1)];++ animation = anime.timeline({+ duration: duration,+ easing: ease,+ complete: play+ })+ .add({+ targets: '.easing-visualizer .bar',+ scaleY: anime.stagger([1, 44], {easing: ease, from: 'center', direction: 'reverse'}),+ delay: anime.stagger(7, {from: 'center'})+ })+ .add({+ targets: '.easing-visualizer .dot',+ translateY: anime.stagger(['-160px', '160px'], {easing: ease, from: 'last'}),+ delay: anime.stagger(7, {from: 'center'})+ }, 0);++ }++ function pause() {++ if (paused) return;+ paused = true;+ if (animation) animation.pause();++ animation = anime.timeline({+ easing: 'easeInOutQuad'+ })+ .add({+ targets: '.easing-visualizer .bar',+ scaleY: anime.stagger([1, 44], {easing: defaultEase, from: 'center', direction: 'reverse'}),+ duration: duration,+ delay: anime.stagger(7, {from: 'center'})+ })+ .add({+ targets: '.easing-visualizer .dot',+ translateY: anime.stagger(['-144px', '144px'], {easing: defaultEase, from: 'last'}),+ duration: duration,+ delay: anime.stagger(7, {from: 'center'})+ }, 0);++ }++ function init() {++ animation = anime.timeline({+ duration: 600,+ easing: 'easeInOutQuad',+ complete: function() {+ isElementInViewport(easingVisualizerEl, play, pause);+ }+ })+ .add({+ targets: '.easing-visualizer .bar',+ scale: [0, 1],+ delay: anime.stagger(8, {from: 'center'})+ })+ .add({+ targets: '.easing-visualizer .dot',+ scale: [0, 1],+ delay: anime.stagger(8, {from: 'center'}),+ complete: function() {+ headerIntroAnimation.play();+ }+ }, 0)+ .add({+ targets: '.easing-visualizer .bar',+ scaleY: anime.stagger([1, 44], {easing: 'easeInOutQuad', from: 'center', direction: 'reverse'}),+ duration: duration,+ easing: 'easeInOutQuad',+ delay: anime.stagger(7, {from: 'center'})+ })+ .add({+ targets: '.easing-visualizer .dot',+ translateY: anime.stagger(['-144px', '144px'], {easing: 'easeInOutQuad', from: 'last'}),+ duration: duration,+ easing: 'easeInOutQuad',+ delay: anime.stagger(7, {from: 'center'})+ }, '-=600');+++ }++ return {+ init: init,+ play: play,+ pause: pause+ }++})();++var sphereAnimation = (function() {++ var sphereEl = document.querySelector('.sphere-animation');+ var spherePathEls = sphereEl.querySelectorAll('.sphere path');+ var pathLength = spherePathEls.length;+ var hasStarted = false;+ var aimations = [];++ fitElementToParent(sphereEl);++ var breathAnimation = anime({+ begin: function() {+ for (var i = 0; i < pathLength; i++) {+ aimations.push(anime({+ targets: spherePathEls[i],+ stroke: {value: ['rgba(255,75,75,1)', 'rgba(80,80,80,.35)'], duration: 500},+ translateX: [2, -4],+ translateY: [2, -4],+ easing: 'easeOutQuad',+ autoplay: false+ }));+ }+ },+ update: function(ins) {+ aimations.forEach(function(animation, i) {+ var percent = (1 - Math.sin((i * .35) + (.0022 * ins.currentTime))) / 2;+ animation.seek(animation.duration * percent);+ });+ },+ duration: Infinity,+ autoplay: false+ });++ var introAnimation = anime.timeline({+ autoplay: false+ })+ .add({+ targets: sphereEl,+ opacity: [.001, 1],+ translateY: [60, 0],+ duration: 2000,+ easing: 'easeOutSine',+ }, 0)+ .add({+ targets: spherePathEls,+ strokeDashoffset: {+ value: [anime.setDashoffset, 0],+ duration: 3900,+ easing: 'easeInOutCirc',+ delay: anime.stagger(190, {direction: 'reverse'})+ },+ duration: 2000,+ delay: anime.stagger(60, {direction: 'reverse'}),+ easing: 'linear'+ }, 0);++ var shadowAnimation = anime({+ targets: '#sphereGradient',+ x1: '25%',+ x2: '25%',+ y1: '0%',+ y2: '75%',+ duration: 30000,+ easing: 'easeOutQuint',+ autoplay: false+ }, 0);++ function play() {+ introAnimation.play();+ breathAnimation.play();+ shadowAnimation.play();+ }++ function pause() {+ breathAnimation.pause();+ shadowAnimation.pause();+ }++ isElementInViewport(sphereEl, play, pause);++})();++var advancedStaggeringAnimation = (function() {++ var staggerVisualizerEl = document.querySelector('.stagger-visualizer');+ var dotsWrapperEl = staggerVisualizerEl.querySelector('.dots-wrapper');+ var dotsFragment = document.createDocumentFragment();+ var grid = [20, 10];+ var cell = 55;+ var numberOfElements = grid[0] * grid[1];+ var animation;+ var paused = true;++ fitElementToParent(staggerVisualizerEl);++ for (var i = 0; i < numberOfElements; i++) {+ var dotEl = document.createElement('div');+ dotEl.classList.add('dot');+ dotsFragment.appendChild(dotEl);+ }++ dotsWrapperEl.appendChild(dotsFragment);++ var index = anime.random(0, numberOfElements-1);+ var nextIndex = 0;++ anime.set('.stagger-visualizer .cursor', {+ translateX: anime.stagger(-cell, {grid: grid, from: index, axis: 'x'}),+ translateY: anime.stagger(-cell, {grid: grid, from: index, axis: 'y'}),+ translateZ: 0,+ scale: 1.5,+ });++ function play() {++ paused = false;+ if (animation) animation.pause();++ nextIndex = anime.random(0, numberOfElements-1);++ animation = anime.timeline({+ easing: 'easeInOutQuad',+ complete: play+ })+ .add({+ targets: '.stagger-visualizer .cursor',+ keyframes: [+ { scale: .75, duration: 120},+ { scale: 2.5, duration: 220},+ { scale: 1.5, duration: 450},+ ],+ duration: 300+ })+ .add({+ targets: '.stagger-visualizer .dot',+ keyframes: [+ {+ translateX: anime.stagger('-2px', {grid: grid, from: index, axis: 'x'}),+ translateY: anime.stagger('-2px', {grid: grid, from: index, axis: 'y'}),+ duration: 100+ }, {+ translateX: anime.stagger('4px', {grid: grid, from: index, axis: 'x'}),+ translateY: anime.stagger('4px', {grid: grid, from: index, axis: 'y'}),+ scale: anime.stagger([2.6, 1], {grid: grid, from: index}),+ duration: 225+ }, {+ translateX: 0,+ translateY: 0,+ scale: 1,+ duration: 1200,+ }+ ],+ delay: anime.stagger(80, {grid: grid, from: index})+ }, 30)+ .add({+ targets: '.stagger-visualizer .cursor',+ translateX: { value: anime.stagger(-cell, {grid: grid, from: nextIndex, axis: 'x'}) },+ translateY: { value: anime.stagger(-cell, {grid: grid, from: nextIndex, axis: 'y'}) },+ scale: 1.5,+ easing: 'cubicBezier(.075, .2, .165, 1)'+ }, '-=800')++ index = nextIndex;++ }++ function pause() {++ if (paused) return;+ paused = true;+ if (animation) animation.pause();++ animation = anime.timeline({+ easing: 'easeInOutQuad',+ duration: 100+ })+ .add({+ targets: '.cursor',+ translateX: { value: anime.stagger(-cell, {grid: grid, from: index, axis: 'x'}) },+ translateY: { value: anime.stagger(-cell, {grid: grid, from: index, axis: 'y'}) },+ scale: 1,+ })+ .add({+ targets: '.stagger-visualizer .dot',+ translateX: 0,+ translateY: 0,+ scale: 1,+ delay: anime.stagger(50, {grid: grid, from: index})+ }, 0)++ }++ isElementInViewport(staggerVisualizerEl, play, pause);++ return {+ play: play,+ pause: pause+ }++})();++var timeControlAnimation = (function() {++ var timeControlEl = document.querySelector('.time-control');+ var rullerEl = document.querySelector('.ruller');+ var timeCursorEl = document.querySelector('.time-cursor');+ var timeEl = document.querySelector('.time-cursor input');+ var infoEls = document.querySelectorAll('.info');+ var fragment = document.createDocumentFragment();+ var numberOfElements = 271;+ var controlAnimationCanMove = false;++ for (let i = 0; i < numberOfElements; i++) {+ var dotEl = document.createElement('div');+ dotEl.classList.add('line');+ fragment.appendChild(dotEl);+ }++ rullerEl.appendChild(fragment);++ var animationPXOffset = (timeControlEl.offsetWidth - (timeControlEl.parentNode.offsetWidth - 20)) / 2;+ if (animationPXOffset < 0) animationPXOffset = 0;++ function pxToTime(px) {+ var width = window.innerWidth > rullerEl.offsetWidth ? rullerEl.offsetWidth + 180 : window.innerWidth;+ var percent = px / (width);+ return percent * (timelineAnimation.duration);+ }++ var time = {+ anim: null,+ start: 0,+ end: 0+ };++ var drag = dragElement(timeCursorEl, {+ begin: function(e) {+ anime.remove(time);+ time.start = timelineAnimation.currentTime;+ controlAnimationCanMove = false;+ },+ move: function(e) {+ timelineAnimation.seek(time.start + pxToTime(-e.deltaX));+ },+ release: function(e) {+ time.end = timelineAnimation.currentTime;+ anime.remove(time);+ time.anim = anime({+ targets: time,+ end: time.start,+ easing: 'spring(.3, 200, 5, 1)',+ update: function() { timelineAnimation.seek(time.end); },+ complete: function() {+ controlAnimationCanMove = true;+ moveControlAnimation();+ }+ });+ }+ });++ var timelineAnimation = anime.timeline({+ easing: 'linear',+ autoplay: false+ })+ .add({+ targets: timeControlEl,+ translateX: [animationPXOffset, -animationPXOffset],+ duration: 1500+ }, 0)+ .add({+ targets: timeCursorEl,+ translateZ: 0,+ keyframes: [+ { translateY: [-24, 0], duration: 100, easing: 'easeInQuad' },+ { translateX: 1080, duration: 1500 },+ { translateY: -24, duration: 100, easing: 'easeOutQuad' }+ ],+ duration: 1500+ }, -100)+ .add({+ targets: '.ruller .line',+ translateY: [ {value: 24}, {value: 0} ],+ duration: 160,+ delay: anime.stagger([0, 1500]),+ easing: 'easeInOutSine'+ }, -80)+ .add({+ targets: timeEl,+ value: [ {value: [0, 100]}, {value: 0}, {value: 100} ],+ duration: 1500,+ round: 1,+ easing: 'linear'+ }, 0)++ for (var i = 0; i < infoEls.length; i++) {+ var infoEl = infoEls[i];+ var delay = parseFloat(anime.get(infoEl, 'data-delay'));+ var direction = infoEl.classList.contains('info-bottom') ? -1 : 1;+ timelineAnimation+ .add({+ targets: infoEl.querySelector('.info-bar'),+ scaleY: [0, 1],+ duration: 250,+ easing: 'easeOutCirc'+ }, delay)+ .add({+ targets: infoEl.querySelectorAll('.info .feature-caption'),+ opacity: [0, 1],+ translateY: [direction * 10, 0],+ duration: 50,+ delay: anime.stagger(50, {start: 10, direction: direction > 0 ? 'reverse' : 'normal'}),+ easing: 'easeOutSine'+ }, delay)+ }++ var windowHeight = window.innerHeight;+ var scrollAnim;++ function moveControlAnimation() {+ var rect = timeControlEl.getBoundingClientRect();+ var top = rect.top;+ var height = rect.height;+ var scrolled = (top - windowHeight + 100) * -1.5;+ timelineAnimation.seek(scrolled * 2);+ if (controlAnimationCanMove) scrollAnim = requestAnimationFrame(moveControlAnimation);+ }++ isElementInViewport(timeControlEl, function(el, entry) {+ windowHeight = window.innerHeight;+ controlAnimationCanMove = true;+ moveControlAnimation();+ }, function(el, entry) {+ controlAnimationCanMove = false;+ }, '50px');++ onScroll(function() {+ if (time.anim && !time.anim.paused) {+ time.anim.pause();+ controlAnimationCanMove = true;+ moveControlAnimation();+ }+ });++})();++var layeredAnimation = (function() {++ var transformEls = document.querySelectorAll('.transform-progress');+ var layeredAnimationEl = document.querySelector('.layered-animations');+ var shapeEls = layeredAnimationEl.querySelectorAll('.shape');+ var triangleEl = layeredAnimationEl.querySelector('polygon');+ var trianglePoints = triangleEl.getAttribute('points').split(' ');+ var easings = ['easeInOutQuad', 'easeInOutCirc', 'easeInOutSine', 'spring'];++ fitElementToParent(layeredAnimationEl);++ function createKeyframes(value) {+ var keyframes = [];+ for (var i = 0; i < 30; i++) keyframes.push({ value: value });+ return keyframes;+ }++ function animateShape(el) {++ var circleEl = el.querySelector('circle');+ var rectEl = el.querySelector('rect');+ var polyEl = el.querySelector('polygon');++ var animation = anime.timeline({+ targets: el,+ duration: function() { return anime.random(600, 2200); },+ easing: function() { return easings[anime.random(0, easings.length - 1)]; },+ complete: function(anim) { animateShape(anim.animatables[0].target); },+ })+ .add({+ translateX: createKeyframes(function(el) {+ return el.classList.contains('large') ? anime.random(-300, 300) : anime.random(-520, 520);+ }),+ translateY: createKeyframes(function(el) {+ return el.classList.contains('large') ? anime.random(-110, 110) : anime.random(-280, 280);+ }),+ rotate: createKeyframes(function() { return anime.random(-180, 180); }),+ }, 0);+ if (circleEl) {+ animation.add({+ targets: circleEl,+ r: createKeyframes(function() { return anime.random(32, 72); }),+ }, 0);+ }+ if (rectEl) {+ animation.add({+ targets: rectEl,+ width: createKeyframes(function() { return anime.random(64, 120); }),+ height: createKeyframes(function() { return anime.random(64, 120); }),+ }, 0);+ }+ if (polyEl) {+ animation.add({+ targets: polyEl,+ points: createKeyframes(function() {+ var scale = anime.random(72, 180) / 100;+ return trianglePoints.map(function(p) { return p * scale; }).join(' ');+ }),+ }, 0);+ }++ isElementInViewport(layeredAnimationEl, animation.play, animation.pause);++ }++ for (var i = 0; i < shapeEls.length; i++) {+ animateShape(shapeEls[i]);+ }++ function animateProgress(el) {+ var animation = anime.timeline({+ targets: el,+ duration: function() { return anime.random(400, 1800); },+ easing: function() { return easings[anime.random(0, easings.length - 2)]; },+ complete: function(anim) { animateProgress(anim.animatables[0].target); },+ })+ .add({+ transformOrigin: createKeyframes(function(el) {+ return anime.random(0, 100) + '%';+ })+ }, 0)+ .add({+ scaleX: createKeyframes(function(el) {+ return anime.random(10, 100) / 100;+ })+ }, 0);+ isElementInViewport(layeredAnimationEl, animation.play, animation.pause);+ }++ for (var i = 0; i < transformEls.length; i++) {+ animateProgress(transformEls[i]);+ }++})();++var scrollToGettingStartedLink = document.querySelector('.scroll-to-getting-started');++scrollToGettingStartedLink.addEventListener('click', function(e) {+ e.preventDefault();+ scrollToElement(document.querySelector('#getting-started'));+})++window.onload = introEasingsAnimation.init;\ No newline at end of filediff --git a/documentation/examples/advanced-staggering-2.html b/documentation/examples/advanced-staggering-2.htmlnew file mode 100644index 00000000..90715b32--- /dev/null+++ b/documentation/examples/advanced-staggering-2.html@@ -0,0 +1,148 @@+<!DOCTYPE html>+<html>+<head>+ <title>advanced staggering • 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="https://animejs.com">+ <meta property="og:description" content="Javascript Animation Engine">+ <meta property="og:image" content="https://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="https://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/animejs.css" rel="stylesheet">+ <style>++ :root {+ font-size: 24px;+ }++ body {+ display: flex;+ flex-wrap: wrap;+ justify-content: center;+ align-items: center;+ height: 100vh;+ }++ .stagger-visualizer {+ position: relative;+ display: flex;+ flex-wrap: wrap;+ justify-content: center;+ align-items: center;+ width: 100%;+ max-width: 912px;+ transform: translate3d(0,0,0);+ }++ .stagger-visualizer .dot {+ position: relative;+ width: 2px;+ height: 2px;+ margin: 18px;+ background-color: currentColor;+ }++ .stagger-visualizer .cursor {+ position: absolute;+ z-index: 1;+ top: 0;+ left: 0;+ width: 24px;+ height: 24px;+ margin: 7px;+ background-color: currentColor;+ border-radius: 50%;+ }++ </style>+</head>+<body>++ <div class="stagger-visualizer">+ <div class="cursor color-red"></div>+ </div>++</body>+<script type="module">++ import anime from '../../src/index.js';++ const staggerVisualizerEl = document.querySelector('.stagger-visualizer');+ const fragment = document.createDocumentFragment();+ const numberOfElements = 24*11;++ for (let i = 0; i < numberOfElements; i++) {+ const dotEl = document.createElement('div');+ dotEl.classList.add('dot');+ fragment.appendChild(dotEl);+ }++ staggerVisualizerEl.appendChild(fragment);++ let index = anime.random(0, numberOfElements);+ let nextIndex = 0;++ function animateGrid() {++ nextIndex = anime.random(0, numberOfElements);++ anime.setValue('.cursor', {+ translateX: anime.stagger('-38px', {grid: [24, 11], from: index, axis: 'x'}),+ translateY: anime.stagger('-38px', {grid: [24, 11], from: index, axis: 'y'})+ });+ anime.timeline({+ easing: 'easeInOutQuad',+ complete: animateGrid+ })+ .add({+ targets: '.cursor',+ keyframes: [+ { scale: .625 },+ { scale: 1.125 },+ { scale: 1 }+ ],+ duration: 600+ })+ .add({+ targets: '.dot',+ keyframes: [+ {+ translateX: anime.stagger('-4px', {grid: [24, 11], from: index, axis: 'x'}),+ translateY: anime.stagger('-4px', {grid: [24, 11], from: index, axis: 'y'}),+ duration: 200+ }, {+ translateX: anime.stagger('4px', {grid: [24, 11], from: index, axis: 'x'}),+ translateY: anime.stagger('4px', {grid: [24, 11], from: index, axis: 'y'}),+ scale: anime.stagger([9, 2], {grid: [24, 11], from: index}),+ duration: 400+ }, {+ translateX: 0,+ translateY: 0,+ scale: 1,+ duration: 600,+ }+ ],+ delay: anime.stagger(30, {grid: [24, 11], from: index})+ }, '-=600')+ .add({+ targets: '.cursor',+ translateX: { value: anime.stagger('-38px', {grid: [24, 11], from: nextIndex, axis: 'x'}), duration: anime.random(400, 1200) },+ translateY: { value: anime.stagger('-38px', {grid: [24, 11], from: nextIndex, axis: 'y'}), duration: anime.random(400, 1200) },+ easing: 'easeOutSine'+ }, '-=1100')++ index = nextIndex;++ }++ animateGrid();++</script>+</html>diff --git a/documentation/examples/advanced-staggering.html b/documentation/examples/advanced-staggering.htmlindex 6ee814bc..941b6a3a 100644--- a/documentation/examples/advanced-staggering.html+++ b/documentation/examples/advanced-staggering.html@@ -5,14 +5,14 @@<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:url" content="https://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 property="og:image" content="https://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">+ <meta name="twitter:image" content="https://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/animejs.css" rel="stylesheet">diff --git a/documentation/examples/anime-DOM-stress-test.html b/documentation/examples/anime-DOM-stress-test.htmlindex 59139345..116b88ea 100644--- a/documentation/examples/anime-DOM-stress-test.html+++ b/documentation/examples/anime-DOM-stress-test.html@@ -5,14 +5,14 @@<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:url" content="https://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 property="og:image" content="https://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">+ <meta name="twitter:image" content="https://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/documentation.css" rel="stylesheet">diff --git a/documentation/examples/anime-callbacks.html b/documentation/examples/anime-callbacks.htmlindex 4a9bcbe4..6e7c5b29 100644--- a/documentation/examples/anime-callbacks.html+++ b/documentation/examples/anime-callbacks.html@@ -5,14 +5,14 @@<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:url" content="https://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 property="og:image" content="https://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">+ <meta name="twitter:image" content="https://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/documentation.css" rel="stylesheet">diff --git a/documentation/examples/anime-colors-test.html b/documentation/examples/anime-colors-test.htmlindex cc8fd9c6..b6c8a7ca 100644--- a/documentation/examples/anime-colors-test.html+++ b/documentation/examples/anime-colors-test.html@@ -5,14 +5,14 @@<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:url" content="https://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 property="og:image" content="https://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">+ <meta name="twitter:image" content="https://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/documentation.css" rel="stylesheet">diff --git a/documentation/examples/anime-complex-properties.html b/documentation/examples/anime-complex-properties.htmlindex dd10e799..37ea8b04 100644--- a/documentation/examples/anime-complex-properties.html+++ b/documentation/examples/anime-complex-properties.html@@ -5,14 +5,14 @@<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:url" content="https://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 property="og:image" content="https://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">+ <meta name="twitter:image" content="https://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/documentation.css" rel="stylesheet">diff --git a/documentation/examples/anime-direction-reverse.html b/documentation/examples/anime-direction-reverse.htmlnew file mode 100644index 00000000..1ffcbacc--- /dev/null+++ b/documentation/examples/anime-direction-reverse.html@@ -0,0 +1,92 @@+<!DOCTYPE html>+<html>+<head>+ <title>Direction reverse | 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="https://animejs.com">+ <meta property="og:description" content="Javascript Animation Engine">+ <meta property="og:image" content="https://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="https://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/documentation.css" rel="stylesheet">+ <!-- <script src="../../lib/anime.min.js"></script> -->+ <!-- <script src="../assets/js/anime/anime.2.2.0.js"></script> -->+ <style>++ .scroll-area {+ width: 100%;+ height: 700vh;+ }++ .animation-wrapper {+ position: fixed;+ top: 0;+ left: 0;+ width: 100%;+ }++ .pane {+ display: flex;+ justify-content: center;+ align-items: center;+ position: absolute;+ top: 100vh;+ left: 0;+ width: 100%;+ height: 100vh;+ background-color: #000;+ font-size: 40vw;+ }++ </style>+</head>+<body>++ <div class="scroll-area"></div>++ <div class="animation-wrapper">+ <div class="pane pane-01">01</div>+ <div class="pane pane-02">02</div>+ <div class="pane pane-03">03</div>+ <div class="pane pane-04">04</div>+ <div class="pane pane-05">05</div>+ <div class="pane pane-06">06</div>+ <div class="pane pane-07">07</div>+ <div class="pane pane-08">08</div>+ <div class="pane pane-09">09</div>+ <div class="pane pane-10">10</div>+ <div class="pane pane-11">11</div>+ <div class="pane pane-12">12</div>+ <div class="pane pane-13">13</div>+ <div class="pane pane-14">14</div>+ </div>++</body>+<script type="module">++ import anime from '../../src/index.js';++ var began = 0;+ var completed = 0;++ window.tl = anime({+ targets: '.pane-01',+ translateY: '-100vh',+ easing: 'easeInOutSine',+ duration: 200,+ direction: 'reverse',+ update: function(instance) {+ console.log(instance);+ }+ })++ </script>+ <!-- <script src="../assets/js/vendors/stats.min.js"></script> -->+</html>diff --git a/documentation/examples/anime-directions-testing.html b/documentation/examples/anime-directions-testing.htmlindex 5b42434b..cc53a97b 100644--- a/documentation/examples/anime-directions-testing.html+++ b/documentation/examples/anime-directions-testing.html@@ -5,14 +5,14 @@<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:url" content="https://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 property="og:image" content="https://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">+ <meta name="twitter:image" content="https://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/documentation.css" rel="stylesheet">diff --git a/documentation/examples/anime-ease-visualizer.html b/documentation/examples/anime-ease-visualizer.htmlindex 9f7f61ad..b9d17232 100644--- a/documentation/examples/anime-ease-visualizer.html+++ b/documentation/examples/anime-ease-visualizer.html@@ -5,14 +5,14 @@<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:url" content="https://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 property="og:image" content="https://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">+ <meta name="twitter:image" content="https://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/documentation.css" rel="stylesheet">diff --git a/documentation/examples/anime-follow-scroll.html b/documentation/examples/anime-follow-scroll.htmlindex b196aeb1..237672ef 100644--- a/documentation/examples/anime-follow-scroll.html+++ b/documentation/examples/anime-follow-scroll.html@@ -5,14 +5,14 @@<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:url" content="https://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 property="og:image" content="https://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">+ <meta name="twitter:image" content="https://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/documentation.css" rel="stylesheet">@@ -79,7 +79,9 @@function onScroll(cb) {var isTicking = false;var scrollY = 0;- var scrollHeight = document.documentElement.scrollHeight - window.innerHeight;+ var body = document.body;+ var html = document.documentElement;+ var scrollHeight = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);function scroll() {scrollY = window.scrollY;if (cb) cb(scrollY, scrollHeight);@@ -102,51 +104,51 @@function logChangeBegan(instance) {began++;- console.log(instance.id, began, 'CHANGE BEGAN', instance.changeBegan);+ // console.log(instance.id, 'CHANGE BEGAN', instance.changeBegan);}function logChangeComplete(instance) {completed++;- console.log(instance.id, completed, 'CHANGE COMPLETE', instance.changeCompleted);- }-- function logChange(instance) {- // console.log(instance.id, 'CHANGING');+ // console.log(instance.id, 'CHANGE COMPLETE', instance.changeCompleted);}window.tl = anime.timeline({- easing: 'easeOutQuad',+ easing: 'easeInOutSine',autoplay: false,- duration: 1000+ duration: 1000,+ // delay: 500,+ // endDelay: 500,+ update: function(instane) {+ console.log(instane.reversePlayback);+ }}).add({targets: '.pane-01',translateY: '-100vh',background: '#FF1461',changeBegin: logChangeBegan,- changeComplete: logChangeComplete,- change: logChange+ changeComplete: logChangeComplete})+ .set('.pane-02', {'translateY': '-100vh'}).add({targets: '.pane-02',translateX: ['100%', 0],- translateY: '-100vh',background: '#FF1461',changeBegin: logChangeBegan,- changeComplete: logChangeComplete,- change: logChange+ changeComplete: logChangeComplete}, '-=500')+ .set('.pane-03', {'translateY': '-200vh'}).add({targets: '.pane-03',translateY: '-100vh',background: '#FF1461',changeBegin: logChangeBegan,- changeComplete: logChangeComplete,- change: logChange+ changeComplete: logChangeComplete}, '-=500')+ .set('.pane-04', {'translateY': '-100vh'}).add({targets: '.pane-04',- translateY: '-100vh',+ scale: [0, 1],background: '#FF1461',changeBegin: logChangeBegan,changeComplete: logChangeComplete,@@ -154,6 +156,7 @@.add({targets: '.pane-05',translateY: '-100vh',+ rotate: [-180, 0],background: '#FF1461',changeBegin: logChangeBegan,changeComplete: logChangeComplete,@@ -222,10 +225,10 @@changeComplete: logChangeComplete,}, '-=500')- onScroll(function(top, height) {+ onScroll(function(top, scrollHeight) {- var currentTime = tl.duration * (top / height);- tl.seek(tl.duration * (top / height));+ var currentTime = tl.duration * (top / (scrollHeight - window.innerHeight));+ tl.seek(currentTime);});diff --git a/documentation/examples/anime-keyframes.html b/documentation/examples/anime-keyframes.htmlindex f1b523a7..6951c0ba 100644--- a/documentation/examples/anime-keyframes.html+++ b/documentation/examples/anime-keyframes.html@@ -5,14 +5,14 @@<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:url" content="https://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 property="og:image" content="https://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">+ <meta name="twitter:image" content="https://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/documentation.css" rel="stylesheet">diff --git a/documentation/examples/anime-mgs-logo-animation.html b/documentation/examples/anime-mgs-logo-animation.htmlindex ffab19df..19c4277f 100644--- a/documentation/examples/anime-mgs-logo-animation.html+++ b/documentation/examples/anime-mgs-logo-animation.html@@ -5,14 +5,14 @@<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:url" content="https://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 property="og:image" content="https://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">+ <meta name="twitter:image" content="https://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/documentation.css" rel="stylesheet">diff --git a/documentation/examples/anime-reverse.html b/documentation/examples/anime-reverse.htmlindex bd9050fb..aa45f4ed 100644--- a/documentation/examples/anime-reverse.html+++ b/documentation/examples/anime-reverse.html@@ -5,14 +5,14 @@<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:url" content="https://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 property="og:image" content="https://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">+ <meta name="twitter:image" content="https://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/documentation.css" rel="stylesheet">diff --git a/documentation/examples/anime-speed-test.html b/documentation/examples/anime-speed-test.htmlindex ee900568..0b0e9740 100644--- a/documentation/examples/anime-speed-test.html+++ b/documentation/examples/anime-speed-test.html@@ -5,14 +5,14 @@<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:url" content="https://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 property="og:image" content="https://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">+ <meta name="twitter:image" content="https://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/documentation.css" rel="stylesheet">diff --git a/documentation/examples/anime-stager.html b/documentation/examples/anime-stager.htmlindex cd3ad2ce..a440b29f 100644--- a/documentation/examples/anime-stager.html+++ b/documentation/examples/anime-stager.html@@ -5,14 +5,14 @@<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:url" content="https://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 property="og:image" content="https://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">+ <meta name="twitter:image" content="https://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/documentation.css" rel="stylesheet">diff --git a/documentation/examples/anime-stagger-2.html b/documentation/examples/anime-stagger-2.htmlindex 325720c1..303c754b 100644--- a/documentation/examples/anime-stagger-2.html+++ b/documentation/examples/anime-stagger-2.html@@ -5,14 +5,14 @@<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:url" content="https://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 property="og:image" content="https://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">+ <meta name="twitter:image" content="https://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/documentation.css" rel="stylesheet">diff --git a/documentation/examples/anime-stagger-3.html b/documentation/examples/anime-stagger-3.htmlindex 2402fd9b..ada1ba51 100644--- a/documentation/examples/anime-stagger-3.html+++ b/documentation/examples/anime-stagger-3.html@@ -5,14 +5,14 @@<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:url" content="https://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 property="og:image" content="https://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">+ <meta name="twitter:image" content="https://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/documentation.css" rel="stylesheet">diff --git a/documentation/examples/anime-stagger-4.html b/documentation/examples/anime-stagger-4.htmlindex 67c6161c..78c19b81 100644--- a/documentation/examples/anime-stagger-4.html+++ b/documentation/examples/anime-stagger-4.html@@ -5,14 +5,14 @@<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:url" content="https://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 property="og:image" content="https://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">+ <meta name="twitter:image" content="https://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/documentation.css" rel="stylesheet">diff --git a/documentation/examples/anime-stagger-demo.html b/documentation/examples/anime-stagger-demo.htmlindex 9f127f05..ce348915 100644--- a/documentation/examples/anime-stagger-demo.html+++ b/documentation/examples/anime-stagger-demo.html@@ -5,14 +5,14 @@<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:url" content="https://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 property="og:image" content="https://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">+ <meta name="twitter:image" content="https://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/documentation.css" rel="stylesheet">diff --git a/documentation/examples/anime-stagger-grid-demo.html b/documentation/examples/anime-stagger-grid-demo.htmlindex 9494446d..0d00031b 100644--- a/documentation/examples/anime-stagger-grid-demo.html+++ b/documentation/examples/anime-stagger-grid-demo.html@@ -5,14 +5,14 @@<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:url" content="https://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 property="og:image" content="https://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">+ <meta name="twitter:image" content="https://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/documentation.css" rel="stylesheet">diff --git a/documentation/examples/anime-stagger-tests.html b/documentation/examples/anime-stagger-tests.htmlindex 166fd78d..6d65c033 100644--- a/documentation/examples/anime-stagger-tests.html+++ b/documentation/examples/anime-stagger-tests.html@@ -5,14 +5,14 @@<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:url" content="https://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 property="og:image" content="https://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">+ <meta name="twitter:image" content="https://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/documentation.css" rel="stylesheet">diff --git a/documentation/examples/anime-staggered-animations.html b/documentation/examples/anime-staggered-animations.htmlindex 0235e3b7..b1bb6d96 100644--- a/documentation/examples/anime-staggered-animations.html+++ b/documentation/examples/anime-staggered-animations.html@@ -5,14 +5,14 @@<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:url" content="https://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 property="og:image" content="https://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">+ <meta name="twitter:image" content="https://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/documentation.css" rel="stylesheet">diff --git a/documentation/examples/anime-staggering-demo.html b/documentation/examples/anime-staggering-demo.htmlindex d3c9da40..6c6046a4 100644--- a/documentation/examples/anime-staggering-demo.html+++ b/documentation/examples/anime-staggering-demo.html@@ -5,14 +5,14 @@<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:url" content="https://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 property="og:image" content="https://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">+ <meta name="twitter:image" content="https://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/documentation.css" rel="stylesheet">diff --git a/documentation/examples/anime-states-system.html b/documentation/examples/anime-states-system.htmlindex 1ac2c7df..b9fe5734 100644--- a/documentation/examples/anime-states-system.html+++ b/documentation/examples/anime-states-system.html@@ -5,14 +5,14 @@<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:url" content="https://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 property="og:image" content="https://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">+ <meta name="twitter:image" content="https://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/documentation.css" rel="stylesheet">@@ -38,11 +38,22 @@text-align: center;}+ .states-box {+ display: flex;+ justify-content: center;+ align-items: center;+ width: 100px;+ height: 100px;+ border: 2px solid currentColor;+ text-align: center;+ }+</style></head><body><div class="states-example color-01"></div>+ <div class="states-box color-01"></div><nav><button value="default">Default</button><button value="circle">Circle</button>@@ -80,6 +91,16 @@},});+anime({+ targets: '.states-box',+ easing: 'easeOutQuad',+ states: {+ open: {+ rotate: 360+ }+ }+})+for (var i = 0; i < buttons.length; i++) {buttons[i].addEventListener('click', function() {statesExample.animateTo(this.value);diff --git a/documentation/examples/anime-svg-lines-animations.html b/documentation/examples/anime-svg-lines-animations.htmlindex bec0a551..b8c1ff07 100644--- a/documentation/examples/anime-svg-lines-animations.html+++ b/documentation/examples/anime-svg-lines-animations.html@@ -5,14 +5,14 @@<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:url" content="https://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 property="og:image" content="https://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">+ <meta name="twitter:image" content="https://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/documentation.css" rel="stylesheet">diff --git a/documentation/examples/anime-svg-path-animation.html b/documentation/examples/anime-svg-path-animation.htmlindex df082d5b..d9ec55c7 100644--- a/documentation/examples/anime-svg-path-animation.html+++ b/documentation/examples/anime-svg-path-animation.html@@ -5,14 +5,14 @@<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:url" content="https://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 property="og:image" content="https://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">+ <meta name="twitter:image" content="https://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/documentation.css" rel="stylesheet">diff --git a/documentation/examples/anime-timeline-stresstest.html b/documentation/examples/anime-timeline-stresstest.htmlindex bf6cf83a..0e6958c2 100644--- a/documentation/examples/anime-timeline-stresstest.html+++ b/documentation/examples/anime-timeline-stresstest.html@@ -5,14 +5,14 @@<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:url" content="https://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 property="og:image" content="https://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">+ <meta name="twitter:image" content="https://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/documentation.css" rel="stylesheet">diff --git a/documentation/examples/anime-timeline.html b/documentation/examples/anime-timeline.htmlindex d4e5fa25..67f0b01b 100644--- a/documentation/examples/anime-timeline.html+++ b/documentation/examples/anime-timeline.html@@ -5,14 +5,14 @@<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:url" content="https://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 property="og:image" content="https://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">+ <meta name="twitter:image" content="https://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/documentation.css" rel="stylesheet">diff --git a/documentation/examples/anime-logo-animation.html b/documentation/examples/anime-v2-logo-animation.htmlsimilarity index 98%rename from documentation/examples/anime-logo-animation.htmlrename to documentation/examples/anime-v2-logo-animation.htmlindex 33baefbb..3bf8266d 100644--- a/documentation/examples/anime-logo-animation.html+++ b/documentation/examples/anime-v2-logo-animation.html@@ -5,14 +5,14 @@<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:url" content="https://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 property="og:image" content="https://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">+ <meta name="twitter:image" content="https://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/documentation.css" rel="stylesheet">diff --git a/documentation/examples/anime-v3-logo-animation.html b/documentation/examples/anime-v3-logo-animation.htmlnew file mode 100644index 00000000..841c53ad--- /dev/null+++ b/documentation/examples/anime-v3-logo-animation.html@@ -0,0 +1,158 @@+<!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="https://animejs.com">+ <meta property="og:description" content="Javascript Animation Engine">+ <meta property="og:image" content="https://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="https://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="documentation/assets/css/animejs.css" rel="stylesheet">+ <script src="../../lib/anime.min.js"></script>+ <style>++ .logo-section {+ display: flex;+ align-items: center;+ justify-content: center;+ width: 100%;+ height: 100vh;+ }++ .logo-animation {+ position: relative;+ width: 940px;+ height: 120px;+ }++ .logo-letters-wrapper {+ display: flex;+ justify-content: space-between;+ }++ .letter-wrapper {+ height: 120px;+ }++ .logo-letter {+ transform: scaleY(.5);+ transform-origin: 50% 0%;+ }++ .logo-letter path {+ fill: none;+ fill-rule: evenodd;+ stroke-linecap: square;+ stroke-width: 40;+ stroke: #3E3E3E;+ }++ .logo-dot {+ position: absolute;+ bottom: 0;+ width: 40px;+ height: 40px;+ margin: -20px 0 0 -20px;+ background-color: #3E3E3E;+ }++ </style>+</head>+<body>++ <div class="logo-section">++ <div class="logo-animation">++ <div class="logo-dot"></div>++ <div class="logo-letters-wrapper">++ <div class="letter-wrapper">+ <svg class="bounced" viewBox="0 0 180 240" width="180" height="240">+ <path class="line" d="M20 20h130c5.523 0 10 8.954 10 40v160H30c-5.523 0-10-8.954-10-40v-60c0-31.046 4.477-40 10-40h110"/>+ </svg>+ </div>+ <div class="letter-wrapper">+ <svg class="bounced" viewBox="0 0 180 240" width="180" height="240">+ <path class="line" d="M160 220V60c0-31.046-8.656-40-19.333-40H39.333C28.656 20 20 28.954 20 60v160"/>+ </svg>+ </div>+ <div class="letter-wrapper">+ <svg class="bounced" viewBox="0 0 40 240" width="40" height="240">+ <path stroke-width="40" d="M20 20v200"/>+ </svg>+ </div>+ <div class="letter-wrapper">+ <svg class="bounced" viewBox="0 0 320 240" width="320" height="240">+ <path class="line" d="M300 220V60c0-31.046-8.656-40-19.333-40H39.333C28.656 20 20 28.954 20 60v160"/>+ </svg>+ </div>+ <div class="letter-wrapper">+ <svg class="bounced" viewBox="0 0 180 240" width="180" height="240">+ <path class="line" d="M40 160h110c5.523 0 10-8.954 10-40V60c0-31.046-4.477-40-10-40H30c-5.523 0-10 8.95-10 40v120c0 31.046 4.477 40 10 40h130"/>+ </svg>+ </div>++ </div>+++ </div>++ <script>++ var logoAnimation = (function() {++ var logoAnimationEl = document.querySelector('.logo-animation');+ var bouncePath = anime.path('.bounce path');+ var versionNumerEls = document.querySelectorAll('.version-number');+ var dateEl = document.querySelector('.date');+ var date = new Date();++ // for (var i = 0; i < versionNumerEls.length; i++) {+ // versionNumerEls[i].innerHTML = anime.version;+ // }+ // dateEl.innerHTML = date.getFullYear();++ // anime.setValue(['.letter-a', '.letter-n', '.letter-i'], {translateX: 56});+ // anime.setValue('.letter-e', {translateX: -56});+ // anime.setValue('.dot', { translateX: 448, translateY: -100 });++ anime.setValue(['.logo-dot'], {+ translateX: 90,+ translateY: -400+ });++ var logoAnimationTL = anime.timeline({+ easing: 'easeOutSine'+ })+ .add({+ targets: '.logo-dot',+ keyframes: [+ {translateY: 0, duration: 300},+ {scaleY: .5},+ {translateX: '+=190'},+ {translateY: '+=190'}+ ],+ })++ // anime.speed = .2;+ // logoAnimationTL.pause();+ // logoAnimationTL.seek(1400);+ // logoAnimationTL.play();++ return logoAnimationTL;++ })();++ </script>+</body>+</html>diff --git a/documentation/examples/built-in-easings-2.html b/documentation/examples/built-in-easings-2.htmlnew file mode 100644index 00000000..5b202523--- /dev/null+++ b/documentation/examples/built-in-easings-2.html@@ -0,0 +1,135 @@+<!DOCTYPE html>+<html>+<head>+ <title>built-in easings • 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="https://animejs.com">+ <meta property="og:description" content="Javascript Animation Engine">+ <meta property="og:image" content="https://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="https://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/animejs.css" rel="stylesheet">+ <style>++ :root {+ font-size: 24px;+ }++ body {+ display: flex;+ flex-wrap: wrap;+ justify-content: center;+ align-items: center;+ height: 100vh;+ }++ .easing-visualizer {+ position: relative;+ display: flex;+ align-items: center;+ justify-content: space-between;+ width: 100%;+ max-width: 908px;+ padding-bottom: 50%;+ }++ .easing-visualizer .wrapper {+ position: absolute;+ bottom: 0;+ display: flex;+ align-items: center;+ justify-content: space-between;+ width: 100%;+ height: 100%;+ }++ .easing-visualizer .bar {+ width: 2px;+ height: 4px;+ margin: 0 3px;+ background-color: currentColor;+ transform-origin: 50% 50%;+ }++ .easing-visualizer .dot {+ position: relative;+ width: 8px;+ height: 8px;+ background-color: currentColor;+ border-radius: 50%;+ }++ </style>+</head>+<body>++ <div class="easing-visualizer">+ <div class="wrapper bars-wrapper"></div>+ <div class="wrapper dots-wrapper"></div>+ </div>++</body>+<script type="module">++ import anime from '../../src/index.js';++ const easingVisualizerEl = document.querySelector('.easing-visualizer');+ const barsWrapperEl = easingVisualizerEl.querySelector('.bars-wrapper');+ const dotsWrapperEl = easingVisualizerEl.querySelector('.dots-wrapper');+ const barsFragment = document.createDocumentFragment();+ const dotsFragment = document.createDocumentFragment();+ const numberOfBars = 101;++ for (let i = 0; i < numberOfBars; i++) {+ const barEl = document.createElement('div');+ const dotEl = document.createElement('div');+ barEl.classList.add('bar');+ dotEl.classList.add('dot');+ dotEl.classList.add('color-red');+ barsFragment.appendChild(barEl);+ dotsFragment.appendChild(dotEl);+ }++ barsWrapperEl.appendChild(barsFragment);+ dotsWrapperEl.appendChild(dotsFragment);++ // anime.setValue('.easing-visualizer .dot', { translateX: anime.stagger(6) });++ function animateEasing() {++ const easings = [];+ for (let ease in anime.penner) easings.push(ease);+ easings.push('steps('+anime.random(5, 20)+')');+ easings.push('cubicBezier(0.545, 0.475, 0.145, 1)');+ const ease = easings[anime.random(0, easings.length - 1)];+ const duration = 450;++ anime.timeline({+ complete: animateEasing,+ easing: ease,+ duration: duration+ })+ .add({+ targets: '.easing-visualizer .bar',+ scaleY: anime.stagger([1, 100], {easing: ease, from: 'center', direction: 'reverse'}),+ delay: anime.stagger(14, {from: 'center'})+ })+ .add({+ targets: '.easing-visualizer .dot',+ translateY: anime.stagger(['-6rem', '6rem'], {easing: ease, from: 'last'}),+ delay: anime.stagger(10, {from: 'center'})+ }, 0);++ }++ animateEasing();++</script>+</html>diff --git a/documentation/examples/built-in-easings.html b/documentation/examples/built-in-easings.htmlindex e5d9409e..c2348ab4 100644--- a/documentation/examples/built-in-easings.html+++ b/documentation/examples/built-in-easings.html@@ -5,14 +5,14 @@<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:url" content="https://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 property="og:image" content="https://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">+ <meta name="twitter:image" content="https://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/animejs.css" rel="stylesheet">@@ -62,8 +62,7 @@</head><body>- <div class="easing-visualizer">- </div>+ <div class="easing-visualizer"></div></body><script type="module">@@ -98,22 +97,19 @@const duration = 450;anime.timeline({- easing: 'easeInOutQuad',- complete: animateEasing+ complete: animateEasing,+ easing: ease,+ duration: duration}).add({targets: '.easing-visualizer .bar',scaleY: anime.stagger([1, 88], {easing: ease, from: 'center', direction: 'reverse'}),- easing: ease,- duration: duration,- delay: anime.stagger(16, {from: 'center'})+ delay: anime.stagger(14, {from: 'center'})}).add({targets: '.easing-visualizer .dot',translateY: anime.stagger(['-6rem', '6rem'], {easing: ease, from: 'last'}),- easing: ease,- duration: duration,- delay: anime.stagger(8, {from: 'center'})+ delay: anime.stagger(10, {from: 'center'})}, 0);}diff --git a/documentation/examples/layered-animations.html b/documentation/examples/layered-animations.htmlindex 22d23325..1a041f8d 100644--- a/documentation/examples/layered-animations.html+++ b/documentation/examples/layered-animations.html@@ -5,14 +5,14 @@<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:url" content="https://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 property="og:image" content="https://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">+ <meta name="twitter:image" content="https://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/animejs.css" rel="stylesheet">@@ -50,8 +50,10 @@}.layered-animations .small.shape {- width: 2rem;- height: 2rem;+ width: 1.5rem;+ height: 1.5rem;+ stroke: currentColor;+ stroke-width: 2px;fill: currentColor;}@@ -96,40 +98,50 @@var rectEl = el.querySelector('rect');var polyEl = el.querySelector('polygon');+ function createKeyframes(total, min, max, unit) {+ var keyframes = [];+ var unit = unit || 0;+ for (var i = 0; i < total; i++) keyframes.push({ value: function() { return anime.random(min, max) + unit; } });+ return keyframes;+ }++ function createKeyframes(value) {+ var keyframes = [];+ for (var i = 0; i < 30; i++) keyframes.push({ value: value });+ return keyframes;+ }+var animation = anime.timeline({targets: el,- duration: function() { return anime.random(600, 2000); },+ duration: function() { return anime.random(800, 2000); },easing: function() { return easings[anime.random(0, easings.length - 1)]; },complete: function(anim) { animateShape(anim.animatables[0].target); },}).add({- translateX: function() { return anime.random(-4, 4) + 'rem'; },- translateY: function() { return anime.random(-4, 4) + 'rem'; },- rotate: {- value: function() { return '+=' + anime.random(-180, 180); },- duration: circleEl ? 0 : function() { return anime.random(600, 2000) }- }+ translateX: createKeyframes(function() { return anime.random(-4, 4) + 'rem'; }),+ translateY: createKeyframes(function() { return anime.random(-4, 4) + 'rem'; }),+ rotate: createKeyframes(function() { return anime.random(-180, 180); }),}, 0);if (circleEl) {animation.add({targets: circleEl,- r: function() { return anime.random(24, 56); }+ r: createKeyframes(function() { return anime.random(24, 56); }),}, 0);}if (rectEl) {animation.add({targets: rectEl,- width: function() { return anime.random(56, 96); },- height: function() { return anime.random(56, 96); }+ width: createKeyframes(function() { return anime.random(56, 96); }),+ height: createKeyframes(function() { return anime.random(56, 96); }),}, 0);}if (polyEl) {animation.add({targets: polyEl,- points: function() {+ points: createKeyframes(function() {var scale = anime.random(64, 148) / 100;return trianglePoints.map(function(p) { return p * scale; }).join(' ');- }+ }),}, 0);}diff --git a/documentation/examples/time-control.html b/documentation/examples/time-control.htmlindex bb6bd870..66b46b14 100644--- a/documentation/examples/time-control.html+++ b/documentation/examples/time-control.html@@ -5,14 +5,14 @@<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:url" content="https://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 property="og:image" content="https://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">+ <meta name="twitter:image" content="https://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/animejs.css" rel="stylesheet">@@ -348,13 +348,9 @@.add({targets: '.time-cursor',keyframes: [- {- translateY: ['-1rem', 0], duration: 100, easing: 'easeInQuad'- }, {- translateX: 'calc(34rem - 6px)', duration: 1500- }, {- translateY: '-1rem', duration: 100, easing: 'easeOutQuad'- }+ { translateY: ['-1rem', 0], duration: 100, easing: 'easeInQuad' },+ { translateX: 'calc(34rem - 6px)', duration: 1500 },+ { translateY: '-1rem', duration: 100, easing: 'easeOutQuad' }],duration: 1500,update: function(anim) {@@ -377,15 +373,15 @@.add({targets: infoEl.querySelector('.info-bar'),scaleY: [0, 1],- duration: 500,+ duration: 250,easing: 'easeOutCirc'}, delay).add({targets: infoEl.querySelectorAll('.info-label'),opacity: [0, 1],translateY: [direction * 10, 0],- duration: 250,- delay: anime.stagger(50, {start: 115, direction: direction > 0 ? 'reverse' : 'normal'}),+ duration: 150,+ delay: anime.stagger(50, {start: 10, direction: direction > 0 ? 'reverse' : 'normal'}),easing: 'easeOutSine'}, delay)}diff --git a/documentation/examples/transforms-demo.html b/documentation/examples/transforms-demo.htmlnew file mode 100644index 00000000..0b7e78f0--- /dev/null+++ b/documentation/examples/transforms-demo.html@@ -0,0 +1,109 @@+<!DOCTYPE html>+<html>+<head>+ <titletransforms demo • 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="https://animejs.com">+ <meta property="og:description" content="Javascript Animation Engine">+ <meta property="og:image" content="https://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="https://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/animejs.css" rel="stylesheet">+ <style>++ :root {+ font-size: 24px;+ }++ body {+ display: flex;+ justify-content: center;+ align-items: center;+ height: 100vh;+ background-color: currentColor;+ }++ .transform-demo {+ position: relative;+ width: 1rem;+ height: 1rem;+ }++ .transform-demo .dot {+ position: absolute;+ width: 1rem;+ height: 1rem;+ border-radius: 50%;+ background-color: currentColor;+ }++ </style>+</head>+<body>++ <div class="transform-demo"></div>++</body>+<script type="module">++ import anime from '../../src/index.js';++ const easingVisualizerEl = document.querySelector('.transform-demo');+ const fragment = document.createDocumentFragment();+ const numberOfBars = 500;++ for (let i = 0; i < numberOfBars; i++) {+ const dotEl = document.createElement('div');+ dotEl.classList.add('dot');+ dotEl.classList.add('color-red');+ fragment.appendChild(dotEl);+ }++ easingVisualizerEl.appendChild(fragment);++ anime.setValue('.transform-demo .dot', {rotate: function() { return anime.random(0, 360); } });++ anime({+ targets: '.transform-demo .dot',+ scale: (function() {+ var keyframes = [];+ for (var i = 0; i < 40; i++) {+ keyframes.push({+ value: function() { return anime.random(50, 150) / 100; },+ duration: anime.random(500, 1000),+ });+ }+ return keyframes;+ })(),+ translateX: (function() {+ var keyframes = [];+ for (var i = 0; i < 40; i++) {+ keyframes.push({+ value: function() { return anime.random(0, 50) + 'vh'; },+ duration: anime.random(1000, 2000),+ });+ }+ return keyframes;+ })(),+ translateY: (function() {+ var keyframes = [];+ for (var i = 0; i < 40; i++) {+ keyframes.push({+ value: function() { return anime.random(0, 50) + 'vh'; },+ duration: anime.random(2000, 4000),+ });+ }+ return keyframes;+ })(),+ easing: 'easeOutQuad'+ })++</script>+</html>diff --git a/documentation/index.html b/documentation/index.htmlindex 8dfef37c..a9681c5d 100644--- a/documentation/index.html+++ b/documentation/index.html@@ -4,40 +4,37 @@<title>Documentation | 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 property="og:url" content="https://animejs.com">+ <meta property="og:description" content="Javascript animation engine">+ <meta property="og:image" content="https://animejs.com/documentation/assets/img/social-media-image.png">++ <meta name="twitter:card" content="summary_large_image"><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" >+ <meta name="twitter:creator" content="@juliangarnier">+ <meta name="twitter:title" content="anime.js">+ <meta name="twitter:description" content="Javascript animation engine">+ <meta name="twitter:image" content="https://animejs.com/documentation/assets/img/social-media-image.png">++ <link rel="apple-touch-icon-precomposed" href="assets/img/apple-touch-icon.png">+ <link rel="icon" type="image/png" href="assets/img/favicon.png" >+<link href="//cloud.typenetwork.com/projects/2160/fontface.css/" rel="stylesheet" type="text/css">- <link href="https://fonts.googleapis.com/css?family=Space+Mono" rel="stylesheet">++ <link href="assets/css/animejs.css" rel="stylesheet"><link href="assets/css/anime-theme.css" rel="stylesheet"><link href="assets/css/documentation.css" rel="stylesheet">+<script src="../lib/anime.min.js"></script></head><body><div class="content"><header class="header">- <a class="logo" href="https://github.com/juliangarnier/anime/">- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 60">- <g id="anime-docs-logo" fill="none" fill-rule="evenodd" stroke-linecap="square">- <g id="Group" stroke="#FFFFFF" stroke-width="2" transform="translate(23 24)">- <path id="a" d="M0 0h12c1.105 0 2 .893 2 1.994v8.012A1.997 1.997 0 0 1 12 12H2c-1.105 0-2-.893-2-1.994V5.978c0-1.102.895-1.995 2-1.995h8"/>- <path id="n" d="M18 12V2c0-1.105.893-2 1.995-2h10.01C31.107 0 32 .895 32 2v10"/>- <path id="i" d="M36.125 12V4"/>- <path id="." d="M36.125 0v.5"/>- <path id="m" d="M40 12V2c0-1.105.894-2 1.998-2H65.002C66.106 0 67 .895 67 2v10"/>- <path id="e" d="M85 12H73c-1.105 0-2-.893-2-1.994V1.994C71 .893 71.895 0 73 0h10c1.105 0 2 .893 2 1.994v3.99a1.997 1.997 0 0 1-2 1.994h-8"/>- </g>- </g>- </svg>- </a>+ <a class="logo" href="https://github.com/juliangarnier/anime/">+ <img class="anime-mini-logo" src="assets/img/anime-mini-logo.svg" />+ <span class="version-number"></span>+ </a></header><section class="pane sidebar"><nav class="navigation"></nav>@@ -57,6 +54,8 @@<div id="cssSelector" class="demo"><h3 class="demo-title">CSS Selector</h3><div class="demo-description">+ <p>Can be any CSS selector.</p>+ <p class="bubble warning">Pseudo elements can't be targeted using JavaScript.</p><table><thead><td>Type</td>@@ -69,7 +68,6 @@<td><code>targets: '.item'</code></td></tr></table>- <p>Can be any CSS selector except pseudo elements (they can't be animated in JavaScript).</p></div><div class="demo-content css-selector-demo"><div class="line">@@ -92,6 +90,9 @@ anime({<div id="domNode" class="demo"><h3 class="demo-title">DOM Node / NodeList</h3><div class="demo-description">+ <p>+ Can be any DOM Node or NodeList.+ </p><table><thead><td>Type</td>@@ -109,9 +110,6 @@ anime({<td><code>targets: el.querySelectorAll('.item')</code></td></tr></table>- <p>- Can be any DOM Node or NodeList.- </p></div><div class="demo-content dom-node-demo"><div class="line">@@ -133,7 +131,7 @@ var elements = document.querySelectorAll('.dom-node-demo .el');anime({targets: elements,- translateX: 250+ translateX: 270});/*DEMO*/}@@ -143,6 +141,9 @@ anime({<div id="JSobject" class="demo"><h3 class="demo-title">JavaScript Object</h3><div class="demo-description">+ <p>+ A JavaScript Object with at least one property containing a numerical value.+ </p><table><thead><td>Type</td>@@ -155,9 +156,6 @@ anime({<td><code>targets: myObjectProp</code></td></tr></table>- <p>- A JavaScript Object with at least one property containing a numerical value.- </p></div><div class="demo-content"><pre class="battery-log">{"charged":"0%","cycles":120}</pre>@@ -191,6 +189,12 @@ anime({<div id="array" class="demo"><h3 class="demo-title">Array</h3><div class="demo-description">+ <p>+ An array containing multiple targets.+ </p>+ <p class="bubble info">+ Accepts mixed types. E.g. <code>['.el', domNode, jsObject]</code>+ </p><table><thead><td>Type</td>@@ -203,9 +207,6 @@ anime({<td><code>targets: ['.item', el.getElementById('#thing')]</code></td></tr></table>- <p>- An array containing different multiple targets.- </p></div><div class="demo-content mixed-array-demo"><div class="line">@@ -252,8 +253,9 @@ anime({</p><p class="bubble warning">Most CSS properties will cause layout changes or repaint, and will result in choppy animation.- Prroritize opacity, and Transforms as much as possible.+ Prioritize opacity and CSS transforms as much as possible.</p>+ <p>More details about accepted values in the <a class="color-values" href="#unitlessValue">values</a> section.</p><table><thead><td>Example</td>@@ -268,7 +270,6 @@ anime({<td><code>'100px'</code></td></tr></table>- <p>More details about accepted values in the <a class="color-values" href="#unitlessValue">Values</a> section.</p></div><div class="demo-content css-prop-demo"><div class="large square shadow"></div>@@ -297,6 +298,7 @@ anime({<p class="bubble info">It's possible to specify different timing for each transforms properties, more details in the <a class="color-prop-params" href="#specificPropParameters">specific property parameters</a> section.</p>+ <p>More details about accepted values in the <a class="color-values" href="#unitlessValue">values</a> section.</p><table><thead><td>Valid properties</td>@@ -318,7 +320,6 @@ anime({<tr><td><code>'skewY'</code></td><td><code>'deg'</code></td></tr><tr><td><code>'perspective'</code></td><td><code>'px'</code></td></tr></table>- <p>More details about accepted values in the <a class="color-values" href="#unitlessValue">Values</a> section.</p></div><div class="demo-content css-transforms-demo"><div class="square shadow"></div>@@ -341,7 +342,8 @@ anime({<h3 class="demo-title">Object properties</h3><div class="demo-description"><p>- Any Object property containing a numerical value can be animated.+ Any Object property containing a numerical value can be animated.<br>+ More details about accepted values in the <a class="color-values" href="#unitlessValue">values</a> section.</p><table><thead>@@ -357,7 +359,6 @@ anime({<td><code>'100%'</code></td></tr></table>- <p>More details about accepted values in the <a class="color-values" href="#unitlessValue">Values</a> section.</p></div><div class="demo-content"><pre class="js-object-log">{"prop1":0,"prop2":"0%"}</pre>@@ -390,7 +391,8 @@ anime({<h3 class="demo-title">DOM Attributes</h3><div class="demo-description"><p>- Any DOM Attribute containing a numerical value can be animated.+ Any DOM Attributes containing a numerical value can be animated.<br>+ More details about accepted values in the <a class="color-values" href="#unitlessValue">values</a> section.</p><table><thead>@@ -410,7 +412,6 @@ anime({<td><code>'3 dogs'</code></td></tr></table>- <p>More details about accepted values in the <a class="color-values" href="#unitlessValue">Values</a> section.</p></div><div class="demo-content dom-attribute-demo"><input class="el text-output" value="0"></input>@@ -432,7 +433,8 @@ anime({<h3 class="demo-title">SVG Attributes</h3><div class="demo-description"><p>- Like any other <a class="color-properties" href="#domAttr">DOM attributes</a>, all SVG attributes containing at least one numerical value can be animated.+ Like any other <a class="color-properties" href="#domAttr">DOM attributes</a>, all SVG attributes containing at least one numerical value can be animated.<br>+ More details about accepted values in the <a class="color-values" href="#unitlessValue">values</a> section and SVG animation in the <a class="color-svg" href="#motionPath">SVG</a> section.</p><table><thead>@@ -452,7 +454,6 @@ anime({<td><code>0</code></td></tr></table>- <p>More details about accepted values in the <a class="color-values" href="#unitlessValue">Values</a> section and SVG animation in the <a class="color-svg" href="#motionPath">SVG</a> section</p></div><div class="demo-content align-center svg-attributes-demo"><svg width="128" height="128" viewBox="0 0 128 128">@@ -499,6 +500,9 @@ anime({<div id="duration" class="demo"><h3 class="demo-title">Duration</h3><div class="demo-description">+ <p>+ Defines the duration in milliseconds of the animation.+ </p><table><thead><td>Type</td>@@ -508,17 +512,19 @@ anime({<tr><td>Number</td><td><code>1000</code></td>- <td><code>duration: 3000</code></td>+ <td><code>3000</code></td>+ </tr>+ <tr>+ <td>anime.stagger</td>+ <td>See <a class="color-staggering" href="#staggeringBasics">staggering</a> section</td>+ <td><code>anime.stagger(150)</code></td></tr><tr><td>Function</td>- <td>See <a class="color-prop-params" href="#functionBasedParameters">Function based parameters</a> section</td>- <td><code>duration: (el, i) => i * 500</code></td>+ <td>See <a class="color-prop-params" href="#functionBasedParameters">function based parameters</a> section</td>+ <td><code>(el, i) => i * 150</code></td></tr></table>- <p>- Defines the duration in milliseconds of the animation.- </p></div><div class="demo-content duration-demo"><div class="label">3000 ms</div>@@ -540,6 +546,9 @@ anime({<div id="delay" class="demo"><h3 class="demo-title">Delay</h3><div class="demo-description">+ <p>+ Defines the delay in milliseconds of the animation.+ </p><table><thead><td>Type</td>@@ -549,17 +558,19 @@ anime({<tr><td>Number</td><td><code>0</code></td>- <td><code>delay: 1000</code></td>+ <td><code>1000</code></td>+ </tr>+ <tr>+ <td>anime.stagger</td>+ <td>See <a class="color-staggering" href="#staggeringBasics">staggering</a> section</td>+ <td><code>anime.stagger(150)</code></td></tr><tr><td>Function</td>- <td>See <a class="color-prop-params" href="#functionBasedParameters">Function based parameters</a> section</td>- <td><code>delay: (el, i) => i * 150</code></td>+ <td>See <a class="color-prop-params" href="#functionBasedParameters">function based parameters</a> section</td>+ <td><code>(el, i) => i * 150</code></td></tr></table>- <p>- Defines the delay in milliseconds of the animation.- </p></div><div class="demo-content delay-demo"><div class="label">1000 ms</div>@@ -581,7 +592,9 @@ anime({<div id="endDelay" class="demo"><h3 class="demo-title">end delay</h3><div class="demo-description">- <pre><code>endDelay: 2000</code></pre>+ <p>+ Adds some extra time in milliseconds at the end of the animation.+ </p><table><thead><td>Type</td>@@ -591,17 +604,19 @@ anime({<tr><td>Number</td><td><code>0</code></td>- <td><code>endDelay: 1000</code></td>+ <td><code>1000</code></td>+ </tr>+ <tr>+ <td>anime.stagger</td>+ <td>See <a class="color-staggering" href="#staggeringBasics">staggering</a> section</td>+ <td><code>anime.stagger(150)</code></td></tr><tr><td>Function</td>- <td>See <a class="color-prop-params" href="#functionBasedParameters">Function based parameters</a> section</td>- <td><code>endDelay: (el, i, t) => (t - i) * 150</code></td>+ <td>See <a class="color-prop-params" href="#functionBasedParameters">function based parameters</a> section</td>+ <td><code>(el, i) => i * 150</code></td></tr></table>- <p>- Add some extra time in milliseconds at the end of the animation.- </p></div><div class="demo-content end-delay-demo"><div class="label">1000 ms</div>@@ -625,6 +640,12 @@ anime({<div id="easing" class="demo"><h3 class="demo-title">Easing</h3><div class="demo-description">+ <p>+ Defines the timing function of the animation.+ </p>+ <p class="bubble info">+ Check out the <a class="color-easings" href="#linearEasing">easings</a> section for a complete list of available easing and parameters.+ </p><table><thead><td>Type</td>@@ -637,12 +658,6 @@ anime({<td><code>easing: 'easeInOutQuad'</code></td></tr></table>- <p>- Defines the timing function of the animation.- </p>- <p class="bubble info">- Check out the <a class="color-easings" href="#linearEasing">Easings</a> section for a complete list of available easing and parameters.- </p></div><div class="demo-content easing-demo"><div class="label">easeInOutExpo</div>@@ -665,6 +680,9 @@ anime({<div id="round" class="demo"><h3 class="demo-title">Round</h3><div class="demo-description">+ <p>+ Rounds up the value to x decimals.+ </p><table><thead><td>Type</td>@@ -677,9 +695,6 @@ anime({<td><code>round: 10</code></td></tr></table>- <p>- Rounds the value to x decimals.- </p></div><div class="demo-content"><pre class="round-log">0</pre>@@ -706,14 +721,20 @@ anime({Defines specific parameters to each property of the animation using an Object as value.<br>Other properties that aren't specified in the Object are inheritted from the main animation.</p>-<pre><code>translateX: {- value: 250,- duration: 800-},-rotate: {+ <table>+ <thead>+ <td>Type</td>+ <td>Example</td>+ </thead>+ <tr>+ <td>Object</td>+<td><code>rotate: {value: 360,- duration: 1600-}</code></pre>+ duration: 1800,+ easing: 'easeInOutSine'+}</code></td>+ </tr>+ </table></div><div class="demo-content specific-prop-params-demo"><div class="square shadow"></div>@@ -750,11 +771,8 @@ anime({<h3 class="demo-title">Function based parameters</h3><div class="demo-description"><p>- Get different values for every target and property of the animation.<br>+ Get different values for every target and property of the animation.</p>-<pre><code>translateX: function(target, index, targetsLength) {- return (targetsLength - index) * 200;-}</code></pre><p>The function accepts 3 arguments:</p>@@ -776,6 +794,9 @@ anime({<td>The total number of animated targets</td></tr></table>+ <p class="bubble info">+ See <a class="color-staggering" href="#staggeringBasics">staggering</a> section for easier values manipulation.+ </p></div><div class="demo-content function-based-params-demo"><div class="line">@@ -798,7 +819,7 @@ anime({/*DEMO*/anime({targets: '.function-based-params-demo .el',- translateX: 250,+ translateX: 270,direction: 'alternate',loop: true,delay: function(el, i, l) {@@ -826,18 +847,6 @@ anime({<div id="direction" class="demo"><h3 class="demo-title">Direction</h3><div class="demo-description">- <table>- <thead>- <td>Type</td>- <td>Default</td>- <td>Example</td>- </thead>- <tr>- <td>String</td>- <td><code>'normal'</code></td>- <td><code>direction: 'alternate'</code></td>- </tr>- </table><p>Defines the direction of the animation.</p>@@ -856,7 +865,7 @@ anime({</tr><tr><td><code>'alternate'</code></td>- <td>Animation progress goes from 0% to 100% then go back to 0%</td>+ <td>Animation progress goes from 0% to 100% then goes back to 0%</td></tr></table></div>@@ -907,18 +916,6 @@ anime({<div id="loop" class="demo"><h3 class="demo-title">Loop</h3><div class="demo-description">- <table>- <thead>- <td>Type</td>- <td>Default</td>- <td>Example</td>- </thead>- <tr>- <td>Number | Boolean</td>- <td><code>'normal'</code></td>- <td><code>loop: 3</code></td>- </tr>- </table><p>Defines the number of iterations of your animation.</p>@@ -935,10 +932,6 @@ anime({<td><code>true</code></td><td>Loop indefinitely</td></tr>- <tr>- <td><code>Infinity</code></td>- <td>Loop indefinitely</td>- </tr></table></div><div class="demo-content">@@ -977,21 +970,21 @@ anime({/*DEMO*/anime({targets: '.loop',- translateX: 250,+ translateX: 270,loop: 3,easing: 'easeInOutSine'});anime({targets: '.loop-infinity',- translateX: 250,+ translateX: 270,loop: true,easing: 'easeInOutSine'});anime({targets: '.loop-reverse',- translateX: 250,+ translateX: 270,loop: 3,direction: 'reverse',easing: 'easeInOutSine'@@ -999,7 +992,7 @@ anime({anime({targets: '.loop-reverse-infinity',- translateX: 250,+ translateX: 270,direction: 'reverse',loop: true,easing: 'easeInOutSine'@@ -1007,7 +1000,7 @@ anime({anime({targets: '.loop-alternate',- translateX: 250,+ translateX: 270,loop: 3,direction: 'alternate',easing: 'easeInOutSine'@@ -1015,7 +1008,7 @@ anime({anime({targets: '.loop-alternate-infinity',- translateX: 250,+ translateX: 270,direction: 'alternate',loop: true,easing: 'easeInOutSine'@@ -1028,21 +1021,8 @@ anime({<div id="autoplay" class="demo"><h3 class="demo-title">Autoplay</h3><div class="demo-description">- <table>- <thead>- <td>Type</td>- <td>Default</td>- <td>Example</td>- </thead>- <tr>- <td>Boolean</td>- <td><code>true</code></td>- <td><code>autoplay: false</code></td>- </tr>- </table>- <p><p>- Defines if the animation should automatically start or not.+ Defines if the animation should automatically starts or not.</p><table><thead>@@ -1091,62 +1071,6 @@ anime({</script></div>-<div id="startTime" class="demo">- <h3 class="demo-title">StartTime</h3>- <div class="demo-description">- <table>- <thead>- <td>Type</td>- <td>Default</td>- <td>Example</td>- </thead>- <tr>- <td>Number</td>- <td><code>0</code></td>- <td><code>startTime: 2000</code></td>- </tr>- </table>- <p>- Force the animation to start at a certain time in milliseconds.- </p>- </div>- <div class="demo-content start-time-demo">- <div class="line">- <div class="label">startTime: 0</div>- <div class="square shadow"></div>- <div class="square el"></div>- </div>- <div class="line">- <div class="label">startTime: 75</div>- <div class="square shadow"></div>- <div class="square el"></div>- </div>- <div class="line">- <div class="label">startTime: 150</div>- <div class="square shadow"></div>- <div class="square el"></div>- </div>- </div>- <script>var startTime = function() {-/*DEMO*/-var els = document.querySelectorAll('.start-time-demo .el');--for (var i = 0; i < els.length; i++) {- anime({- targets: els[i],- translateX: 250,- direction: 'alternate',- loop: true,- easing: 'linear',- duration: 1000,- startTime: i * 200- });-}-/*DEMO*/-}- </script>-</div>-</article><!-- -->@@ -1159,6 +1083,9 @@ for (var i = 0; i < els.length; i++) {<div id="unitlessValue" class="demo"><h3 class="demo-title">Unitless</h3><div class="demo-description">+ <p>+ If the original value has a unit, it will be automatically added to the animated value.+ </p><table><thead><td>Type</td>@@ -1169,9 +1096,6 @@ for (var i = 0; i < els.length; i++) {<td><code>translateX: 250</code></td></tr></table>- <p>- If the original value has a unit, it will be automatically added to the animated value.- </p></div><div class="demo-content unitless-values-demo"><div class="circle shadow"></div>@@ -1193,6 +1117,13 @@ anime({<div id="specificUnitValue" class="demo"><h3 class="demo-title">Specific unit</h3><div class="demo-description">+ <p>+ Forces the animation to use a certain unit and will automatically convert the initial target value.+ </p>+ <p class="bubble warning">+ Conversion accuracy can vary depending of the unit used.<br>+ You can also define the initial value of the animation directly using an array, see the <a href="#fromToValues" class="color-values">from to values</a> section.+ </p><table><thead><td>Type</td>@@ -1203,13 +1134,6 @@ anime({<td><code>width: '100%'</code></td></tr></table>- <p>- Force the animation to use a certain unit and will automatically convert the initial target value.- </p>- <p class="bubble warning">- Conversion accuracy can vary depending of the unit used.<br>- You can also define the initial value of the animation directly using an array, see the <a href="#fromToValues" class="color-values">From To values</a> section.- </p></div><div class="demo-content specific-unit-values-demo"><div class="square shadow"></div>@@ -1233,6 +1157,9 @@ anime({<div id="relativeValues" class="demo"><h3 class="demo-title">Relative</h3><div class="demo-description">+ <p>+ Adds, substracts or multiplies the original value.+ </p><table><thead><td>Accepts</td>@@ -1255,10 +1182,6 @@ anime({<td><code>'*=10'</code></td></tr></table>- <p>- Add, substract or multiply the original value.<br>- Default units are preserved.- </p></div><div class="demo-content"><div class="circle shadow"></div>@@ -1296,6 +1219,9 @@ anime({<div id="colors" class="demo"><h3 class="demo-title">Colors</h3><div class="demo-description">+ <p>+ <i>anime.js</i> accepts and converts Haxadecimal, RGB, RGBA, HSL, and HSLA color values.+ </p><table><thead><td>Accepts</td>@@ -1311,7 +1237,7 @@ anime({</tr><tr><td>RGBA</td>- <td><code>'rgba(255, 255, 255, 1)'</code></td>+ <td><code>'rgba(255, 255, 255, .2)'</code></td></tr><tr><td>HSL</td>@@ -1319,12 +1245,9 @@ anime({</tr><tr><td>HSLA</td>- <td><code>'hsla(0, 100%, 100%, 1)'</code></td>+ <td><code>'hsla(0, 100%, 100%, .2)'</code></td></tr></table>- <p>- <i>Anime</i> accepts and converts Haxadecimal, RGB, RGBA, HSL, and HSLA color values.- </p></div><div class="demo-content colors-demo"><div class="line">@@ -1366,7 +1289,7 @@ var colorsExamples = anime.timeline({.add({ targets: '.color-hsl', background: 'hsl(0, 100%, 100%)' }, 0).add({ targets: '.color-rgba', background: 'rgba(255,255,255, .2)' }, 0).add({ targets: '.color-hsla', background: 'hsla(0, 100%, 100%, .2)' }, 0)-.add({ targets: '.colors-demo .el', translateX: 250 }, 0);+.add({ targets: '.colors-demo .el', translateX: 270 }, 0);/*DEMO*/}</script>@@ -1376,6 +1299,9 @@ var colorsExamples = anime.timeline({<div id="fromToValues" class="demo"><h3 class="demo-title">From To</h3><div class="demo-description">+ <p>+ Forces the animation to start at a specified value.+ </p><table><thead><td>Type</td>@@ -1386,12 +1312,6 @@ var colorsExamples = anime.timeline({<td><code>['50%', '100%']</code></td></tr></table>- <p>- Force the animation to starts at a specified value.- </p>- <p class="bubble warning">- Values must have identical units <code>['50%', '100%']</code>, or no units <code>[50, 100]</code>.- </p></div><div class="demo-content"><div class="circle shadow"></div>@@ -1415,18 +1335,10 @@ anime({<div id="functionBasedPropVal" class="demo"><h3 class="demo-title">Function based values</h3><div class="demo-description">- <table>- <thead>- <td>Type</td>- <td>Example</td>- </thead>- <tr>- <td>Function</td>- <td><code>(el, i, t) => (t - i) * 200</code></td>- </tr>- </table><p>- Get different values for every target and property of the animation.<br>+ Get different values for every target and property of the animation.+ </p>+ <p>The function accepts 3 arguments:</p><table>@@ -1451,7 +1363,7 @@ anime({<div class="demo-content function-based-values-demo"><div class="line"><div class="small circle shadow"></div>- <div data-x="160" class="small circle el"></div>+ <div data-x="170" class="small circle el"></div></div><div class="line"><div class="small circle shadow"></div>@@ -1459,7 +1371,7 @@ anime({</div><div class="line"><div class="small circle shadow"></div>- <div data-x="250" class="small circle el"></div>+ <div data-x="270" class="small circle el"></div></div></div><script>var functionBasedPropVal = function() {@@ -1488,9 +1400,24 @@ anime({</div>-<div id="keyframes" class="demo">- <h3 class="demo-title">Keyframes</h3>+</article>+<!-- -->++<!-- KEYFRAMES -->+<article id="keyframes" class="color-keyframes">+<header>+ <h2 class="demos-title">Keyframes</h2>+</header>++<div id="animationKeyframes" class="demo">+ <h3 class="demo-title">Animation keyframes</h3><div class="demo-description">+ <p>+ Animation keyframes are defined using an Array, within the <code>keyframes</code> property.+ </p>+ <p class="bubble info">+ If their is no duration specified inside the keyframes, each keyframe duration will be equal to the animation total duration divided by the number of keyframes.+ </p><table><thead><td>Type</td>@@ -1505,33 +1432,63 @@ anime({]</code></td></tr></table>+ </div>+ <div class="demo-content animation-keyframes-demo">+ <div class="circle shadow"></div>+ <div class="circle el keyframes"></div>+ </div>+ <script>var animationKeyframes = function() {+/*DEMO*/+anime({+ targets: '.animation-keyframes-demo .el',+ keyframes: [+ {translateY: -40},+ {translateX: 250},+ {translateY: 40},+ {translateX: 0},+ {translateY: 0}+ ],+ duration: 4000,+ easing: 'easeOutElastic(1, .8)',+ loop: true+});+/*DEMO*/+}+ </script>+</div>++<div id="propertyKeyframes" class="demo">+ <h3 class="demo-title">Property keyframes</h3>+ <div class="demo-description"><p>- Keyframes are defined using an Array of property Object.<br>- More details on Object values in the <a class="color-anim-params" href="#specificPropParameters">Specific property parameters</a>.+ Similar to <a class="color-keyframes" href="#animationKeyframes">animation keyframes</a>, property keyframes are defined using an Array of property Object. Property keyframes allow overlapping animations since each property have its own keyframes array.</p><p class="bubble info">- If their is no duration specified inside the keyframes of one property, each keyframe duration will be equal to the animation total duration divided by the number of keyframes:+ If their is no duration specified inside the keyframes, each keyframe duration will be equal to the animation total duration divided by the number of keyframes.</p>-<pre><code>anime({- targets: '.el',- translateX: [- {value: 100}, // duration -> 2000 / 4 = 500 ms- {value: 200}, // duration -> 2000 / 4 = 500 ms- {value: 300}, // duration -> 2000 / 4 = 500 ms- {value: 400} // duration -> 2000 / 4 = 500 ms- ],- duration: 2000-});-</code></pre>+ <table>+ <thead>+ <td>Type</td>+ <td>Example</td>+ </thead>+ <tr>+ <td><code>Array</code></td>+ <td><code>[+ {value: 100, easing: 'easeOutExpo'},+ {value: 200, delay: 500},+ {value: 300, duration: 1000}+]</code></td>+ </tr>+ </table></div>- <div class="demo-content keyframes-demo">+ <div class="demo-content property-keyframes-demo"><div class="circle shadow"></div><div class="circle el keyframes"></div></div>- <script>var keyframes = function() {+ <script>var propertyKeyframes = function() {/*DEMO*/anime({- targets: '.el.keyframes',+ targets: '.property-keyframes-demo .el',translateX: [{ value: 250, duration: 1000, delay: 500 },{ value: 0, duration: 1000, delay: 500 }@@ -1560,16 +1517,595 @@ anime({/*DEMO*/}</script>-</div></article><!-- -->-<!-- TIMELINE -->-<article id="timeline" class="color-tl">+<!-- STAGGERING -->+<article id="staggering" class="color-staggering"><header>- <h2 class="demos-title">Timeline</h2>+ <h2 class="demos-title">Staggering</h2>+</header>++<div id="staggeringBasics" class="demo">+ <h3 class="demo-title">Staggering basics</h3>+ <div class="demo-description">+ <p>+ Staggering allows you to animate multiple elements with <a href="https://en.wikipedia.org/wiki/Follow_through_and_overlapping_action">follow through and overlapping action</a>.+ </p>+ <pre><code>anime.stagger(value, options)</code></pre>+ <table>+ <thead>+ <td>Arguments</td>+ <td>Type</td>+ <td>Info</td>+ <td>Required</td>+ </thead>+ <tr>+ <td>Value</td>+ <td><code>Number</code>, <code>String</code>, <code>Array</code></td>+ <td>The manipulated value(s)</td>+ <td>Yes</td>+ </tr>+ <tr>+ <td>Options</td>+ <td><code>Object</code></td>+ <td>Stagger parameters</td>+ <td>No</td>+ </tr>+ </table>+ </div>+ <div class="demo-content basic-staggering-demo">+ <div class="line">+ <div class="label">delay = (100 * 0) ms</div>+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="label">delay = (100 * 1) ms</div>+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="label">delay = (100 * 2) ms</div>+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="label">delay = (100 * 3) ms</div>+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="label">delay = (100 * 4) ms</div>+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="label">delay = (100 * 5) ms</div>+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ </div>+ <script>var staggeringBasics = function() {+/*DEMO*/+anime({+ targets: '.basic-staggering-demo .el',+ translateX: 270,+ delay: anime.stagger(100) // increase delay by 100ms for each elements.+});+/*DEMO*/+}+ </script>+</div>++<div id="staggeringStartValue" class="demo">+ <h3 class="demo-title">Start value</h3>+ <div class="demo-description">+ <p>+ Starts the staggering effect from a specific value.+ </p>+ <pre><code>anime.stagger(value, {start: startValue})</code></pre>+ <table>+ <thead>+ <td>Types</td>+ <td>Info</td>+ </thead>+ <tr>+ <td><code>Number</code>, <code>String</code>+ <td>Same as propety values, see <a href="#unitlessValue" class="color-values">values section</a></td>+ </tr>+ </table>+ </div>+ <div class="demo-content staggering-start-value-demo">+ <div class="line">+ <div class="label">delay = 500 + (100 * 0) ms</div>+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="label">delay = 500 + (100 * 1) ms</div>+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="label">delay = 500 + (100 * 2) ms</div>+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="label">delay = 500 + (100 * 3) ms</div>+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="label">delay = 500 + (100 * 4) ms</div>+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="label">delay = 500 + (100 * 5) ms</div>+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ </div>+ <script>var staggeringStartValue = function() {+/*DEMO*/+anime({+ targets: '.staggering-start-value-demo .el',+ translateX: 270,+ delay: anime.stagger(100, {start: 500}) // delay starts at 500ms then increase by 100ms for each elements.+});+/*DEMO*/+}+ </script>+</div>++<div id="rangeValueStaggering" class="demo">+ <h3 class="demo-title">Range value</h3>+ <div class="demo-description">+ <p>+ Distributes evenly values between two numbers.+ </p>+ <pre><code>anime.stagger([startValue, endValue])</code></pre>+ <table>+ <thead>+ <td>Type</td>+ <td>Info</td>+ </thead>+ <tr>+ <td><code>'easingName'</code></td>+ <td>All valid easing names are accepted, see <a href="#easings" class="color-easings">easings section</a></td>+ </tr>+ <tr>+ <td><code>function(i)</code></td>+ <td>Custom easing function, see <a href="#customEasing" class="color-easings">custom easings section</a></td>+ </tr>+ </table>+ </div>+ <div class="demo-content range-value-staggering-demo">+ <div class="line">+ <div class="label">rotate = ((360 - (-360)) / 5) * 0</div>+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="label">rotate = ((360 - (-360)) / 5) * 1</div>+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="label">rotate = ((360 - (-360)) / 5) * 2</div>+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="label">rotate = ((360 - (-360)) / 5) * 3</div>+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="label">rotate = ((360 - (-360)) / 5) * 4</div>+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="label">rotate = ((360 - (-360)) / 5) * 5</div>+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ </div>+ <script>var rangeValueStaggering = function() {+/*DEMO*/+anime({+ targets: '.range-value-staggering-demo .el',+ translateX: 270,+ rotate: anime.stagger([-360, 360]), // rotation will be distributed from -360deg to 360deg evenly between all elements+ easing: 'easeInOutQuad'+});+/*DEMO*/+}+ </script>+</div>++<div id="staggeringFrom" class="demo">+ <h3 class="demo-title">From value</h3>+ <div class="demo-description">+ <p>+ Starts the stagger effect from a specific position.+ </p>+ <pre><code>anime.stagger(value, {from: startingPosition})</code></pre>+ <table>+ <thead>+ <td>Options</td>+ <td>Type</td>+ <td>Info</td>+ </thead>+ <tr>+ <td><code>'first'</code> (default)</td>+ <td><code>'string'</code></td>+ <td>Start the effect from the first element</td>+ </tr>+ <tr>+ <td><code>'last'</code></td>+ <td><code>'string'</code></td>+ <td>Start the effect from the last element</td>+ </tr>+ <tr>+ <td><code>'center'</code></td>+ <td><code>'string'</code></td>+ <td>Start the effect from the center</td>+ </tr>+ <tr>+ <td><code>index</code></td>+ <td><code>number</code></td>+ <td>Start the effect from the specified index</td>+ </tr>+ </table>+ </div>+ <div class="demo-content staggering-from-demo">+ <div class="line">+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ </div>+ <script>var staggeringFrom = function() {+/*DEMO*/+anime({+ targets: '.staggering-from-demo .el',+ translateX: 270,+ delay: anime.stagger(100, {from: 'center'})+});+/*DEMO*/+}+ </script>+</div>++<div id="staggeringDirection" class="demo">+ <h3 class="demo-title">Direction</h3>+ <div class="demo-description">+ <p>+ Changes the order in which the stagger operates.+ </p>+ <pre><code>anime.stagger(value, {direction: 'reverse'})</code></pre>+ <table>+ <thead>+ <td>Options</td>+ <td>Info</td>+ </thead>+ <tr>+ <td><code>'normal'</code> (default)</td>+ <td>Normal staggering, from the first elelemnt to the last</td>+ </tr>+ <tr>+ <td><code>'reverse'</code></td>+ <td>Reversed staggering, from the last elelemnt to the first</td>+ </tr>+ </table>+ </div>+ <div class="demo-content staggering-direction-demo">+ <div class="line">+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ </div>+ <script>var staggeringDirection = function() {+/*DEMO*/+anime({+ targets: '.staggering-direction-demo .el',+ translateX: 270,+ delay: anime.stagger(100, {direction: 'reverse'})+});+/*DEMO*/+}+ </script>+</div>++<div id="staggeringEasing" class="demo">+ <h3 class="demo-title">Easing</h3>+ <div class="demo-description">+ <p>+ Stagger values using an easing function.+ </p>+ <pre><code>anime.stagger(value, {easing: 'easingName'})</code></pre>+ <table>+ <thead>+ <td>Type</td>+ <td>Info</td>+ </thead>+ <tr>+ <td><code>'string'</code></td>+ <td>All valid <a href="#easings" class="color-easings">easing names</a> are accepted</td>+ </tr>+ <tr>+ <td><code>function(i)</code></td>+ <td>Use your own <a href="#customEasing" class="color-easings">custom easings function</a></td>+ </tr>+ </table>+ </div>+ <div class="demo-content staggering-easing-demo">+ <div class="line">+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ </div>+ <script>var staggeringEasing = function() {+/*DEMO*/+anime({+ targets: '.staggering-easing-demo .el',+ translateX: 270,+ delay: anime.stagger(300, {easing: 'easeOutQuad'})+});+/*DEMO*/+}+ </script>+</div>++<div id="gridStaggering" class="demo">+ <h3 class="demo-title">Grid</h3>+ <div class="demo-description">+ <p>+ Staggering values based a 2D array that allow "ripple" effects.+ </p>+ <pre><code>anime.stagger(value, {grid: [rows, columns]})</code></pre>+ <table>+ <thead>+ <td>Type</td>+ <td>Info</td>+ </thead>+ <tr>+ <td><code>array</code></td>+ <td>A 2 items array, the first value is the number of rows, the second the number of columns</td>+ </tr>+ </table>+ </div>+ <div class="demo-content staggering-grid-demo">+ <div class="grid">+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ <div class="small square el"></div>+ </div>+ <div class="grid shadow">+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ <div class="small square"></div>+ </div>+ </div>+ <script>var gridStaggering = function() {+/*DEMO*/+anime({+ targets: '.staggering-grid-demo .el',+ scale: .1,+ delay: anime.stagger(200, {grid: [14, 5], from: 'center'}),+ easing: 'easeInOutQuad'+});+/*DEMO*/+}+ </script>+</div>++</article>+<!-- -->++<!-- TIMELINE -->+<article id="timeline" class="color-tl">+<header>+ <h2 class="demos-title">Timeline</h2></header><div id="timelineBasics" class="demo">@@ -1577,7 +2113,7 @@ anime({<div class="demo-description"><p>Timelines let you synchronise multiple animations together.<br>- By default each animation added to the timeline will start after the previous animation ends.+ By default each animation added to the timeline starts after the previous animation ends.</p><p>Creating a timeline:@@ -1668,6 +2204,10 @@ tl<div id="timelineOffsets" class="demo"><h3 class="demo-title">Time Offsets</h3><div class="demo-description">+ <p>+ Time offsets can be specified with a second optional parameter using the timeline <code>.add()</code> function. It defines when a animation starts in the timeline, if no offset is specifed, the animation will starts after the previous animation ends.<br>+ An offset can be relative to the last animation or absolute to the whole timeline.+ </p><table><thead><td>Type</td>@@ -1694,11 +2234,6 @@ tl<td>Starts at 100ms, reagardless of the animtion position in the timeline</td></tr></table>- <p>- Time offset can be specified as a second optional parameter in the timeline <code>.add()</code> Function.<br>- It defines when a animation starts in the timeline, if no offset is specifed, the animation will starts after the previous animation ends.<br>- An offset can be relative to the last animation or absolute to the whole timeline.- </p></div><div class="demo-content offsets-demo"><div class="line">@@ -1748,23 +2283,28 @@ tl<h3 class="demo-title">Parameters inheritance</h3><div class="demo-description"><p>- Write less code by defining default parameters.<br>- Every timeline child inherits the default parameters.+ Parameters set in the parent timeline instance will be inherited by all the children.</p>-<pre><code>var myTimeline = anime({- targets: '.el',- easing: 'linear' // defines '.el' as the targets for each animation child-});--myTimeline-.add({- translateX: 250 // animtate '.el' to 250px to the right with a 'linear' easing-})-.add({- rotate: 180,- easing: 'easeOutExpo' // override the default timeline easing-});-</code></pre>+ <table>+ <thead>+ <td>Parameters that can be inherited</td>+ </thead>+ <tr>+ <td><code>targets</code></td>+ </tr>+ <tr>+ <td><code>duration</code></td>+ </tr>+ <tr>+ <td><code>delay</code></td>+ </tr>+ <tr>+ <td><code>endDelay</code></td>+ </tr>+ <tr>+ <td><code>round</code></td>+ </tr>+ </table></div><div class="demo-content params-inheritance-demo"><div class="line">@@ -1828,10 +2368,10 @@ tl<div id="playPause" class="demo"><h3 class="demo-title">Play / Pause</h3><div class="demo-description">+ <p>Plays a paused animation, or starts the animation if the <code>autoplay</code> parameters is set to <code>false</code>.</p><pre><code>animation.play();</code></pre>- <p>Play a paused animation, or if the animation <code>autoplay</code> parameters is set to <code>true</code>/.</p>+ <p>Pauses a running animation.</p><pre><code>animation.pause();</code></pre>- <p>Pause a running animation.</p></div><div class="demo-content play-pause-demo"><div class="line">@@ -1855,7 +2395,7 @@ tl/*DEMO*/var animation = anime({targets: '.play-pause-demo .el',- translateX: 250,+ translateX: 270,delay: function(el, i) { return i * 100; },direction: 'alternate',loop: true,@@ -1874,8 +2414,8 @@ document.querySelector('.play-pause-demo .pause').onclick = animation.pause;<div id="restartAnim" class="demo"><h3 class="demo-title">Restart</h3><div class="demo-description">+ <p>Restarts an animation from its initial values.</p><pre><code>animation.restart();</code></pre>- <p>Restart an animation from its initial values.</p></div><div class="demo-content restart-demo"><div class="line">@@ -1915,8 +2455,8 @@ document.querySelector('.restart-demo .restart').onclick = animation.restart;<div id="reverseAnim" class="demo"><h3 class="demo-title">Reverse</h3><div class="demo-description">+ <p>Reverses the direction of an animation.</p><pre><code>animation.reverse();</code></pre>- <p>Reverse the direction of an animation (running or not).</p></div><div class="demo-content reverse-anim-demo"><div class="line">@@ -1940,7 +2480,7 @@ document.querySelector('.restart-demo .restart').onclick = animation.restart;var reverseAnimDemo = anime({targets: '.reverse-anim-demo .el',- translateX: 250,+ translateX: 270,duration: 2000,delay: function(el, i) { return i * 200; }});@@ -1953,7 +2493,7 @@ document.querySelector('.restart-demo .restart').onclick = animation.restart;/*DEMO*/var animation = anime({targets: '.reverse-anim-demo .el',- translateX: 250,+ translateX: 270,loop: true,direction: 'alternate',delay: function(el, i) { return i * 200; },@@ -1970,9 +2510,9 @@ document.querySelector('.reverse-anim-demo .reverse').onclick = animation.revers<div id="seekAnim" class="demo"><h3 class="demo-title">Seek</h3><div class="demo-description">- <pre><code>animation.seek(timeStamp);</code></pre><p>Jump to a specific time (in milliseconds).</p>- <p>Can also be used to control an animation while scrolling:</p>+ <pre><code>animation.seek(timeStamp);</code></pre>+ <p>Can also be used to control an animation while scrolling.</p><pre><code>animation.seek((scrollPercent / 100) * animation.duration);</code></pre></div><div class="demo-content seek-anim-demo">@@ -1996,7 +2536,7 @@ document.querySelector('.reverse-anim-demo .reverse').onclick = animation.revers/*DEMO*/var animation = anime({targets: '.seek-anim-demo .el',- translateX: 250,+ translateX: 270,delay: function(el, i) { return i * 100; },elasticity: 200,easing: 'easeInOutSine',@@ -2016,260 +2556,72 @@ seekProgressEl.oninput = function() {<div id="TLcontrols" class="demo"><h3 class="demo-title">Timeline controls</h3><div class="demo-description">+ <p>Timelines can be controled like any other <i>anime.js</i> instance.</p><pre><code>timeline.play();timeline.pause();timeline.restart();timeline.seek(timeStamp);</code></pre>- <p>Timelines can be controled like any other anime instance.</p></div><div class="demo-content timeline-controls-demo"><div class="line"><div class="small square shadow"></div><div class="small square el"></div></div>- <div class="line">- <div class="small circle shadow"></div>- <div class="small circle el"></div>- </div>- <div class="line">- <div class="small triangle shadow"></div>- <div class="small triangle el"></div>- </div>- <div class="line controls">- <button class="play">Play</button>- <button class="pause">Pause</button>- <button class="restart">Restart</button>- <input class="progress" step=".001" type="range" min="0" max="100" value="0"></input>- </div>- </div>- <script>var TLcontrols = function() {-/*DEMO*/-var controlsProgressEl = document.querySelector('.timeline-controls-demo .progress');--var tl = anime.timeline({- direction: 'alternate',- loop: true,- duration: 500,- easing: 'easeInOutSine',- update: function(anim) {- controlsProgressEl.value = tl.progress;- }-});--tl-.add({- targets: '.timeline-controls-demo .square.el',- translateX: 250,-})-.add({- targets: '.timeline-controls-demo .circle.el',- translateX: 250,-}, '-=100')-.add({- targets: '.timeline-controls-demo .triangle.el',- translateX: 250,-}, '-=100');--document.querySelector('.timeline-controls-demo .play').onclick = tl.play;-document.querySelector('.timeline-controls-demo .pause').onclick = tl.pause;-document.querySelector('.timeline-controls-demo .restart').onclick = tl.restart;--controlsProgressEl.addEventListener('input', function() {- tl.seek(tl.duration * (controlsProgressEl.value / 100));-});-/*DEMO*/-}- </script>--</div>--</article>-<!-- -->--<!-- STATES -->-<article id="states" class="color-states">-<header>- <h2 class="demos-title">States</h2>-</header>--<div id="statesBasics" class="demo">- <h3 class="demo-title">Basics</h3>- <div class="demo-description">- <p>States let you define and store multiple set of properties for one animation.</p>- <p class="bubble info">This is particullary useful when an element is animated multiple times with different parameters.</p>- <p>Add states using the <code>states</code> property:</p>-<pre><code>var animation = anime({- targets: statesExampleEl,- scaleX: 1, // Default scaleX value- scaleY: 1, // Default scaleY value- borderRadius: '0%', // Default borderRadius value- duration: 500, // Default duration- easing: 'easeInOutQuad', //Default easing- states: {- circle: {- borderRadius: '50%',- duration: 1000,- easing: 'easeInOutCirc'- },- rectangle: {- scaleX: 1.3,- scaleY: .6,- }- },- });</pre></code>- <p>When using states, the default values (in this case <code>scaleX: 1, scaleY: 1, borderRadius: '0%'</code>) will be automatically applied on initialization.</p>- <p>To instantanetly switch to a state, use <code>.goTo(stateName)</code></p>-<pre><code>animation.goTo('circle');</pre></code>- <p>To animate to a state, use <code>.animateTo(stateName, parameters)</code> with optional animation parameters:</p>-<pre><code>animation.animateTo('circle', {easing: 'easeInOutCirc'});</pre></code>- </div>- <div class="demo-content states-demo">- <div class="line align-center">- <div class="large square outline shadow"></div>- <div class="large square outline el"></div>- </div>- <div class="line controls">- <button value="default">Default</button>- <button value="circle">Circle</button>- <button value="rectangle">Rectangle</button>- </div>- </div>- <script>var statesBasics = function() {-/*DEMO*/-var buttons = document.querySelectorAll('.states-demo button');--var statesDemoAnimation = anime({- targets: '.states-demo .el',- scaleX: 1,- scaleY: 1,- borderRadius: '0%',- duration: 500,- easing: 'easeInOutQuad',- states: {- circle: {- borderRadius: '50%',- duration: 1000,- easing: 'easeInOutCirc'- },- rectangle: {- scaleX: 1.3,- scaleY: .6- }- }-});--for (var i = 0; i < buttons.length; i++) {- buttons[i].addEventListener('click', function() {- statesDemoAnimation.animateTo(this.value);- });-}-/*DEMO*/-var statesDemoAnimation = anime({- targets: '.states-demo .el',- scaleX: 1,- scaleY: 1,- borderRadius: '0%',- duration: 500,- easing: 'easeInOutQuad',- states: {- circle: {- borderRadius: '50%',- duration: 1000,- easing: 'easeInOutCirc'- },- rectangle: {- scaleX: 1.3,- scaleY: .6- }- },- begin: function(anim) {- var activeButton = document.querySelector('.states-demo button[value='+anim.currentState+']');- for (var i = 0; i < buttons.length; i++) buttons[i].classList.remove('is-active');- activeButton.classList.add('is-active');- }-});-}- </script>-</div>--<div id="statesParametersOverrides" class="demo">- <h3 class="demo-title">Parameters Overrides</h3>- <div class="demo-description">- <p>You can overide parameters or even animate other properties when animating to a state:</p>-<pre><code>animation.animateTo('circle', {- translateX: 100,- easing: 'easeInOutCirc'-});</pre></code>- </div>- <div class="demo-content states-overrides-demo">- <div class="line align-center">- <div class="large square outline shadow"></div>- <div class="large square outline el"></div>- </div>+ <div class="line">+ <div class="small circle shadow"></div>+ <div class="small circle el"></div>+ </div>+ <div class="line">+ <div class="small triangle shadow"></div>+ <div class="small triangle el"></div>+ </div><div class="line controls">- <button value="circle">Circle</button>- <button value="rectangle">Rectangle</button>+ <button class="play">Play</button>+ <button class="pause">Pause</button>+ <button class="restart">Restart</button>+ <input class="progress" step=".001" type="range" min="0" max="100" value="0"></input></div></div>- <script>var statesParametersOverrides = function() {+ <script>var TLcontrols = function() {/*DEMO*/-var buttons = document.querySelectorAll('.states-overrides-demo button');+var controlsProgressEl = document.querySelector('.timeline-controls-demo .progress');-var statesOverridesDemoAnimation = anime({- targets: '.states-overrides-demo .el',- scaleX: 1,- scaleY: 1,- borderRadius: '0%',+var tl = anime.timeline({+ direction: 'alternate',+ loop: true,duration: 500,- easing: 'easeInOutQuad',- states: {- circle: {- borderRadius: '50%'- },- rectangle: {- scaleX: 1.3,- scaleY: .6- }- },+ easing: 'easeInOutSine',+ update: function(anim) {+ controlsProgressEl.value = tl.progress;+ }});-statesOverridesDemoAnimation.goTo('circle');+tl+.add({+ targets: '.timeline-controls-demo .square.el',+ translateX: 270,+})+.add({+ targets: '.timeline-controls-demo .circle.el',+ translateX: 270,+}, '-=100')+.add({+ targets: '.timeline-controls-demo .triangle.el',+ translateX: 270,+}, '-=100');++document.querySelector('.timeline-controls-demo .play').onclick = tl.play;+document.querySelector('.timeline-controls-demo .pause').onclick = tl.pause;+document.querySelector('.timeline-controls-demo .restart').onclick = tl.restart;-for (var i = 0; i < buttons.length; i++) {- buttons[i].addEventListener('click', function() {- statesOverridesDemoAnimation.animateTo(this.value, {- translateX: anime.random(-40, 40),- duration: anime.random(100, 1000)- });- });-}-/*DEMO*/-var statesOverridesDemoAnimation = anime({- targets: '.states-overrides-demo .el',- scaleX: 1,- scaleY: 1,- borderRadius: '0%',- duration: 500,- easing: 'easeInOutQuad',- states: {- circle: {- borderRadius: '50%'- },- rectangle: {- scaleX: 1.3,- scaleY: .6- }- },- begin: function(anim) {- var activeButton = document.querySelector('.states-overrides-demo button[value='+anim.currentState+']');- for (var i = 0; i < buttons.length; i++) buttons[i].classList.remove('is-active');- if (activeButton) activeButton.classList.add('is-active');- }+controlsProgressEl.addEventListener('input', function() {+ tl.seek(tl.duration * (controlsProgressEl.value / 100));});-statesOverridesDemoAnimation.goTo('circle');+/*DEMO*/}</script>+</div></article>@@ -2284,6 +2636,9 @@ statesOverridesDemoAnimation.goTo('circle');<div id="update" class="demo"><h3 class="demo-title">Update</h3><div class="demo-description">+ <p>+ Callback triggered on every frame as soon as the animation starts playing.+ </p><table><thead><td>Type</td>@@ -2296,9 +2651,6 @@ statesOverridesDemoAnimation.goTo('circle');<td>Return the current animation Object</td></tr></table>- <p>- <code>update()</code> callback is triggered on every frames as soon as the animation starts playing.- </p></div><div class="demo-content update-demo"><div class="logs">@@ -2337,6 +2689,9 @@ anime({<div id="beginComplete" class="demo"><h3 class="demo-title">Begin & Complete</h3><div class="demo-description">+ <p><code>begin()</code> callback is triggered once, when the animation starts playing.</p>+ <p><code>complete()</code> callback is triggered once, when the animation is completed.</p>+ <p class="bubble info">Both <code>begin()</code> and <code>complete()</code> callbacks are called if the animation's <code>duration</code> is <code>0</code>.</p><table><thead><td>Type</td>@@ -2349,9 +2704,6 @@ anime({<td>Return the current animation Object</td></tr></table>- <p><code>begin()</code> callback is triggered once right after the animation starts playing.</p>- <p><code>complete()</code> callback is triggered once when the animation is completed.</p>- <p class="bubble info">Both <code>begin()</code> and <code>complete()</code> callbacks are called if the animation's <code>duration</code> is <code>0</code>.</p></div><div class="demo-content begin-complete-demo"><div class="logs">@@ -2397,6 +2749,8 @@ anime({<div id="loopBeginLoopComplete" class="demo"><h3 class="demo-title">loopBegin & loopComplete</h3><div class="demo-description">+ <p><code>loopBegin()</code> callback is triggered once everytime a loop begin.</p>+ <p><code>loopComplete()</code> callback is triggered once everytime a loop is completed.</p><table><thead><td>Type</td>@@ -2409,9 +2763,6 @@ anime({<td>Return the current animation Object</td></tr></table>- <p><code>loopBegin()</code> callback is triggered once everytime a loop begin.</p>- <p><code>loopComplete()</code> callback is triggered once everytime a loop is completed.</p>- <p class="bubble warning">Animation direction will affect the order in which <code>loopBegin()</code> and <code>loopComplete()</code> are triggerd.</p></div><div class="demo-content loopBegin-loopComplete-demo"><div class="logs">@@ -2456,6 +2807,9 @@ anime({<div id="change" class="demo"><h3 class="demo-title">Change</h3><div class="demo-description">+ <p>+ Callback triggered on every frames in between the animation's <a href="#delay" class="color-prop-params">delay</a> and <a href="#endDelay" class="color-prop-params">endDelay</a>.+ </p><table><thead><td>Type</td>@@ -2468,9 +2822,6 @@ anime({<td>Return the current animation Object</td></tr></table>- <p>- <code>change()</code> callback is triggered on every frames in between the animation's <a href="#delay" class="color-prop-params">delay</a> and <a href="#endDelay" class="color-prop-params">endDelay</a>.- </p></div><div class="demo-content change-demo"><div class="logs">@@ -2513,6 +2864,9 @@ anime({<div id="changeBeginChangeComplete" class="demo"><h3 class="demo-title">changeBegin & changeComplete</h3><div class="demo-description">+ <p><code>changeBegin()</code> callback is triggered everytime the animation starts changing.</p>+ <p><code>changeComplete()</code> callback is triggered everytime the animation stops changing.</p>+ <p class="bubble warning">Animation direction will affect the order in which <code>changeBegin()</code> and <code>changeComplete()</code> are triggerd.</p><table><thead><td>Type</td>@@ -2525,9 +2879,6 @@ anime({<td>Return the current animation Object</td></tr></table>- <p><code>changeBegin()</code> callback is triggered once everytime the animation <code>delay</code> ends.</p>- <p><code>changeComplete()</code> callback is triggered once everytime the animation <code>endDelay</code> starts.</p>- <p class="bubble warning">Animation direction will affect the order in which <code>changeBegin()</code> and <code>changeComplete()</code> are triggerd.</p></div><div class="demo-content changeBegin-chnageComplete-demo"><div class="logs">@@ -2579,12 +2930,12 @@ anime({<div id="finishedPromise" class="demo"><h3 class="demo-title">Finished promise</h3><div class="demo-description">-<pre><code>animation.finished.then(function() {- // Do things...-});</code></pre><p>Every animation instances return a <code>finished</code> promise when the animation finised.</p>+<pre><code>animation.finished.then(function() {+ // Do things...+});</code></pre><p class="bubble warning">Promises are not suported in IE < 11.</p>@@ -2599,7 +2950,7 @@ anime({</div><script>var finishedPromise = function() {if (window.demoPromiseResetTimeout) clearTimeout(window.demoPromiseResetTimeout);-anime.setValue('.promise-demo .el', {backgroundColor: ''});+anime.set('.promise-demo .el', {backgroundColor: ''});/*DEMO*/var progressLogEl = document.querySelector('.promise-demo .progress-log');var promiseEl = document.querySelector('.promise-demo .el');@@ -2608,7 +2959,7 @@ var demoPromiseResetTimeout;function logFinished() {finishedLogEl.value = 'Promise resolved';- anime.setValue(promiseEl, {backgroundColor: '#18FF92'});+ anime.set(promiseEl, {backgroundColor: '#18FF92'});// Rebind the promise, since this demo can be looped.window.demoPromiseResetTimeout = setTimeout(function() {promise = animation.finished.then(logFinished);@@ -2647,11 +2998,14 @@ var promise = animation.finished.then(logFinished);<h3 class="demo-title">Motion path</h3><div class="demo-description"><p>- Animate an element relative to the <code>x</code>, <code>y</code> and <code>angle</code> values of an SVG path element.+ Animates an element relative to the <code>x</code>, <code>y</code> and <code>angle</code> values of an SVG path element.</p><pre><code>var myPath = anime.path('svg path');</code></pre><p>- The path function returns a new Function that returns the specified property:+ The path function returns a new Function that returns the specified property.+ </p>+ <p class="bubble info">+ Motion path animations are responsive since v3</p><table><thead>@@ -2712,6 +3066,9 @@ anime({</p><p class="bubble warning">Shapes must have the same number of points!+ </p><br>+ <p class="bubble info">+ More info on SVG shape morphing <a href="https://hackernoon.com/metamorphosis-morphing-svgs-378cf4f3aa58">here</a>.</p></div><div class="demo-content align-center morphing-demo">@@ -2754,25 +3111,13 @@ anime({<h3 class="demo-title">Line drawing</h3><div class="demo-description"><p>- <i>Anime</i> has a built in helper to create path drawing animation with the <code>'stroke-dashoffset'</code> property.<br>- Set the path <code>'dash-offset'</code> value with <code>anime.setDashoffset()</code> in a <a href="#fromToValues" class="color-values">From To</a> formated value:+ Creates path drawing animation using the <code>'stroke-dashoffset'</code> property.<br>+ Set the path <code>'dash-offset'</code> value with <code>anime.setDashoffset()</code> in a <a href="#fromToValues" class="color-values">from to</a> formated value.+ </p>+ <pre><code>strokeDashoffset: [anime.setDashoffset, 0]</code></pre>+ <p class="bubble info">+ More info on line drawing animation <a href="https://css-tricks.com/svg-line-animation-works/">here</a>.</p>-<pre><code>anime({- targets: 'svg path',- strokeDashoffset: [anime.setDashoffset, 0]-});</code></pre>- <table>- <thead>- <td>Accepts</td>- <td>Parameters</td>- <td>Info</td>- </thead>- <tr>- <td><code>Function</code></td>- <td>animation</td>- <td>Return the current animation Object</td>- </tr>- </table></div><div class="demo-content align-center line-drawing-demo"><svg viewBox="0 0 280 100">@@ -2817,9 +3162,10 @@ anime({<h3 class="demo-title">Linear</h3><div class="demo-description"><p>- <code>'linear'</code> will not apply any easing timing to your animation.<br>- usefull for opacity and colors animations.+ Does not apply any easing timing to your animation.<br>+ Usefull for opacity and colors transitions.</p>+ <pre><code>easing: 'linear'</code></pre></div><div class="demo-content linear-easing-demo"><div class="line">@@ -2846,7 +3192,11 @@ anime({<h3 class="demo-title">Penner's functions</h3><div class="demo-description"><p>- Built in <a href="http://robertpenner.com/easing/">Robert Penner's easing functions</a>:+ Built in <a href="http://robertpenner.com/easing/">Robert Penner's easing functions</a>.+ </p>+ <pre><code>easing: 'easeInOutSine'</code></pre>+ <p>+ Availabe easings :</p><table><thead>@@ -2912,13 +3262,15 @@ function createEasingDemo(easing) {translateX: 250,direction: 'alternate',loop: true,+ delay: 200,+ endDelay: 200,easing: easing,});fragment.appendChild(demoEl);}-for (var easeName in anime.easings) {- if (Array.isArray(anime.easings[easeName])) {+for (var easeName in anime.penner) {+ if (Array.isArray(anime.penner[easeName])) {createEasingDemo(easeName);}}@@ -2934,12 +3286,12 @@ demoContentEl.appendChild(fragment);<div id="cubicBezier" class="demo"><h3 class="demo-title">Cubic Bézier Curve</h3><div class="demo-description">- <pre><code>easing: 'cubicBezier(.5, .05, .1, .3)'</code></pre><p>- Use your own custom cubic Bézier curves <code>cubicBezier(x1, y1, x2, y2):</code>+ Use your own custom cubic Bézier curves <code>cubicBezier(x1, y1, x2, y2)</code>.</p>+ <pre><code>easing: 'cubicBezier(.5, .05, .1, .3)'</code></pre><p class="bubble warning">- You can use Bézier curves generator like <a href="https://matthewlein.com/tools/ceaser">Ceaser</a>.+ You can use Bézier curves generator like <a href="https://matthewlein.com/tools/ceaser">Ceaser to generate your curves coordinates</a>.</p></div><div class="demo-content cubic-bezier-demo">@@ -2966,10 +3318,10 @@ anime({<div id="springPhysicsEasing" class="demo"><h3 class="demo-title">Spring</h3><div class="demo-description">- <pre><code>easing: 'spring(mass, stiffness, damping, velocity)'</code></pre><p>Spring physics based easing.</p>+ <pre><code>easing: 'spring(mass, stiffness, damping, velocity)'</code></pre><p class="bubble warning">The duration of a spring animation if defined by the spring parameters.<br>The animation <code>duration</code> parameter will not be taken into account.@@ -3031,8 +3383,8 @@ anime({<div id="elasticEasing" class="demo"><h3 class="demo-title">Elastic</h3><div class="demo-description">- <pre><code>easing: 'easeOutElastic(amplitude, period)'</code></pre><p>Elastic easing.</p>+ <pre><code>easing: 'easeOutElastic(amplitude, period)'</code></pre><table><thead><td>in</td>@@ -3087,7 +3439,7 @@ anime({/*DEMO*/anime({targets: '.elastic-easing-demo .el',- translateX: 250,+ translateX: 270,easing: function(el) {return el.getAttribute('data-ease');},@@ -3102,10 +3454,10 @@ anime({<div id="stepEasing" class="demo"><h3 class="demo-title">Steps</h3><div class="demo-description">- <pre><code>easing: 'steps(numberOfSteps)'</code></pre><p>Defines the number of jumps an animation takes to arrive at its end value.</p>+ <pre><code>easing: 'steps(numberOfSteps)'</code></pre><table><thead><td>Parameter</td>@@ -3145,6 +3497,10 @@ anime({<div id="customEasing" class="demo"><h3 class="demo-title">Custom easing function</h3><div class="demo-description">+ <p>+ A custom easing function must be returned by <a class="color-values" href="#functionBasedPropVal">function based value</a>.+ </p>+ <pre><code>easing: function() { return function(time) { return time * i} }</code></pre><table><thead><td>Parameter</td>@@ -3155,10 +3511,6 @@ anime({<td>Return the current time of the animation</td></tr></table>- <p>- A custom easing function must be returned by <a class="color-values" href="#functionBasedPropVal">function based value</a>.- </p>- <pre><code>easing: function() { return function(time) { return time * i} }</code></pre></div><div class="demo-content custom-easing-demo"><div class="line">@@ -3178,7 +3530,7 @@ anime({/*DEMO*/anime({targets: '.custom-easing-demo .el',- translateX: 250,+ translateX: 270,direction: 'alternate',loop: true,duration: 2000,@@ -3203,77 +3555,14 @@ anime({<h2 class="demos-title">Helpers</h2></header>-<div id="running" class="demo">- <h3 class="demo-title">running</h3>- <div class="demo-description">- <pre><code>anime.running()</code></pre>- <p>- Returns an Array of all active <i>Anime</i> instances currently running.- </p>- </div>- <div class="demo-content running-demo">- <div class="line">- <div class="small square shadow"></div>- <div class="small square el"></div>- </div>- <div class="line">- <div class="small circle shadow"></div>- <div class="small circle el"></div>- </div>- <div class="line">- <div class="small triangle shadow"></div>- <div class="small triangle el"></div>- </div>- <div class="line">- <pre class="bottom log running-log"></pre>- </div>- </div>- <script>var running = function() {-/*DEMO*/-var runninLogEl = document.querySelector('.running-log');--anime({- targets: '.running-demo .square.el',- translateX: 250,- direction: 'alternate',- loop: true,- easing: 'linear'-});--anime({- targets: '.running-demo .circle.el',- translateX: 250,- direction: 'alternate',- loop: true,- easing: 'easeInOutCirc'-});--anime({- targets: '.running-demo .triangle.el',- translateX: 250,- direction: 'alternate',- easing: 'easeInOutQuad',- loop: true,- run: function() {- runninLogEl.innerHTML = 'there are currently ' + anime.running.length + ' instances running';- }-});--/*DEMO*/-}- </script>--</div>-<div id="remove" class="demo"><h3 class="demo-title">remove</h3><div class="demo-description">- <pre><code>anime.remove(targets)</code></pre><p>Removes targets from a running animation or timeline.<br>- The <code>targets</code> parameters accepts the same values as <a class="color-targets" href="#cssSelector">Targets</a> property.+ The <code>targets</code> parameters accepts the same values as the <a class="color-targets" href="#cssSelector">targets</a> property.</p>- <pre><code>anime.remove(document.querySelector('.item'));</code></pre>+ <pre><code>anime.remove(targets)</code></pre></div><div class="demo-content remove-demo"><div class="line">@@ -3296,7 +3585,7 @@ anime({/*DEMO*/anime({targets: '.remove-demo .el',- translateX: 250,+ translateX: 270,direction: 'alternate',loop: true,easing: 'easeInOutQuad'@@ -3311,45 +3600,79 @@ document.querySelector('.remove-el-button').addEventListener('click', function()</div>-<div id="getValue" class="demo">- <h3 class="demo-title">getValue</h3>+<div id="get" class="demo">+ <h3 class="demo-title">get</h3><div class="demo-description">- <p>Returns the original value of an element:</p>- <pre><code>anime.getValue(target, propertyName, unit);</code></pre>+ <p>Returns the original value of an element.</p>+ <pre><code>anime.get(target, propertyName, unit);</code></pre><p>- Since <i>Anime</i> uses <a href="https://developer.mozilla.org/fr/docs/Web/API/Window/getComputedStyle">getComputedStyle</a> to access original CSS, the values are almost always returned in <code>'px'</code>, the third (optional) argument converts the value in the desired unit.+ Since <i>anime.js</i> uses <a href="https://developer.mozilla.org/fr/docs/Web/API/Window/getComputedStyle">getComputedStyle</a> to access original CSS, the values are almost always returned in <code>'px'</code>, the third (optional) argument converts the value in the desired unit.</p>- <pre><code>anime.getValue(domNode, 'width', 'rem');</code></pre>+ <pre><code>anime.get(domNode, 'width', 'rem');</code></pre>+ <table>+ <thead>+ <td>Parameter</td>+ <td>Type</td>+ <td>Info</td>+ </thead>+ <tr>+ <td>target</td>+ <td><code>'string'</code>, <code>var</code></td>+ <td>Any valid <a class="color-targets" href="#cssSelector">targets</a> can be used</td>+ </tr>+ </table><p class="bubble warning">- Only inlined transforms values can be accessed.+ CSS transforms : Only inlined values can be accessed.</p></div><div class="demo-content get-value-demo"><div class="line">+ <div class="logs">+ <div class="log get-value-demo-log"></div>+ </div><div class="large circle shadow"></div><div class="large circle el"></div>- <div class="log get-value-demo-log"></div></div></div>- <script>var getValue = function() {+ <script>var get = function() {/*DEMO*/var logEl = document.querySelector('.get-value-demo-log');var el = document.querySelector('.get-value-demo .el');-logEl.innerHTML = '".el" width is "' + anime.getValue(el, 'width', 'rem') + 'rem"';+logEl.innerHTML = '';+logEl.innerHTML += '".el" width is :<br>';+logEl.innerHTML += '"' + anime.get(el, 'width', 'px') + '"';+logEl.innerHTML += ' or "' + anime.get(el, 'width', 'rem') + 'rem"'/*DEMO*/}</script></div>-<div id="setValue" class="demo">- <h3 class="demo-title">setValue</h3>+<div id="set" class="demo">+ <h3 class="demo-title">set</h3><div class="demo-description"><p>- Imadiatly set values to the specified targets:<br>+ Imadiatly sets values to the specified targets.</p>- <pre><code>anime.setValue(targets, {property: value});</code></pre>+ <pre><code>anime.set(targets, {property: value});</code></pre>+ <table>+ <thead>+ <td>Parameters</td>+ <td>Types</td>+ <td>Info</td>+ </thead>+ <tr>+ <td>target(s)</td>+ <td><code>'string'</code>, <code>var</code></td>+ <td>Any valid <a class="color-targets" href="#cssSelector">targets</a> can be used</td>+ </tr>+ <tr>+ <td>values</td>+ <td><code>object</code></td>+ <td>Any valid <a class="color-properties" href="#cssProperties">properties</a> can be used</td>+ </tr>+ </table></div><div class="demo-content set-value-demo"><div class="line">@@ -3365,9 +3688,9 @@ logEl.innerHTML = '".el" width is "' + anime.getValue(el, 'width', 'rem') + 'rem<div class="small square el"></div></div></div>- <script>var setValue = function() {+ <script>var set = function() {/*DEMO*/-anime.setValue('.set-value-demo .el', {+anime.set('.set-value-demo .el', {translateX: function() { return anime.random(50, 250); },rotate: function() { return anime.random(0, 360); },});@@ -3380,11 +3703,10 @@ anime.setValue('.set-value-demo .el', {<div id="random" class="demo"><h3 class="demo-title">random</h3><div class="demo-description">- <pre><code>anime.random(minValue, maxValue)</code></pre><p>Returns a random integer within a specific range.</p>- <pre><code>var randomValue = anime.random(-100, 100);</code></pre>+ <pre><code>anime.random(minValue, maxValue);</code></pre></div><div class="demo-content random-demo"><div class="line">@@ -3406,7 +3728,7 @@ function randomValues() {anime({targets: '.random-demo .el',translateX: function() {- return anime.random(0, 250);+ return anime.random(0, 270);},easing: 'easeInOutQuad',duration: 750,@@ -3424,12 +3746,12 @@ randomValues();<div id="tick" class="demo"><h3 class="demo-title">tick</h3><div class="demo-description">- <pre><code>animation.tick(time)</code></pre><p>- Let you use an external requestAnimationFrame loop.<br>+ Plays an animation using an external <code>requestAnimationFrame</code> loop.</p>+ <pre><code>animation.tick(time)</code></pre><p class="bubble warning">- Don't forget to set the <code>autoplay</code> parameter to <code>false</code> to prevent the <i>Anime</i> built-in RAF loop to start.+ Don't forget to set the <code>autoplay</code> parameter to <code>false</code> to prevent the <i>anime.js</i> built-in RAF loop to start.</p></div><div class="demo-content tick-demo">@@ -3445,7 +3767,7 @@ if (customRAF) cancelAnimationFrame(customRAF);/*DEMO*/var animation = anime({targets: '.tick-demo .el',- translateX: 250,+ translateX: 270,direction: 'alternate',loop: true,easing: 'easeInOutQuad',@@ -3464,6 +3786,67 @@ requestAnimationFrame(loop);</div>+<div id="running" class="demo">+ <h3 class="demo-title">running</h3>+ <div class="demo-description">+ <p>+ Returns an Array of all active <i>anime.js</i> instances currently running.+ </p>+ <pre><code>anime.running</code></pre>+ </div>+ <div class="demo-content running-demo">+ <div class="line">+ <div class="small square shadow"></div>+ <div class="small square el"></div>+ </div>+ <div class="line">+ <div class="small circle shadow"></div>+ <div class="small circle el"></div>+ </div>+ <div class="line">+ <div class="small triangle shadow"></div>+ <div class="small triangle el"></div>+ </div>+ <div class="line">+ <pre class="bottom log running-log"></pre>+ </div>+ </div>+ <script>var running = function() {+/*DEMO*/+var runninLogEl = document.querySelector('.running-log');++anime({+ targets: '.running-demo .square.el',+ translateX: 270,+ direction: 'alternate',+ loop: true,+ easing: 'linear'+});++anime({+ targets: '.running-demo .circle.el',+ translateX: 270,+ direction: 'alternate',+ loop: true,+ easing: 'easeInOutCirc'+});++anime({+ targets: '.running-demo .triangle.el',+ translateX: 270,+ direction: 'alternate',+ easing: 'easeInOutQuad',+ loop: true,+ update: function() {+ runninLogEl.innerHTML = 'there are currently ' + anime.running.length + ' instances running';+ }+});++/*DEMO*/+}+ </script>+</div>+</article><!-- -->