1.0.3 • Published 4 years ago
@oyi/animation v1.0.3
animation
engine for easy animations
Steps for usage
npm i @oyi/animation -S
html
<div id="div">0</div>
javascript
import Animation form '@oyi/animation'
let div = document.getElementById('div')
let an = new Animation({x: 0}, {
duration: 2500,
delayTime: 1000,
cycle: 0
})
.to({x: 1000})
.onUpdate((data) => {
div.innerText = data.x
})
.start()