I am working on a HTML application which runs in an embedded device. There is a GSAP animation using TweenLite. For performance improvement I would like to do some tweaks in the frame per second of the animation. For a smooth animation, I need a fps(40) and as soon as the animation is complete, I would like to change the fps to fps(0).
TweenLite.to($(element), 0, {
scale: 0.95,
opacity: 0,
onStart: function () {
TweenLite.ticker.fps(40);
},
onComplete: function () {
$(element).css("transform", "none");
done();
TweenLite.ticker.fps(0);
}
});
But the animation is always taking fps(0). onStart TweenLite.ticker.fps(40); is not working. In stead of onStart, I also tried it as below.
TweenLite.ticker.fps(40);
TweenLite.to($(element), 0, {
scale: 0.95,
opacity: 0,
onComplete: function () {
$(element).css("transform", "none");
done();
TweenLite.ticker.fps(0);
}
});
Anyone have some idea regarding this? Thanks in advance!