Created
May 27, 2012 04:18
-
-
Save kesne/2802167 to your computer and use it in GitHub Desktop.
Comprehensive overview of adding book transitions.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enyo.Book.transition({ | |
//Name of the transition: | |
name: "everything", | |
//Using this will set up the step function, automatically transitioning between values. | |
//If you don't set this as true, you're expected to provide your own step function. | |
auto: true, | |
//Set it up to use next/back animations. | |
directional: true, | |
//Set the easing function. The default is enyo.easing.quadInOut. You can also define your own easing function here. | |
easing: enyo.easing.quadInOut, | |
//Set up properties about the transition itself: | |
transition: { | |
//The duration, in ms, of the transition: | |
duration: 500, | |
next: { | |
//Some animations use different in/out transitions, so you can define them here. | |
//The book will automagically transition numerical values. | |
from: { | |
opacity: 0, | |
transform: { | |
scale: 0.7 | |
} | |
}, | |
visible: { | |
opacity: 1, | |
transform: { | |
scale: 1 | |
} | |
}, | |
out: { | |
opacity: 0, | |
transform: { | |
scale: 1.3 | |
} | |
} | |
//NOTE: If your "from" and "out" are the same, you can just give the property "hidden" the values. | |
}, | |
back: { | |
//You get the idea. | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment