Skip to content

Instantly share code, notes, and snippets.

@awt2542
Last active November 28, 2016 18:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save awt2542/f87877834469f95bb1d18915aa1af5e6 to your computer and use it in GitHub Desktop.
Save awt2542/f87877834469f95bb1d18915aa1af5e6 to your computer and use it in GitHub Desktop.
fadeIn = (nav, layerA, layerB, background) ->
layerA:
show: {opacity: 1, x: 0, y: 0}
hide: {opacity: 0, x: 0, y: 0}
layerB:
show: {opacity: 1, x: 0, y: 0}
hide: {opacity: 0, x: 0, y: 0}
zoomIn = (nav, layerA, layerB, background) ->
layerB:
show: {scale: 1, opacity: 1, x: 0, y: 0}
hide: {scale: 0.8, opacity: 0, x: 0, y: 0}
slideInRight = (nav, layerA, layerB, background) ->
layerB:
show: {x: 0, y: 0}
hide: {x: layerB.width, y: 0}
slideInLeft = (nav, layerA, layerB, background) ->
layerB:
show: {x: 0, y: 0}
hide: {x: -layerB.width, y: 0}
slideInUp = (nav, layerA, layerB, background) ->
layerB:
show: {y: 0, x: 0}
hide: {y: layerB.height, x: 0}
slideInDown = (nav, layerA, layerB, background) ->
layerB:
show: {y: 0, x: 0}
hide: {y: -layerB.height, x: 0}
moveInRight = (nav, layerA, layerB, background) ->
layerA:
hide: {x: -layerA.width, y: 0}
layerB:
show: {x: 0, y:0}
hide: {x: layerB.width, y: 0}
moveInLeft = (nav, layerA, layerB, background) ->
layerA:
hide: {x: layerA.width, y: 0}
layerB:
show: {x: 0, y: 0}
hide: {x: -layerB.width, y: 0}
moveInUp = (nav, layerA, layerB, background) ->
layerA:
hide: {y: -layerA.height, x:0}
layerB:
show: {y: 0, x:0}
hide: {y: layerB.height, x: 0}
moveInDown = (nav, layerA, layerB, background) ->
layerA:
hide: {y: layerA.height, x: 0}
layerB:
show: {y: 0, x:0}
hide: {y: -layerB.height, x:0}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment