Set of classes that help setup very simple animations, with curves, repeat modes and barebones scheduling.
C++
Latest commit b9e3a24 Jan 6, 2017 @armadillu expose anim direction
Permalink
Failed to load latest commit information.
ExampleAnimationQueue
ExampleCurveParameters/src some cleanup, add inverse info for new curves, shuffle of ENUM order … Jan 4, 2017
example
src
ReadMe.md
install.xml add install.xml Oct 15, 2012
ofxaddons_thumbnail.png

ReadMe.md

Set of classes that to set up very simple animations, with curves, repeat modes and scheduling. As of now, you can animate ofPoints, ofColors and floats.

Let's see how to make a value animate indefinitely between two positions, with an EaseInEaseOut curve.

ofxAnimatableFloat  anim;

setup(){        

    //set initial position
    anim.reset( 0.0f );

    //set repeating style
    anim.setRepeatType(LOOP_BACK_AND_FORTH);

    //set animation curve
    anim.setCurve(EASE_IN_EASE_OUT);

    //start the animation, go from current val to the specified val
    anim.animateTo( 1.0f );

}

update(){
    //update with App timebase (60 fps)
    pointAnim.update( 1.0f/60.0f );
}

Includes basic tweening curves, and customizable ones found here and here; also includes Google's Swift Out curve.

ofxAnimatable screenshot

see big

LICENSE

ofxAnimatable is made available under the MIT license.