ComponentAnimator


#1

I’ve been using this (ComponentAnimator) a lot lately, and I made a handy class to make slotting it in easier. It’s called AnimatorUser, and all it does is give you an interface to an animator object; the trick is that it takes one as a parameter in the constructor, but if one isn’t provided it will make one for itself. This makes it easier to add other animated things without changing much.

I was going to suggest something similar to be in juce, but then I thought - why not just make a singleton instead? That would be a handy thing for juce, so you can just reach for an Animator::getInstance()->animateComponent(…) without fannying around.

What do you think? I’d do an example code here for you but i’m sure you already have the code for it in your head, so simple it is!


#2