Skip to content

Instantly share code, notes, and snippets.

@erin-dot-io
Last active August 29, 2015 14:04
Show Gist options
  • Save erin-dot-io/35be584ecf6018a594ea to your computer and use it in GitHub Desktop.
Save erin-dot-io/35be584ecf6018a594ea to your computer and use it in GitHub Desktop.
Volicty.js - custom UI Pack animations
// Softly bounce up from bottom of object's height and fade in
$.Velocity.RegisterUI('transition.flyUpIn', {
defaultDuration: 600,
calls: [
[{ translateY: [ 0, '100%' ]}, 1, { easing: [ .28,1.47,.48,.96 ] }]
]
});
// fade text up and in for erin.io hero section
$.Velocity.RegisterUI('transition.flyUpIn', {
defaultDuration: 400,
calls: [
[{ translateY: [ 0, '100px' ], opacity: 1}, 1, { easing: 'easeOutQuart' }]
]
});
// fade text left and out for erin.io hero section
$.Velocity.RegisterUI('transition.flyLeftOut', {
defaultDuration: 200,
calls: [
[{ translateX: [ '-200px', 0 ], opacity: 0}, 1, { easing: 'easeInQuint' }]
],
reset: { translateX: 0 }
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment