Skip to content

Instantly share code, notes, and snippets.

@marekalgoud
Last active September 26, 2019 08:39
Show Gist options
  • Select an option

  • Save marekalgoud/233596e0c5f69945800cad14dbe93701 to your computer and use it in GitHub Desktop.

Select an option

Save marekalgoud/233596e0c5f69945800cad14dbe93701 to your computer and use it in GitHub Desktop.

Revisions

  1. marekalgoud revised this gist Sep 26, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion in.js
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ export default (targets) => {
    const opacity = 1
    const anim = anime.timeline({
    easing: 'easeInOutSine',
    1000
    duration: 1000
    })

    anim.add({
  2. marekalgoud created this gist Sep 26, 2019.
    21 changes: 21 additions & 0 deletions in.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    import anime from 'animejs/lib/anime.es.js'

    export default (targets) => {
    targets.style.opacity = 0
    targets.style.transform = 'translateY(100px)'

    const translateY = '0'
    const opacity = 1
    const anim = anime.timeline({
    easing: 'easeInOutSine',
    1000
    })

    anim.add({
    targets,
    opacity,
    translateY
    })

    return anim.finished
    }