Component Animator Jitter


#1

Hi all.

I am getting some nasty jitter when I use the ComponentAnimator Class. I am attempting to animate the positions of about 25 child components. These components are stored in an OwnedArray in a single parent component, which I loop through to animate each child component. The child components are to be animated from their current parent component to a destination parent component. Each parent component resides in a Juce DocumentWindow. In order to animate from the origin parent to destination parent, each component must first be added to the desktop, then animated across the desktop, and finally added to the destination parent component.

I have always been able to perform smooth animations when animating components within a parent component. It is when I take the extra step of animating from one component to the other that the animations get jittery.

Sending a feeler out to anybody who may have experienced jitter when animating components this way. Is there anything I should be aware of? Anyone experience anything similar and find a solution?

Below is some pseudo code:

OwnedArray modules;
int moduleIncr = 0;

for(int i = 0; i < modules.size(); i++)
{
moduleIncr++;
animateToDestination();
}

animateToDestination()
{
//1. add the component to the desktop
modules[moduleIncr].addToDesktop();

    //2. animate window to the desired screen location
     Rectangle<int> moveToRect(destinationX,  destinationY, module->getWidth(), module->getHeight());
    Desktop::getInstance().getAnimator().animateComponent (modules[moduleIncr], moveToRect, 1.0, 2000, false, 1.0, 1.0);

moduleIncr++;

}


#2

It sounds like moving between the desktop and a child component is bound to risk being a bit glitchy, because you’re at the mercy of the OS’s windowing system in terms of how the repaints happen at that point… Not sure what to suggest there…