Skip to content

armgit / anime

Public Imported from GitHub
0

JavaScript animation engine

Update documentation

Julian Garnier6f1ed20cc290
diff --git a/documentation/assets/js/documentation.js b/documentation/assets/js/documentation.js
index 6971561c..1ef28384 100644
--- a/documentation/assets/js/documentation.js
+++ b/documentation/assets/js/documentation.js
@@ -12,7 +12,7 @@ Split(['.code-pane-description', '.code-pane-js', '.code-pane-html'], {
direction: 'vertical',
gutterSize: 60,
snapOffset: 0,
- sizes: [58, 38, 4],
+ sizes: [68, 28, 4],
minSize: [60, 0, 0]
})
diff --git a/documentation/index.html b/documentation/index.html
index 24cfedb8..6510bb00 100644
--- a/documentation/index.html
+++ b/documentation/index.html
@@ -1099,26 +1099,24 @@ anime({
<h3 class="demo-title">Specific unit</h3>
<div class="demo-description">
<p>
- Force the animation to use a certain unit.
- </p>
- <p class="warning">
- <i>Anime</i> will not automatically convert units!<br>
- For example if the target initial value is <code>'100px'</code> and the animation end value is <code>'3rem'</code>, <code>'100px'</code> will be converted to <code>'100rem'</code>.
+ Force the animation to use a certain unit and will automatically convert the initial target value.
</p>
<p>
- If you need your animation to starts from a specific value, check out the <a href="#fromToValues" class="color-values">From To values</a> section.
+ You can also defines the initial value of the animation directly using an array, see <a href="#fromToValues" class="color-values">From To values</a> section.
</p>
</div>
<div class="demo-content specific-unit-values-demo">
- <div class="circle shadow"></div>
- <div class="circle el"></div>
+ <div class="square shadow"></div>
+ <div class="square el"></div>
</div>
<script>var specificUnitValue = function() {
/*DEMO*/
anime({
targets: '.specific-unit-values-demo .el',
- translateX: '20em', // -> from '0em' to '20em'
- rotate: '1.5turn' // -> from '0turn' to '20turn'
+ width: '100%', // -> from '28px' to '100%',
+ easing: 'easeInOutQuad',
+ direction: 'alternate',
+ loop: true
});
/*DEMO*/
}
@@ -1308,7 +1306,7 @@ anime({
Force the animation to starts at a specified value.
</p>
<p class="warning">
- Units must be identical for both values.
+ Units must be identical for both values (<code>['50%', '100%']</code>).
</p>
<table>
<thead>