Skip to content

armgit / anime

Public Imported from GitHub
0

JavaScript animation engine

Update state syntax example

Julian Garnierd0d87aac80fd
diff --git a/src/states-new-syntax.js b/src/states-new-syntax.js
index 4e25b1f1..492e79ea 100644
--- a/src/states-new-syntax.js
+++ b/src/states-new-syntax.js
@@ -1,20 +1,20 @@
-var animation = anime({
+var modal = anime({
targets: '.modal',
states: {
- closed: {
+ close: {
width: 100,
height: 100,
easing: 'easeInOutExpo'
},
- opened: {
- width: '100vw',
- height: '100vh'
+ open: {
+ width: 500,
+ height: 500
}
},
duration: 2000,
easing: 'easeOutExpo'
-})
+});
-animation.goTo('closed');
+modal.goTo('close');
-animation.animateTo('open');
\ No newline at end of file
+modal.animateTo('open');