Jump to content
Search Community

Animation isn't smooth cause some big loop must execute behind it/

Choody test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi!

 

I don't sure that my topic title is good enought to understand my problem. So i have 12 circle (draw with KineticJS), and when i choose one of the circle i execute TweenLite

TweenLite.to(this, 3, {kinetic:{opacity:0, scaleX:100, scaleY:100}, onComplete:addEvent, onCompleteParams:[this]});

And then behind this animation for one circle. I just hide other 11 circle and draw new 20 circle with some graviti loop, maybe it's little heavy. Cause of that heavy loop my animation have somethink like freez, I mean the bubble smoothy grow, grow, grow then little freezz (0.5 s) and after freez animation is smooth. Maybe it is method to do animation without this freez?

 

My sample code:


bubbleGroup.on('click', function(){


for(var i = 0; i < categoryBubbleTab.length; i++)
{
categoryBubbleTab[i].setScale(0);
}
//My animation with freez below
TweenLite.to(this, 3, {kinetic:{opacity:0, scaleX:100, scaleY:100}, onComplete:addEvent, onCompleteParams:[this]});


$.ajax({
url: 'getData.php',
data: {function: 'object', text: this.get('Text')[0].getText()},
type: 'post',
success: function(output) {
//Graviti code with n^2 loop 
//Some code
}
});
});
Link to comment
Share on other sites

Hi and welcome to the forums.

 

Very difficult to understand the problem without seeing an example. Does the animation freeze happen when the ajax() call is removed? Not really sure how that relates to your animation.

 

Please provide a codepen or jsfiddle example.

 

Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...