0.1.0 • Published 5 years ago

@xg4/motion v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

Motion

Build Status npm npm

Installation

Install with npm or Yarn

# npm
$ npm install @xg4/motion --save
# yarn
$ yarn add @xg4/motion

Usage

import { move } from '@xg4/motion'
import { easeInOutCubic } from '@xg4/easings'

move(handler, {
  from: 0,
  to: 100,
  duration: 3000,
  ease: easeInOutCubic
})

function handler(value) {
  // value (0~100)
  console.log(value)
}

Move Options

nametypedefaultdescription
fromnumber0起始值
tonumber0结束值
durationnumber450运动持续时间
easefunctioneaseInOutCubic缓动函数
countnumber1运动次数
reversebooleanfalse反复运动时,是否反转

Contributing

Welcome

  • Fork it

  • Submit pull request

LICENSE

MIT

0.1.0

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago