Hi Guys,
I would like to trace the opacity / top / left attributes of an element during the Tween, how would i get the values the most effective way ?
I know that transform attributes are written on the element with the object tween.target._gsTransform however opacity, top and left attributes are not written within this object.
I would like to avoid to read on every update the css attribute and get values from there!
Something like this:
var t = TweenLite.fromTo("#box", 1, {
opacity: 0
}, {
opacity: 1,
onUpdate: getValue,
onUpdateParams: ["{self}"]
});
function getValue(tween) {
var element = tween.target;
/*jQuery('#trace').html("Trace:" + element._gsTransform.opacity);*/
}
Thanks a lot,
Krisztian from ThemePunch