📹 Video
- 🤔TweenMax.from docs
- Very similar to the TweenMax.to() used before, except the properties will be where the animation starts, and its current position will be where it ends.
document.addEventListener('click', event => {
const { x, y } = event
TweenMax.fromTo('#box', 1, { x, y })
})
- 🤔TweenMax.fromTo docs
- Same as the .from() except a fourth argument sets where the animation will end.
document.addEventListener('click', event => {
const { x, y } = event
TweenMax.fromTo('#box', 1, { x, y }, { x: 200, y: 200 })
})