parabola
A parabola animation for the browser.
Installing
Using npm:
npm i parabola
Using cdn:
<script src="https://unpkg.com/parabola/index.js"></script>
Usage
... { const config = originX: 0 // 动画起始位置的left值 originY: 0 // 动画起始位置的top值 targetX: 300 // 动画目标位置的left值 targetY: 600 // 动画目标位置的top值 duration: 1000 // [可选]动画持续时间 a: 0005 // [可选]抛物线参数 vertical: true // [可选]是否为竖向 callback: thisupdateLocation // 每一帧动画结束回调,接受x,y两个参数 done: thisanimationDone // [可选]动画结束回调 }...