GithubHelp home page GithubHelp logo

ofxcindertimeline's Introduction

ofxCinderTimeline

ofxCinderTimeline is Cinder's Timeline animation engine packaged as an openFrameworks addon. The Timeline API allows for the sophisticated animation of arbitrary properties. It supports a large library of easing functions as well as custom easing, callbacks and fire-and-forget tween management. The add source is taken directly from Cinder 0.8.4 and unmodified (newer versions require not-yet-supported-by-openFrameworks C++11 and libc++). Timeline is based on the sc-Choreograph CinderBlock by David Wicks.

EXAMPLES

Basics - Take pos to (0,0) in 1 second using a quadratic easing curve. 0.125 seconds before the pos animation completes, begin to take radius to 3.0 in 5 seconds using the default linear easing.

ofxCinderTimeline::Anim<ofVec2f> pos = ofVec2f(10.0f, 10.0f);
ofxCinderTimeline::Anim<float> radius = 0.0f;
timeline().apply(&pos, ofVec2f::zero(), 1.0f, ofxCinderTimeline::EaseInQuad());
timeline().apply(&radius, 3.0f, 5.0f).appendTo(&pos, -0.125f);

Callbacks - After a 4 second delay, animate alpha from 1.0 to 0.0 in 2 seconds using the default linear easing. When complete, the callback method faded will be run.

ofxCinderTimeline::Anim<float> alpha;
timeline().apply(&alpha, 1.0f, 0.0f, 2.0f).delay(4.0f).finishFn(boost::bind(&ofApp::faded, this));

Cues - 5 seconds from now, run the callback method cueHit.

timeline().add(boost::bind(&ofApp::cueHit, this), timeline().getCurrentTime() + 5);

For more information, see the included example example-BasicTween, the RFC: Timeline (+ Boost 1.48) forum thread and the Timeline documentation from the Cinder library.

NOTES

Timeline requires Boost to compile. Download the 1.48 sources unarchive and move the resulting boost_1_48_0/boost into ofxCinderTimeline/libs. The ofxCinderTimeline addon requires that ofxCinderTimeline/libs and ofxCinderTimeline/libs/cinder/include are included in the header search path.

ALERT

While Boost is required, you may not want to add it to your project as there are 8,654 header files - it only needs to be within the header search path! Both the projectGenerator and OFPlugin blow up trying to use ofxCinderTimeline, possibly due to the number of Boost headers. Until that is resolved, you may wish to add ofxCinderTimeline to your project manually.

ofxcindertimeline's People

Contributors

pizthewiz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.