diff --git a/README.md b/README.md index e69de29..94cb0a3 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,20 @@ +```sh +npm install hease +``` + +```ts +import { hease, EASE } from 'hease'; +// 播放,并注册相关事件 +const ani = hease(0, 1, 2000, EASE.linear) + .onUpdate((val) => { + console.log(val); + }) + .onComplate(() => { + console.log('动画播放完成'); + }) + .play(); +// 停止动画 +ani.stop(); +// 立即完成动画 +ani.complete(); +``` \ No newline at end of file diff --git a/package.json b/package.json index 1de9acf..9149264 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "hease", "private": false, - "version": "0.0.4", + "version": "0.1.0", "repository": "https://github.com/hxg2050/hease.git", "license": "MIT", "main": "./dist/index.cjs.js", diff --git a/src/hease.ts b/src/hease.ts index 052506e..c0f8029 100644 --- a/src/hease.ts +++ b/src/hease.ts @@ -28,7 +28,7 @@ class _Hease extends EE { * 目标状态 */ to() { - + } /** @@ -51,12 +51,12 @@ class _Hease extends EE { repeat() { } - + /** * 播放动画 */ play() { - + } /**