TweenLite different methods
TweenLite different Methods
const square = document.querySelector(".box1");
TweenLite.to(square, 1,{
backgroundColor : "red",
y : 200,
autoAlpha : 0
})
to = Change Element orginal state to that kept property state, i.e animating state
const square = document.querySelector(".box1");
TweenLite.from(square, 1,{
backgroundColor : "red",
y : 200,
autoAlpha : 0
})
from = Brings element from animating property to original state
const square = document.querySelector(".box1");
TweenLite.fromTo(square, 1,{
backgroundColor : "red",
y : 200,
autoAlpha : 0
},
{
backgroundColor: "pink",
y : -200,
autoAlpha: 1,
})
fromTo = Initializing initial and final position and animating according to user
Comments
Post a Comment