import To from '../../src/index.js'

const ele = document.querySelector('#animateEle')

ele.onload = function(){

    To.get({ rotate: 0, x: 0, y: 0 })
    .to({ rotate: 720, x: 200, y: 200 }, 1600, To.easing.elasticInOut)
    .progress(function () {
        ele.style.transform = `translate(${this.x}px, ${this.y}px) rotate(${this.rotate}deg)`
    })
    .start()
}

ele.src = ele.src