Skip to content

Instantly share code, notes, and snippets.

@humaan
Created May 14, 2014 07:59
Show Gist options
  • Save humaan/03adcbfbe74b4d64f14c to your computer and use it in GitHub Desktop.
Save humaan/03adcbfbe74b4d64f14c to your computer and use it in GitHub Desktop.
Extra Mask
//Create the additional mask shapes and apply to the group
parts.tent_mask = paper.path( paths.small_tent ).attr({
fill : '#fff'
});
logo_group.attr({
mask : parts.tent_mask
});
//Hover animations
$('#logo').hover(function(){
...
//Animate to the big tent mask
parts.tent_mask.animate({
path : paths.big_tent
}, 800, mina.elastic );
}, function(){
...
//Revert to the small tent mask
parts.tent_mask.animate({
path : paths.small_tent
}, 800, mina.elastic );
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment