1.2.0 • Published 7 years ago

ease-animate v1.2.0

Weekly downloads
6
License
MIT
Repository
github
Last release
7 years ago

ease-animate

Build Status

A javascript ease animate library

Usage

install

npm install --save ease-animate

or

<script type="text/javascript" src='./dist/ease-animate.min.js'></script>

run

const animate = new Animate()

dom animate

animate.domAnimate({
  selector: '#ele',
  opts: {top: 200, left: 500},
  duration: 1000,
  onDone () {
    console.log('dom done')
  },
})

scrollbar animate

animate.scrollAnimate({
  targetValue: 0,
  duration: 1000,
  onDone () {
    console.log('scroll done')
  },
})

API

new Animate()

domAnimate()

void domAnimate(opts) dom animation

opts:

selector element selector

opts css attribute and value

[duration] default 500

[easing] ease type, default 'quadInOut'

scrollAnimate()

void animate.scrollAnimate(opts) scrollbar animation

opts:

position target position

[duration] default 500, ms

[easing] default 'circleInOut'

isScrolling

is scrolling

isDomRunning

is dom animating

easing

see ease-generator

demo

here

browser support

excluding ie8-

1.2.0

7 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago